• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.google.cloud.channel.v1;
18 
19 import com.google.api.core.ApiFuture;
20 import com.google.api.core.ApiFutures;
21 import com.google.api.core.BetaApi;
22 import com.google.api.gax.core.BackgroundResource;
23 import com.google.api.gax.httpjson.longrunning.OperationsClient;
24 import com.google.api.gax.longrunning.OperationFuture;
25 import com.google.api.gax.paging.AbstractFixedSizeCollection;
26 import com.google.api.gax.paging.AbstractPage;
27 import com.google.api.gax.paging.AbstractPagedListResponse;
28 import com.google.api.gax.rpc.OperationCallable;
29 import com.google.api.gax.rpc.PageContext;
30 import com.google.api.gax.rpc.UnaryCallable;
31 import com.google.cloud.channel.v1.stub.CloudChannelServiceStub;
32 import com.google.cloud.channel.v1.stub.CloudChannelServiceStubSettings;
33 import com.google.common.util.concurrent.MoreExecutors;
34 import com.google.longrunning.Operation;
35 import com.google.protobuf.Empty;
36 import java.io.IOException;
37 import java.util.List;
38 import java.util.concurrent.TimeUnit;
39 import javax.annotation.Generated;
40 
41 // AUTO-GENERATED DOCUMENTATION AND CLASS.
42 /**
43  * Service Description: CloudChannelService lets Google cloud resellers and distributors manage
44  * their customers, channel partners, entitlements, and reports.
45  *
46  * <p>Using this service: 1. Resellers and distributors can manage a customer entity. 2.
47  * Distributors can register an authorized reseller in their channel and provide them with delegated
48  * admin access. 3. Resellers and distributors can manage customer entitlements.
49  *
50  * <p>CloudChannelService exposes the following resources: -
51  * [Customer][google.cloud.channel.v1.Customer]s: An entity-usually an enterprise-managed by a
52  * reseller or distributor.
53  *
54  * <p>- [Entitlement][google.cloud.channel.v1.Entitlement]s: An entity that provides a customer with
55  * the means to use a service. Entitlements are created or updated as a result of a successful
56  * fulfillment.
57  *
58  * <p>- [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s: An entity that identifies
59  * links between distributors and their indirect resellers in a channel.
60  *
61  * <p>This class provides the ability to make remote calls to the backing service through method
62  * calls that map to API methods. Sample code to get started:
63  *
64  * <pre>{@code
65  * // This snippet has been automatically generated and should be regarded as a code template only.
66  * // It will require modifications to work:
67  * // - It may require correct/in-range values for request initialization.
68  * // - It may require specifying regional endpoints when creating the service client as shown in
69  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
70  * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
71  *   CustomerName name = CustomerName.of("[ACCOUNT]", "[CUSTOMER]");
72  *   Customer response = cloudChannelServiceClient.getCustomer(name);
73  * }
74  * }</pre>
75  *
76  * <p>Note: close() needs to be called on the CloudChannelServiceClient object to clean up resources
77  * such as threads. In the example above, try-with-resources is used, which automatically calls
78  * close().
79  *
80  * <p>The surface of this class includes several types of Java methods for each of the API's
81  * methods:
82  *
83  * <ol>
84  *   <li>A "flattened" method. With this type of method, the fields of the request type have been
85  *       converted into function parameters. It may be the case that not all fields are available as
86  *       parameters, and not every API method will have a flattened method entry point.
87  *   <li>A "request object" method. This type of method only takes one parameter, a request object,
88  *       which must be constructed before the call. Not every API method will have a request object
89  *       method.
90  *   <li>A "callable" method. This type of method takes no parameters and returns an immutable API
91  *       callable object, which can be used to initiate calls to the service.
92  * </ol>
93  *
94  * <p>See the individual methods for example code.
95  *
96  * <p>Many parameters require resource names to be formatted in a particular way. To assist with
97  * these names, this class includes a format method for each type of name, and additionally a parse
98  * method to extract the individual identifiers contained within names that are returned.
99  *
100  * <p>This class can be customized by passing in a custom instance of CloudChannelServiceSettings to
101  * create(). For example:
102  *
103  * <p>To customize credentials:
104  *
105  * <pre>{@code
106  * // This snippet has been automatically generated and should be regarded as a code template only.
107  * // It will require modifications to work:
108  * // - It may require correct/in-range values for request initialization.
109  * // - It may require specifying regional endpoints when creating the service client as shown in
110  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
111  * CloudChannelServiceSettings cloudChannelServiceSettings =
112  *     CloudChannelServiceSettings.newBuilder()
113  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
114  *         .build();
115  * CloudChannelServiceClient cloudChannelServiceClient =
116  *     CloudChannelServiceClient.create(cloudChannelServiceSettings);
117  * }</pre>
118  *
119  * <p>To customize the endpoint:
120  *
121  * <pre>{@code
122  * // This snippet has been automatically generated and should be regarded as a code template only.
123  * // It will require modifications to work:
124  * // - It may require correct/in-range values for request initialization.
125  * // - It may require specifying regional endpoints when creating the service client as shown in
126  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
127  * CloudChannelServiceSettings cloudChannelServiceSettings =
128  *     CloudChannelServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
129  * CloudChannelServiceClient cloudChannelServiceClient =
130  *     CloudChannelServiceClient.create(cloudChannelServiceSettings);
131  * }</pre>
132  *
133  * <p>To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
134  * the wire:
135  *
136  * <pre>{@code
137  * // This snippet has been automatically generated and should be regarded as a code template only.
138  * // It will require modifications to work:
139  * // - It may require correct/in-range values for request initialization.
140  * // - It may require specifying regional endpoints when creating the service client as shown in
141  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
142  * CloudChannelServiceSettings cloudChannelServiceSettings =
143  *     CloudChannelServiceSettings.newHttpJsonBuilder().build();
144  * CloudChannelServiceClient cloudChannelServiceClient =
145  *     CloudChannelServiceClient.create(cloudChannelServiceSettings);
146  * }</pre>
147  *
148  * <p>Please refer to the GitHub repository's samples for more quickstart code snippets.
149  */
150 @Generated("by gapic-generator-java")
151 public class CloudChannelServiceClient implements BackgroundResource {
152   private final CloudChannelServiceSettings settings;
153   private final CloudChannelServiceStub stub;
154   private final OperationsClient httpJsonOperationsClient;
155   private final com.google.longrunning.OperationsClient operationsClient;
156 
157   /** Constructs an instance of CloudChannelServiceClient with default settings. */
create()158   public static final CloudChannelServiceClient create() throws IOException {
159     return create(CloudChannelServiceSettings.newBuilder().build());
160   }
161 
162   /**
163    * Constructs an instance of CloudChannelServiceClient, using the given settings. The channels are
164    * created based on the settings passed in, or defaults for any settings that are not set.
165    */
create(CloudChannelServiceSettings settings)166   public static final CloudChannelServiceClient create(CloudChannelServiceSettings settings)
167       throws IOException {
168     return new CloudChannelServiceClient(settings);
169   }
170 
171   /**
172    * Constructs an instance of CloudChannelServiceClient, using the given stub for making calls.
173    * This is for advanced usage - prefer using create(CloudChannelServiceSettings).
174    */
create(CloudChannelServiceStub stub)175   public static final CloudChannelServiceClient create(CloudChannelServiceStub stub) {
176     return new CloudChannelServiceClient(stub);
177   }
178 
179   /**
180    * Constructs an instance of CloudChannelServiceClient, using the given settings. This is
181    * protected so that it is easy to make a subclass, but otherwise, the static factory methods
182    * should be preferred.
183    */
CloudChannelServiceClient(CloudChannelServiceSettings settings)184   protected CloudChannelServiceClient(CloudChannelServiceSettings settings) throws IOException {
185     this.settings = settings;
186     this.stub = ((CloudChannelServiceStubSettings) settings.getStubSettings()).createStub();
187     this.operationsClient =
188         com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
189     this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
190   }
191 
CloudChannelServiceClient(CloudChannelServiceStub stub)192   protected CloudChannelServiceClient(CloudChannelServiceStub stub) {
193     this.settings = null;
194     this.stub = stub;
195     this.operationsClient =
196         com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
197     this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
198   }
199 
getSettings()200   public final CloudChannelServiceSettings getSettings() {
201     return settings;
202   }
203 
getStub()204   public CloudChannelServiceStub getStub() {
205     return stub;
206   }
207 
208   /**
209    * Returns the OperationsClient that can be used to query the status of a long-running operation
210    * returned by another API method call.
211    */
getOperationsClient()212   public final com.google.longrunning.OperationsClient getOperationsClient() {
213     return operationsClient;
214   }
215 
216   /**
217    * Returns the OperationsClient that can be used to query the status of a long-running operation
218    * returned by another API method call.
219    */
220   @BetaApi
getHttpJsonOperationsClient()221   public final OperationsClient getHttpJsonOperationsClient() {
222     return httpJsonOperationsClient;
223   }
224 
225   // AUTO-GENERATED DOCUMENTATION AND METHOD.
226   /**
227    * List [Customer][google.cloud.channel.v1.Customer]s.
228    *
229    * <p>Possible error codes:
230    *
231    * <ul>
232    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
233    *       account in the API request.
234    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
235    * </ul>
236    *
237    * <p>Return value: List of [Customer][google.cloud.channel.v1.Customer]s, or an empty list if
238    * there are no customers.
239    *
240    * <p>Sample code:
241    *
242    * <pre>{@code
243    * // This snippet has been automatically generated and should be regarded as a code template only.
244    * // It will require modifications to work:
245    * // - It may require correct/in-range values for request initialization.
246    * // - It may require specifying regional endpoints when creating the service client as shown in
247    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
248    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
249    *   ListCustomersRequest request =
250    *       ListCustomersRequest.newBuilder()
251    *           .setParent("parent-995424086")
252    *           .setPageSize(883849137)
253    *           .setPageToken("pageToken873572522")
254    *           .setFilter("filter-1274492040")
255    *           .build();
256    *   for (Customer element : cloudChannelServiceClient.listCustomers(request).iterateAll()) {
257    *     // doThingsWith(element);
258    *   }
259    * }
260    * }</pre>
261    *
262    * @param request The request object containing all of the parameters for the API call.
263    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
264    */
listCustomers(ListCustomersRequest request)265   public final ListCustomersPagedResponse listCustomers(ListCustomersRequest request) {
266     return listCustomersPagedCallable().call(request);
267   }
268 
269   // AUTO-GENERATED DOCUMENTATION AND METHOD.
270   /**
271    * List [Customer][google.cloud.channel.v1.Customer]s.
272    *
273    * <p>Possible error codes:
274    *
275    * <ul>
276    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
277    *       account in the API request.
278    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
279    * </ul>
280    *
281    * <p>Return value: List of [Customer][google.cloud.channel.v1.Customer]s, or an empty list if
282    * there are no customers.
283    *
284    * <p>Sample code:
285    *
286    * <pre>{@code
287    * // This snippet has been automatically generated and should be regarded as a code template only.
288    * // It will require modifications to work:
289    * // - It may require correct/in-range values for request initialization.
290    * // - It may require specifying regional endpoints when creating the service client as shown in
291    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
292    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
293    *   ListCustomersRequest request =
294    *       ListCustomersRequest.newBuilder()
295    *           .setParent("parent-995424086")
296    *           .setPageSize(883849137)
297    *           .setPageToken("pageToken873572522")
298    *           .setFilter("filter-1274492040")
299    *           .build();
300    *   ApiFuture<Customer> future =
301    *       cloudChannelServiceClient.listCustomersPagedCallable().futureCall(request);
302    *   // Do something.
303    *   for (Customer element : future.get().iterateAll()) {
304    *     // doThingsWith(element);
305    *   }
306    * }
307    * }</pre>
308    */
309   public final UnaryCallable<ListCustomersRequest, ListCustomersPagedResponse>
listCustomersPagedCallable()310       listCustomersPagedCallable() {
311     return stub.listCustomersPagedCallable();
312   }
313 
314   // AUTO-GENERATED DOCUMENTATION AND METHOD.
315   /**
316    * List [Customer][google.cloud.channel.v1.Customer]s.
317    *
318    * <p>Possible error codes:
319    *
320    * <ul>
321    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
322    *       account in the API request.
323    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
324    * </ul>
325    *
326    * <p>Return value: List of [Customer][google.cloud.channel.v1.Customer]s, or an empty list if
327    * there are no customers.
328    *
329    * <p>Sample code:
330    *
331    * <pre>{@code
332    * // This snippet has been automatically generated and should be regarded as a code template only.
333    * // It will require modifications to work:
334    * // - It may require correct/in-range values for request initialization.
335    * // - It may require specifying regional endpoints when creating the service client as shown in
336    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
337    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
338    *   ListCustomersRequest request =
339    *       ListCustomersRequest.newBuilder()
340    *           .setParent("parent-995424086")
341    *           .setPageSize(883849137)
342    *           .setPageToken("pageToken873572522")
343    *           .setFilter("filter-1274492040")
344    *           .build();
345    *   while (true) {
346    *     ListCustomersResponse response =
347    *         cloudChannelServiceClient.listCustomersCallable().call(request);
348    *     for (Customer element : response.getCustomersList()) {
349    *       // doThingsWith(element);
350    *     }
351    *     String nextPageToken = response.getNextPageToken();
352    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
353    *       request = request.toBuilder().setPageToken(nextPageToken).build();
354    *     } else {
355    *       break;
356    *     }
357    *   }
358    * }
359    * }</pre>
360    */
listCustomersCallable()361   public final UnaryCallable<ListCustomersRequest, ListCustomersResponse> listCustomersCallable() {
362     return stub.listCustomersCallable();
363   }
364 
365   // AUTO-GENERATED DOCUMENTATION AND METHOD.
366   /**
367    * Returns the requested [Customer][google.cloud.channel.v1.Customer] resource.
368    *
369    * <p>Possible error codes:
370    *
371    * <ul>
372    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
373    *       account in the API request.
374    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
375    *   <li>NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name
376    *       parameter.
377    * </ul>
378    *
379    * <p>Return value: The [Customer][google.cloud.channel.v1.Customer] resource.
380    *
381    * <p>Sample code:
382    *
383    * <pre>{@code
384    * // This snippet has been automatically generated and should be regarded as a code template only.
385    * // It will require modifications to work:
386    * // - It may require correct/in-range values for request initialization.
387    * // - It may require specifying regional endpoints when creating the service client as shown in
388    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
389    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
390    *   CustomerName name = CustomerName.of("[ACCOUNT]", "[CUSTOMER]");
391    *   Customer response = cloudChannelServiceClient.getCustomer(name);
392    * }
393    * }</pre>
394    *
395    * @param name Required. The resource name of the customer to retrieve. Name uses the format:
396    *     accounts/{account_id}/customers/{customer_id}
397    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
398    */
getCustomer(CustomerName name)399   public final Customer getCustomer(CustomerName name) {
400     GetCustomerRequest request =
401         GetCustomerRequest.newBuilder().setName(name == null ? null : name.toString()).build();
402     return getCustomer(request);
403   }
404 
405   // AUTO-GENERATED DOCUMENTATION AND METHOD.
406   /**
407    * Returns the requested [Customer][google.cloud.channel.v1.Customer] resource.
408    *
409    * <p>Possible error codes:
410    *
411    * <ul>
412    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
413    *       account in the API request.
414    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
415    *   <li>NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name
416    *       parameter.
417    * </ul>
418    *
419    * <p>Return value: The [Customer][google.cloud.channel.v1.Customer] resource.
420    *
421    * <p>Sample code:
422    *
423    * <pre>{@code
424    * // This snippet has been automatically generated and should be regarded as a code template only.
425    * // It will require modifications to work:
426    * // - It may require correct/in-range values for request initialization.
427    * // - It may require specifying regional endpoints when creating the service client as shown in
428    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
429    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
430    *   String name = CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString();
431    *   Customer response = cloudChannelServiceClient.getCustomer(name);
432    * }
433    * }</pre>
434    *
435    * @param name Required. The resource name of the customer to retrieve. Name uses the format:
436    *     accounts/{account_id}/customers/{customer_id}
437    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
438    */
getCustomer(String name)439   public final Customer getCustomer(String name) {
440     GetCustomerRequest request = GetCustomerRequest.newBuilder().setName(name).build();
441     return getCustomer(request);
442   }
443 
444   // AUTO-GENERATED DOCUMENTATION AND METHOD.
445   /**
446    * Returns the requested [Customer][google.cloud.channel.v1.Customer] resource.
447    *
448    * <p>Possible error codes:
449    *
450    * <ul>
451    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
452    *       account in the API request.
453    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
454    *   <li>NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name
455    *       parameter.
456    * </ul>
457    *
458    * <p>Return value: The [Customer][google.cloud.channel.v1.Customer] resource.
459    *
460    * <p>Sample code:
461    *
462    * <pre>{@code
463    * // This snippet has been automatically generated and should be regarded as a code template only.
464    * // It will require modifications to work:
465    * // - It may require correct/in-range values for request initialization.
466    * // - It may require specifying regional endpoints when creating the service client as shown in
467    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
468    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
469    *   GetCustomerRequest request =
470    *       GetCustomerRequest.newBuilder()
471    *           .setName(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
472    *           .build();
473    *   Customer response = cloudChannelServiceClient.getCustomer(request);
474    * }
475    * }</pre>
476    *
477    * @param request The request object containing all of the parameters for the API call.
478    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
479    */
getCustomer(GetCustomerRequest request)480   public final Customer getCustomer(GetCustomerRequest request) {
481     return getCustomerCallable().call(request);
482   }
483 
484   // AUTO-GENERATED DOCUMENTATION AND METHOD.
485   /**
486    * Returns the requested [Customer][google.cloud.channel.v1.Customer] resource.
487    *
488    * <p>Possible error codes:
489    *
490    * <ul>
491    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
492    *       account in the API request.
493    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
494    *   <li>NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name
495    *       parameter.
496    * </ul>
497    *
498    * <p>Return value: The [Customer][google.cloud.channel.v1.Customer] resource.
499    *
500    * <p>Sample code:
501    *
502    * <pre>{@code
503    * // This snippet has been automatically generated and should be regarded as a code template only.
504    * // It will require modifications to work:
505    * // - It may require correct/in-range values for request initialization.
506    * // - It may require specifying regional endpoints when creating the service client as shown in
507    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
508    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
509    *   GetCustomerRequest request =
510    *       GetCustomerRequest.newBuilder()
511    *           .setName(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
512    *           .build();
513    *   ApiFuture<Customer> future =
514    *       cloudChannelServiceClient.getCustomerCallable().futureCall(request);
515    *   // Do something.
516    *   Customer response = future.get();
517    * }
518    * }</pre>
519    */
getCustomerCallable()520   public final UnaryCallable<GetCustomerRequest, Customer> getCustomerCallable() {
521     return stub.getCustomerCallable();
522   }
523 
524   // AUTO-GENERATED DOCUMENTATION AND METHOD.
525   /**
526    * Confirms the existence of Cloud Identity accounts based on the domain and if the Cloud Identity
527    * accounts are owned by the reseller.
528    *
529    * <p>Possible error codes:
530    *
531    * <ul>
532    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
533    *       account in the API request.
534    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
535    *   <li>INVALID_VALUE: Invalid domain value in the request.
536    * </ul>
537    *
538    * <p>Return value: A list of
539    * [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources
540    * for the domain (may be empty)
541    *
542    * <p>Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if no
543    * [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources
544    * match the domain.
545    *
546    * <p>Sample code:
547    *
548    * <pre>{@code
549    * // This snippet has been automatically generated and should be regarded as a code template only.
550    * // It will require modifications to work:
551    * // - It may require correct/in-range values for request initialization.
552    * // - It may require specifying regional endpoints when creating the service client as shown in
553    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
554    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
555    *   CheckCloudIdentityAccountsExistRequest request =
556    *       CheckCloudIdentityAccountsExistRequest.newBuilder()
557    *           .setParent("parent-995424086")
558    *           .setDomain("domain-1326197564")
559    *           .build();
560    *   CheckCloudIdentityAccountsExistResponse response =
561    *       cloudChannelServiceClient.checkCloudIdentityAccountsExist(request);
562    * }
563    * }</pre>
564    *
565    * @param request The request object containing all of the parameters for the API call.
566    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
567    */
checkCloudIdentityAccountsExist( CheckCloudIdentityAccountsExistRequest request)568   public final CheckCloudIdentityAccountsExistResponse checkCloudIdentityAccountsExist(
569       CheckCloudIdentityAccountsExistRequest request) {
570     return checkCloudIdentityAccountsExistCallable().call(request);
571   }
572 
573   // AUTO-GENERATED DOCUMENTATION AND METHOD.
574   /**
575    * Confirms the existence of Cloud Identity accounts based on the domain and if the Cloud Identity
576    * accounts are owned by the reseller.
577    *
578    * <p>Possible error codes:
579    *
580    * <ul>
581    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
582    *       account in the API request.
583    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
584    *   <li>INVALID_VALUE: Invalid domain value in the request.
585    * </ul>
586    *
587    * <p>Return value: A list of
588    * [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources
589    * for the domain (may be empty)
590    *
591    * <p>Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if no
592    * [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources
593    * match the domain.
594    *
595    * <p>Sample code:
596    *
597    * <pre>{@code
598    * // This snippet has been automatically generated and should be regarded as a code template only.
599    * // It will require modifications to work:
600    * // - It may require correct/in-range values for request initialization.
601    * // - It may require specifying regional endpoints when creating the service client as shown in
602    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
603    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
604    *   CheckCloudIdentityAccountsExistRequest request =
605    *       CheckCloudIdentityAccountsExistRequest.newBuilder()
606    *           .setParent("parent-995424086")
607    *           .setDomain("domain-1326197564")
608    *           .build();
609    *   ApiFuture<CheckCloudIdentityAccountsExistResponse> future =
610    *       cloudChannelServiceClient.checkCloudIdentityAccountsExistCallable().futureCall(request);
611    *   // Do something.
612    *   CheckCloudIdentityAccountsExistResponse response = future.get();
613    * }
614    * }</pre>
615    */
616   public final UnaryCallable<
617           CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse>
checkCloudIdentityAccountsExistCallable()618       checkCloudIdentityAccountsExistCallable() {
619     return stub.checkCloudIdentityAccountsExistCallable();
620   }
621 
622   // AUTO-GENERATED DOCUMENTATION AND METHOD.
623   /**
624    * Creates a new [Customer][google.cloud.channel.v1.Customer] resource under the reseller or
625    * distributor account.
626    *
627    * <p>Possible error codes:
628    *
629    * <ul>
630    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
631    *       account in the API request.
632    *   <li>INVALID_ARGUMENT: &#42; Required request parameters are missing or invalid. &#42; Domain
633    *       field value doesn't match the primary email domain.
634    * </ul>
635    *
636    * <p>Return value: The newly created [Customer][google.cloud.channel.v1.Customer] resource.
637    *
638    * <p>Sample code:
639    *
640    * <pre>{@code
641    * // This snippet has been automatically generated and should be regarded as a code template only.
642    * // It will require modifications to work:
643    * // - It may require correct/in-range values for request initialization.
644    * // - It may require specifying regional endpoints when creating the service client as shown in
645    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
646    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
647    *   CreateCustomerRequest request =
648    *       CreateCustomerRequest.newBuilder()
649    *           .setParent("parent-995424086")
650    *           .setCustomer(Customer.newBuilder().build())
651    *           .build();
652    *   Customer response = cloudChannelServiceClient.createCustomer(request);
653    * }
654    * }</pre>
655    *
656    * @param request The request object containing all of the parameters for the API call.
657    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
658    */
createCustomer(CreateCustomerRequest request)659   public final Customer createCustomer(CreateCustomerRequest request) {
660     return createCustomerCallable().call(request);
661   }
662 
663   // AUTO-GENERATED DOCUMENTATION AND METHOD.
664   /**
665    * Creates a new [Customer][google.cloud.channel.v1.Customer] resource under the reseller or
666    * distributor account.
667    *
668    * <p>Possible error codes:
669    *
670    * <ul>
671    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
672    *       account in the API request.
673    *   <li>INVALID_ARGUMENT: &#42; Required request parameters are missing or invalid. &#42; Domain
674    *       field value doesn't match the primary email domain.
675    * </ul>
676    *
677    * <p>Return value: The newly created [Customer][google.cloud.channel.v1.Customer] resource.
678    *
679    * <p>Sample code:
680    *
681    * <pre>{@code
682    * // This snippet has been automatically generated and should be regarded as a code template only.
683    * // It will require modifications to work:
684    * // - It may require correct/in-range values for request initialization.
685    * // - It may require specifying regional endpoints when creating the service client as shown in
686    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
687    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
688    *   CreateCustomerRequest request =
689    *       CreateCustomerRequest.newBuilder()
690    *           .setParent("parent-995424086")
691    *           .setCustomer(Customer.newBuilder().build())
692    *           .build();
693    *   ApiFuture<Customer> future =
694    *       cloudChannelServiceClient.createCustomerCallable().futureCall(request);
695    *   // Do something.
696    *   Customer response = future.get();
697    * }
698    * }</pre>
699    */
createCustomerCallable()700   public final UnaryCallable<CreateCustomerRequest, Customer> createCustomerCallable() {
701     return stub.createCustomerCallable();
702   }
703 
704   // AUTO-GENERATED DOCUMENTATION AND METHOD.
705   /**
706    * Updates an existing [Customer][google.cloud.channel.v1.Customer] resource for the reseller or
707    * distributor.
708    *
709    * <p>Possible error codes:
710    *
711    * <ul>
712    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
713    *       account in the API request.
714    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
715    *   <li>NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name in
716    *       the request.
717    * </ul>
718    *
719    * <p>Return value: The updated [Customer][google.cloud.channel.v1.Customer] resource.
720    *
721    * <p>Sample code:
722    *
723    * <pre>{@code
724    * // This snippet has been automatically generated and should be regarded as a code template only.
725    * // It will require modifications to work:
726    * // - It may require correct/in-range values for request initialization.
727    * // - It may require specifying regional endpoints when creating the service client as shown in
728    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
729    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
730    *   UpdateCustomerRequest request =
731    *       UpdateCustomerRequest.newBuilder()
732    *           .setCustomer(Customer.newBuilder().build())
733    *           .setUpdateMask(FieldMask.newBuilder().build())
734    *           .build();
735    *   Customer response = cloudChannelServiceClient.updateCustomer(request);
736    * }
737    * }</pre>
738    *
739    * @param request The request object containing all of the parameters for the API call.
740    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
741    */
updateCustomer(UpdateCustomerRequest request)742   public final Customer updateCustomer(UpdateCustomerRequest request) {
743     return updateCustomerCallable().call(request);
744   }
745 
746   // AUTO-GENERATED DOCUMENTATION AND METHOD.
747   /**
748    * Updates an existing [Customer][google.cloud.channel.v1.Customer] resource for the reseller or
749    * distributor.
750    *
751    * <p>Possible error codes:
752    *
753    * <ul>
754    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
755    *       account in the API request.
756    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
757    *   <li>NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name in
758    *       the request.
759    * </ul>
760    *
761    * <p>Return value: The updated [Customer][google.cloud.channel.v1.Customer] resource.
762    *
763    * <p>Sample code:
764    *
765    * <pre>{@code
766    * // This snippet has been automatically generated and should be regarded as a code template only.
767    * // It will require modifications to work:
768    * // - It may require correct/in-range values for request initialization.
769    * // - It may require specifying regional endpoints when creating the service client as shown in
770    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
771    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
772    *   UpdateCustomerRequest request =
773    *       UpdateCustomerRequest.newBuilder()
774    *           .setCustomer(Customer.newBuilder().build())
775    *           .setUpdateMask(FieldMask.newBuilder().build())
776    *           .build();
777    *   ApiFuture<Customer> future =
778    *       cloudChannelServiceClient.updateCustomerCallable().futureCall(request);
779    *   // Do something.
780    *   Customer response = future.get();
781    * }
782    * }</pre>
783    */
updateCustomerCallable()784   public final UnaryCallable<UpdateCustomerRequest, Customer> updateCustomerCallable() {
785     return stub.updateCustomerCallable();
786   }
787 
788   // AUTO-GENERATED DOCUMENTATION AND METHOD.
789   /**
790    * Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently.
791    *
792    * <p>Possible error codes:
793    *
794    * <ul>
795    *   <li>PERMISSION_DENIED: The account making the request does not own this customer.
796    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
797    *   <li>FAILED_PRECONDITION: The customer has existing entitlements.
798    *   <li>NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name in
799    *       the request.
800    * </ul>
801    *
802    * <p>Sample code:
803    *
804    * <pre>{@code
805    * // This snippet has been automatically generated and should be regarded as a code template only.
806    * // It will require modifications to work:
807    * // - It may require correct/in-range values for request initialization.
808    * // - It may require specifying regional endpoints when creating the service client as shown in
809    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
810    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
811    *   CustomerName name = CustomerName.of("[ACCOUNT]", "[CUSTOMER]");
812    *   cloudChannelServiceClient.deleteCustomer(name);
813    * }
814    * }</pre>
815    *
816    * @param name Required. The resource name of the customer to delete.
817    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
818    */
deleteCustomer(CustomerName name)819   public final void deleteCustomer(CustomerName name) {
820     DeleteCustomerRequest request =
821         DeleteCustomerRequest.newBuilder().setName(name == null ? null : name.toString()).build();
822     deleteCustomer(request);
823   }
824 
825   // AUTO-GENERATED DOCUMENTATION AND METHOD.
826   /**
827    * Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently.
828    *
829    * <p>Possible error codes:
830    *
831    * <ul>
832    *   <li>PERMISSION_DENIED: The account making the request does not own this customer.
833    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
834    *   <li>FAILED_PRECONDITION: The customer has existing entitlements.
835    *   <li>NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name in
836    *       the request.
837    * </ul>
838    *
839    * <p>Sample code:
840    *
841    * <pre>{@code
842    * // This snippet has been automatically generated and should be regarded as a code template only.
843    * // It will require modifications to work:
844    * // - It may require correct/in-range values for request initialization.
845    * // - It may require specifying regional endpoints when creating the service client as shown in
846    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
847    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
848    *   String name = CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString();
849    *   cloudChannelServiceClient.deleteCustomer(name);
850    * }
851    * }</pre>
852    *
853    * @param name Required. The resource name of the customer to delete.
854    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
855    */
deleteCustomer(String name)856   public final void deleteCustomer(String name) {
857     DeleteCustomerRequest request = DeleteCustomerRequest.newBuilder().setName(name).build();
858     deleteCustomer(request);
859   }
860 
861   // AUTO-GENERATED DOCUMENTATION AND METHOD.
862   /**
863    * Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently.
864    *
865    * <p>Possible error codes:
866    *
867    * <ul>
868    *   <li>PERMISSION_DENIED: The account making the request does not own this customer.
869    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
870    *   <li>FAILED_PRECONDITION: The customer has existing entitlements.
871    *   <li>NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name in
872    *       the request.
873    * </ul>
874    *
875    * <p>Sample code:
876    *
877    * <pre>{@code
878    * // This snippet has been automatically generated and should be regarded as a code template only.
879    * // It will require modifications to work:
880    * // - It may require correct/in-range values for request initialization.
881    * // - It may require specifying regional endpoints when creating the service client as shown in
882    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
883    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
884    *   DeleteCustomerRequest request =
885    *       DeleteCustomerRequest.newBuilder()
886    *           .setName(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
887    *           .build();
888    *   cloudChannelServiceClient.deleteCustomer(request);
889    * }
890    * }</pre>
891    *
892    * @param request The request object containing all of the parameters for the API call.
893    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
894    */
deleteCustomer(DeleteCustomerRequest request)895   public final void deleteCustomer(DeleteCustomerRequest request) {
896     deleteCustomerCallable().call(request);
897   }
898 
899   // AUTO-GENERATED DOCUMENTATION AND METHOD.
900   /**
901    * Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently.
902    *
903    * <p>Possible error codes:
904    *
905    * <ul>
906    *   <li>PERMISSION_DENIED: The account making the request does not own this customer.
907    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
908    *   <li>FAILED_PRECONDITION: The customer has existing entitlements.
909    *   <li>NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name in
910    *       the request.
911    * </ul>
912    *
913    * <p>Sample code:
914    *
915    * <pre>{@code
916    * // This snippet has been automatically generated and should be regarded as a code template only.
917    * // It will require modifications to work:
918    * // - It may require correct/in-range values for request initialization.
919    * // - It may require specifying regional endpoints when creating the service client as shown in
920    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
921    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
922    *   DeleteCustomerRequest request =
923    *       DeleteCustomerRequest.newBuilder()
924    *           .setName(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
925    *           .build();
926    *   ApiFuture<Empty> future =
927    *       cloudChannelServiceClient.deleteCustomerCallable().futureCall(request);
928    *   // Do something.
929    *   future.get();
930    * }
931    * }</pre>
932    */
deleteCustomerCallable()933   public final UnaryCallable<DeleteCustomerRequest, Empty> deleteCustomerCallable() {
934     return stub.deleteCustomerCallable();
935   }
936 
937   // AUTO-GENERATED DOCUMENTATION AND METHOD.
938   /**
939    * Imports a [Customer][google.cloud.channel.v1.Customer] from the Cloud Identity associated with
940    * the provided Cloud Identity ID or domain before a TransferEntitlements call. If a linked
941    * Customer already exists and overwrite_if_exists is true, it will update that Customer's data.
942    *
943    * <p>Possible error codes:
944    *
945    * <ul>
946    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
947    *       account in the API request.
948    *   <li>NOT_FOUND: Cloud Identity doesn't exist or was deleted.
949    *   <li>INVALID_ARGUMENT: Required parameters are missing, or the auth_token is expired or
950    *       invalid.
951    *   <li>ALREADY_EXISTS: A customer already exists and has conflicting critical fields. Requires
952    *       an overwrite.
953    * </ul>
954    *
955    * <p>Return value: The [Customer][google.cloud.channel.v1.Customer].
956    *
957    * <p>Sample code:
958    *
959    * <pre>{@code
960    * // This snippet has been automatically generated and should be regarded as a code template only.
961    * // It will require modifications to work:
962    * // - It may require correct/in-range values for request initialization.
963    * // - It may require specifying regional endpoints when creating the service client as shown in
964    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
965    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
966    *   ImportCustomerRequest request =
967    *       ImportCustomerRequest.newBuilder()
968    *           .setParent("parent-995424086")
969    *           .setAuthToken("authToken1450587441")
970    *           .setOverwriteIfExists(true)
971    *           .setChannelPartnerId("channelPartnerId-170366400")
972    *           .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
973    *           .build();
974    *   Customer response = cloudChannelServiceClient.importCustomer(request);
975    * }
976    * }</pre>
977    *
978    * @param request The request object containing all of the parameters for the API call.
979    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
980    */
importCustomer(ImportCustomerRequest request)981   public final Customer importCustomer(ImportCustomerRequest request) {
982     return importCustomerCallable().call(request);
983   }
984 
985   // AUTO-GENERATED DOCUMENTATION AND METHOD.
986   /**
987    * Imports a [Customer][google.cloud.channel.v1.Customer] from the Cloud Identity associated with
988    * the provided Cloud Identity ID or domain before a TransferEntitlements call. If a linked
989    * Customer already exists and overwrite_if_exists is true, it will update that Customer's data.
990    *
991    * <p>Possible error codes:
992    *
993    * <ul>
994    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
995    *       account in the API request.
996    *   <li>NOT_FOUND: Cloud Identity doesn't exist or was deleted.
997    *   <li>INVALID_ARGUMENT: Required parameters are missing, or the auth_token is expired or
998    *       invalid.
999    *   <li>ALREADY_EXISTS: A customer already exists and has conflicting critical fields. Requires
1000    *       an overwrite.
1001    * </ul>
1002    *
1003    * <p>Return value: The [Customer][google.cloud.channel.v1.Customer].
1004    *
1005    * <p>Sample code:
1006    *
1007    * <pre>{@code
1008    * // This snippet has been automatically generated and should be regarded as a code template only.
1009    * // It will require modifications to work:
1010    * // - It may require correct/in-range values for request initialization.
1011    * // - It may require specifying regional endpoints when creating the service client as shown in
1012    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1013    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1014    *   ImportCustomerRequest request =
1015    *       ImportCustomerRequest.newBuilder()
1016    *           .setParent("parent-995424086")
1017    *           .setAuthToken("authToken1450587441")
1018    *           .setOverwriteIfExists(true)
1019    *           .setChannelPartnerId("channelPartnerId-170366400")
1020    *           .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
1021    *           .build();
1022    *   ApiFuture<Customer> future =
1023    *       cloudChannelServiceClient.importCustomerCallable().futureCall(request);
1024    *   // Do something.
1025    *   Customer response = future.get();
1026    * }
1027    * }</pre>
1028    */
importCustomerCallable()1029   public final UnaryCallable<ImportCustomerRequest, Customer> importCustomerCallable() {
1030     return stub.importCustomerCallable();
1031   }
1032 
1033   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1034   /**
1035    * Creates a Cloud Identity for the given customer using the customer's information, or the
1036    * information provided here.
1037    *
1038    * <p>Possible error codes:
1039    *
1040    * <ul>
1041    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1042    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1043    *   <li>NOT_FOUND: The customer was not found.
1044    *   <li>ALREADY_EXISTS: The customer's primary email already exists. Retry after changing the
1045    *       customer's primary contact email.
1046    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
1047    *       Channel support.
1048    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
1049    *       Channel support.
1050    * </ul>
1051    *
1052    * <p>Return value: The ID of a long-running operation.
1053    *
1054    * <p>To get the results of the operation, call the GetOperation method of
1055    * CloudChannelOperationsService. The Operation metadata contains an instance of
1056    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
1057    *
1058    * <p>Sample code:
1059    *
1060    * <pre>{@code
1061    * // This snippet has been automatically generated and should be regarded as a code template only.
1062    * // It will require modifications to work:
1063    * // - It may require correct/in-range values for request initialization.
1064    * // - It may require specifying regional endpoints when creating the service client as shown in
1065    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1066    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1067    *   ProvisionCloudIdentityRequest request =
1068    *       ProvisionCloudIdentityRequest.newBuilder()
1069    *           .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
1070    *           .setCloudIdentityInfo(CloudIdentityInfo.newBuilder().build())
1071    *           .setUser(AdminUser.newBuilder().build())
1072    *           .setValidateOnly(true)
1073    *           .build();
1074    *   Customer response = cloudChannelServiceClient.provisionCloudIdentityAsync(request).get();
1075    * }
1076    * }</pre>
1077    *
1078    * @param request The request object containing all of the parameters for the API call.
1079    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1080    */
provisionCloudIdentityAsync( ProvisionCloudIdentityRequest request)1081   public final OperationFuture<Customer, OperationMetadata> provisionCloudIdentityAsync(
1082       ProvisionCloudIdentityRequest request) {
1083     return provisionCloudIdentityOperationCallable().futureCall(request);
1084   }
1085 
1086   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1087   /**
1088    * Creates a Cloud Identity for the given customer using the customer's information, or the
1089    * information provided here.
1090    *
1091    * <p>Possible error codes:
1092    *
1093    * <ul>
1094    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1095    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1096    *   <li>NOT_FOUND: The customer was not found.
1097    *   <li>ALREADY_EXISTS: The customer's primary email already exists. Retry after changing the
1098    *       customer's primary contact email.
1099    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
1100    *       Channel support.
1101    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
1102    *       Channel support.
1103    * </ul>
1104    *
1105    * <p>Return value: The ID of a long-running operation.
1106    *
1107    * <p>To get the results of the operation, call the GetOperation method of
1108    * CloudChannelOperationsService. The Operation metadata contains an instance of
1109    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
1110    *
1111    * <p>Sample code:
1112    *
1113    * <pre>{@code
1114    * // This snippet has been automatically generated and should be regarded as a code template only.
1115    * // It will require modifications to work:
1116    * // - It may require correct/in-range values for request initialization.
1117    * // - It may require specifying regional endpoints when creating the service client as shown in
1118    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1119    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1120    *   ProvisionCloudIdentityRequest request =
1121    *       ProvisionCloudIdentityRequest.newBuilder()
1122    *           .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
1123    *           .setCloudIdentityInfo(CloudIdentityInfo.newBuilder().build())
1124    *           .setUser(AdminUser.newBuilder().build())
1125    *           .setValidateOnly(true)
1126    *           .build();
1127    *   OperationFuture<Customer, OperationMetadata> future =
1128    *       cloudChannelServiceClient.provisionCloudIdentityOperationCallable().futureCall(request);
1129    *   // Do something.
1130    *   Customer response = future.get();
1131    * }
1132    * }</pre>
1133    */
1134   public final OperationCallable<ProvisionCloudIdentityRequest, Customer, OperationMetadata>
provisionCloudIdentityOperationCallable()1135       provisionCloudIdentityOperationCallable() {
1136     return stub.provisionCloudIdentityOperationCallable();
1137   }
1138 
1139   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1140   /**
1141    * Creates a Cloud Identity for the given customer using the customer's information, or the
1142    * information provided here.
1143    *
1144    * <p>Possible error codes:
1145    *
1146    * <ul>
1147    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1148    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1149    *   <li>NOT_FOUND: The customer was not found.
1150    *   <li>ALREADY_EXISTS: The customer's primary email already exists. Retry after changing the
1151    *       customer's primary contact email.
1152    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
1153    *       Channel support.
1154    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
1155    *       Channel support.
1156    * </ul>
1157    *
1158    * <p>Return value: The ID of a long-running operation.
1159    *
1160    * <p>To get the results of the operation, call the GetOperation method of
1161    * CloudChannelOperationsService. The Operation metadata contains an instance of
1162    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
1163    *
1164    * <p>Sample code:
1165    *
1166    * <pre>{@code
1167    * // This snippet has been automatically generated and should be regarded as a code template only.
1168    * // It will require modifications to work:
1169    * // - It may require correct/in-range values for request initialization.
1170    * // - It may require specifying regional endpoints when creating the service client as shown in
1171    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1172    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1173    *   ProvisionCloudIdentityRequest request =
1174    *       ProvisionCloudIdentityRequest.newBuilder()
1175    *           .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
1176    *           .setCloudIdentityInfo(CloudIdentityInfo.newBuilder().build())
1177    *           .setUser(AdminUser.newBuilder().build())
1178    *           .setValidateOnly(true)
1179    *           .build();
1180    *   ApiFuture<Operation> future =
1181    *       cloudChannelServiceClient.provisionCloudIdentityCallable().futureCall(request);
1182    *   // Do something.
1183    *   Operation response = future.get();
1184    * }
1185    * }</pre>
1186    */
1187   public final UnaryCallable<ProvisionCloudIdentityRequest, Operation>
provisionCloudIdentityCallable()1188       provisionCloudIdentityCallable() {
1189     return stub.provisionCloudIdentityCallable();
1190   }
1191 
1192   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1193   /**
1194    * Lists [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer.
1195    *
1196    * <p>Possible error codes:
1197    *
1198    * <ul>
1199    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1200    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1201    * </ul>
1202    *
1203    * <p>Return value: A list of the customer's [Entitlement][google.cloud.channel.v1.Entitlement]s.
1204    *
1205    * <p>Sample code:
1206    *
1207    * <pre>{@code
1208    * // This snippet has been automatically generated and should be regarded as a code template only.
1209    * // It will require modifications to work:
1210    * // - It may require correct/in-range values for request initialization.
1211    * // - It may require specifying regional endpoints when creating the service client as shown in
1212    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1213    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1214    *   ListEntitlementsRequest request =
1215    *       ListEntitlementsRequest.newBuilder()
1216    *           .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
1217    *           .setPageSize(883849137)
1218    *           .setPageToken("pageToken873572522")
1219    *           .build();
1220    *   for (Entitlement element : cloudChannelServiceClient.listEntitlements(request).iterateAll()) {
1221    *     // doThingsWith(element);
1222    *   }
1223    * }
1224    * }</pre>
1225    *
1226    * @param request The request object containing all of the parameters for the API call.
1227    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1228    */
listEntitlements(ListEntitlementsRequest request)1229   public final ListEntitlementsPagedResponse listEntitlements(ListEntitlementsRequest request) {
1230     return listEntitlementsPagedCallable().call(request);
1231   }
1232 
1233   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1234   /**
1235    * Lists [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer.
1236    *
1237    * <p>Possible error codes:
1238    *
1239    * <ul>
1240    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1241    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1242    * </ul>
1243    *
1244    * <p>Return value: A list of the customer's [Entitlement][google.cloud.channel.v1.Entitlement]s.
1245    *
1246    * <p>Sample code:
1247    *
1248    * <pre>{@code
1249    * // This snippet has been automatically generated and should be regarded as a code template only.
1250    * // It will require modifications to work:
1251    * // - It may require correct/in-range values for request initialization.
1252    * // - It may require specifying regional endpoints when creating the service client as shown in
1253    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1254    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1255    *   ListEntitlementsRequest request =
1256    *       ListEntitlementsRequest.newBuilder()
1257    *           .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
1258    *           .setPageSize(883849137)
1259    *           .setPageToken("pageToken873572522")
1260    *           .build();
1261    *   ApiFuture<Entitlement> future =
1262    *       cloudChannelServiceClient.listEntitlementsPagedCallable().futureCall(request);
1263    *   // Do something.
1264    *   for (Entitlement element : future.get().iterateAll()) {
1265    *     // doThingsWith(element);
1266    *   }
1267    * }
1268    * }</pre>
1269    */
1270   public final UnaryCallable<ListEntitlementsRequest, ListEntitlementsPagedResponse>
listEntitlementsPagedCallable()1271       listEntitlementsPagedCallable() {
1272     return stub.listEntitlementsPagedCallable();
1273   }
1274 
1275   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1276   /**
1277    * Lists [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer.
1278    *
1279    * <p>Possible error codes:
1280    *
1281    * <ul>
1282    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1283    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1284    * </ul>
1285    *
1286    * <p>Return value: A list of the customer's [Entitlement][google.cloud.channel.v1.Entitlement]s.
1287    *
1288    * <p>Sample code:
1289    *
1290    * <pre>{@code
1291    * // This snippet has been automatically generated and should be regarded as a code template only.
1292    * // It will require modifications to work:
1293    * // - It may require correct/in-range values for request initialization.
1294    * // - It may require specifying regional endpoints when creating the service client as shown in
1295    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1296    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1297    *   ListEntitlementsRequest request =
1298    *       ListEntitlementsRequest.newBuilder()
1299    *           .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
1300    *           .setPageSize(883849137)
1301    *           .setPageToken("pageToken873572522")
1302    *           .build();
1303    *   while (true) {
1304    *     ListEntitlementsResponse response =
1305    *         cloudChannelServiceClient.listEntitlementsCallable().call(request);
1306    *     for (Entitlement element : response.getEntitlementsList()) {
1307    *       // doThingsWith(element);
1308    *     }
1309    *     String nextPageToken = response.getNextPageToken();
1310    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
1311    *       request = request.toBuilder().setPageToken(nextPageToken).build();
1312    *     } else {
1313    *       break;
1314    *     }
1315    *   }
1316    * }
1317    * }</pre>
1318    */
1319   public final UnaryCallable<ListEntitlementsRequest, ListEntitlementsResponse>
listEntitlementsCallable()1320       listEntitlementsCallable() {
1321     return stub.listEntitlementsCallable();
1322   }
1323 
1324   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1325   /**
1326    * List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on the
1327    * Cloud Identity ID or Customer Name in the request.
1328    *
1329    * <p>Use this method to list the entitlements information of an unowned customer. You should
1330    * provide the customer's Cloud Identity ID or Customer Name.
1331    *
1332    * <p>Possible error codes:
1333    *
1334    * <ul>
1335    *   <li>PERMISSION_DENIED: &#42; The customer doesn't belong to the reseller and has no auth
1336    *       token. &#42; The supplied auth token is invalid. &#42; The reseller account making the
1337    *       request is different from the reseller account in the query.
1338    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1339    * </ul>
1340    *
1341    * <p>Return value: A list of the customer's
1342    * [TransferableSku][google.cloud.channel.v1.TransferableSku].
1343    *
1344    * <p>Sample code:
1345    *
1346    * <pre>{@code
1347    * // This snippet has been automatically generated and should be regarded as a code template only.
1348    * // It will require modifications to work:
1349    * // - It may require correct/in-range values for request initialization.
1350    * // - It may require specifying regional endpoints when creating the service client as shown in
1351    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1352    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1353    *   ListTransferableSkusRequest request =
1354    *       ListTransferableSkusRequest.newBuilder()
1355    *           .setParent("parent-995424086")
1356    *           .setPageSize(883849137)
1357    *           .setPageToken("pageToken873572522")
1358    *           .setAuthToken("authToken1450587441")
1359    *           .setLanguageCode("languageCode-2092349083")
1360    *           .build();
1361    *   for (TransferableSku element :
1362    *       cloudChannelServiceClient.listTransferableSkus(request).iterateAll()) {
1363    *     // doThingsWith(element);
1364    *   }
1365    * }
1366    * }</pre>
1367    *
1368    * @param request The request object containing all of the parameters for the API call.
1369    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1370    */
listTransferableSkus( ListTransferableSkusRequest request)1371   public final ListTransferableSkusPagedResponse listTransferableSkus(
1372       ListTransferableSkusRequest request) {
1373     return listTransferableSkusPagedCallable().call(request);
1374   }
1375 
1376   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1377   /**
1378    * List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on the
1379    * Cloud Identity ID or Customer Name in the request.
1380    *
1381    * <p>Use this method to list the entitlements information of an unowned customer. You should
1382    * provide the customer's Cloud Identity ID or Customer Name.
1383    *
1384    * <p>Possible error codes:
1385    *
1386    * <ul>
1387    *   <li>PERMISSION_DENIED: &#42; The customer doesn't belong to the reseller and has no auth
1388    *       token. &#42; The supplied auth token is invalid. &#42; The reseller account making the
1389    *       request is different from the reseller account in the query.
1390    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1391    * </ul>
1392    *
1393    * <p>Return value: A list of the customer's
1394    * [TransferableSku][google.cloud.channel.v1.TransferableSku].
1395    *
1396    * <p>Sample code:
1397    *
1398    * <pre>{@code
1399    * // This snippet has been automatically generated and should be regarded as a code template only.
1400    * // It will require modifications to work:
1401    * // - It may require correct/in-range values for request initialization.
1402    * // - It may require specifying regional endpoints when creating the service client as shown in
1403    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1404    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1405    *   ListTransferableSkusRequest request =
1406    *       ListTransferableSkusRequest.newBuilder()
1407    *           .setParent("parent-995424086")
1408    *           .setPageSize(883849137)
1409    *           .setPageToken("pageToken873572522")
1410    *           .setAuthToken("authToken1450587441")
1411    *           .setLanguageCode("languageCode-2092349083")
1412    *           .build();
1413    *   ApiFuture<TransferableSku> future =
1414    *       cloudChannelServiceClient.listTransferableSkusPagedCallable().futureCall(request);
1415    *   // Do something.
1416    *   for (TransferableSku element : future.get().iterateAll()) {
1417    *     // doThingsWith(element);
1418    *   }
1419    * }
1420    * }</pre>
1421    */
1422   public final UnaryCallable<ListTransferableSkusRequest, ListTransferableSkusPagedResponse>
listTransferableSkusPagedCallable()1423       listTransferableSkusPagedCallable() {
1424     return stub.listTransferableSkusPagedCallable();
1425   }
1426 
1427   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1428   /**
1429    * List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on the
1430    * Cloud Identity ID or Customer Name in the request.
1431    *
1432    * <p>Use this method to list the entitlements information of an unowned customer. You should
1433    * provide the customer's Cloud Identity ID or Customer Name.
1434    *
1435    * <p>Possible error codes:
1436    *
1437    * <ul>
1438    *   <li>PERMISSION_DENIED: &#42; The customer doesn't belong to the reseller and has no auth
1439    *       token. &#42; The supplied auth token is invalid. &#42; The reseller account making the
1440    *       request is different from the reseller account in the query.
1441    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1442    * </ul>
1443    *
1444    * <p>Return value: A list of the customer's
1445    * [TransferableSku][google.cloud.channel.v1.TransferableSku].
1446    *
1447    * <p>Sample code:
1448    *
1449    * <pre>{@code
1450    * // This snippet has been automatically generated and should be regarded as a code template only.
1451    * // It will require modifications to work:
1452    * // - It may require correct/in-range values for request initialization.
1453    * // - It may require specifying regional endpoints when creating the service client as shown in
1454    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1455    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1456    *   ListTransferableSkusRequest request =
1457    *       ListTransferableSkusRequest.newBuilder()
1458    *           .setParent("parent-995424086")
1459    *           .setPageSize(883849137)
1460    *           .setPageToken("pageToken873572522")
1461    *           .setAuthToken("authToken1450587441")
1462    *           .setLanguageCode("languageCode-2092349083")
1463    *           .build();
1464    *   while (true) {
1465    *     ListTransferableSkusResponse response =
1466    *         cloudChannelServiceClient.listTransferableSkusCallable().call(request);
1467    *     for (TransferableSku element : response.getTransferableSkusList()) {
1468    *       // doThingsWith(element);
1469    *     }
1470    *     String nextPageToken = response.getNextPageToken();
1471    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
1472    *       request = request.toBuilder().setPageToken(nextPageToken).build();
1473    *     } else {
1474    *       break;
1475    *     }
1476    *   }
1477    * }
1478    * }</pre>
1479    */
1480   public final UnaryCallable<ListTransferableSkusRequest, ListTransferableSkusResponse>
listTransferableSkusCallable()1481       listTransferableSkusCallable() {
1482     return stub.listTransferableSkusCallable();
1483   }
1484 
1485   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1486   /**
1487    * List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on
1488    * Cloud Identity ID or Customer Name in the request.
1489    *
1490    * <p>Use this method when a reseller gets the entitlement information of an unowned customer. The
1491    * reseller should provide the customer's Cloud Identity ID or Customer Name.
1492    *
1493    * <p>Possible error codes:
1494    *
1495    * <ul>
1496    *   <li>PERMISSION_DENIED: &#42; The customer doesn't belong to the reseller and has no auth
1497    *       token. &#42; The customer provided incorrect reseller information when generating auth
1498    *       token. &#42; The reseller account making the request is different from the reseller
1499    *       account in the query.
1500    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1501    * </ul>
1502    *
1503    * <p>Return value: List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the
1504    * given customer and SKU.
1505    *
1506    * <p>Sample code:
1507    *
1508    * <pre>{@code
1509    * // This snippet has been automatically generated and should be regarded as a code template only.
1510    * // It will require modifications to work:
1511    * // - It may require correct/in-range values for request initialization.
1512    * // - It may require specifying regional endpoints when creating the service client as shown in
1513    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1514    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1515    *   ListTransferableOffersRequest request =
1516    *       ListTransferableOffersRequest.newBuilder()
1517    *           .setParent("parent-995424086")
1518    *           .setPageSize(883849137)
1519    *           .setPageToken("pageToken873572522")
1520    *           .setSku("sku113949")
1521    *           .setLanguageCode("languageCode-2092349083")
1522    *           .build();
1523    *   for (TransferableOffer element :
1524    *       cloudChannelServiceClient.listTransferableOffers(request).iterateAll()) {
1525    *     // doThingsWith(element);
1526    *   }
1527    * }
1528    * }</pre>
1529    *
1530    * @param request The request object containing all of the parameters for the API call.
1531    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1532    */
listTransferableOffers( ListTransferableOffersRequest request)1533   public final ListTransferableOffersPagedResponse listTransferableOffers(
1534       ListTransferableOffersRequest request) {
1535     return listTransferableOffersPagedCallable().call(request);
1536   }
1537 
1538   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1539   /**
1540    * List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on
1541    * Cloud Identity ID or Customer Name in the request.
1542    *
1543    * <p>Use this method when a reseller gets the entitlement information of an unowned customer. The
1544    * reseller should provide the customer's Cloud Identity ID or Customer Name.
1545    *
1546    * <p>Possible error codes:
1547    *
1548    * <ul>
1549    *   <li>PERMISSION_DENIED: &#42; The customer doesn't belong to the reseller and has no auth
1550    *       token. &#42; The customer provided incorrect reseller information when generating auth
1551    *       token. &#42; The reseller account making the request is different from the reseller
1552    *       account in the query.
1553    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1554    * </ul>
1555    *
1556    * <p>Return value: List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the
1557    * given customer and SKU.
1558    *
1559    * <p>Sample code:
1560    *
1561    * <pre>{@code
1562    * // This snippet has been automatically generated and should be regarded as a code template only.
1563    * // It will require modifications to work:
1564    * // - It may require correct/in-range values for request initialization.
1565    * // - It may require specifying regional endpoints when creating the service client as shown in
1566    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1567    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1568    *   ListTransferableOffersRequest request =
1569    *       ListTransferableOffersRequest.newBuilder()
1570    *           .setParent("parent-995424086")
1571    *           .setPageSize(883849137)
1572    *           .setPageToken("pageToken873572522")
1573    *           .setSku("sku113949")
1574    *           .setLanguageCode("languageCode-2092349083")
1575    *           .build();
1576    *   ApiFuture<TransferableOffer> future =
1577    *       cloudChannelServiceClient.listTransferableOffersPagedCallable().futureCall(request);
1578    *   // Do something.
1579    *   for (TransferableOffer element : future.get().iterateAll()) {
1580    *     // doThingsWith(element);
1581    *   }
1582    * }
1583    * }</pre>
1584    */
1585   public final UnaryCallable<ListTransferableOffersRequest, ListTransferableOffersPagedResponse>
listTransferableOffersPagedCallable()1586       listTransferableOffersPagedCallable() {
1587     return stub.listTransferableOffersPagedCallable();
1588   }
1589 
1590   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1591   /**
1592    * List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on
1593    * Cloud Identity ID or Customer Name in the request.
1594    *
1595    * <p>Use this method when a reseller gets the entitlement information of an unowned customer. The
1596    * reseller should provide the customer's Cloud Identity ID or Customer Name.
1597    *
1598    * <p>Possible error codes:
1599    *
1600    * <ul>
1601    *   <li>PERMISSION_DENIED: &#42; The customer doesn't belong to the reseller and has no auth
1602    *       token. &#42; The customer provided incorrect reseller information when generating auth
1603    *       token. &#42; The reseller account making the request is different from the reseller
1604    *       account in the query.
1605    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1606    * </ul>
1607    *
1608    * <p>Return value: List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the
1609    * given customer and SKU.
1610    *
1611    * <p>Sample code:
1612    *
1613    * <pre>{@code
1614    * // This snippet has been automatically generated and should be regarded as a code template only.
1615    * // It will require modifications to work:
1616    * // - It may require correct/in-range values for request initialization.
1617    * // - It may require specifying regional endpoints when creating the service client as shown in
1618    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1619    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1620    *   ListTransferableOffersRequest request =
1621    *       ListTransferableOffersRequest.newBuilder()
1622    *           .setParent("parent-995424086")
1623    *           .setPageSize(883849137)
1624    *           .setPageToken("pageToken873572522")
1625    *           .setSku("sku113949")
1626    *           .setLanguageCode("languageCode-2092349083")
1627    *           .build();
1628    *   while (true) {
1629    *     ListTransferableOffersResponse response =
1630    *         cloudChannelServiceClient.listTransferableOffersCallable().call(request);
1631    *     for (TransferableOffer element : response.getTransferableOffersList()) {
1632    *       // doThingsWith(element);
1633    *     }
1634    *     String nextPageToken = response.getNextPageToken();
1635    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
1636    *       request = request.toBuilder().setPageToken(nextPageToken).build();
1637    *     } else {
1638    *       break;
1639    *     }
1640    *   }
1641    * }
1642    * }</pre>
1643    */
1644   public final UnaryCallable<ListTransferableOffersRequest, ListTransferableOffersResponse>
listTransferableOffersCallable()1645       listTransferableOffersCallable() {
1646     return stub.listTransferableOffersCallable();
1647   }
1648 
1649   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1650   /**
1651    * Returns the requested [Entitlement][google.cloud.channel.v1.Entitlement] resource.
1652    *
1653    * <p>Possible error codes:
1654    *
1655    * <ul>
1656    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1657    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1658    *   <li>NOT_FOUND: The customer entitlement was not found.
1659    * </ul>
1660    *
1661    * <p>Return value: The requested [Entitlement][google.cloud.channel.v1.Entitlement] resource.
1662    *
1663    * <p>Sample code:
1664    *
1665    * <pre>{@code
1666    * // This snippet has been automatically generated and should be regarded as a code template only.
1667    * // It will require modifications to work:
1668    * // - It may require correct/in-range values for request initialization.
1669    * // - It may require specifying regional endpoints when creating the service client as shown in
1670    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1671    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1672    *   GetEntitlementRequest request =
1673    *       GetEntitlementRequest.newBuilder()
1674    *           .setName(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString())
1675    *           .build();
1676    *   Entitlement response = cloudChannelServiceClient.getEntitlement(request);
1677    * }
1678    * }</pre>
1679    *
1680    * @param request The request object containing all of the parameters for the API call.
1681    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1682    */
getEntitlement(GetEntitlementRequest request)1683   public final Entitlement getEntitlement(GetEntitlementRequest request) {
1684     return getEntitlementCallable().call(request);
1685   }
1686 
1687   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1688   /**
1689    * Returns the requested [Entitlement][google.cloud.channel.v1.Entitlement] resource.
1690    *
1691    * <p>Possible error codes:
1692    *
1693    * <ul>
1694    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1695    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
1696    *   <li>NOT_FOUND: The customer entitlement was not found.
1697    * </ul>
1698    *
1699    * <p>Return value: The requested [Entitlement][google.cloud.channel.v1.Entitlement] resource.
1700    *
1701    * <p>Sample code:
1702    *
1703    * <pre>{@code
1704    * // This snippet has been automatically generated and should be regarded as a code template only.
1705    * // It will require modifications to work:
1706    * // - It may require correct/in-range values for request initialization.
1707    * // - It may require specifying regional endpoints when creating the service client as shown in
1708    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1709    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1710    *   GetEntitlementRequest request =
1711    *       GetEntitlementRequest.newBuilder()
1712    *           .setName(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString())
1713    *           .build();
1714    *   ApiFuture<Entitlement> future =
1715    *       cloudChannelServiceClient.getEntitlementCallable().futureCall(request);
1716    *   // Do something.
1717    *   Entitlement response = future.get();
1718    * }
1719    * }</pre>
1720    */
getEntitlementCallable()1721   public final UnaryCallable<GetEntitlementRequest, Entitlement> getEntitlementCallable() {
1722     return stub.getEntitlementCallable();
1723   }
1724 
1725   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1726   /**
1727    * Creates an entitlement for a customer.
1728    *
1729    * <p>Possible error codes:
1730    *
1731    * <ul>
1732    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1733    *   <li>INVALID_ARGUMENT: &#42; Required request parameters are missing or invalid. &#42; There
1734    *       is already a customer entitlement for a SKU from the same product family.
1735    *   <li>INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support
1736    *       for further troubleshooting.
1737    *   <li>NOT_FOUND: The customer or offer resource was not found.
1738    *   <li>ALREADY_EXISTS: &#42; The SKU was already purchased for the customer. &#42; The
1739    *       customer's primary email already exists. Retry after changing the customer's primary
1740    *       contact email.
1741    *   <li>CONDITION_NOT_MET or FAILED_PRECONDITION: &#42; The domain required for purchasing a SKU
1742    *       has not been verified. &#42; A pre-requisite SKU required to purchase an Add-On SKU is
1743    *       missing. For example, Google Workspace Business Starter is required to purchase Vault or
1744    *       Drive. &#42; (Developer accounts only) Reseller and resold domain must meet the following
1745    *       naming requirements: &#42; Domain names must start with goog-test. &#42; Domain names
1746    *       must include the reseller domain.
1747    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
1748    *       Channel support.
1749    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
1750    *       Channel support.
1751    * </ul>
1752    *
1753    * <p>Return value: The ID of a long-running operation.
1754    *
1755    * <p>To get the results of the operation, call the GetOperation method of
1756    * CloudChannelOperationsService. The Operation metadata will contain an instance of
1757    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
1758    *
1759    * <p>Sample code:
1760    *
1761    * <pre>{@code
1762    * // This snippet has been automatically generated and should be regarded as a code template only.
1763    * // It will require modifications to work:
1764    * // - It may require correct/in-range values for request initialization.
1765    * // - It may require specifying regional endpoints when creating the service client as shown in
1766    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1767    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1768    *   CreateEntitlementRequest request =
1769    *       CreateEntitlementRequest.newBuilder()
1770    *           .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
1771    *           .setEntitlement(Entitlement.newBuilder().build())
1772    *           .setRequestId("requestId693933066")
1773    *           .build();
1774    *   Entitlement response = cloudChannelServiceClient.createEntitlementAsync(request).get();
1775    * }
1776    * }</pre>
1777    *
1778    * @param request The request object containing all of the parameters for the API call.
1779    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1780    */
createEntitlementAsync( CreateEntitlementRequest request)1781   public final OperationFuture<Entitlement, OperationMetadata> createEntitlementAsync(
1782       CreateEntitlementRequest request) {
1783     return createEntitlementOperationCallable().futureCall(request);
1784   }
1785 
1786   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1787   /**
1788    * Creates an entitlement for a customer.
1789    *
1790    * <p>Possible error codes:
1791    *
1792    * <ul>
1793    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1794    *   <li>INVALID_ARGUMENT: &#42; Required request parameters are missing or invalid. &#42; There
1795    *       is already a customer entitlement for a SKU from the same product family.
1796    *   <li>INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support
1797    *       for further troubleshooting.
1798    *   <li>NOT_FOUND: The customer or offer resource was not found.
1799    *   <li>ALREADY_EXISTS: &#42; The SKU was already purchased for the customer. &#42; The
1800    *       customer's primary email already exists. Retry after changing the customer's primary
1801    *       contact email.
1802    *   <li>CONDITION_NOT_MET or FAILED_PRECONDITION: &#42; The domain required for purchasing a SKU
1803    *       has not been verified. &#42; A pre-requisite SKU required to purchase an Add-On SKU is
1804    *       missing. For example, Google Workspace Business Starter is required to purchase Vault or
1805    *       Drive. &#42; (Developer accounts only) Reseller and resold domain must meet the following
1806    *       naming requirements: &#42; Domain names must start with goog-test. &#42; Domain names
1807    *       must include the reseller domain.
1808    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
1809    *       Channel support.
1810    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
1811    *       Channel support.
1812    * </ul>
1813    *
1814    * <p>Return value: The ID of a long-running operation.
1815    *
1816    * <p>To get the results of the operation, call the GetOperation method of
1817    * CloudChannelOperationsService. The Operation metadata will contain an instance of
1818    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
1819    *
1820    * <p>Sample code:
1821    *
1822    * <pre>{@code
1823    * // This snippet has been automatically generated and should be regarded as a code template only.
1824    * // It will require modifications to work:
1825    * // - It may require correct/in-range values for request initialization.
1826    * // - It may require specifying regional endpoints when creating the service client as shown in
1827    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1828    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1829    *   CreateEntitlementRequest request =
1830    *       CreateEntitlementRequest.newBuilder()
1831    *           .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
1832    *           .setEntitlement(Entitlement.newBuilder().build())
1833    *           .setRequestId("requestId693933066")
1834    *           .build();
1835    *   OperationFuture<Entitlement, OperationMetadata> future =
1836    *       cloudChannelServiceClient.createEntitlementOperationCallable().futureCall(request);
1837    *   // Do something.
1838    *   Entitlement response = future.get();
1839    * }
1840    * }</pre>
1841    */
1842   public final OperationCallable<CreateEntitlementRequest, Entitlement, OperationMetadata>
createEntitlementOperationCallable()1843       createEntitlementOperationCallable() {
1844     return stub.createEntitlementOperationCallable();
1845   }
1846 
1847   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1848   /**
1849    * Creates an entitlement for a customer.
1850    *
1851    * <p>Possible error codes:
1852    *
1853    * <ul>
1854    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1855    *   <li>INVALID_ARGUMENT: &#42; Required request parameters are missing or invalid. &#42; There
1856    *       is already a customer entitlement for a SKU from the same product family.
1857    *   <li>INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support
1858    *       for further troubleshooting.
1859    *   <li>NOT_FOUND: The customer or offer resource was not found.
1860    *   <li>ALREADY_EXISTS: &#42; The SKU was already purchased for the customer. &#42; The
1861    *       customer's primary email already exists. Retry after changing the customer's primary
1862    *       contact email.
1863    *   <li>CONDITION_NOT_MET or FAILED_PRECONDITION: &#42; The domain required for purchasing a SKU
1864    *       has not been verified. &#42; A pre-requisite SKU required to purchase an Add-On SKU is
1865    *       missing. For example, Google Workspace Business Starter is required to purchase Vault or
1866    *       Drive. &#42; (Developer accounts only) Reseller and resold domain must meet the following
1867    *       naming requirements: &#42; Domain names must start with goog-test. &#42; Domain names
1868    *       must include the reseller domain.
1869    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
1870    *       Channel support.
1871    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
1872    *       Channel support.
1873    * </ul>
1874    *
1875    * <p>Return value: The ID of a long-running operation.
1876    *
1877    * <p>To get the results of the operation, call the GetOperation method of
1878    * CloudChannelOperationsService. The Operation metadata will contain an instance of
1879    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
1880    *
1881    * <p>Sample code:
1882    *
1883    * <pre>{@code
1884    * // This snippet has been automatically generated and should be regarded as a code template only.
1885    * // It will require modifications to work:
1886    * // - It may require correct/in-range values for request initialization.
1887    * // - It may require specifying regional endpoints when creating the service client as shown in
1888    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1889    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1890    *   CreateEntitlementRequest request =
1891    *       CreateEntitlementRequest.newBuilder()
1892    *           .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
1893    *           .setEntitlement(Entitlement.newBuilder().build())
1894    *           .setRequestId("requestId693933066")
1895    *           .build();
1896    *   ApiFuture<Operation> future =
1897    *       cloudChannelServiceClient.createEntitlementCallable().futureCall(request);
1898    *   // Do something.
1899    *   Operation response = future.get();
1900    * }
1901    * }</pre>
1902    */
createEntitlementCallable()1903   public final UnaryCallable<CreateEntitlementRequest, Operation> createEntitlementCallable() {
1904     return stub.createEntitlementCallable();
1905   }
1906 
1907   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1908   /**
1909    * Change parameters of the entitlement.
1910    *
1911    * <p>An entitlement update is a long-running operation and it updates the entitlement as a result
1912    * of fulfillment.
1913    *
1914    * <p>Possible error codes:
1915    *
1916    * <ul>
1917    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1918    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the
1919    *       number of seats being changed is greater than the allowed number of max seats, or
1920    *       decreasing seats for a commitment based plan.
1921    *   <li>NOT_FOUND: Entitlement resource not found.
1922    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
1923    *       Channel support.
1924    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
1925    *       Channel support.
1926    * </ul>
1927    *
1928    * <p>Return value: The ID of a long-running operation.
1929    *
1930    * <p>To get the results of the operation, call the GetOperation method of
1931    * CloudChannelOperationsService. The Operation metadata will contain an instance of
1932    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
1933    *
1934    * <p>Sample code:
1935    *
1936    * <pre>{@code
1937    * // This snippet has been automatically generated and should be regarded as a code template only.
1938    * // It will require modifications to work:
1939    * // - It may require correct/in-range values for request initialization.
1940    * // - It may require specifying regional endpoints when creating the service client as shown in
1941    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1942    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1943    *   ChangeParametersRequest request =
1944    *       ChangeParametersRequest.newBuilder()
1945    *           .setName("name3373707")
1946    *           .addAllParameters(new ArrayList<Parameter>())
1947    *           .setRequestId("requestId693933066")
1948    *           .setPurchaseOrderId("purchaseOrderId2029917384")
1949    *           .build();
1950    *   Entitlement response = cloudChannelServiceClient.changeParametersAsync(request).get();
1951    * }
1952    * }</pre>
1953    *
1954    * @param request The request object containing all of the parameters for the API call.
1955    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1956    */
changeParametersAsync( ChangeParametersRequest request)1957   public final OperationFuture<Entitlement, OperationMetadata> changeParametersAsync(
1958       ChangeParametersRequest request) {
1959     return changeParametersOperationCallable().futureCall(request);
1960   }
1961 
1962   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1963   /**
1964    * Change parameters of the entitlement.
1965    *
1966    * <p>An entitlement update is a long-running operation and it updates the entitlement as a result
1967    * of fulfillment.
1968    *
1969    * <p>Possible error codes:
1970    *
1971    * <ul>
1972    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
1973    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the
1974    *       number of seats being changed is greater than the allowed number of max seats, or
1975    *       decreasing seats for a commitment based plan.
1976    *   <li>NOT_FOUND: Entitlement resource not found.
1977    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
1978    *       Channel support.
1979    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
1980    *       Channel support.
1981    * </ul>
1982    *
1983    * <p>Return value: The ID of a long-running operation.
1984    *
1985    * <p>To get the results of the operation, call the GetOperation method of
1986    * CloudChannelOperationsService. The Operation metadata will contain an instance of
1987    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
1988    *
1989    * <p>Sample code:
1990    *
1991    * <pre>{@code
1992    * // This snippet has been automatically generated and should be regarded as a code template only.
1993    * // It will require modifications to work:
1994    * // - It may require correct/in-range values for request initialization.
1995    * // - It may require specifying regional endpoints when creating the service client as shown in
1996    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1997    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
1998    *   ChangeParametersRequest request =
1999    *       ChangeParametersRequest.newBuilder()
2000    *           .setName("name3373707")
2001    *           .addAllParameters(new ArrayList<Parameter>())
2002    *           .setRequestId("requestId693933066")
2003    *           .setPurchaseOrderId("purchaseOrderId2029917384")
2004    *           .build();
2005    *   OperationFuture<Entitlement, OperationMetadata> future =
2006    *       cloudChannelServiceClient.changeParametersOperationCallable().futureCall(request);
2007    *   // Do something.
2008    *   Entitlement response = future.get();
2009    * }
2010    * }</pre>
2011    */
2012   public final OperationCallable<ChangeParametersRequest, Entitlement, OperationMetadata>
changeParametersOperationCallable()2013       changeParametersOperationCallable() {
2014     return stub.changeParametersOperationCallable();
2015   }
2016 
2017   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2018   /**
2019    * Change parameters of the entitlement.
2020    *
2021    * <p>An entitlement update is a long-running operation and it updates the entitlement as a result
2022    * of fulfillment.
2023    *
2024    * <p>Possible error codes:
2025    *
2026    * <ul>
2027    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2028    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the
2029    *       number of seats being changed is greater than the allowed number of max seats, or
2030    *       decreasing seats for a commitment based plan.
2031    *   <li>NOT_FOUND: Entitlement resource not found.
2032    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2033    *       Channel support.
2034    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2035    *       Channel support.
2036    * </ul>
2037    *
2038    * <p>Return value: The ID of a long-running operation.
2039    *
2040    * <p>To get the results of the operation, call the GetOperation method of
2041    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2042    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2043    *
2044    * <p>Sample code:
2045    *
2046    * <pre>{@code
2047    * // This snippet has been automatically generated and should be regarded as a code template only.
2048    * // It will require modifications to work:
2049    * // - It may require correct/in-range values for request initialization.
2050    * // - It may require specifying regional endpoints when creating the service client as shown in
2051    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2052    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2053    *   ChangeParametersRequest request =
2054    *       ChangeParametersRequest.newBuilder()
2055    *           .setName("name3373707")
2056    *           .addAllParameters(new ArrayList<Parameter>())
2057    *           .setRequestId("requestId693933066")
2058    *           .setPurchaseOrderId("purchaseOrderId2029917384")
2059    *           .build();
2060    *   ApiFuture<Operation> future =
2061    *       cloudChannelServiceClient.changeParametersCallable().futureCall(request);
2062    *   // Do something.
2063    *   Operation response = future.get();
2064    * }
2065    * }</pre>
2066    */
changeParametersCallable()2067   public final UnaryCallable<ChangeParametersRequest, Operation> changeParametersCallable() {
2068     return stub.changeParametersCallable();
2069   }
2070 
2071   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2072   /**
2073    * Updates the renewal settings for an existing customer entitlement.
2074    *
2075    * <p>An entitlement update is a long-running operation and it updates the entitlement as a result
2076    * of fulfillment.
2077    *
2078    * <p>Possible error codes:
2079    *
2080    * <ul>
2081    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2082    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2083    *   <li>NOT_FOUND: Entitlement resource not found.
2084    *   <li>NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't
2085    *       enable or disable renewals for non-commitment plans.
2086    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2087    *       Channel support.
2088    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2089    *       Channel support.
2090    * </ul>
2091    *
2092    * <p>Return value: The ID of a long-running operation.
2093    *
2094    * <p>To get the results of the operation, call the GetOperation method of
2095    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2096    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2097    *
2098    * <p>Sample code:
2099    *
2100    * <pre>{@code
2101    * // This snippet has been automatically generated and should be regarded as a code template only.
2102    * // It will require modifications to work:
2103    * // - It may require correct/in-range values for request initialization.
2104    * // - It may require specifying regional endpoints when creating the service client as shown in
2105    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2106    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2107    *   ChangeRenewalSettingsRequest request =
2108    *       ChangeRenewalSettingsRequest.newBuilder()
2109    *           .setName("name3373707")
2110    *           .setRenewalSettings(RenewalSettings.newBuilder().build())
2111    *           .setRequestId("requestId693933066")
2112    *           .build();
2113    *   Entitlement response = cloudChannelServiceClient.changeRenewalSettingsAsync(request).get();
2114    * }
2115    * }</pre>
2116    *
2117    * @param request The request object containing all of the parameters for the API call.
2118    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2119    */
changeRenewalSettingsAsync( ChangeRenewalSettingsRequest request)2120   public final OperationFuture<Entitlement, OperationMetadata> changeRenewalSettingsAsync(
2121       ChangeRenewalSettingsRequest request) {
2122     return changeRenewalSettingsOperationCallable().futureCall(request);
2123   }
2124 
2125   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2126   /**
2127    * Updates the renewal settings for an existing customer entitlement.
2128    *
2129    * <p>An entitlement update is a long-running operation and it updates the entitlement as a result
2130    * of fulfillment.
2131    *
2132    * <p>Possible error codes:
2133    *
2134    * <ul>
2135    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2136    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2137    *   <li>NOT_FOUND: Entitlement resource not found.
2138    *   <li>NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't
2139    *       enable or disable renewals for non-commitment plans.
2140    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2141    *       Channel support.
2142    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2143    *       Channel support.
2144    * </ul>
2145    *
2146    * <p>Return value: The ID of a long-running operation.
2147    *
2148    * <p>To get the results of the operation, call the GetOperation method of
2149    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2150    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2151    *
2152    * <p>Sample code:
2153    *
2154    * <pre>{@code
2155    * // This snippet has been automatically generated and should be regarded as a code template only.
2156    * // It will require modifications to work:
2157    * // - It may require correct/in-range values for request initialization.
2158    * // - It may require specifying regional endpoints when creating the service client as shown in
2159    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2160    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2161    *   ChangeRenewalSettingsRequest request =
2162    *       ChangeRenewalSettingsRequest.newBuilder()
2163    *           .setName("name3373707")
2164    *           .setRenewalSettings(RenewalSettings.newBuilder().build())
2165    *           .setRequestId("requestId693933066")
2166    *           .build();
2167    *   OperationFuture<Entitlement, OperationMetadata> future =
2168    *       cloudChannelServiceClient.changeRenewalSettingsOperationCallable().futureCall(request);
2169    *   // Do something.
2170    *   Entitlement response = future.get();
2171    * }
2172    * }</pre>
2173    */
2174   public final OperationCallable<ChangeRenewalSettingsRequest, Entitlement, OperationMetadata>
changeRenewalSettingsOperationCallable()2175       changeRenewalSettingsOperationCallable() {
2176     return stub.changeRenewalSettingsOperationCallable();
2177   }
2178 
2179   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2180   /**
2181    * Updates the renewal settings for an existing customer entitlement.
2182    *
2183    * <p>An entitlement update is a long-running operation and it updates the entitlement as a result
2184    * of fulfillment.
2185    *
2186    * <p>Possible error codes:
2187    *
2188    * <ul>
2189    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2190    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2191    *   <li>NOT_FOUND: Entitlement resource not found.
2192    *   <li>NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't
2193    *       enable or disable renewals for non-commitment plans.
2194    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2195    *       Channel support.
2196    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2197    *       Channel support.
2198    * </ul>
2199    *
2200    * <p>Return value: The ID of a long-running operation.
2201    *
2202    * <p>To get the results of the operation, call the GetOperation method of
2203    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2204    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2205    *
2206    * <p>Sample code:
2207    *
2208    * <pre>{@code
2209    * // This snippet has been automatically generated and should be regarded as a code template only.
2210    * // It will require modifications to work:
2211    * // - It may require correct/in-range values for request initialization.
2212    * // - It may require specifying regional endpoints when creating the service client as shown in
2213    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2214    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2215    *   ChangeRenewalSettingsRequest request =
2216    *       ChangeRenewalSettingsRequest.newBuilder()
2217    *           .setName("name3373707")
2218    *           .setRenewalSettings(RenewalSettings.newBuilder().build())
2219    *           .setRequestId("requestId693933066")
2220    *           .build();
2221    *   ApiFuture<Operation> future =
2222    *       cloudChannelServiceClient.changeRenewalSettingsCallable().futureCall(request);
2223    *   // Do something.
2224    *   Operation response = future.get();
2225    * }
2226    * }</pre>
2227    */
2228   public final UnaryCallable<ChangeRenewalSettingsRequest, Operation>
changeRenewalSettingsCallable()2229       changeRenewalSettingsCallable() {
2230     return stub.changeRenewalSettingsCallable();
2231   }
2232 
2233   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2234   /**
2235    * Updates the Offer for an existing customer entitlement.
2236    *
2237    * <p>An entitlement update is a long-running operation and it updates the entitlement as a result
2238    * of fulfillment.
2239    *
2240    * <p>Possible error codes:
2241    *
2242    * <ul>
2243    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2244    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2245    *   <li>NOT_FOUND: Offer or Entitlement resource not found.
2246    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2247    *       Channel support.
2248    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2249    *       Channel support.
2250    * </ul>
2251    *
2252    * <p>Return value: The ID of a long-running operation.
2253    *
2254    * <p>To get the results of the operation, call the GetOperation method of
2255    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2256    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2257    *
2258    * <p>Sample code:
2259    *
2260    * <pre>{@code
2261    * // This snippet has been automatically generated and should be regarded as a code template only.
2262    * // It will require modifications to work:
2263    * // - It may require correct/in-range values for request initialization.
2264    * // - It may require specifying regional endpoints when creating the service client as shown in
2265    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2266    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2267    *   ChangeOfferRequest request =
2268    *       ChangeOfferRequest.newBuilder()
2269    *           .setName("name3373707")
2270    *           .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString())
2271    *           .addAllParameters(new ArrayList<Parameter>())
2272    *           .setPurchaseOrderId("purchaseOrderId2029917384")
2273    *           .setRequestId("requestId693933066")
2274    *           .build();
2275    *   Entitlement response = cloudChannelServiceClient.changeOfferAsync(request).get();
2276    * }
2277    * }</pre>
2278    *
2279    * @param request The request object containing all of the parameters for the API call.
2280    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2281    */
changeOfferAsync( ChangeOfferRequest request)2282   public final OperationFuture<Entitlement, OperationMetadata> changeOfferAsync(
2283       ChangeOfferRequest request) {
2284     return changeOfferOperationCallable().futureCall(request);
2285   }
2286 
2287   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2288   /**
2289    * Updates the Offer for an existing customer entitlement.
2290    *
2291    * <p>An entitlement update is a long-running operation and it updates the entitlement as a result
2292    * of fulfillment.
2293    *
2294    * <p>Possible error codes:
2295    *
2296    * <ul>
2297    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2298    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2299    *   <li>NOT_FOUND: Offer or Entitlement resource not found.
2300    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2301    *       Channel support.
2302    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2303    *       Channel support.
2304    * </ul>
2305    *
2306    * <p>Return value: The ID of a long-running operation.
2307    *
2308    * <p>To get the results of the operation, call the GetOperation method of
2309    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2310    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2311    *
2312    * <p>Sample code:
2313    *
2314    * <pre>{@code
2315    * // This snippet has been automatically generated and should be regarded as a code template only.
2316    * // It will require modifications to work:
2317    * // - It may require correct/in-range values for request initialization.
2318    * // - It may require specifying regional endpoints when creating the service client as shown in
2319    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2320    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2321    *   ChangeOfferRequest request =
2322    *       ChangeOfferRequest.newBuilder()
2323    *           .setName("name3373707")
2324    *           .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString())
2325    *           .addAllParameters(new ArrayList<Parameter>())
2326    *           .setPurchaseOrderId("purchaseOrderId2029917384")
2327    *           .setRequestId("requestId693933066")
2328    *           .build();
2329    *   OperationFuture<Entitlement, OperationMetadata> future =
2330    *       cloudChannelServiceClient.changeOfferOperationCallable().futureCall(request);
2331    *   // Do something.
2332    *   Entitlement response = future.get();
2333    * }
2334    * }</pre>
2335    */
2336   public final OperationCallable<ChangeOfferRequest, Entitlement, OperationMetadata>
changeOfferOperationCallable()2337       changeOfferOperationCallable() {
2338     return stub.changeOfferOperationCallable();
2339   }
2340 
2341   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2342   /**
2343    * Updates the Offer for an existing customer entitlement.
2344    *
2345    * <p>An entitlement update is a long-running operation and it updates the entitlement as a result
2346    * of fulfillment.
2347    *
2348    * <p>Possible error codes:
2349    *
2350    * <ul>
2351    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2352    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2353    *   <li>NOT_FOUND: Offer or Entitlement resource not found.
2354    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2355    *       Channel support.
2356    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2357    *       Channel support.
2358    * </ul>
2359    *
2360    * <p>Return value: The ID of a long-running operation.
2361    *
2362    * <p>To get the results of the operation, call the GetOperation method of
2363    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2364    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2365    *
2366    * <p>Sample code:
2367    *
2368    * <pre>{@code
2369    * // This snippet has been automatically generated and should be regarded as a code template only.
2370    * // It will require modifications to work:
2371    * // - It may require correct/in-range values for request initialization.
2372    * // - It may require specifying regional endpoints when creating the service client as shown in
2373    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2374    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2375    *   ChangeOfferRequest request =
2376    *       ChangeOfferRequest.newBuilder()
2377    *           .setName("name3373707")
2378    *           .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString())
2379    *           .addAllParameters(new ArrayList<Parameter>())
2380    *           .setPurchaseOrderId("purchaseOrderId2029917384")
2381    *           .setRequestId("requestId693933066")
2382    *           .build();
2383    *   ApiFuture<Operation> future =
2384    *       cloudChannelServiceClient.changeOfferCallable().futureCall(request);
2385    *   // Do something.
2386    *   Operation response = future.get();
2387    * }
2388    * }</pre>
2389    */
changeOfferCallable()2390   public final UnaryCallable<ChangeOfferRequest, Operation> changeOfferCallable() {
2391     return stub.changeOfferCallable();
2392   }
2393 
2394   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2395   /**
2396    * Starts paid service for a trial entitlement.
2397    *
2398    * <p>Starts paid service for a trial entitlement immediately. This method is only applicable if a
2399    * plan is set up for a trial entitlement but has some trial days remaining.
2400    *
2401    * <p>Possible error codes:
2402    *
2403    * <ul>
2404    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2405    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2406    *   <li>NOT_FOUND: Entitlement resource not found.
2407    *   <li>FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans.
2408    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2409    *       Channel support.
2410    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2411    *       Channel support.
2412    * </ul>
2413    *
2414    * <p>Return value: The ID of a long-running operation.
2415    *
2416    * <p>To get the results of the operation, call the GetOperation method of
2417    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2418    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2419    *
2420    * <p>Sample code:
2421    *
2422    * <pre>{@code
2423    * // This snippet has been automatically generated and should be regarded as a code template only.
2424    * // It will require modifications to work:
2425    * // - It may require correct/in-range values for request initialization.
2426    * // - It may require specifying regional endpoints when creating the service client as shown in
2427    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2428    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2429    *   StartPaidServiceRequest request =
2430    *       StartPaidServiceRequest.newBuilder()
2431    *           .setName("name3373707")
2432    *           .setRequestId("requestId693933066")
2433    *           .build();
2434    *   Entitlement response = cloudChannelServiceClient.startPaidServiceAsync(request).get();
2435    * }
2436    * }</pre>
2437    *
2438    * @param request The request object containing all of the parameters for the API call.
2439    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2440    */
startPaidServiceAsync( StartPaidServiceRequest request)2441   public final OperationFuture<Entitlement, OperationMetadata> startPaidServiceAsync(
2442       StartPaidServiceRequest request) {
2443     return startPaidServiceOperationCallable().futureCall(request);
2444   }
2445 
2446   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2447   /**
2448    * Starts paid service for a trial entitlement.
2449    *
2450    * <p>Starts paid service for a trial entitlement immediately. This method is only applicable if a
2451    * plan is set up for a trial entitlement but has some trial days remaining.
2452    *
2453    * <p>Possible error codes:
2454    *
2455    * <ul>
2456    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2457    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2458    *   <li>NOT_FOUND: Entitlement resource not found.
2459    *   <li>FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans.
2460    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2461    *       Channel support.
2462    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2463    *       Channel support.
2464    * </ul>
2465    *
2466    * <p>Return value: The ID of a long-running operation.
2467    *
2468    * <p>To get the results of the operation, call the GetOperation method of
2469    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2470    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2471    *
2472    * <p>Sample code:
2473    *
2474    * <pre>{@code
2475    * // This snippet has been automatically generated and should be regarded as a code template only.
2476    * // It will require modifications to work:
2477    * // - It may require correct/in-range values for request initialization.
2478    * // - It may require specifying regional endpoints when creating the service client as shown in
2479    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2480    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2481    *   StartPaidServiceRequest request =
2482    *       StartPaidServiceRequest.newBuilder()
2483    *           .setName("name3373707")
2484    *           .setRequestId("requestId693933066")
2485    *           .build();
2486    *   OperationFuture<Entitlement, OperationMetadata> future =
2487    *       cloudChannelServiceClient.startPaidServiceOperationCallable().futureCall(request);
2488    *   // Do something.
2489    *   Entitlement response = future.get();
2490    * }
2491    * }</pre>
2492    */
2493   public final OperationCallable<StartPaidServiceRequest, Entitlement, OperationMetadata>
startPaidServiceOperationCallable()2494       startPaidServiceOperationCallable() {
2495     return stub.startPaidServiceOperationCallable();
2496   }
2497 
2498   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2499   /**
2500    * Starts paid service for a trial entitlement.
2501    *
2502    * <p>Starts paid service for a trial entitlement immediately. This method is only applicable if a
2503    * plan is set up for a trial entitlement but has some trial days remaining.
2504    *
2505    * <p>Possible error codes:
2506    *
2507    * <ul>
2508    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2509    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2510    *   <li>NOT_FOUND: Entitlement resource not found.
2511    *   <li>FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans.
2512    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2513    *       Channel support.
2514    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2515    *       Channel support.
2516    * </ul>
2517    *
2518    * <p>Return value: The ID of a long-running operation.
2519    *
2520    * <p>To get the results of the operation, call the GetOperation method of
2521    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2522    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2523    *
2524    * <p>Sample code:
2525    *
2526    * <pre>{@code
2527    * // This snippet has been automatically generated and should be regarded as a code template only.
2528    * // It will require modifications to work:
2529    * // - It may require correct/in-range values for request initialization.
2530    * // - It may require specifying regional endpoints when creating the service client as shown in
2531    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2532    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2533    *   StartPaidServiceRequest request =
2534    *       StartPaidServiceRequest.newBuilder()
2535    *           .setName("name3373707")
2536    *           .setRequestId("requestId693933066")
2537    *           .build();
2538    *   ApiFuture<Operation> future =
2539    *       cloudChannelServiceClient.startPaidServiceCallable().futureCall(request);
2540    *   // Do something.
2541    *   Operation response = future.get();
2542    * }
2543    * }</pre>
2544    */
startPaidServiceCallable()2545   public final UnaryCallable<StartPaidServiceRequest, Operation> startPaidServiceCallable() {
2546     return stub.startPaidServiceCallable();
2547   }
2548 
2549   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2550   /**
2551    * Suspends a previously fulfilled entitlement.
2552    *
2553    * <p>An entitlement suspension is a long-running operation.
2554    *
2555    * <p>Possible error codes:
2556    *
2557    * <ul>
2558    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2559    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2560    *   <li>NOT_FOUND: Entitlement resource not found.
2561    *   <li>NOT_ACTIVE: Entitlement is not active.
2562    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2563    *       Channel support.
2564    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2565    *       Channel support.
2566    * </ul>
2567    *
2568    * <p>Return value: The ID of a long-running operation.
2569    *
2570    * <p>To get the results of the operation, call the GetOperation method of
2571    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2572    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2573    *
2574    * <p>Sample code:
2575    *
2576    * <pre>{@code
2577    * // This snippet has been automatically generated and should be regarded as a code template only.
2578    * // It will require modifications to work:
2579    * // - It may require correct/in-range values for request initialization.
2580    * // - It may require specifying regional endpoints when creating the service client as shown in
2581    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2582    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2583    *   SuspendEntitlementRequest request =
2584    *       SuspendEntitlementRequest.newBuilder()
2585    *           .setName("name3373707")
2586    *           .setRequestId("requestId693933066")
2587    *           .build();
2588    *   Entitlement response = cloudChannelServiceClient.suspendEntitlementAsync(request).get();
2589    * }
2590    * }</pre>
2591    *
2592    * @param request The request object containing all of the parameters for the API call.
2593    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2594    */
suspendEntitlementAsync( SuspendEntitlementRequest request)2595   public final OperationFuture<Entitlement, OperationMetadata> suspendEntitlementAsync(
2596       SuspendEntitlementRequest request) {
2597     return suspendEntitlementOperationCallable().futureCall(request);
2598   }
2599 
2600   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2601   /**
2602    * Suspends a previously fulfilled entitlement.
2603    *
2604    * <p>An entitlement suspension is a long-running operation.
2605    *
2606    * <p>Possible error codes:
2607    *
2608    * <ul>
2609    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2610    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2611    *   <li>NOT_FOUND: Entitlement resource not found.
2612    *   <li>NOT_ACTIVE: Entitlement is not active.
2613    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2614    *       Channel support.
2615    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2616    *       Channel support.
2617    * </ul>
2618    *
2619    * <p>Return value: The ID of a long-running operation.
2620    *
2621    * <p>To get the results of the operation, call the GetOperation method of
2622    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2623    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2624    *
2625    * <p>Sample code:
2626    *
2627    * <pre>{@code
2628    * // This snippet has been automatically generated and should be regarded as a code template only.
2629    * // It will require modifications to work:
2630    * // - It may require correct/in-range values for request initialization.
2631    * // - It may require specifying regional endpoints when creating the service client as shown in
2632    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2633    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2634    *   SuspendEntitlementRequest request =
2635    *       SuspendEntitlementRequest.newBuilder()
2636    *           .setName("name3373707")
2637    *           .setRequestId("requestId693933066")
2638    *           .build();
2639    *   OperationFuture<Entitlement, OperationMetadata> future =
2640    *       cloudChannelServiceClient.suspendEntitlementOperationCallable().futureCall(request);
2641    *   // Do something.
2642    *   Entitlement response = future.get();
2643    * }
2644    * }</pre>
2645    */
2646   public final OperationCallable<SuspendEntitlementRequest, Entitlement, OperationMetadata>
suspendEntitlementOperationCallable()2647       suspendEntitlementOperationCallable() {
2648     return stub.suspendEntitlementOperationCallable();
2649   }
2650 
2651   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2652   /**
2653    * Suspends a previously fulfilled entitlement.
2654    *
2655    * <p>An entitlement suspension is a long-running operation.
2656    *
2657    * <p>Possible error codes:
2658    *
2659    * <ul>
2660    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
2661    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2662    *   <li>NOT_FOUND: Entitlement resource not found.
2663    *   <li>NOT_ACTIVE: Entitlement is not active.
2664    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2665    *       Channel support.
2666    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2667    *       Channel support.
2668    * </ul>
2669    *
2670    * <p>Return value: The ID of a long-running operation.
2671    *
2672    * <p>To get the results of the operation, call the GetOperation method of
2673    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2674    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2675    *
2676    * <p>Sample code:
2677    *
2678    * <pre>{@code
2679    * // This snippet has been automatically generated and should be regarded as a code template only.
2680    * // It will require modifications to work:
2681    * // - It may require correct/in-range values for request initialization.
2682    * // - It may require specifying regional endpoints when creating the service client as shown in
2683    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2684    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2685    *   SuspendEntitlementRequest request =
2686    *       SuspendEntitlementRequest.newBuilder()
2687    *           .setName("name3373707")
2688    *           .setRequestId("requestId693933066")
2689    *           .build();
2690    *   ApiFuture<Operation> future =
2691    *       cloudChannelServiceClient.suspendEntitlementCallable().futureCall(request);
2692    *   // Do something.
2693    *   Operation response = future.get();
2694    * }
2695    * }</pre>
2696    */
suspendEntitlementCallable()2697   public final UnaryCallable<SuspendEntitlementRequest, Operation> suspendEntitlementCallable() {
2698     return stub.suspendEntitlementCallable();
2699   }
2700 
2701   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2702   /**
2703    * Cancels a previously fulfilled entitlement.
2704    *
2705    * <p>An entitlement cancellation is a long-running operation.
2706    *
2707    * <p>Possible error codes:
2708    *
2709    * <ul>
2710    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
2711    *       account in the API request.
2712    *   <li>FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud
2713    *       entitlement's Cloud Billing subaccount.
2714    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2715    *   <li>NOT_FOUND: Entitlement resource not found.
2716    *   <li>DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons, or
2717    *       entitlements for Google Cloud's development platform.
2718    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2719    *       Channel support.
2720    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2721    *       Channel support.
2722    * </ul>
2723    *
2724    * <p>Return value: The ID of a long-running operation.
2725    *
2726    * <p>To get the results of the operation, call the GetOperation method of
2727    * CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The
2728    * Operation metadata will contain an instance of
2729    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2730    *
2731    * <p>Sample code:
2732    *
2733    * <pre>{@code
2734    * // This snippet has been automatically generated and should be regarded as a code template only.
2735    * // It will require modifications to work:
2736    * // - It may require correct/in-range values for request initialization.
2737    * // - It may require specifying regional endpoints when creating the service client as shown in
2738    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2739    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2740    *   CancelEntitlementRequest request =
2741    *       CancelEntitlementRequest.newBuilder()
2742    *           .setName("name3373707")
2743    *           .setRequestId("requestId693933066")
2744    *           .build();
2745    *   cloudChannelServiceClient.cancelEntitlementAsync(request).get();
2746    * }
2747    * }</pre>
2748    *
2749    * @param request The request object containing all of the parameters for the API call.
2750    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2751    */
cancelEntitlementAsync( CancelEntitlementRequest request)2752   public final OperationFuture<Empty, OperationMetadata> cancelEntitlementAsync(
2753       CancelEntitlementRequest request) {
2754     return cancelEntitlementOperationCallable().futureCall(request);
2755   }
2756 
2757   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2758   /**
2759    * Cancels a previously fulfilled entitlement.
2760    *
2761    * <p>An entitlement cancellation is a long-running operation.
2762    *
2763    * <p>Possible error codes:
2764    *
2765    * <ul>
2766    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
2767    *       account in the API request.
2768    *   <li>FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud
2769    *       entitlement's Cloud Billing subaccount.
2770    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2771    *   <li>NOT_FOUND: Entitlement resource not found.
2772    *   <li>DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons, or
2773    *       entitlements for Google Cloud's development platform.
2774    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2775    *       Channel support.
2776    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2777    *       Channel support.
2778    * </ul>
2779    *
2780    * <p>Return value: The ID of a long-running operation.
2781    *
2782    * <p>To get the results of the operation, call the GetOperation method of
2783    * CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The
2784    * Operation metadata will contain an instance of
2785    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2786    *
2787    * <p>Sample code:
2788    *
2789    * <pre>{@code
2790    * // This snippet has been automatically generated and should be regarded as a code template only.
2791    * // It will require modifications to work:
2792    * // - It may require correct/in-range values for request initialization.
2793    * // - It may require specifying regional endpoints when creating the service client as shown in
2794    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2795    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2796    *   CancelEntitlementRequest request =
2797    *       CancelEntitlementRequest.newBuilder()
2798    *           .setName("name3373707")
2799    *           .setRequestId("requestId693933066")
2800    *           .build();
2801    *   OperationFuture<Empty, OperationMetadata> future =
2802    *       cloudChannelServiceClient.cancelEntitlementOperationCallable().futureCall(request);
2803    *   // Do something.
2804    *   future.get();
2805    * }
2806    * }</pre>
2807    */
2808   public final OperationCallable<CancelEntitlementRequest, Empty, OperationMetadata>
cancelEntitlementOperationCallable()2809       cancelEntitlementOperationCallable() {
2810     return stub.cancelEntitlementOperationCallable();
2811   }
2812 
2813   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2814   /**
2815    * Cancels a previously fulfilled entitlement.
2816    *
2817    * <p>An entitlement cancellation is a long-running operation.
2818    *
2819    * <p>Possible error codes:
2820    *
2821    * <ul>
2822    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
2823    *       account in the API request.
2824    *   <li>FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud
2825    *       entitlement's Cloud Billing subaccount.
2826    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2827    *   <li>NOT_FOUND: Entitlement resource not found.
2828    *   <li>DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons, or
2829    *       entitlements for Google Cloud's development platform.
2830    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2831    *       Channel support.
2832    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2833    *       Channel support.
2834    * </ul>
2835    *
2836    * <p>Return value: The ID of a long-running operation.
2837    *
2838    * <p>To get the results of the operation, call the GetOperation method of
2839    * CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The
2840    * Operation metadata will contain an instance of
2841    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2842    *
2843    * <p>Sample code:
2844    *
2845    * <pre>{@code
2846    * // This snippet has been automatically generated and should be regarded as a code template only.
2847    * // It will require modifications to work:
2848    * // - It may require correct/in-range values for request initialization.
2849    * // - It may require specifying regional endpoints when creating the service client as shown in
2850    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2851    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2852    *   CancelEntitlementRequest request =
2853    *       CancelEntitlementRequest.newBuilder()
2854    *           .setName("name3373707")
2855    *           .setRequestId("requestId693933066")
2856    *           .build();
2857    *   ApiFuture<Operation> future =
2858    *       cloudChannelServiceClient.cancelEntitlementCallable().futureCall(request);
2859    *   // Do something.
2860    *   future.get();
2861    * }
2862    * }</pre>
2863    */
cancelEntitlementCallable()2864   public final UnaryCallable<CancelEntitlementRequest, Operation> cancelEntitlementCallable() {
2865     return stub.cancelEntitlementCallable();
2866   }
2867 
2868   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2869   /**
2870    * Activates a previously suspended entitlement. Entitlements suspended for pending ToS acceptance
2871    * can't be activated using this method.
2872    *
2873    * <p>An entitlement activation is a long-running operation and it updates the state of the
2874    * customer entitlement.
2875    *
2876    * <p>Possible error codes:
2877    *
2878    * <ul>
2879    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
2880    *       account in the API request.
2881    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2882    *   <li>NOT_FOUND: Entitlement resource not found.
2883    *   <li>SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and
2884    *       entitlements that have accepted the TOS.
2885    *   <li>NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state.
2886    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2887    *       Channel support.
2888    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2889    *       Channel support.
2890    * </ul>
2891    *
2892    * <p>Return value: The ID of a long-running operation.
2893    *
2894    * <p>To get the results of the operation, call the GetOperation method of
2895    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2896    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2897    *
2898    * <p>Sample code:
2899    *
2900    * <pre>{@code
2901    * // This snippet has been automatically generated and should be regarded as a code template only.
2902    * // It will require modifications to work:
2903    * // - It may require correct/in-range values for request initialization.
2904    * // - It may require specifying regional endpoints when creating the service client as shown in
2905    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2906    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2907    *   ActivateEntitlementRequest request =
2908    *       ActivateEntitlementRequest.newBuilder()
2909    *           .setName("name3373707")
2910    *           .setRequestId("requestId693933066")
2911    *           .build();
2912    *   Entitlement response = cloudChannelServiceClient.activateEntitlementAsync(request).get();
2913    * }
2914    * }</pre>
2915    *
2916    * @param request The request object containing all of the parameters for the API call.
2917    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2918    */
activateEntitlementAsync( ActivateEntitlementRequest request)2919   public final OperationFuture<Entitlement, OperationMetadata> activateEntitlementAsync(
2920       ActivateEntitlementRequest request) {
2921     return activateEntitlementOperationCallable().futureCall(request);
2922   }
2923 
2924   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2925   /**
2926    * Activates a previously suspended entitlement. Entitlements suspended for pending ToS acceptance
2927    * can't be activated using this method.
2928    *
2929    * <p>An entitlement activation is a long-running operation and it updates the state of the
2930    * customer entitlement.
2931    *
2932    * <p>Possible error codes:
2933    *
2934    * <ul>
2935    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
2936    *       account in the API request.
2937    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2938    *   <li>NOT_FOUND: Entitlement resource not found.
2939    *   <li>SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and
2940    *       entitlements that have accepted the TOS.
2941    *   <li>NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state.
2942    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2943    *       Channel support.
2944    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
2945    *       Channel support.
2946    * </ul>
2947    *
2948    * <p>Return value: The ID of a long-running operation.
2949    *
2950    * <p>To get the results of the operation, call the GetOperation method of
2951    * CloudChannelOperationsService. The Operation metadata will contain an instance of
2952    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
2953    *
2954    * <p>Sample code:
2955    *
2956    * <pre>{@code
2957    * // This snippet has been automatically generated and should be regarded as a code template only.
2958    * // It will require modifications to work:
2959    * // - It may require correct/in-range values for request initialization.
2960    * // - It may require specifying regional endpoints when creating the service client as shown in
2961    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2962    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
2963    *   ActivateEntitlementRequest request =
2964    *       ActivateEntitlementRequest.newBuilder()
2965    *           .setName("name3373707")
2966    *           .setRequestId("requestId693933066")
2967    *           .build();
2968    *   OperationFuture<Entitlement, OperationMetadata> future =
2969    *       cloudChannelServiceClient.activateEntitlementOperationCallable().futureCall(request);
2970    *   // Do something.
2971    *   Entitlement response = future.get();
2972    * }
2973    * }</pre>
2974    */
2975   public final OperationCallable<ActivateEntitlementRequest, Entitlement, OperationMetadata>
activateEntitlementOperationCallable()2976       activateEntitlementOperationCallable() {
2977     return stub.activateEntitlementOperationCallable();
2978   }
2979 
2980   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2981   /**
2982    * Activates a previously suspended entitlement. Entitlements suspended for pending ToS acceptance
2983    * can't be activated using this method.
2984    *
2985    * <p>An entitlement activation is a long-running operation and it updates the state of the
2986    * customer entitlement.
2987    *
2988    * <p>Possible error codes:
2989    *
2990    * <ul>
2991    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
2992    *       account in the API request.
2993    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
2994    *   <li>NOT_FOUND: Entitlement resource not found.
2995    *   <li>SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and
2996    *       entitlements that have accepted the TOS.
2997    *   <li>NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state.
2998    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
2999    *       Channel support.
3000    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
3001    *       Channel support.
3002    * </ul>
3003    *
3004    * <p>Return value: The ID of a long-running operation.
3005    *
3006    * <p>To get the results of the operation, call the GetOperation method of
3007    * CloudChannelOperationsService. The Operation metadata will contain an instance of
3008    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
3009    *
3010    * <p>Sample code:
3011    *
3012    * <pre>{@code
3013    * // This snippet has been automatically generated and should be regarded as a code template only.
3014    * // It will require modifications to work:
3015    * // - It may require correct/in-range values for request initialization.
3016    * // - It may require specifying regional endpoints when creating the service client as shown in
3017    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3018    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3019    *   ActivateEntitlementRequest request =
3020    *       ActivateEntitlementRequest.newBuilder()
3021    *           .setName("name3373707")
3022    *           .setRequestId("requestId693933066")
3023    *           .build();
3024    *   ApiFuture<Operation> future =
3025    *       cloudChannelServiceClient.activateEntitlementCallable().futureCall(request);
3026    *   // Do something.
3027    *   Operation response = future.get();
3028    * }
3029    * }</pre>
3030    */
activateEntitlementCallable()3031   public final UnaryCallable<ActivateEntitlementRequest, Operation> activateEntitlementCallable() {
3032     return stub.activateEntitlementCallable();
3033   }
3034 
3035   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3036   /**
3037    * Transfers customer entitlements to new reseller.
3038    *
3039    * <p>Possible error codes:
3040    *
3041    * <ul>
3042    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
3043    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3044    *   <li>NOT_FOUND: The customer or offer resource was not found.
3045    *   <li>ALREADY_EXISTS: The SKU was already transferred for the customer.
3046    *   <li>CONDITION_NOT_MET or FAILED_PRECONDITION: &#42; The SKU requires domain verification to
3047    *       transfer, but the domain is not verified. &#42; An Add-On SKU (example, Vault or Drive)
3048    *       is missing the pre-requisite SKU (example, G Suite Basic). &#42; (Developer accounts
3049    *       only) Reseller and resold domain must meet the following naming requirements: &#42;
3050    *       Domain names must start with goog-test. &#42; Domain names must include the reseller
3051    *       domain. &#42; Specify all transferring entitlements.
3052    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
3053    *       Channel support.
3054    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
3055    *       Channel support.
3056    * </ul>
3057    *
3058    * <p>Return value: The ID of a long-running operation.
3059    *
3060    * <p>To get the results of the operation, call the GetOperation method of
3061    * CloudChannelOperationsService. The Operation metadata will contain an instance of
3062    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
3063    *
3064    * <p>Sample code:
3065    *
3066    * <pre>{@code
3067    * // This snippet has been automatically generated and should be regarded as a code template only.
3068    * // It will require modifications to work:
3069    * // - It may require correct/in-range values for request initialization.
3070    * // - It may require specifying regional endpoints when creating the service client as shown in
3071    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3072    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3073    *   TransferEntitlementsRequest request =
3074    *       TransferEntitlementsRequest.newBuilder()
3075    *           .setParent("parent-995424086")
3076    *           .addAllEntitlements(new ArrayList<Entitlement>())
3077    *           .setAuthToken("authToken1450587441")
3078    *           .setRequestId("requestId693933066")
3079    *           .build();
3080    *   TransferEntitlementsResponse response =
3081    *       cloudChannelServiceClient.transferEntitlementsAsync(request).get();
3082    * }
3083    * }</pre>
3084    *
3085    * @param request The request object containing all of the parameters for the API call.
3086    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3087    */
3088   public final OperationFuture<TransferEntitlementsResponse, OperationMetadata>
transferEntitlementsAsync(TransferEntitlementsRequest request)3089       transferEntitlementsAsync(TransferEntitlementsRequest request) {
3090     return transferEntitlementsOperationCallable().futureCall(request);
3091   }
3092 
3093   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3094   /**
3095    * Transfers customer entitlements to new reseller.
3096    *
3097    * <p>Possible error codes:
3098    *
3099    * <ul>
3100    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
3101    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3102    *   <li>NOT_FOUND: The customer or offer resource was not found.
3103    *   <li>ALREADY_EXISTS: The SKU was already transferred for the customer.
3104    *   <li>CONDITION_NOT_MET or FAILED_PRECONDITION: &#42; The SKU requires domain verification to
3105    *       transfer, but the domain is not verified. &#42; An Add-On SKU (example, Vault or Drive)
3106    *       is missing the pre-requisite SKU (example, G Suite Basic). &#42; (Developer accounts
3107    *       only) Reseller and resold domain must meet the following naming requirements: &#42;
3108    *       Domain names must start with goog-test. &#42; Domain names must include the reseller
3109    *       domain. &#42; Specify all transferring entitlements.
3110    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
3111    *       Channel support.
3112    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
3113    *       Channel support.
3114    * </ul>
3115    *
3116    * <p>Return value: The ID of a long-running operation.
3117    *
3118    * <p>To get the results of the operation, call the GetOperation method of
3119    * CloudChannelOperationsService. The Operation metadata will contain an instance of
3120    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
3121    *
3122    * <p>Sample code:
3123    *
3124    * <pre>{@code
3125    * // This snippet has been automatically generated and should be regarded as a code template only.
3126    * // It will require modifications to work:
3127    * // - It may require correct/in-range values for request initialization.
3128    * // - It may require specifying regional endpoints when creating the service client as shown in
3129    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3130    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3131    *   TransferEntitlementsRequest request =
3132    *       TransferEntitlementsRequest.newBuilder()
3133    *           .setParent("parent-995424086")
3134    *           .addAllEntitlements(new ArrayList<Entitlement>())
3135    *           .setAuthToken("authToken1450587441")
3136    *           .setRequestId("requestId693933066")
3137    *           .build();
3138    *   OperationFuture<TransferEntitlementsResponse, OperationMetadata> future =
3139    *       cloudChannelServiceClient.transferEntitlementsOperationCallable().futureCall(request);
3140    *   // Do something.
3141    *   TransferEntitlementsResponse response = future.get();
3142    * }
3143    * }</pre>
3144    */
3145   public final OperationCallable<
3146           TransferEntitlementsRequest, TransferEntitlementsResponse, OperationMetadata>
transferEntitlementsOperationCallable()3147       transferEntitlementsOperationCallable() {
3148     return stub.transferEntitlementsOperationCallable();
3149   }
3150 
3151   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3152   /**
3153    * Transfers customer entitlements to new reseller.
3154    *
3155    * <p>Possible error codes:
3156    *
3157    * <ul>
3158    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
3159    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3160    *   <li>NOT_FOUND: The customer or offer resource was not found.
3161    *   <li>ALREADY_EXISTS: The SKU was already transferred for the customer.
3162    *   <li>CONDITION_NOT_MET or FAILED_PRECONDITION: &#42; The SKU requires domain verification to
3163    *       transfer, but the domain is not verified. &#42; An Add-On SKU (example, Vault or Drive)
3164    *       is missing the pre-requisite SKU (example, G Suite Basic). &#42; (Developer accounts
3165    *       only) Reseller and resold domain must meet the following naming requirements: &#42;
3166    *       Domain names must start with goog-test. &#42; Domain names must include the reseller
3167    *       domain. &#42; Specify all transferring entitlements.
3168    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
3169    *       Channel support.
3170    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
3171    *       Channel support.
3172    * </ul>
3173    *
3174    * <p>Return value: The ID of a long-running operation.
3175    *
3176    * <p>To get the results of the operation, call the GetOperation method of
3177    * CloudChannelOperationsService. The Operation metadata will contain an instance of
3178    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
3179    *
3180    * <p>Sample code:
3181    *
3182    * <pre>{@code
3183    * // This snippet has been automatically generated and should be regarded as a code template only.
3184    * // It will require modifications to work:
3185    * // - It may require correct/in-range values for request initialization.
3186    * // - It may require specifying regional endpoints when creating the service client as shown in
3187    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3188    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3189    *   TransferEntitlementsRequest request =
3190    *       TransferEntitlementsRequest.newBuilder()
3191    *           .setParent("parent-995424086")
3192    *           .addAllEntitlements(new ArrayList<Entitlement>())
3193    *           .setAuthToken("authToken1450587441")
3194    *           .setRequestId("requestId693933066")
3195    *           .build();
3196    *   ApiFuture<Operation> future =
3197    *       cloudChannelServiceClient.transferEntitlementsCallable().futureCall(request);
3198    *   // Do something.
3199    *   Operation response = future.get();
3200    * }
3201    * }</pre>
3202    */
3203   public final UnaryCallable<TransferEntitlementsRequest, Operation>
transferEntitlementsCallable()3204       transferEntitlementsCallable() {
3205     return stub.transferEntitlementsCallable();
3206   }
3207 
3208   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3209   /**
3210    * Transfers customer entitlements from their current reseller to Google.
3211    *
3212    * <p>Possible error codes:
3213    *
3214    * <ul>
3215    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
3216    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3217    *   <li>NOT_FOUND: The customer or offer resource was not found.
3218    *   <li>ALREADY_EXISTS: The SKU was already transferred for the customer.
3219    *   <li>CONDITION_NOT_MET or FAILED_PRECONDITION: &#42; The SKU requires domain verification to
3220    *       transfer, but the domain is not verified. &#42; An Add-On SKU (example, Vault or Drive)
3221    *       is missing the pre-requisite SKU (example, G Suite Basic). &#42; (Developer accounts
3222    *       only) Reseller and resold domain must meet the following naming requirements: &#42;
3223    *       Domain names must start with goog-test. &#42; Domain names must include the reseller
3224    *       domain.
3225    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
3226    *       Channel support.
3227    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
3228    *       Channel support.
3229    * </ul>
3230    *
3231    * <p>Return value: The ID of a long-running operation.
3232    *
3233    * <p>To get the results of the operation, call the GetOperation method of
3234    * CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The
3235    * Operation metadata will contain an instance of
3236    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
3237    *
3238    * <p>Sample code:
3239    *
3240    * <pre>{@code
3241    * // This snippet has been automatically generated and should be regarded as a code template only.
3242    * // It will require modifications to work:
3243    * // - It may require correct/in-range values for request initialization.
3244    * // - It may require specifying regional endpoints when creating the service client as shown in
3245    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3246    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3247    *   TransferEntitlementsToGoogleRequest request =
3248    *       TransferEntitlementsToGoogleRequest.newBuilder()
3249    *           .setParent("parent-995424086")
3250    *           .addAllEntitlements(new ArrayList<Entitlement>())
3251    *           .setRequestId("requestId693933066")
3252    *           .build();
3253    *   cloudChannelServiceClient.transferEntitlementsToGoogleAsync(request).get();
3254    * }
3255    * }</pre>
3256    *
3257    * @param request The request object containing all of the parameters for the API call.
3258    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3259    */
transferEntitlementsToGoogleAsync( TransferEntitlementsToGoogleRequest request)3260   public final OperationFuture<Empty, OperationMetadata> transferEntitlementsToGoogleAsync(
3261       TransferEntitlementsToGoogleRequest request) {
3262     return transferEntitlementsToGoogleOperationCallable().futureCall(request);
3263   }
3264 
3265   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3266   /**
3267    * Transfers customer entitlements from their current reseller to Google.
3268    *
3269    * <p>Possible error codes:
3270    *
3271    * <ul>
3272    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
3273    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3274    *   <li>NOT_FOUND: The customer or offer resource was not found.
3275    *   <li>ALREADY_EXISTS: The SKU was already transferred for the customer.
3276    *   <li>CONDITION_NOT_MET or FAILED_PRECONDITION: &#42; The SKU requires domain verification to
3277    *       transfer, but the domain is not verified. &#42; An Add-On SKU (example, Vault or Drive)
3278    *       is missing the pre-requisite SKU (example, G Suite Basic). &#42; (Developer accounts
3279    *       only) Reseller and resold domain must meet the following naming requirements: &#42;
3280    *       Domain names must start with goog-test. &#42; Domain names must include the reseller
3281    *       domain.
3282    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
3283    *       Channel support.
3284    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
3285    *       Channel support.
3286    * </ul>
3287    *
3288    * <p>Return value: The ID of a long-running operation.
3289    *
3290    * <p>To get the results of the operation, call the GetOperation method of
3291    * CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The
3292    * Operation metadata will contain an instance of
3293    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
3294    *
3295    * <p>Sample code:
3296    *
3297    * <pre>{@code
3298    * // This snippet has been automatically generated and should be regarded as a code template only.
3299    * // It will require modifications to work:
3300    * // - It may require correct/in-range values for request initialization.
3301    * // - It may require specifying regional endpoints when creating the service client as shown in
3302    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3303    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3304    *   TransferEntitlementsToGoogleRequest request =
3305    *       TransferEntitlementsToGoogleRequest.newBuilder()
3306    *           .setParent("parent-995424086")
3307    *           .addAllEntitlements(new ArrayList<Entitlement>())
3308    *           .setRequestId("requestId693933066")
3309    *           .build();
3310    *   OperationFuture<Empty, OperationMetadata> future =
3311    *       cloudChannelServiceClient
3312    *           .transferEntitlementsToGoogleOperationCallable()
3313    *           .futureCall(request);
3314    *   // Do something.
3315    *   future.get();
3316    * }
3317    * }</pre>
3318    */
3319   public final OperationCallable<TransferEntitlementsToGoogleRequest, Empty, OperationMetadata>
transferEntitlementsToGoogleOperationCallable()3320       transferEntitlementsToGoogleOperationCallable() {
3321     return stub.transferEntitlementsToGoogleOperationCallable();
3322   }
3323 
3324   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3325   /**
3326    * Transfers customer entitlements from their current reseller to Google.
3327    *
3328    * <p>Possible error codes:
3329    *
3330    * <ul>
3331    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
3332    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3333    *   <li>NOT_FOUND: The customer or offer resource was not found.
3334    *   <li>ALREADY_EXISTS: The SKU was already transferred for the customer.
3335    *   <li>CONDITION_NOT_MET or FAILED_PRECONDITION: &#42; The SKU requires domain verification to
3336    *       transfer, but the domain is not verified. &#42; An Add-On SKU (example, Vault or Drive)
3337    *       is missing the pre-requisite SKU (example, G Suite Basic). &#42; (Developer accounts
3338    *       only) Reseller and resold domain must meet the following naming requirements: &#42;
3339    *       Domain names must start with goog-test. &#42; Domain names must include the reseller
3340    *       domain.
3341    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
3342    *       Channel support.
3343    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
3344    *       Channel support.
3345    * </ul>
3346    *
3347    * <p>Return value: The ID of a long-running operation.
3348    *
3349    * <p>To get the results of the operation, call the GetOperation method of
3350    * CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The
3351    * Operation metadata will contain an instance of
3352    * [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
3353    *
3354    * <p>Sample code:
3355    *
3356    * <pre>{@code
3357    * // This snippet has been automatically generated and should be regarded as a code template only.
3358    * // It will require modifications to work:
3359    * // - It may require correct/in-range values for request initialization.
3360    * // - It may require specifying regional endpoints when creating the service client as shown in
3361    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3362    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3363    *   TransferEntitlementsToGoogleRequest request =
3364    *       TransferEntitlementsToGoogleRequest.newBuilder()
3365    *           .setParent("parent-995424086")
3366    *           .addAllEntitlements(new ArrayList<Entitlement>())
3367    *           .setRequestId("requestId693933066")
3368    *           .build();
3369    *   ApiFuture<Operation> future =
3370    *       cloudChannelServiceClient.transferEntitlementsToGoogleCallable().futureCall(request);
3371    *   // Do something.
3372    *   future.get();
3373    * }
3374    * }</pre>
3375    */
3376   public final UnaryCallable<TransferEntitlementsToGoogleRequest, Operation>
transferEntitlementsToGoogleCallable()3377       transferEntitlementsToGoogleCallable() {
3378     return stub.transferEntitlementsToGoogleCallable();
3379   }
3380 
3381   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3382   /**
3383    * List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a
3384    * distributor. You must be a distributor to call this method.
3385    *
3386    * <p>Possible error codes:
3387    *
3388    * <ul>
3389    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
3390    *       account in the API request.
3391    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3392    * </ul>
3393    *
3394    * <p>Return value: The list of the distributor account's
3395    * [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources.
3396    *
3397    * <p>Sample code:
3398    *
3399    * <pre>{@code
3400    * // This snippet has been automatically generated and should be regarded as a code template only.
3401    * // It will require modifications to work:
3402    * // - It may require correct/in-range values for request initialization.
3403    * // - It may require specifying regional endpoints when creating the service client as shown in
3404    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3405    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3406    *   ListChannelPartnerLinksRequest request =
3407    *       ListChannelPartnerLinksRequest.newBuilder()
3408    *           .setParent("parent-995424086")
3409    *           .setPageSize(883849137)
3410    *           .setPageToken("pageToken873572522")
3411    *           .setView(ChannelPartnerLinkView.forNumber(0))
3412    *           .build();
3413    *   for (ChannelPartnerLink element :
3414    *       cloudChannelServiceClient.listChannelPartnerLinks(request).iterateAll()) {
3415    *     // doThingsWith(element);
3416    *   }
3417    * }
3418    * }</pre>
3419    *
3420    * @param request The request object containing all of the parameters for the API call.
3421    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3422    */
listChannelPartnerLinks( ListChannelPartnerLinksRequest request)3423   public final ListChannelPartnerLinksPagedResponse listChannelPartnerLinks(
3424       ListChannelPartnerLinksRequest request) {
3425     return listChannelPartnerLinksPagedCallable().call(request);
3426   }
3427 
3428   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3429   /**
3430    * List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a
3431    * distributor. You must be a distributor to call this method.
3432    *
3433    * <p>Possible error codes:
3434    *
3435    * <ul>
3436    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
3437    *       account in the API request.
3438    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3439    * </ul>
3440    *
3441    * <p>Return value: The list of the distributor account's
3442    * [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources.
3443    *
3444    * <p>Sample code:
3445    *
3446    * <pre>{@code
3447    * // This snippet has been automatically generated and should be regarded as a code template only.
3448    * // It will require modifications to work:
3449    * // - It may require correct/in-range values for request initialization.
3450    * // - It may require specifying regional endpoints when creating the service client as shown in
3451    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3452    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3453    *   ListChannelPartnerLinksRequest request =
3454    *       ListChannelPartnerLinksRequest.newBuilder()
3455    *           .setParent("parent-995424086")
3456    *           .setPageSize(883849137)
3457    *           .setPageToken("pageToken873572522")
3458    *           .setView(ChannelPartnerLinkView.forNumber(0))
3459    *           .build();
3460    *   ApiFuture<ChannelPartnerLink> future =
3461    *       cloudChannelServiceClient.listChannelPartnerLinksPagedCallable().futureCall(request);
3462    *   // Do something.
3463    *   for (ChannelPartnerLink element : future.get().iterateAll()) {
3464    *     // doThingsWith(element);
3465    *   }
3466    * }
3467    * }</pre>
3468    */
3469   public final UnaryCallable<ListChannelPartnerLinksRequest, ListChannelPartnerLinksPagedResponse>
listChannelPartnerLinksPagedCallable()3470       listChannelPartnerLinksPagedCallable() {
3471     return stub.listChannelPartnerLinksPagedCallable();
3472   }
3473 
3474   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3475   /**
3476    * List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a
3477    * distributor. You must be a distributor to call this method.
3478    *
3479    * <p>Possible error codes:
3480    *
3481    * <ul>
3482    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
3483    *       account in the API request.
3484    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3485    * </ul>
3486    *
3487    * <p>Return value: The list of the distributor account's
3488    * [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources.
3489    *
3490    * <p>Sample code:
3491    *
3492    * <pre>{@code
3493    * // This snippet has been automatically generated and should be regarded as a code template only.
3494    * // It will require modifications to work:
3495    * // - It may require correct/in-range values for request initialization.
3496    * // - It may require specifying regional endpoints when creating the service client as shown in
3497    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3498    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3499    *   ListChannelPartnerLinksRequest request =
3500    *       ListChannelPartnerLinksRequest.newBuilder()
3501    *           .setParent("parent-995424086")
3502    *           .setPageSize(883849137)
3503    *           .setPageToken("pageToken873572522")
3504    *           .setView(ChannelPartnerLinkView.forNumber(0))
3505    *           .build();
3506    *   while (true) {
3507    *     ListChannelPartnerLinksResponse response =
3508    *         cloudChannelServiceClient.listChannelPartnerLinksCallable().call(request);
3509    *     for (ChannelPartnerLink element : response.getChannelPartnerLinksList()) {
3510    *       // doThingsWith(element);
3511    *     }
3512    *     String nextPageToken = response.getNextPageToken();
3513    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
3514    *       request = request.toBuilder().setPageToken(nextPageToken).build();
3515    *     } else {
3516    *       break;
3517    *     }
3518    *   }
3519    * }
3520    * }</pre>
3521    */
3522   public final UnaryCallable<ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse>
listChannelPartnerLinksCallable()3523       listChannelPartnerLinksCallable() {
3524     return stub.listChannelPartnerLinksCallable();
3525   }
3526 
3527   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3528   /**
3529    * Returns the requested [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]
3530    * resource. You must be a distributor to call this method.
3531    *
3532    * <p>Possible error codes:
3533    *
3534    * <ul>
3535    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
3536    *       account in the API request.
3537    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3538    *   <li>NOT_FOUND: ChannelPartnerLink resource not found because of an invalid channel partner
3539    *       link name.
3540    * </ul>
3541    *
3542    * <p>Return value: The [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
3543    *
3544    * <p>Sample code:
3545    *
3546    * <pre>{@code
3547    * // This snippet has been automatically generated and should be regarded as a code template only.
3548    * // It will require modifications to work:
3549    * // - It may require correct/in-range values for request initialization.
3550    * // - It may require specifying regional endpoints when creating the service client as shown in
3551    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3552    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3553    *   GetChannelPartnerLinkRequest request =
3554    *       GetChannelPartnerLinkRequest.newBuilder()
3555    *           .setName("name3373707")
3556    *           .setView(ChannelPartnerLinkView.forNumber(0))
3557    *           .build();
3558    *   ChannelPartnerLink response = cloudChannelServiceClient.getChannelPartnerLink(request);
3559    * }
3560    * }</pre>
3561    *
3562    * @param request The request object containing all of the parameters for the API call.
3563    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3564    */
getChannelPartnerLink(GetChannelPartnerLinkRequest request)3565   public final ChannelPartnerLink getChannelPartnerLink(GetChannelPartnerLinkRequest request) {
3566     return getChannelPartnerLinkCallable().call(request);
3567   }
3568 
3569   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3570   /**
3571    * Returns the requested [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]
3572    * resource. You must be a distributor to call this method.
3573    *
3574    * <p>Possible error codes:
3575    *
3576    * <ul>
3577    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
3578    *       account in the API request.
3579    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3580    *   <li>NOT_FOUND: ChannelPartnerLink resource not found because of an invalid channel partner
3581    *       link name.
3582    * </ul>
3583    *
3584    * <p>Return value: The [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
3585    *
3586    * <p>Sample code:
3587    *
3588    * <pre>{@code
3589    * // This snippet has been automatically generated and should be regarded as a code template only.
3590    * // It will require modifications to work:
3591    * // - It may require correct/in-range values for request initialization.
3592    * // - It may require specifying regional endpoints when creating the service client as shown in
3593    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3594    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3595    *   GetChannelPartnerLinkRequest request =
3596    *       GetChannelPartnerLinkRequest.newBuilder()
3597    *           .setName("name3373707")
3598    *           .setView(ChannelPartnerLinkView.forNumber(0))
3599    *           .build();
3600    *   ApiFuture<ChannelPartnerLink> future =
3601    *       cloudChannelServiceClient.getChannelPartnerLinkCallable().futureCall(request);
3602    *   // Do something.
3603    *   ChannelPartnerLink response = future.get();
3604    * }
3605    * }</pre>
3606    */
3607   public final UnaryCallable<GetChannelPartnerLinkRequest, ChannelPartnerLink>
getChannelPartnerLinkCallable()3608       getChannelPartnerLinkCallable() {
3609     return stub.getChannelPartnerLinkCallable();
3610   }
3611 
3612   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3613   /**
3614    * Initiates a channel partner link between a distributor and a reseller, or between resellers in
3615    * an n-tier reseller channel. Invited partners need to follow the invite_link_uri provided in the
3616    * response to accept. After accepting the invitation, a link is set up between the two parties.
3617    * You must be a distributor to call this method.
3618    *
3619    * <p>Possible error codes:
3620    *
3621    * <ul>
3622    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
3623    *       account in the API request.
3624    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3625    *   <li>ALREADY_EXISTS: The ChannelPartnerLink sent in the request already exists.
3626    *   <li>NOT_FOUND: No Cloud Identity customer exists for provided domain.
3627    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
3628    *       Channel support.
3629    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
3630    *       Channel support.
3631    * </ul>
3632    *
3633    * <p>Return value: The new [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]
3634    * resource.
3635    *
3636    * <p>Sample code:
3637    *
3638    * <pre>{@code
3639    * // This snippet has been automatically generated and should be regarded as a code template only.
3640    * // It will require modifications to work:
3641    * // - It may require correct/in-range values for request initialization.
3642    * // - It may require specifying regional endpoints when creating the service client as shown in
3643    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3644    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3645    *   CreateChannelPartnerLinkRequest request =
3646    *       CreateChannelPartnerLinkRequest.newBuilder()
3647    *           .setParent("parent-995424086")
3648    *           .setChannelPartnerLink(ChannelPartnerLink.newBuilder().build())
3649    *           .build();
3650    *   ChannelPartnerLink response = cloudChannelServiceClient.createChannelPartnerLink(request);
3651    * }
3652    * }</pre>
3653    *
3654    * @param request The request object containing all of the parameters for the API call.
3655    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3656    */
createChannelPartnerLink( CreateChannelPartnerLinkRequest request)3657   public final ChannelPartnerLink createChannelPartnerLink(
3658       CreateChannelPartnerLinkRequest request) {
3659     return createChannelPartnerLinkCallable().call(request);
3660   }
3661 
3662   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3663   /**
3664    * Initiates a channel partner link between a distributor and a reseller, or between resellers in
3665    * an n-tier reseller channel. Invited partners need to follow the invite_link_uri provided in the
3666    * response to accept. After accepting the invitation, a link is set up between the two parties.
3667    * You must be a distributor to call this method.
3668    *
3669    * <p>Possible error codes:
3670    *
3671    * <ul>
3672    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
3673    *       account in the API request.
3674    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
3675    *   <li>ALREADY_EXISTS: The ChannelPartnerLink sent in the request already exists.
3676    *   <li>NOT_FOUND: No Cloud Identity customer exists for provided domain.
3677    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
3678    *       Channel support.
3679    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
3680    *       Channel support.
3681    * </ul>
3682    *
3683    * <p>Return value: The new [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]
3684    * resource.
3685    *
3686    * <p>Sample code:
3687    *
3688    * <pre>{@code
3689    * // This snippet has been automatically generated and should be regarded as a code template only.
3690    * // It will require modifications to work:
3691    * // - It may require correct/in-range values for request initialization.
3692    * // - It may require specifying regional endpoints when creating the service client as shown in
3693    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3694    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3695    *   CreateChannelPartnerLinkRequest request =
3696    *       CreateChannelPartnerLinkRequest.newBuilder()
3697    *           .setParent("parent-995424086")
3698    *           .setChannelPartnerLink(ChannelPartnerLink.newBuilder().build())
3699    *           .build();
3700    *   ApiFuture<ChannelPartnerLink> future =
3701    *       cloudChannelServiceClient.createChannelPartnerLinkCallable().futureCall(request);
3702    *   // Do something.
3703    *   ChannelPartnerLink response = future.get();
3704    * }
3705    * }</pre>
3706    */
3707   public final UnaryCallable<CreateChannelPartnerLinkRequest, ChannelPartnerLink>
createChannelPartnerLinkCallable()3708       createChannelPartnerLinkCallable() {
3709     return stub.createChannelPartnerLinkCallable();
3710   }
3711 
3712   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3713   /**
3714    * Updates a channel partner link. Distributors call this method to change a link's status. For
3715    * example, to suspend a partner link. You must be a distributor to call this method.
3716    *
3717    * <p>Possible error codes:
3718    *
3719    * <ul>
3720    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
3721    *       account in the API request.
3722    *   <li>INVALID_ARGUMENT: &#42; Required request parameters are missing or invalid. &#42; Link
3723    *       state cannot change from invited to active or suspended. &#42; Cannot send
3724    *       reseller_cloud_identity_id, invite_url, or name in update mask.
3725    *   <li>NOT_FOUND: ChannelPartnerLink resource not found.
3726    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
3727    *       Channel support.
3728    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
3729    *       Channel support.
3730    * </ul>
3731    *
3732    * <p>Return value: The updated [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]
3733    * resource.
3734    *
3735    * <p>Sample code:
3736    *
3737    * <pre>{@code
3738    * // This snippet has been automatically generated and should be regarded as a code template only.
3739    * // It will require modifications to work:
3740    * // - It may require correct/in-range values for request initialization.
3741    * // - It may require specifying regional endpoints when creating the service client as shown in
3742    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3743    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3744    *   UpdateChannelPartnerLinkRequest request =
3745    *       UpdateChannelPartnerLinkRequest.newBuilder()
3746    *           .setName("name3373707")
3747    *           .setChannelPartnerLink(ChannelPartnerLink.newBuilder().build())
3748    *           .setUpdateMask(FieldMask.newBuilder().build())
3749    *           .build();
3750    *   ChannelPartnerLink response = cloudChannelServiceClient.updateChannelPartnerLink(request);
3751    * }
3752    * }</pre>
3753    *
3754    * @param request The request object containing all of the parameters for the API call.
3755    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3756    */
updateChannelPartnerLink( UpdateChannelPartnerLinkRequest request)3757   public final ChannelPartnerLink updateChannelPartnerLink(
3758       UpdateChannelPartnerLinkRequest request) {
3759     return updateChannelPartnerLinkCallable().call(request);
3760   }
3761 
3762   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3763   /**
3764    * Updates a channel partner link. Distributors call this method to change a link's status. For
3765    * example, to suspend a partner link. You must be a distributor to call this method.
3766    *
3767    * <p>Possible error codes:
3768    *
3769    * <ul>
3770    *   <li>PERMISSION_DENIED: The reseller account making the request is different from the reseller
3771    *       account in the API request.
3772    *   <li>INVALID_ARGUMENT: &#42; Required request parameters are missing or invalid. &#42; Link
3773    *       state cannot change from invited to active or suspended. &#42; Cannot send
3774    *       reseller_cloud_identity_id, invite_url, or name in update mask.
3775    *   <li>NOT_FOUND: ChannelPartnerLink resource not found.
3776    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
3777    *       Channel support.
3778    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
3779    *       Channel support.
3780    * </ul>
3781    *
3782    * <p>Return value: The updated [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]
3783    * resource.
3784    *
3785    * <p>Sample code:
3786    *
3787    * <pre>{@code
3788    * // This snippet has been automatically generated and should be regarded as a code template only.
3789    * // It will require modifications to work:
3790    * // - It may require correct/in-range values for request initialization.
3791    * // - It may require specifying regional endpoints when creating the service client as shown in
3792    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3793    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3794    *   UpdateChannelPartnerLinkRequest request =
3795    *       UpdateChannelPartnerLinkRequest.newBuilder()
3796    *           .setName("name3373707")
3797    *           .setChannelPartnerLink(ChannelPartnerLink.newBuilder().build())
3798    *           .setUpdateMask(FieldMask.newBuilder().build())
3799    *           .build();
3800    *   ApiFuture<ChannelPartnerLink> future =
3801    *       cloudChannelServiceClient.updateChannelPartnerLinkCallable().futureCall(request);
3802    *   // Do something.
3803    *   ChannelPartnerLink response = future.get();
3804    * }
3805    * }</pre>
3806    */
3807   public final UnaryCallable<UpdateChannelPartnerLinkRequest, ChannelPartnerLink>
updateChannelPartnerLinkCallable()3808       updateChannelPartnerLinkCallable() {
3809     return stub.updateChannelPartnerLinkCallable();
3810   }
3811 
3812   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3813   /**
3814    * Gets information about how a Reseller modifies their bill before sending it to a Customer.
3815    *
3816    * <p>Possible Error Codes:
3817    *
3818    * <ul>
3819    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
3820    *       different.
3821    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
3822    *       was not found.
3823    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
3824    *       contact Cloud Channel support.
3825    * </ul>
3826    *
3827    * <p>Return Value: If successful, the
3828    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resource, otherwise
3829    * returns an error.
3830    *
3831    * <p>Sample code:
3832    *
3833    * <pre>{@code
3834    * // This snippet has been automatically generated and should be regarded as a code template only.
3835    * // It will require modifications to work:
3836    * // - It may require correct/in-range values for request initialization.
3837    * // - It may require specifying regional endpoints when creating the service client as shown in
3838    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3839    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3840    *   CustomerRepricingConfigName name =
3841    *       CustomerRepricingConfigName.of("[ACCOUNT]", "[CUSTOMER]", "[CUSTOMER_REPRICING_CONFIG]");
3842    *   CustomerRepricingConfig response = cloudChannelServiceClient.getCustomerRepricingConfig(name);
3843    * }
3844    * }</pre>
3845    *
3846    * @param name Required. The resource name of the CustomerRepricingConfig. Format:
3847    *     accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.
3848    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3849    */
getCustomerRepricingConfig( CustomerRepricingConfigName name)3850   public final CustomerRepricingConfig getCustomerRepricingConfig(
3851       CustomerRepricingConfigName name) {
3852     GetCustomerRepricingConfigRequest request =
3853         GetCustomerRepricingConfigRequest.newBuilder()
3854             .setName(name == null ? null : name.toString())
3855             .build();
3856     return getCustomerRepricingConfig(request);
3857   }
3858 
3859   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3860   /**
3861    * Gets information about how a Reseller modifies their bill before sending it to a Customer.
3862    *
3863    * <p>Possible Error Codes:
3864    *
3865    * <ul>
3866    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
3867    *       different.
3868    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
3869    *       was not found.
3870    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
3871    *       contact Cloud Channel support.
3872    * </ul>
3873    *
3874    * <p>Return Value: If successful, the
3875    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resource, otherwise
3876    * returns an error.
3877    *
3878    * <p>Sample code:
3879    *
3880    * <pre>{@code
3881    * // This snippet has been automatically generated and should be regarded as a code template only.
3882    * // It will require modifications to work:
3883    * // - It may require correct/in-range values for request initialization.
3884    * // - It may require specifying regional endpoints when creating the service client as shown in
3885    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3886    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3887    *   String name =
3888    *       CustomerRepricingConfigName.of("[ACCOUNT]", "[CUSTOMER]", "[CUSTOMER_REPRICING_CONFIG]")
3889    *           .toString();
3890    *   CustomerRepricingConfig response = cloudChannelServiceClient.getCustomerRepricingConfig(name);
3891    * }
3892    * }</pre>
3893    *
3894    * @param name Required. The resource name of the CustomerRepricingConfig. Format:
3895    *     accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.
3896    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3897    */
getCustomerRepricingConfig(String name)3898   public final CustomerRepricingConfig getCustomerRepricingConfig(String name) {
3899     GetCustomerRepricingConfigRequest request =
3900         GetCustomerRepricingConfigRequest.newBuilder().setName(name).build();
3901     return getCustomerRepricingConfig(request);
3902   }
3903 
3904   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3905   /**
3906    * Gets information about how a Reseller modifies their bill before sending it to a Customer.
3907    *
3908    * <p>Possible Error Codes:
3909    *
3910    * <ul>
3911    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
3912    *       different.
3913    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
3914    *       was not found.
3915    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
3916    *       contact Cloud Channel support.
3917    * </ul>
3918    *
3919    * <p>Return Value: If successful, the
3920    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resource, otherwise
3921    * returns an error.
3922    *
3923    * <p>Sample code:
3924    *
3925    * <pre>{@code
3926    * // This snippet has been automatically generated and should be regarded as a code template only.
3927    * // It will require modifications to work:
3928    * // - It may require correct/in-range values for request initialization.
3929    * // - It may require specifying regional endpoints when creating the service client as shown in
3930    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3931    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3932    *   GetCustomerRepricingConfigRequest request =
3933    *       GetCustomerRepricingConfigRequest.newBuilder()
3934    *           .setName(
3935    *               CustomerRepricingConfigName.of(
3936    *                       "[ACCOUNT]", "[CUSTOMER]", "[CUSTOMER_REPRICING_CONFIG]")
3937    *                   .toString())
3938    *           .build();
3939    *   CustomerRepricingConfig response =
3940    *       cloudChannelServiceClient.getCustomerRepricingConfig(request);
3941    * }
3942    * }</pre>
3943    *
3944    * @param request The request object containing all of the parameters for the API call.
3945    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3946    */
getCustomerRepricingConfig( GetCustomerRepricingConfigRequest request)3947   public final CustomerRepricingConfig getCustomerRepricingConfig(
3948       GetCustomerRepricingConfigRequest request) {
3949     return getCustomerRepricingConfigCallable().call(request);
3950   }
3951 
3952   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3953   /**
3954    * Gets information about how a Reseller modifies their bill before sending it to a Customer.
3955    *
3956    * <p>Possible Error Codes:
3957    *
3958    * <ul>
3959    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
3960    *       different.
3961    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
3962    *       was not found.
3963    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
3964    *       contact Cloud Channel support.
3965    * </ul>
3966    *
3967    * <p>Return Value: If successful, the
3968    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resource, otherwise
3969    * returns an error.
3970    *
3971    * <p>Sample code:
3972    *
3973    * <pre>{@code
3974    * // This snippet has been automatically generated and should be regarded as a code template only.
3975    * // It will require modifications to work:
3976    * // - It may require correct/in-range values for request initialization.
3977    * // - It may require specifying regional endpoints when creating the service client as shown in
3978    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3979    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
3980    *   GetCustomerRepricingConfigRequest request =
3981    *       GetCustomerRepricingConfigRequest.newBuilder()
3982    *           .setName(
3983    *               CustomerRepricingConfigName.of(
3984    *                       "[ACCOUNT]", "[CUSTOMER]", "[CUSTOMER_REPRICING_CONFIG]")
3985    *                   .toString())
3986    *           .build();
3987    *   ApiFuture<CustomerRepricingConfig> future =
3988    *       cloudChannelServiceClient.getCustomerRepricingConfigCallable().futureCall(request);
3989    *   // Do something.
3990    *   CustomerRepricingConfig response = future.get();
3991    * }
3992    * }</pre>
3993    */
3994   public final UnaryCallable<GetCustomerRepricingConfigRequest, CustomerRepricingConfig>
getCustomerRepricingConfigCallable()3995       getCustomerRepricingConfigCallable() {
3996     return stub.getCustomerRepricingConfigCallable();
3997   }
3998 
3999   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4000   /**
4001    * Lists information about how a Reseller modifies their bill before sending it to a Customer.
4002    *
4003    * <p>Possible Error Codes:
4004    *
4005    * <ul>
4006    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4007    *       different.
4008    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4009    *       specified does not exist or is not associated with the given account.
4010    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4011    *       contact Cloud Channel support.
4012    * </ul>
4013    *
4014    * <p>Return Value: If successful, the
4015    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resources. The data
4016    * for each resource is displayed in the ascending order of:
4017    *
4018    * <ul>
4019    *   <li>Customer ID
4020    *   <li>[RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
4021    *   <li>[RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4022    *   <li>[CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time]
4023    * </ul>
4024    *
4025    * <p>If unsuccessful, returns an error.
4026    *
4027    * <p>Sample code:
4028    *
4029    * <pre>{@code
4030    * // This snippet has been automatically generated and should be regarded as a code template only.
4031    * // It will require modifications to work:
4032    * // - It may require correct/in-range values for request initialization.
4033    * // - It may require specifying regional endpoints when creating the service client as shown in
4034    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4035    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4036    *   CustomerName parent = CustomerName.of("[ACCOUNT]", "[CUSTOMER]");
4037    *   for (CustomerRepricingConfig element :
4038    *       cloudChannelServiceClient.listCustomerRepricingConfigs(parent).iterateAll()) {
4039    *     // doThingsWith(element);
4040    *   }
4041    * }
4042    * }</pre>
4043    *
4044    * @param parent Required. The resource name of the customer. Parent uses the format:
4045    *     accounts/{account_id}/customers/{customer_id}. Supports accounts/{account_id}/customers/-
4046    *     to retrieve configs for all customers.
4047    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4048    */
listCustomerRepricingConfigs( CustomerName parent)4049   public final ListCustomerRepricingConfigsPagedResponse listCustomerRepricingConfigs(
4050       CustomerName parent) {
4051     ListCustomerRepricingConfigsRequest request =
4052         ListCustomerRepricingConfigsRequest.newBuilder()
4053             .setParent(parent == null ? null : parent.toString())
4054             .build();
4055     return listCustomerRepricingConfigs(request);
4056   }
4057 
4058   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4059   /**
4060    * Lists information about how a Reseller modifies their bill before sending it to a Customer.
4061    *
4062    * <p>Possible Error Codes:
4063    *
4064    * <ul>
4065    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4066    *       different.
4067    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4068    *       specified does not exist or is not associated with the given account.
4069    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4070    *       contact Cloud Channel support.
4071    * </ul>
4072    *
4073    * <p>Return Value: If successful, the
4074    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resources. The data
4075    * for each resource is displayed in the ascending order of:
4076    *
4077    * <ul>
4078    *   <li>Customer ID
4079    *   <li>[RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
4080    *   <li>[RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4081    *   <li>[CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time]
4082    * </ul>
4083    *
4084    * <p>If unsuccessful, returns an error.
4085    *
4086    * <p>Sample code:
4087    *
4088    * <pre>{@code
4089    * // This snippet has been automatically generated and should be regarded as a code template only.
4090    * // It will require modifications to work:
4091    * // - It may require correct/in-range values for request initialization.
4092    * // - It may require specifying regional endpoints when creating the service client as shown in
4093    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4094    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4095    *   String parent = CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString();
4096    *   for (CustomerRepricingConfig element :
4097    *       cloudChannelServiceClient.listCustomerRepricingConfigs(parent).iterateAll()) {
4098    *     // doThingsWith(element);
4099    *   }
4100    * }
4101    * }</pre>
4102    *
4103    * @param parent Required. The resource name of the customer. Parent uses the format:
4104    *     accounts/{account_id}/customers/{customer_id}. Supports accounts/{account_id}/customers/-
4105    *     to retrieve configs for all customers.
4106    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4107    */
listCustomerRepricingConfigs( String parent)4108   public final ListCustomerRepricingConfigsPagedResponse listCustomerRepricingConfigs(
4109       String parent) {
4110     ListCustomerRepricingConfigsRequest request =
4111         ListCustomerRepricingConfigsRequest.newBuilder().setParent(parent).build();
4112     return listCustomerRepricingConfigs(request);
4113   }
4114 
4115   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4116   /**
4117    * Lists information about how a Reseller modifies their bill before sending it to a Customer.
4118    *
4119    * <p>Possible Error Codes:
4120    *
4121    * <ul>
4122    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4123    *       different.
4124    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4125    *       specified does not exist or is not associated with the given account.
4126    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4127    *       contact Cloud Channel support.
4128    * </ul>
4129    *
4130    * <p>Return Value: If successful, the
4131    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resources. The data
4132    * for each resource is displayed in the ascending order of:
4133    *
4134    * <ul>
4135    *   <li>Customer ID
4136    *   <li>[RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
4137    *   <li>[RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4138    *   <li>[CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time]
4139    * </ul>
4140    *
4141    * <p>If unsuccessful, returns an error.
4142    *
4143    * <p>Sample code:
4144    *
4145    * <pre>{@code
4146    * // This snippet has been automatically generated and should be regarded as a code template only.
4147    * // It will require modifications to work:
4148    * // - It may require correct/in-range values for request initialization.
4149    * // - It may require specifying regional endpoints when creating the service client as shown in
4150    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4151    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4152    *   ListCustomerRepricingConfigsRequest request =
4153    *       ListCustomerRepricingConfigsRequest.newBuilder()
4154    *           .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
4155    *           .setPageSize(883849137)
4156    *           .setPageToken("pageToken873572522")
4157    *           .setFilter("filter-1274492040")
4158    *           .build();
4159    *   for (CustomerRepricingConfig element :
4160    *       cloudChannelServiceClient.listCustomerRepricingConfigs(request).iterateAll()) {
4161    *     // doThingsWith(element);
4162    *   }
4163    * }
4164    * }</pre>
4165    *
4166    * @param request The request object containing all of the parameters for the API call.
4167    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4168    */
listCustomerRepricingConfigs( ListCustomerRepricingConfigsRequest request)4169   public final ListCustomerRepricingConfigsPagedResponse listCustomerRepricingConfigs(
4170       ListCustomerRepricingConfigsRequest request) {
4171     return listCustomerRepricingConfigsPagedCallable().call(request);
4172   }
4173 
4174   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4175   /**
4176    * Lists information about how a Reseller modifies their bill before sending it to a Customer.
4177    *
4178    * <p>Possible Error Codes:
4179    *
4180    * <ul>
4181    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4182    *       different.
4183    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4184    *       specified does not exist or is not associated with the given account.
4185    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4186    *       contact Cloud Channel support.
4187    * </ul>
4188    *
4189    * <p>Return Value: If successful, the
4190    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resources. The data
4191    * for each resource is displayed in the ascending order of:
4192    *
4193    * <ul>
4194    *   <li>Customer ID
4195    *   <li>[RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
4196    *   <li>[RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4197    *   <li>[CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time]
4198    * </ul>
4199    *
4200    * <p>If unsuccessful, returns an error.
4201    *
4202    * <p>Sample code:
4203    *
4204    * <pre>{@code
4205    * // This snippet has been automatically generated and should be regarded as a code template only.
4206    * // It will require modifications to work:
4207    * // - It may require correct/in-range values for request initialization.
4208    * // - It may require specifying regional endpoints when creating the service client as shown in
4209    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4210    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4211    *   ListCustomerRepricingConfigsRequest request =
4212    *       ListCustomerRepricingConfigsRequest.newBuilder()
4213    *           .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
4214    *           .setPageSize(883849137)
4215    *           .setPageToken("pageToken873572522")
4216    *           .setFilter("filter-1274492040")
4217    *           .build();
4218    *   ApiFuture<CustomerRepricingConfig> future =
4219    *       cloudChannelServiceClient.listCustomerRepricingConfigsPagedCallable().futureCall(request);
4220    *   // Do something.
4221    *   for (CustomerRepricingConfig element : future.get().iterateAll()) {
4222    *     // doThingsWith(element);
4223    *   }
4224    * }
4225    * }</pre>
4226    */
4227   public final UnaryCallable<
4228           ListCustomerRepricingConfigsRequest, ListCustomerRepricingConfigsPagedResponse>
listCustomerRepricingConfigsPagedCallable()4229       listCustomerRepricingConfigsPagedCallable() {
4230     return stub.listCustomerRepricingConfigsPagedCallable();
4231   }
4232 
4233   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4234   /**
4235    * Lists information about how a Reseller modifies their bill before sending it to a Customer.
4236    *
4237    * <p>Possible Error Codes:
4238    *
4239    * <ul>
4240    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4241    *       different.
4242    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4243    *       specified does not exist or is not associated with the given account.
4244    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4245    *       contact Cloud Channel support.
4246    * </ul>
4247    *
4248    * <p>Return Value: If successful, the
4249    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resources. The data
4250    * for each resource is displayed in the ascending order of:
4251    *
4252    * <ul>
4253    *   <li>Customer ID
4254    *   <li>[RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
4255    *   <li>[RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4256    *   <li>[CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time]
4257    * </ul>
4258    *
4259    * <p>If unsuccessful, returns an error.
4260    *
4261    * <p>Sample code:
4262    *
4263    * <pre>{@code
4264    * // This snippet has been automatically generated and should be regarded as a code template only.
4265    * // It will require modifications to work:
4266    * // - It may require correct/in-range values for request initialization.
4267    * // - It may require specifying regional endpoints when creating the service client as shown in
4268    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4269    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4270    *   ListCustomerRepricingConfigsRequest request =
4271    *       ListCustomerRepricingConfigsRequest.newBuilder()
4272    *           .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
4273    *           .setPageSize(883849137)
4274    *           .setPageToken("pageToken873572522")
4275    *           .setFilter("filter-1274492040")
4276    *           .build();
4277    *   while (true) {
4278    *     ListCustomerRepricingConfigsResponse response =
4279    *         cloudChannelServiceClient.listCustomerRepricingConfigsCallable().call(request);
4280    *     for (CustomerRepricingConfig element : response.getCustomerRepricingConfigsList()) {
4281    *       // doThingsWith(element);
4282    *     }
4283    *     String nextPageToken = response.getNextPageToken();
4284    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
4285    *       request = request.toBuilder().setPageToken(nextPageToken).build();
4286    *     } else {
4287    *       break;
4288    *     }
4289    *   }
4290    * }
4291    * }</pre>
4292    */
4293   public final UnaryCallable<
4294           ListCustomerRepricingConfigsRequest, ListCustomerRepricingConfigsResponse>
listCustomerRepricingConfigsCallable()4295       listCustomerRepricingConfigsCallable() {
4296     return stub.listCustomerRepricingConfigsCallable();
4297   }
4298 
4299   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4300   /**
4301    * Creates a CustomerRepricingConfig. Call this method to set modifications for a specific
4302    * customer's bill. You can only create configs if the
4303    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4304    * is a future month. If needed, you can create a config for the current month, with some
4305    * restrictions.
4306    *
4307    * <p>When creating a config for a future month, make sure there are no existing configs for that
4308    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
4309    *
4310    * <p>The following restrictions are for creating configs in the current month.
4311    *
4312    * <ul>
4313    *   <li>This functionality is reserved for recovering from an erroneous config, and should not be
4314    *       used for regular business cases.
4315    *   <li>The new config will not modify exports used with other configs. Changes to the config may
4316    *       be immediate, but may take up to 24 hours.
4317    *   <li>There is a limit of ten configs for any
4318    *       [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
4319    *       or
4320    *       [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
4321    *   <li>The contained
4322    *       [CustomerRepricingConfig.repricing_config][google.cloud.channel.v1.CustomerRepricingConfig.repricing_config]
4323    *       vaule must be different from the value used in the current config for a
4324    *       [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement].
4325    * </ul>
4326    *
4327    * <p>Possible Error Codes:
4328    *
4329    * <ul>
4330    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4331    *       different.
4332    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
4333    *       the updated config is for the current month or past months.
4334    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4335    *       specified does not exist or is not associated with the given account.
4336    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4337    *       contact Cloud Channel support.
4338    * </ul>
4339    *
4340    * <p>Return Value: If successful, the updated
4341    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resource, otherwise
4342    * returns an error.
4343    *
4344    * <p>Sample code:
4345    *
4346    * <pre>{@code
4347    * // This snippet has been automatically generated and should be regarded as a code template only.
4348    * // It will require modifications to work:
4349    * // - It may require correct/in-range values for request initialization.
4350    * // - It may require specifying regional endpoints when creating the service client as shown in
4351    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4352    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4353    *   CustomerName parent = CustomerName.of("[ACCOUNT]", "[CUSTOMER]");
4354    *   CustomerRepricingConfig customerRepricingConfig =
4355    *       CustomerRepricingConfig.newBuilder().build();
4356    *   CustomerRepricingConfig response =
4357    *       cloudChannelServiceClient.createCustomerRepricingConfig(parent, customerRepricingConfig);
4358    * }
4359    * }</pre>
4360    *
4361    * @param parent Required. The resource name of the customer that will receive this repricing
4362    *     config. Parent uses the format: accounts/{account_id}/customers/{customer_id}
4363    * @param customerRepricingConfig Required. The CustomerRepricingConfig object to update.
4364    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4365    */
createCustomerRepricingConfig( CustomerName parent, CustomerRepricingConfig customerRepricingConfig)4366   public final CustomerRepricingConfig createCustomerRepricingConfig(
4367       CustomerName parent, CustomerRepricingConfig customerRepricingConfig) {
4368     CreateCustomerRepricingConfigRequest request =
4369         CreateCustomerRepricingConfigRequest.newBuilder()
4370             .setParent(parent == null ? null : parent.toString())
4371             .setCustomerRepricingConfig(customerRepricingConfig)
4372             .build();
4373     return createCustomerRepricingConfig(request);
4374   }
4375 
4376   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4377   /**
4378    * Creates a CustomerRepricingConfig. Call this method to set modifications for a specific
4379    * customer's bill. You can only create configs if the
4380    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4381    * is a future month. If needed, you can create a config for the current month, with some
4382    * restrictions.
4383    *
4384    * <p>When creating a config for a future month, make sure there are no existing configs for that
4385    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
4386    *
4387    * <p>The following restrictions are for creating configs in the current month.
4388    *
4389    * <ul>
4390    *   <li>This functionality is reserved for recovering from an erroneous config, and should not be
4391    *       used for regular business cases.
4392    *   <li>The new config will not modify exports used with other configs. Changes to the config may
4393    *       be immediate, but may take up to 24 hours.
4394    *   <li>There is a limit of ten configs for any
4395    *       [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
4396    *       or
4397    *       [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
4398    *   <li>The contained
4399    *       [CustomerRepricingConfig.repricing_config][google.cloud.channel.v1.CustomerRepricingConfig.repricing_config]
4400    *       vaule must be different from the value used in the current config for a
4401    *       [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement].
4402    * </ul>
4403    *
4404    * <p>Possible Error Codes:
4405    *
4406    * <ul>
4407    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4408    *       different.
4409    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
4410    *       the updated config is for the current month or past months.
4411    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4412    *       specified does not exist or is not associated with the given account.
4413    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4414    *       contact Cloud Channel support.
4415    * </ul>
4416    *
4417    * <p>Return Value: If successful, the updated
4418    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resource, otherwise
4419    * returns an error.
4420    *
4421    * <p>Sample code:
4422    *
4423    * <pre>{@code
4424    * // This snippet has been automatically generated and should be regarded as a code template only.
4425    * // It will require modifications to work:
4426    * // - It may require correct/in-range values for request initialization.
4427    * // - It may require specifying regional endpoints when creating the service client as shown in
4428    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4429    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4430    *   String parent = CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString();
4431    *   CustomerRepricingConfig customerRepricingConfig =
4432    *       CustomerRepricingConfig.newBuilder().build();
4433    *   CustomerRepricingConfig response =
4434    *       cloudChannelServiceClient.createCustomerRepricingConfig(parent, customerRepricingConfig);
4435    * }
4436    * }</pre>
4437    *
4438    * @param parent Required. The resource name of the customer that will receive this repricing
4439    *     config. Parent uses the format: accounts/{account_id}/customers/{customer_id}
4440    * @param customerRepricingConfig Required. The CustomerRepricingConfig object to update.
4441    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4442    */
createCustomerRepricingConfig( String parent, CustomerRepricingConfig customerRepricingConfig)4443   public final CustomerRepricingConfig createCustomerRepricingConfig(
4444       String parent, CustomerRepricingConfig customerRepricingConfig) {
4445     CreateCustomerRepricingConfigRequest request =
4446         CreateCustomerRepricingConfigRequest.newBuilder()
4447             .setParent(parent)
4448             .setCustomerRepricingConfig(customerRepricingConfig)
4449             .build();
4450     return createCustomerRepricingConfig(request);
4451   }
4452 
4453   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4454   /**
4455    * Creates a CustomerRepricingConfig. Call this method to set modifications for a specific
4456    * customer's bill. You can only create configs if the
4457    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4458    * is a future month. If needed, you can create a config for the current month, with some
4459    * restrictions.
4460    *
4461    * <p>When creating a config for a future month, make sure there are no existing configs for that
4462    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
4463    *
4464    * <p>The following restrictions are for creating configs in the current month.
4465    *
4466    * <ul>
4467    *   <li>This functionality is reserved for recovering from an erroneous config, and should not be
4468    *       used for regular business cases.
4469    *   <li>The new config will not modify exports used with other configs. Changes to the config may
4470    *       be immediate, but may take up to 24 hours.
4471    *   <li>There is a limit of ten configs for any
4472    *       [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
4473    *       or
4474    *       [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
4475    *   <li>The contained
4476    *       [CustomerRepricingConfig.repricing_config][google.cloud.channel.v1.CustomerRepricingConfig.repricing_config]
4477    *       vaule must be different from the value used in the current config for a
4478    *       [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement].
4479    * </ul>
4480    *
4481    * <p>Possible Error Codes:
4482    *
4483    * <ul>
4484    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4485    *       different.
4486    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
4487    *       the updated config is for the current month or past months.
4488    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4489    *       specified does not exist or is not associated with the given account.
4490    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4491    *       contact Cloud Channel support.
4492    * </ul>
4493    *
4494    * <p>Return Value: If successful, the updated
4495    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resource, otherwise
4496    * returns an error.
4497    *
4498    * <p>Sample code:
4499    *
4500    * <pre>{@code
4501    * // This snippet has been automatically generated and should be regarded as a code template only.
4502    * // It will require modifications to work:
4503    * // - It may require correct/in-range values for request initialization.
4504    * // - It may require specifying regional endpoints when creating the service client as shown in
4505    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4506    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4507    *   CreateCustomerRepricingConfigRequest request =
4508    *       CreateCustomerRepricingConfigRequest.newBuilder()
4509    *           .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
4510    *           .setCustomerRepricingConfig(CustomerRepricingConfig.newBuilder().build())
4511    *           .build();
4512    *   CustomerRepricingConfig response =
4513    *       cloudChannelServiceClient.createCustomerRepricingConfig(request);
4514    * }
4515    * }</pre>
4516    *
4517    * @param request The request object containing all of the parameters for the API call.
4518    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4519    */
createCustomerRepricingConfig( CreateCustomerRepricingConfigRequest request)4520   public final CustomerRepricingConfig createCustomerRepricingConfig(
4521       CreateCustomerRepricingConfigRequest request) {
4522     return createCustomerRepricingConfigCallable().call(request);
4523   }
4524 
4525   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4526   /**
4527    * Creates a CustomerRepricingConfig. Call this method to set modifications for a specific
4528    * customer's bill. You can only create configs if the
4529    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4530    * is a future month. If needed, you can create a config for the current month, with some
4531    * restrictions.
4532    *
4533    * <p>When creating a config for a future month, make sure there are no existing configs for that
4534    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
4535    *
4536    * <p>The following restrictions are for creating configs in the current month.
4537    *
4538    * <ul>
4539    *   <li>This functionality is reserved for recovering from an erroneous config, and should not be
4540    *       used for regular business cases.
4541    *   <li>The new config will not modify exports used with other configs. Changes to the config may
4542    *       be immediate, but may take up to 24 hours.
4543    *   <li>There is a limit of ten configs for any
4544    *       [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
4545    *       or
4546    *       [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
4547    *   <li>The contained
4548    *       [CustomerRepricingConfig.repricing_config][google.cloud.channel.v1.CustomerRepricingConfig.repricing_config]
4549    *       vaule must be different from the value used in the current config for a
4550    *       [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement].
4551    * </ul>
4552    *
4553    * <p>Possible Error Codes:
4554    *
4555    * <ul>
4556    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4557    *       different.
4558    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
4559    *       the updated config is for the current month or past months.
4560    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4561    *       specified does not exist or is not associated with the given account.
4562    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4563    *       contact Cloud Channel support.
4564    * </ul>
4565    *
4566    * <p>Return Value: If successful, the updated
4567    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resource, otherwise
4568    * returns an error.
4569    *
4570    * <p>Sample code:
4571    *
4572    * <pre>{@code
4573    * // This snippet has been automatically generated and should be regarded as a code template only.
4574    * // It will require modifications to work:
4575    * // - It may require correct/in-range values for request initialization.
4576    * // - It may require specifying regional endpoints when creating the service client as shown in
4577    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4578    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4579    *   CreateCustomerRepricingConfigRequest request =
4580    *       CreateCustomerRepricingConfigRequest.newBuilder()
4581    *           .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
4582    *           .setCustomerRepricingConfig(CustomerRepricingConfig.newBuilder().build())
4583    *           .build();
4584    *   ApiFuture<CustomerRepricingConfig> future =
4585    *       cloudChannelServiceClient.createCustomerRepricingConfigCallable().futureCall(request);
4586    *   // Do something.
4587    *   CustomerRepricingConfig response = future.get();
4588    * }
4589    * }</pre>
4590    */
4591   public final UnaryCallable<CreateCustomerRepricingConfigRequest, CustomerRepricingConfig>
createCustomerRepricingConfigCallable()4592       createCustomerRepricingConfigCallable() {
4593     return stub.createCustomerRepricingConfigCallable();
4594   }
4595 
4596   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4597   /**
4598    * Updates a CustomerRepricingConfig. Call this method to set modifications for a specific
4599    * customer's bill. This method overwrites the existing CustomerRepricingConfig.
4600    *
4601    * <p>You can only update configs if the
4602    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4603    * is a future month. To make changes to configs for the current month, use
4604    * [CreateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig],
4605    * taking note of its restrictions. You cannot update the
4606    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
4607    *
4608    * <p>When updating a config in the future:
4609    *
4610    * <ul>
4611    *   <li>This config must already exist.
4612    * </ul>
4613    *
4614    * <p>Possible Error Codes:
4615    *
4616    * <ul>
4617    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4618    *       different.
4619    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
4620    *       the updated config is for the current month or past months.
4621    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4622    *       specified does not exist or is not associated with the given account.
4623    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4624    *       contact Cloud Channel support.
4625    * </ul>
4626    *
4627    * <p>Return Value: If successful, the updated
4628    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resource, otherwise
4629    * returns an error.
4630    *
4631    * <p>Sample code:
4632    *
4633    * <pre>{@code
4634    * // This snippet has been automatically generated and should be regarded as a code template only.
4635    * // It will require modifications to work:
4636    * // - It may require correct/in-range values for request initialization.
4637    * // - It may require specifying regional endpoints when creating the service client as shown in
4638    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4639    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4640    *   CustomerRepricingConfig customerRepricingConfig =
4641    *       CustomerRepricingConfig.newBuilder().build();
4642    *   CustomerRepricingConfig response =
4643    *       cloudChannelServiceClient.updateCustomerRepricingConfig(customerRepricingConfig);
4644    * }
4645    * }</pre>
4646    *
4647    * @param customerRepricingConfig Required. The CustomerRepricingConfig object to update.
4648    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4649    */
updateCustomerRepricingConfig( CustomerRepricingConfig customerRepricingConfig)4650   public final CustomerRepricingConfig updateCustomerRepricingConfig(
4651       CustomerRepricingConfig customerRepricingConfig) {
4652     UpdateCustomerRepricingConfigRequest request =
4653         UpdateCustomerRepricingConfigRequest.newBuilder()
4654             .setCustomerRepricingConfig(customerRepricingConfig)
4655             .build();
4656     return updateCustomerRepricingConfig(request);
4657   }
4658 
4659   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4660   /**
4661    * Updates a CustomerRepricingConfig. Call this method to set modifications for a specific
4662    * customer's bill. This method overwrites the existing CustomerRepricingConfig.
4663    *
4664    * <p>You can only update configs if the
4665    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4666    * is a future month. To make changes to configs for the current month, use
4667    * [CreateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig],
4668    * taking note of its restrictions. You cannot update the
4669    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
4670    *
4671    * <p>When updating a config in the future:
4672    *
4673    * <ul>
4674    *   <li>This config must already exist.
4675    * </ul>
4676    *
4677    * <p>Possible Error Codes:
4678    *
4679    * <ul>
4680    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4681    *       different.
4682    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
4683    *       the updated config is for the current month or past months.
4684    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4685    *       specified does not exist or is not associated with the given account.
4686    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4687    *       contact Cloud Channel support.
4688    * </ul>
4689    *
4690    * <p>Return Value: If successful, the updated
4691    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resource, otherwise
4692    * returns an error.
4693    *
4694    * <p>Sample code:
4695    *
4696    * <pre>{@code
4697    * // This snippet has been automatically generated and should be regarded as a code template only.
4698    * // It will require modifications to work:
4699    * // - It may require correct/in-range values for request initialization.
4700    * // - It may require specifying regional endpoints when creating the service client as shown in
4701    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4702    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4703    *   UpdateCustomerRepricingConfigRequest request =
4704    *       UpdateCustomerRepricingConfigRequest.newBuilder()
4705    *           .setCustomerRepricingConfig(CustomerRepricingConfig.newBuilder().build())
4706    *           .build();
4707    *   CustomerRepricingConfig response =
4708    *       cloudChannelServiceClient.updateCustomerRepricingConfig(request);
4709    * }
4710    * }</pre>
4711    *
4712    * @param request The request object containing all of the parameters for the API call.
4713    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4714    */
updateCustomerRepricingConfig( UpdateCustomerRepricingConfigRequest request)4715   public final CustomerRepricingConfig updateCustomerRepricingConfig(
4716       UpdateCustomerRepricingConfigRequest request) {
4717     return updateCustomerRepricingConfigCallable().call(request);
4718   }
4719 
4720   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4721   /**
4722    * Updates a CustomerRepricingConfig. Call this method to set modifications for a specific
4723    * customer's bill. This method overwrites the existing CustomerRepricingConfig.
4724    *
4725    * <p>You can only update configs if the
4726    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4727    * is a future month. To make changes to configs for the current month, use
4728    * [CreateCustomerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateCustomerRepricingConfig],
4729    * taking note of its restrictions. You cannot update the
4730    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
4731    *
4732    * <p>When updating a config in the future:
4733    *
4734    * <ul>
4735    *   <li>This config must already exist.
4736    * </ul>
4737    *
4738    * <p>Possible Error Codes:
4739    *
4740    * <ul>
4741    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4742    *       different.
4743    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
4744    *       the updated config is for the current month or past months.
4745    *   <li>NOT_FOUND: The [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4746    *       specified does not exist or is not associated with the given account.
4747    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4748    *       contact Cloud Channel support.
4749    * </ul>
4750    *
4751    * <p>Return Value: If successful, the updated
4752    * [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] resource, otherwise
4753    * returns an error.
4754    *
4755    * <p>Sample code:
4756    *
4757    * <pre>{@code
4758    * // This snippet has been automatically generated and should be regarded as a code template only.
4759    * // It will require modifications to work:
4760    * // - It may require correct/in-range values for request initialization.
4761    * // - It may require specifying regional endpoints when creating the service client as shown in
4762    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4763    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4764    *   UpdateCustomerRepricingConfigRequest request =
4765    *       UpdateCustomerRepricingConfigRequest.newBuilder()
4766    *           .setCustomerRepricingConfig(CustomerRepricingConfig.newBuilder().build())
4767    *           .build();
4768    *   ApiFuture<CustomerRepricingConfig> future =
4769    *       cloudChannelServiceClient.updateCustomerRepricingConfigCallable().futureCall(request);
4770    *   // Do something.
4771    *   CustomerRepricingConfig response = future.get();
4772    * }
4773    * }</pre>
4774    */
4775   public final UnaryCallable<UpdateCustomerRepricingConfigRequest, CustomerRepricingConfig>
updateCustomerRepricingConfigCallable()4776       updateCustomerRepricingConfigCallable() {
4777     return stub.updateCustomerRepricingConfigCallable();
4778   }
4779 
4780   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4781   /**
4782    * Deletes the given [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4783    * permanently. You can only delete configs if their
4784    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4785    * is set to a date after the current month.
4786    *
4787    * <p>Possible error codes:
4788    *
4789    * <ul>
4790    *   <li>PERMISSION_DENIED: The account making the request does not own this customer.
4791    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
4792    *   <li>FAILED_PRECONDITION: The
4793    *       [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] is active or
4794    *       in the past.
4795    *   <li>NOT_FOUND: No [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4796    *       found for the name in the request.
4797    * </ul>
4798    *
4799    * <p>Sample code:
4800    *
4801    * <pre>{@code
4802    * // This snippet has been automatically generated and should be regarded as a code template only.
4803    * // It will require modifications to work:
4804    * // - It may require correct/in-range values for request initialization.
4805    * // - It may require specifying regional endpoints when creating the service client as shown in
4806    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4807    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4808    *   CustomerRepricingConfigName name =
4809    *       CustomerRepricingConfigName.of("[ACCOUNT]", "[CUSTOMER]", "[CUSTOMER_REPRICING_CONFIG]");
4810    *   cloudChannelServiceClient.deleteCustomerRepricingConfig(name);
4811    * }
4812    * }</pre>
4813    *
4814    * @param name Required. The resource name of the customer repricing config rule to delete.
4815    *     Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.
4816    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4817    */
deleteCustomerRepricingConfig(CustomerRepricingConfigName name)4818   public final void deleteCustomerRepricingConfig(CustomerRepricingConfigName name) {
4819     DeleteCustomerRepricingConfigRequest request =
4820         DeleteCustomerRepricingConfigRequest.newBuilder()
4821             .setName(name == null ? null : name.toString())
4822             .build();
4823     deleteCustomerRepricingConfig(request);
4824   }
4825 
4826   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4827   /**
4828    * Deletes the given [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4829    * permanently. You can only delete configs if their
4830    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4831    * is set to a date after the current month.
4832    *
4833    * <p>Possible error codes:
4834    *
4835    * <ul>
4836    *   <li>PERMISSION_DENIED: The account making the request does not own this customer.
4837    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
4838    *   <li>FAILED_PRECONDITION: The
4839    *       [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] is active or
4840    *       in the past.
4841    *   <li>NOT_FOUND: No [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4842    *       found for the name in the request.
4843    * </ul>
4844    *
4845    * <p>Sample code:
4846    *
4847    * <pre>{@code
4848    * // This snippet has been automatically generated and should be regarded as a code template only.
4849    * // It will require modifications to work:
4850    * // - It may require correct/in-range values for request initialization.
4851    * // - It may require specifying regional endpoints when creating the service client as shown in
4852    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4853    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4854    *   String name =
4855    *       CustomerRepricingConfigName.of("[ACCOUNT]", "[CUSTOMER]", "[CUSTOMER_REPRICING_CONFIG]")
4856    *           .toString();
4857    *   cloudChannelServiceClient.deleteCustomerRepricingConfig(name);
4858    * }
4859    * }</pre>
4860    *
4861    * @param name Required. The resource name of the customer repricing config rule to delete.
4862    *     Format: accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.
4863    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4864    */
deleteCustomerRepricingConfig(String name)4865   public final void deleteCustomerRepricingConfig(String name) {
4866     DeleteCustomerRepricingConfigRequest request =
4867         DeleteCustomerRepricingConfigRequest.newBuilder().setName(name).build();
4868     deleteCustomerRepricingConfig(request);
4869   }
4870 
4871   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4872   /**
4873    * Deletes the given [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4874    * permanently. You can only delete configs if their
4875    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4876    * is set to a date after the current month.
4877    *
4878    * <p>Possible error codes:
4879    *
4880    * <ul>
4881    *   <li>PERMISSION_DENIED: The account making the request does not own this customer.
4882    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
4883    *   <li>FAILED_PRECONDITION: The
4884    *       [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] is active or
4885    *       in the past.
4886    *   <li>NOT_FOUND: No [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4887    *       found for the name in the request.
4888    * </ul>
4889    *
4890    * <p>Sample code:
4891    *
4892    * <pre>{@code
4893    * // This snippet has been automatically generated and should be regarded as a code template only.
4894    * // It will require modifications to work:
4895    * // - It may require correct/in-range values for request initialization.
4896    * // - It may require specifying regional endpoints when creating the service client as shown in
4897    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4898    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4899    *   DeleteCustomerRepricingConfigRequest request =
4900    *       DeleteCustomerRepricingConfigRequest.newBuilder()
4901    *           .setName(
4902    *               CustomerRepricingConfigName.of(
4903    *                       "[ACCOUNT]", "[CUSTOMER]", "[CUSTOMER_REPRICING_CONFIG]")
4904    *                   .toString())
4905    *           .build();
4906    *   cloudChannelServiceClient.deleteCustomerRepricingConfig(request);
4907    * }
4908    * }</pre>
4909    *
4910    * @param request The request object containing all of the parameters for the API call.
4911    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4912    */
deleteCustomerRepricingConfig(DeleteCustomerRepricingConfigRequest request)4913   public final void deleteCustomerRepricingConfig(DeleteCustomerRepricingConfigRequest request) {
4914     deleteCustomerRepricingConfigCallable().call(request);
4915   }
4916 
4917   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4918   /**
4919    * Deletes the given [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4920    * permanently. You can only delete configs if their
4921    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
4922    * is set to a date after the current month.
4923    *
4924    * <p>Possible error codes:
4925    *
4926    * <ul>
4927    *   <li>PERMISSION_DENIED: The account making the request does not own this customer.
4928    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
4929    *   <li>FAILED_PRECONDITION: The
4930    *       [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig] is active or
4931    *       in the past.
4932    *   <li>NOT_FOUND: No [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
4933    *       found for the name in the request.
4934    * </ul>
4935    *
4936    * <p>Sample code:
4937    *
4938    * <pre>{@code
4939    * // This snippet has been automatically generated and should be regarded as a code template only.
4940    * // It will require modifications to work:
4941    * // - It may require correct/in-range values for request initialization.
4942    * // - It may require specifying regional endpoints when creating the service client as shown in
4943    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4944    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4945    *   DeleteCustomerRepricingConfigRequest request =
4946    *       DeleteCustomerRepricingConfigRequest.newBuilder()
4947    *           .setName(
4948    *               CustomerRepricingConfigName.of(
4949    *                       "[ACCOUNT]", "[CUSTOMER]", "[CUSTOMER_REPRICING_CONFIG]")
4950    *                   .toString())
4951    *           .build();
4952    *   ApiFuture<Empty> future =
4953    *       cloudChannelServiceClient.deleteCustomerRepricingConfigCallable().futureCall(request);
4954    *   // Do something.
4955    *   future.get();
4956    * }
4957    * }</pre>
4958    */
4959   public final UnaryCallable<DeleteCustomerRepricingConfigRequest, Empty>
deleteCustomerRepricingConfigCallable()4960       deleteCustomerRepricingConfigCallable() {
4961     return stub.deleteCustomerRepricingConfigCallable();
4962   }
4963 
4964   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4965   /**
4966    * Gets information about how a Distributor modifies their bill before sending it to a
4967    * ChannelPartner.
4968    *
4969    * <p>Possible Error Codes:
4970    *
4971    * <ul>
4972    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
4973    *       different.
4974    *   <li>NOT_FOUND: The
4975    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
4976    *       was not found.
4977    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
4978    *       contact Cloud Channel support.
4979    * </ul>
4980    *
4981    * <p>Return Value: If successful, the
4982    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
4983    * resource, otherwise returns an error.
4984    *
4985    * <p>Sample code:
4986    *
4987    * <pre>{@code
4988    * // This snippet has been automatically generated and should be regarded as a code template only.
4989    * // It will require modifications to work:
4990    * // - It may require correct/in-range values for request initialization.
4991    * // - It may require specifying regional endpoints when creating the service client as shown in
4992    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4993    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
4994    *   ChannelPartnerRepricingConfigName name =
4995    *       ChannelPartnerRepricingConfigName.of(
4996    *           "[ACCOUNT]", "[CHANNEL_PARTNER]", "[CHANNEL_PARTNER_REPRICING_CONFIG]");
4997    *   ChannelPartnerRepricingConfig response =
4998    *       cloudChannelServiceClient.getChannelPartnerRepricingConfig(name);
4999    * }
5000    * }</pre>
5001    *
5002    * @param name Required. The resource name of the ChannelPartnerRepricingConfig Format:
5003    *     accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.
5004    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5005    */
getChannelPartnerRepricingConfig( ChannelPartnerRepricingConfigName name)5006   public final ChannelPartnerRepricingConfig getChannelPartnerRepricingConfig(
5007       ChannelPartnerRepricingConfigName name) {
5008     GetChannelPartnerRepricingConfigRequest request =
5009         GetChannelPartnerRepricingConfigRequest.newBuilder()
5010             .setName(name == null ? null : name.toString())
5011             .build();
5012     return getChannelPartnerRepricingConfig(request);
5013   }
5014 
5015   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5016   /**
5017    * Gets information about how a Distributor modifies their bill before sending it to a
5018    * ChannelPartner.
5019    *
5020    * <p>Possible Error Codes:
5021    *
5022    * <ul>
5023    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5024    *       different.
5025    *   <li>NOT_FOUND: The
5026    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5027    *       was not found.
5028    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5029    *       contact Cloud Channel support.
5030    * </ul>
5031    *
5032    * <p>Return Value: If successful, the
5033    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5034    * resource, otherwise returns an error.
5035    *
5036    * <p>Sample code:
5037    *
5038    * <pre>{@code
5039    * // This snippet has been automatically generated and should be regarded as a code template only.
5040    * // It will require modifications to work:
5041    * // - It may require correct/in-range values for request initialization.
5042    * // - It may require specifying regional endpoints when creating the service client as shown in
5043    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5044    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5045    *   String name =
5046    *       ChannelPartnerRepricingConfigName.of(
5047    *               "[ACCOUNT]", "[CHANNEL_PARTNER]", "[CHANNEL_PARTNER_REPRICING_CONFIG]")
5048    *           .toString();
5049    *   ChannelPartnerRepricingConfig response =
5050    *       cloudChannelServiceClient.getChannelPartnerRepricingConfig(name);
5051    * }
5052    * }</pre>
5053    *
5054    * @param name Required. The resource name of the ChannelPartnerRepricingConfig Format:
5055    *     accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.
5056    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5057    */
getChannelPartnerRepricingConfig(String name)5058   public final ChannelPartnerRepricingConfig getChannelPartnerRepricingConfig(String name) {
5059     GetChannelPartnerRepricingConfigRequest request =
5060         GetChannelPartnerRepricingConfigRequest.newBuilder().setName(name).build();
5061     return getChannelPartnerRepricingConfig(request);
5062   }
5063 
5064   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5065   /**
5066    * Gets information about how a Distributor modifies their bill before sending it to a
5067    * ChannelPartner.
5068    *
5069    * <p>Possible Error Codes:
5070    *
5071    * <ul>
5072    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5073    *       different.
5074    *   <li>NOT_FOUND: The
5075    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5076    *       was not found.
5077    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5078    *       contact Cloud Channel support.
5079    * </ul>
5080    *
5081    * <p>Return Value: If successful, the
5082    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5083    * resource, otherwise returns an error.
5084    *
5085    * <p>Sample code:
5086    *
5087    * <pre>{@code
5088    * // This snippet has been automatically generated and should be regarded as a code template only.
5089    * // It will require modifications to work:
5090    * // - It may require correct/in-range values for request initialization.
5091    * // - It may require specifying regional endpoints when creating the service client as shown in
5092    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5093    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5094    *   GetChannelPartnerRepricingConfigRequest request =
5095    *       GetChannelPartnerRepricingConfigRequest.newBuilder()
5096    *           .setName(
5097    *               ChannelPartnerRepricingConfigName.of(
5098    *                       "[ACCOUNT]", "[CHANNEL_PARTNER]", "[CHANNEL_PARTNER_REPRICING_CONFIG]")
5099    *                   .toString())
5100    *           .build();
5101    *   ChannelPartnerRepricingConfig response =
5102    *       cloudChannelServiceClient.getChannelPartnerRepricingConfig(request);
5103    * }
5104    * }</pre>
5105    *
5106    * @param request The request object containing all of the parameters for the API call.
5107    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5108    */
getChannelPartnerRepricingConfig( GetChannelPartnerRepricingConfigRequest request)5109   public final ChannelPartnerRepricingConfig getChannelPartnerRepricingConfig(
5110       GetChannelPartnerRepricingConfigRequest request) {
5111     return getChannelPartnerRepricingConfigCallable().call(request);
5112   }
5113 
5114   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5115   /**
5116    * Gets information about how a Distributor modifies their bill before sending it to a
5117    * ChannelPartner.
5118    *
5119    * <p>Possible Error Codes:
5120    *
5121    * <ul>
5122    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5123    *       different.
5124    *   <li>NOT_FOUND: The
5125    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5126    *       was not found.
5127    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5128    *       contact Cloud Channel support.
5129    * </ul>
5130    *
5131    * <p>Return Value: If successful, the
5132    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5133    * resource, otherwise returns an error.
5134    *
5135    * <p>Sample code:
5136    *
5137    * <pre>{@code
5138    * // This snippet has been automatically generated and should be regarded as a code template only.
5139    * // It will require modifications to work:
5140    * // - It may require correct/in-range values for request initialization.
5141    * // - It may require specifying regional endpoints when creating the service client as shown in
5142    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5143    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5144    *   GetChannelPartnerRepricingConfigRequest request =
5145    *       GetChannelPartnerRepricingConfigRequest.newBuilder()
5146    *           .setName(
5147    *               ChannelPartnerRepricingConfigName.of(
5148    *                       "[ACCOUNT]", "[CHANNEL_PARTNER]", "[CHANNEL_PARTNER_REPRICING_CONFIG]")
5149    *                   .toString())
5150    *           .build();
5151    *   ApiFuture<ChannelPartnerRepricingConfig> future =
5152    *       cloudChannelServiceClient.getChannelPartnerRepricingConfigCallable().futureCall(request);
5153    *   // Do something.
5154    *   ChannelPartnerRepricingConfig response = future.get();
5155    * }
5156    * }</pre>
5157    */
5158   public final UnaryCallable<GetChannelPartnerRepricingConfigRequest, ChannelPartnerRepricingConfig>
getChannelPartnerRepricingConfigCallable()5159       getChannelPartnerRepricingConfigCallable() {
5160     return stub.getChannelPartnerRepricingConfigCallable();
5161   }
5162 
5163   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5164   /**
5165    * Lists information about how a Reseller modifies their bill before sending it to a
5166    * ChannelPartner.
5167    *
5168    * <p>Possible Error Codes:
5169    *
5170    * <ul>
5171    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5172    *       different.
5173    *   <li>NOT_FOUND: The
5174    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5175    *       specified does not exist or is not associated with the given account.
5176    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5177    *       contact Cloud Channel support.
5178    * </ul>
5179    *
5180    * <p>Return Value: If successful, the
5181    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5182    * resources. The data for each resource is displayed in the ascending order of:
5183    *
5184    * <ul>
5185    *   <li>Channel Partner ID
5186    *   <li>[RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5187    *   <li>[ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time]
5188    * </ul>
5189    *
5190    * <p>If unsuccessful, returns an error.
5191    *
5192    * <p>Sample code:
5193    *
5194    * <pre>{@code
5195    * // This snippet has been automatically generated and should be regarded as a code template only.
5196    * // It will require modifications to work:
5197    * // - It may require correct/in-range values for request initialization.
5198    * // - It may require specifying regional endpoints when creating the service client as shown in
5199    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5200    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5201    *   ChannelPartnerLinkName parent =
5202    *       ChannelPartnerLinkName.of("[ACCOUNT]", "[CHANNEL_PARTNER_LINK]");
5203    *   for (ChannelPartnerRepricingConfig element :
5204    *       cloudChannelServiceClient.listChannelPartnerRepricingConfigs(parent).iterateAll()) {
5205    *     // doThingsWith(element);
5206    *   }
5207    * }
5208    * }</pre>
5209    *
5210    * @param parent Required. The resource name of the account's
5211    *     [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]. Parent uses the format:
5212    *     accounts/{account_id}/channelPartnerLinks/{channel_partner_id}. Supports
5213    *     accounts/{account_id}/channelPartnerLinks/- to retrieve configs for all channel partners.
5214    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5215    */
listChannelPartnerRepricingConfigs( ChannelPartnerLinkName parent)5216   public final ListChannelPartnerRepricingConfigsPagedResponse listChannelPartnerRepricingConfigs(
5217       ChannelPartnerLinkName parent) {
5218     ListChannelPartnerRepricingConfigsRequest request =
5219         ListChannelPartnerRepricingConfigsRequest.newBuilder()
5220             .setParent(parent == null ? null : parent.toString())
5221             .build();
5222     return listChannelPartnerRepricingConfigs(request);
5223   }
5224 
5225   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5226   /**
5227    * Lists information about how a Reseller modifies their bill before sending it to a
5228    * ChannelPartner.
5229    *
5230    * <p>Possible Error Codes:
5231    *
5232    * <ul>
5233    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5234    *       different.
5235    *   <li>NOT_FOUND: The
5236    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5237    *       specified does not exist or is not associated with the given account.
5238    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5239    *       contact Cloud Channel support.
5240    * </ul>
5241    *
5242    * <p>Return Value: If successful, the
5243    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5244    * resources. The data for each resource is displayed in the ascending order of:
5245    *
5246    * <ul>
5247    *   <li>Channel Partner ID
5248    *   <li>[RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5249    *   <li>[ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time]
5250    * </ul>
5251    *
5252    * <p>If unsuccessful, returns an error.
5253    *
5254    * <p>Sample code:
5255    *
5256    * <pre>{@code
5257    * // This snippet has been automatically generated and should be regarded as a code template only.
5258    * // It will require modifications to work:
5259    * // - It may require correct/in-range values for request initialization.
5260    * // - It may require specifying regional endpoints when creating the service client as shown in
5261    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5262    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5263    *   String parent = ChannelPartnerLinkName.of("[ACCOUNT]", "[CHANNEL_PARTNER_LINK]").toString();
5264    *   for (ChannelPartnerRepricingConfig element :
5265    *       cloudChannelServiceClient.listChannelPartnerRepricingConfigs(parent).iterateAll()) {
5266    *     // doThingsWith(element);
5267    *   }
5268    * }
5269    * }</pre>
5270    *
5271    * @param parent Required. The resource name of the account's
5272    *     [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]. Parent uses the format:
5273    *     accounts/{account_id}/channelPartnerLinks/{channel_partner_id}. Supports
5274    *     accounts/{account_id}/channelPartnerLinks/- to retrieve configs for all channel partners.
5275    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5276    */
listChannelPartnerRepricingConfigs( String parent)5277   public final ListChannelPartnerRepricingConfigsPagedResponse listChannelPartnerRepricingConfigs(
5278       String parent) {
5279     ListChannelPartnerRepricingConfigsRequest request =
5280         ListChannelPartnerRepricingConfigsRequest.newBuilder().setParent(parent).build();
5281     return listChannelPartnerRepricingConfigs(request);
5282   }
5283 
5284   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5285   /**
5286    * Lists information about how a Reseller modifies their bill before sending it to a
5287    * ChannelPartner.
5288    *
5289    * <p>Possible Error Codes:
5290    *
5291    * <ul>
5292    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5293    *       different.
5294    *   <li>NOT_FOUND: The
5295    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5296    *       specified does not exist or is not associated with the given account.
5297    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5298    *       contact Cloud Channel support.
5299    * </ul>
5300    *
5301    * <p>Return Value: If successful, the
5302    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5303    * resources. The data for each resource is displayed in the ascending order of:
5304    *
5305    * <ul>
5306    *   <li>Channel Partner ID
5307    *   <li>[RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5308    *   <li>[ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time]
5309    * </ul>
5310    *
5311    * <p>If unsuccessful, returns an error.
5312    *
5313    * <p>Sample code:
5314    *
5315    * <pre>{@code
5316    * // This snippet has been automatically generated and should be regarded as a code template only.
5317    * // It will require modifications to work:
5318    * // - It may require correct/in-range values for request initialization.
5319    * // - It may require specifying regional endpoints when creating the service client as shown in
5320    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5321    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5322    *   ListChannelPartnerRepricingConfigsRequest request =
5323    *       ListChannelPartnerRepricingConfigsRequest.newBuilder()
5324    *           .setParent(
5325    *               ChannelPartnerLinkName.of("[ACCOUNT]", "[CHANNEL_PARTNER_LINK]").toString())
5326    *           .setPageSize(883849137)
5327    *           .setPageToken("pageToken873572522")
5328    *           .setFilter("filter-1274492040")
5329    *           .build();
5330    *   for (ChannelPartnerRepricingConfig element :
5331    *       cloudChannelServiceClient.listChannelPartnerRepricingConfigs(request).iterateAll()) {
5332    *     // doThingsWith(element);
5333    *   }
5334    * }
5335    * }</pre>
5336    *
5337    * @param request The request object containing all of the parameters for the API call.
5338    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5339    */
listChannelPartnerRepricingConfigs( ListChannelPartnerRepricingConfigsRequest request)5340   public final ListChannelPartnerRepricingConfigsPagedResponse listChannelPartnerRepricingConfigs(
5341       ListChannelPartnerRepricingConfigsRequest request) {
5342     return listChannelPartnerRepricingConfigsPagedCallable().call(request);
5343   }
5344 
5345   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5346   /**
5347    * Lists information about how a Reseller modifies their bill before sending it to a
5348    * ChannelPartner.
5349    *
5350    * <p>Possible Error Codes:
5351    *
5352    * <ul>
5353    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5354    *       different.
5355    *   <li>NOT_FOUND: The
5356    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5357    *       specified does not exist or is not associated with the given account.
5358    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5359    *       contact Cloud Channel support.
5360    * </ul>
5361    *
5362    * <p>Return Value: If successful, the
5363    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5364    * resources. The data for each resource is displayed in the ascending order of:
5365    *
5366    * <ul>
5367    *   <li>Channel Partner ID
5368    *   <li>[RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5369    *   <li>[ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time]
5370    * </ul>
5371    *
5372    * <p>If unsuccessful, returns an error.
5373    *
5374    * <p>Sample code:
5375    *
5376    * <pre>{@code
5377    * // This snippet has been automatically generated and should be regarded as a code template only.
5378    * // It will require modifications to work:
5379    * // - It may require correct/in-range values for request initialization.
5380    * // - It may require specifying regional endpoints when creating the service client as shown in
5381    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5382    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5383    *   ListChannelPartnerRepricingConfigsRequest request =
5384    *       ListChannelPartnerRepricingConfigsRequest.newBuilder()
5385    *           .setParent(
5386    *               ChannelPartnerLinkName.of("[ACCOUNT]", "[CHANNEL_PARTNER_LINK]").toString())
5387    *           .setPageSize(883849137)
5388    *           .setPageToken("pageToken873572522")
5389    *           .setFilter("filter-1274492040")
5390    *           .build();
5391    *   ApiFuture<ChannelPartnerRepricingConfig> future =
5392    *       cloudChannelServiceClient
5393    *           .listChannelPartnerRepricingConfigsPagedCallable()
5394    *           .futureCall(request);
5395    *   // Do something.
5396    *   for (ChannelPartnerRepricingConfig element : future.get().iterateAll()) {
5397    *     // doThingsWith(element);
5398    *   }
5399    * }
5400    * }</pre>
5401    */
5402   public final UnaryCallable<
5403           ListChannelPartnerRepricingConfigsRequest,
5404           ListChannelPartnerRepricingConfigsPagedResponse>
listChannelPartnerRepricingConfigsPagedCallable()5405       listChannelPartnerRepricingConfigsPagedCallable() {
5406     return stub.listChannelPartnerRepricingConfigsPagedCallable();
5407   }
5408 
5409   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5410   /**
5411    * Lists information about how a Reseller modifies their bill before sending it to a
5412    * ChannelPartner.
5413    *
5414    * <p>Possible Error Codes:
5415    *
5416    * <ul>
5417    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5418    *       different.
5419    *   <li>NOT_FOUND: The
5420    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5421    *       specified does not exist or is not associated with the given account.
5422    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5423    *       contact Cloud Channel support.
5424    * </ul>
5425    *
5426    * <p>Return Value: If successful, the
5427    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5428    * resources. The data for each resource is displayed in the ascending order of:
5429    *
5430    * <ul>
5431    *   <li>Channel Partner ID
5432    *   <li>[RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5433    *   <li>[ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time]
5434    * </ul>
5435    *
5436    * <p>If unsuccessful, returns an error.
5437    *
5438    * <p>Sample code:
5439    *
5440    * <pre>{@code
5441    * // This snippet has been automatically generated and should be regarded as a code template only.
5442    * // It will require modifications to work:
5443    * // - It may require correct/in-range values for request initialization.
5444    * // - It may require specifying regional endpoints when creating the service client as shown in
5445    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5446    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5447    *   ListChannelPartnerRepricingConfigsRequest request =
5448    *       ListChannelPartnerRepricingConfigsRequest.newBuilder()
5449    *           .setParent(
5450    *               ChannelPartnerLinkName.of("[ACCOUNT]", "[CHANNEL_PARTNER_LINK]").toString())
5451    *           .setPageSize(883849137)
5452    *           .setPageToken("pageToken873572522")
5453    *           .setFilter("filter-1274492040")
5454    *           .build();
5455    *   while (true) {
5456    *     ListChannelPartnerRepricingConfigsResponse response =
5457    *         cloudChannelServiceClient.listChannelPartnerRepricingConfigsCallable().call(request);
5458    *     for (ChannelPartnerRepricingConfig element :
5459    *         response.getChannelPartnerRepricingConfigsList()) {
5460    *       // doThingsWith(element);
5461    *     }
5462    *     String nextPageToken = response.getNextPageToken();
5463    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
5464    *       request = request.toBuilder().setPageToken(nextPageToken).build();
5465    *     } else {
5466    *       break;
5467    *     }
5468    *   }
5469    * }
5470    * }</pre>
5471    */
5472   public final UnaryCallable<
5473           ListChannelPartnerRepricingConfigsRequest, ListChannelPartnerRepricingConfigsResponse>
listChannelPartnerRepricingConfigsCallable()5474       listChannelPartnerRepricingConfigsCallable() {
5475     return stub.listChannelPartnerRepricingConfigsCallable();
5476   }
5477 
5478   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5479   /**
5480    * Creates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific
5481    * ChannelPartner's bill. You can only create configs if the
5482    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5483    * is a future month. If needed, you can create a config for the current month, with some
5484    * restrictions.
5485    *
5486    * <p>When creating a config for a future month, make sure there are no existing configs for that
5487    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
5488    *
5489    * <p>The following restrictions are for creating configs in the current month.
5490    *
5491    * <ul>
5492    *   <li>This functionality is reserved for recovering from an erroneous config, and should not be
5493    *       used for regular business cases.
5494    *   <li>The new config will not modify exports used with other configs. Changes to the config may
5495    *       be immediate, but may take up to 24 hours.
5496    *   <li>There is a limit of ten configs for any ChannelPartner or
5497    *       [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
5498    *   <li>The contained
5499    *       [ChannelPartnerRepricingConfig.repricing_config][google.cloud.channel.v1.ChannelPartnerRepricingConfig.repricing_config]
5500    *       vaule must be different from the value used in the current config for a ChannelPartner.
5501    * </ul>
5502    *
5503    * <p>Possible Error Codes:
5504    *
5505    * <ul>
5506    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5507    *       different.
5508    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
5509    *       the updated config is for the current month or past months.
5510    *   <li>NOT_FOUND: The
5511    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5512    *       specified does not exist or is not associated with the given account.
5513    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5514    *       contact Cloud Channel support.
5515    * </ul>
5516    *
5517    * <p>Return Value: If successful, the updated
5518    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5519    * resource, otherwise returns an error.
5520    *
5521    * <p>Sample code:
5522    *
5523    * <pre>{@code
5524    * // This snippet has been automatically generated and should be regarded as a code template only.
5525    * // It will require modifications to work:
5526    * // - It may require correct/in-range values for request initialization.
5527    * // - It may require specifying regional endpoints when creating the service client as shown in
5528    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5529    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5530    *   ChannelPartnerLinkName parent =
5531    *       ChannelPartnerLinkName.of("[ACCOUNT]", "[CHANNEL_PARTNER_LINK]");
5532    *   ChannelPartnerRepricingConfig channelPartnerRepricingConfig =
5533    *       ChannelPartnerRepricingConfig.newBuilder().build();
5534    *   ChannelPartnerRepricingConfig response =
5535    *       cloudChannelServiceClient.createChannelPartnerRepricingConfig(
5536    *           parent, channelPartnerRepricingConfig);
5537    * }
5538    * }</pre>
5539    *
5540    * @param parent Required. The resource name of the ChannelPartner that will receive the repricing
5541    *     config. Parent uses the format:
5542    *     accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
5543    * @param channelPartnerRepricingConfig Required. The ChannelPartnerRepricingConfig object to
5544    *     update.
5545    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5546    */
createChannelPartnerRepricingConfig( ChannelPartnerLinkName parent, ChannelPartnerRepricingConfig channelPartnerRepricingConfig)5547   public final ChannelPartnerRepricingConfig createChannelPartnerRepricingConfig(
5548       ChannelPartnerLinkName parent, ChannelPartnerRepricingConfig channelPartnerRepricingConfig) {
5549     CreateChannelPartnerRepricingConfigRequest request =
5550         CreateChannelPartnerRepricingConfigRequest.newBuilder()
5551             .setParent(parent == null ? null : parent.toString())
5552             .setChannelPartnerRepricingConfig(channelPartnerRepricingConfig)
5553             .build();
5554     return createChannelPartnerRepricingConfig(request);
5555   }
5556 
5557   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5558   /**
5559    * Creates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific
5560    * ChannelPartner's bill. You can only create configs if the
5561    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5562    * is a future month. If needed, you can create a config for the current month, with some
5563    * restrictions.
5564    *
5565    * <p>When creating a config for a future month, make sure there are no existing configs for that
5566    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
5567    *
5568    * <p>The following restrictions are for creating configs in the current month.
5569    *
5570    * <ul>
5571    *   <li>This functionality is reserved for recovering from an erroneous config, and should not be
5572    *       used for regular business cases.
5573    *   <li>The new config will not modify exports used with other configs. Changes to the config may
5574    *       be immediate, but may take up to 24 hours.
5575    *   <li>There is a limit of ten configs for any ChannelPartner or
5576    *       [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
5577    *   <li>The contained
5578    *       [ChannelPartnerRepricingConfig.repricing_config][google.cloud.channel.v1.ChannelPartnerRepricingConfig.repricing_config]
5579    *       vaule must be different from the value used in the current config for a ChannelPartner.
5580    * </ul>
5581    *
5582    * <p>Possible Error Codes:
5583    *
5584    * <ul>
5585    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5586    *       different.
5587    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
5588    *       the updated config is for the current month or past months.
5589    *   <li>NOT_FOUND: The
5590    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5591    *       specified does not exist or is not associated with the given account.
5592    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5593    *       contact Cloud Channel support.
5594    * </ul>
5595    *
5596    * <p>Return Value: If successful, the updated
5597    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5598    * resource, otherwise returns an error.
5599    *
5600    * <p>Sample code:
5601    *
5602    * <pre>{@code
5603    * // This snippet has been automatically generated and should be regarded as a code template only.
5604    * // It will require modifications to work:
5605    * // - It may require correct/in-range values for request initialization.
5606    * // - It may require specifying regional endpoints when creating the service client as shown in
5607    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5608    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5609    *   String parent = ChannelPartnerLinkName.of("[ACCOUNT]", "[CHANNEL_PARTNER_LINK]").toString();
5610    *   ChannelPartnerRepricingConfig channelPartnerRepricingConfig =
5611    *       ChannelPartnerRepricingConfig.newBuilder().build();
5612    *   ChannelPartnerRepricingConfig response =
5613    *       cloudChannelServiceClient.createChannelPartnerRepricingConfig(
5614    *           parent, channelPartnerRepricingConfig);
5615    * }
5616    * }</pre>
5617    *
5618    * @param parent Required. The resource name of the ChannelPartner that will receive the repricing
5619    *     config. Parent uses the format:
5620    *     accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
5621    * @param channelPartnerRepricingConfig Required. The ChannelPartnerRepricingConfig object to
5622    *     update.
5623    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5624    */
createChannelPartnerRepricingConfig( String parent, ChannelPartnerRepricingConfig channelPartnerRepricingConfig)5625   public final ChannelPartnerRepricingConfig createChannelPartnerRepricingConfig(
5626       String parent, ChannelPartnerRepricingConfig channelPartnerRepricingConfig) {
5627     CreateChannelPartnerRepricingConfigRequest request =
5628         CreateChannelPartnerRepricingConfigRequest.newBuilder()
5629             .setParent(parent)
5630             .setChannelPartnerRepricingConfig(channelPartnerRepricingConfig)
5631             .build();
5632     return createChannelPartnerRepricingConfig(request);
5633   }
5634 
5635   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5636   /**
5637    * Creates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific
5638    * ChannelPartner's bill. You can only create configs if the
5639    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5640    * is a future month. If needed, you can create a config for the current month, with some
5641    * restrictions.
5642    *
5643    * <p>When creating a config for a future month, make sure there are no existing configs for that
5644    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
5645    *
5646    * <p>The following restrictions are for creating configs in the current month.
5647    *
5648    * <ul>
5649    *   <li>This functionality is reserved for recovering from an erroneous config, and should not be
5650    *       used for regular business cases.
5651    *   <li>The new config will not modify exports used with other configs. Changes to the config may
5652    *       be immediate, but may take up to 24 hours.
5653    *   <li>There is a limit of ten configs for any ChannelPartner or
5654    *       [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
5655    *   <li>The contained
5656    *       [ChannelPartnerRepricingConfig.repricing_config][google.cloud.channel.v1.ChannelPartnerRepricingConfig.repricing_config]
5657    *       vaule must be different from the value used in the current config for a ChannelPartner.
5658    * </ul>
5659    *
5660    * <p>Possible Error Codes:
5661    *
5662    * <ul>
5663    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5664    *       different.
5665    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
5666    *       the updated config is for the current month or past months.
5667    *   <li>NOT_FOUND: The
5668    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5669    *       specified does not exist or is not associated with the given account.
5670    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5671    *       contact Cloud Channel support.
5672    * </ul>
5673    *
5674    * <p>Return Value: If successful, the updated
5675    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5676    * resource, otherwise returns an error.
5677    *
5678    * <p>Sample code:
5679    *
5680    * <pre>{@code
5681    * // This snippet has been automatically generated and should be regarded as a code template only.
5682    * // It will require modifications to work:
5683    * // - It may require correct/in-range values for request initialization.
5684    * // - It may require specifying regional endpoints when creating the service client as shown in
5685    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5686    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5687    *   CreateChannelPartnerRepricingConfigRequest request =
5688    *       CreateChannelPartnerRepricingConfigRequest.newBuilder()
5689    *           .setParent(
5690    *               ChannelPartnerLinkName.of("[ACCOUNT]", "[CHANNEL_PARTNER_LINK]").toString())
5691    *           .setChannelPartnerRepricingConfig(ChannelPartnerRepricingConfig.newBuilder().build())
5692    *           .build();
5693    *   ChannelPartnerRepricingConfig response =
5694    *       cloudChannelServiceClient.createChannelPartnerRepricingConfig(request);
5695    * }
5696    * }</pre>
5697    *
5698    * @param request The request object containing all of the parameters for the API call.
5699    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5700    */
createChannelPartnerRepricingConfig( CreateChannelPartnerRepricingConfigRequest request)5701   public final ChannelPartnerRepricingConfig createChannelPartnerRepricingConfig(
5702       CreateChannelPartnerRepricingConfigRequest request) {
5703     return createChannelPartnerRepricingConfigCallable().call(request);
5704   }
5705 
5706   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5707   /**
5708    * Creates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific
5709    * ChannelPartner's bill. You can only create configs if the
5710    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5711    * is a future month. If needed, you can create a config for the current month, with some
5712    * restrictions.
5713    *
5714    * <p>When creating a config for a future month, make sure there are no existing configs for that
5715    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
5716    *
5717    * <p>The following restrictions are for creating configs in the current month.
5718    *
5719    * <ul>
5720    *   <li>This functionality is reserved for recovering from an erroneous config, and should not be
5721    *       used for regular business cases.
5722    *   <li>The new config will not modify exports used with other configs. Changes to the config may
5723    *       be immediate, but may take up to 24 hours.
5724    *   <li>There is a limit of ten configs for any ChannelPartner or
5725    *       [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
5726    *   <li>The contained
5727    *       [ChannelPartnerRepricingConfig.repricing_config][google.cloud.channel.v1.ChannelPartnerRepricingConfig.repricing_config]
5728    *       vaule must be different from the value used in the current config for a ChannelPartner.
5729    * </ul>
5730    *
5731    * <p>Possible Error Codes:
5732    *
5733    * <ul>
5734    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5735    *       different.
5736    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
5737    *       the updated config is for the current month or past months.
5738    *   <li>NOT_FOUND: The
5739    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5740    *       specified does not exist or is not associated with the given account.
5741    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5742    *       contact Cloud Channel support.
5743    * </ul>
5744    *
5745    * <p>Return Value: If successful, the updated
5746    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5747    * resource, otherwise returns an error.
5748    *
5749    * <p>Sample code:
5750    *
5751    * <pre>{@code
5752    * // This snippet has been automatically generated and should be regarded as a code template only.
5753    * // It will require modifications to work:
5754    * // - It may require correct/in-range values for request initialization.
5755    * // - It may require specifying regional endpoints when creating the service client as shown in
5756    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5757    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5758    *   CreateChannelPartnerRepricingConfigRequest request =
5759    *       CreateChannelPartnerRepricingConfigRequest.newBuilder()
5760    *           .setParent(
5761    *               ChannelPartnerLinkName.of("[ACCOUNT]", "[CHANNEL_PARTNER_LINK]").toString())
5762    *           .setChannelPartnerRepricingConfig(ChannelPartnerRepricingConfig.newBuilder().build())
5763    *           .build();
5764    *   ApiFuture<ChannelPartnerRepricingConfig> future =
5765    *       cloudChannelServiceClient
5766    *           .createChannelPartnerRepricingConfigCallable()
5767    *           .futureCall(request);
5768    *   // Do something.
5769    *   ChannelPartnerRepricingConfig response = future.get();
5770    * }
5771    * }</pre>
5772    */
5773   public final UnaryCallable<
5774           CreateChannelPartnerRepricingConfigRequest, ChannelPartnerRepricingConfig>
createChannelPartnerRepricingConfigCallable()5775       createChannelPartnerRepricingConfigCallable() {
5776     return stub.createChannelPartnerRepricingConfigCallable();
5777   }
5778 
5779   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5780   /**
5781    * Updates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific
5782    * ChannelPartner's bill. This method overwrites the existing CustomerRepricingConfig.
5783    *
5784    * <p>You can only update configs if the
5785    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5786    * is a future month. To make changes to configs for the current month, use
5787    * [CreateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig],
5788    * taking note of its restrictions. You cannot update the
5789    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
5790    *
5791    * <p>When updating a config in the future:
5792    *
5793    * <ul>
5794    *   <li>This config must already exist.
5795    * </ul>
5796    *
5797    * <p>Possible Error Codes:
5798    *
5799    * <ul>
5800    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5801    *       different.
5802    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
5803    *       the updated config is for the current month or past months.
5804    *   <li>NOT_FOUND: The
5805    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5806    *       specified does not exist or is not associated with the given account.
5807    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5808    *       contact Cloud Channel support.
5809    * </ul>
5810    *
5811    * <p>Return Value: If successful, the updated
5812    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5813    * resource, otherwise returns an error.
5814    *
5815    * <p>Sample code:
5816    *
5817    * <pre>{@code
5818    * // This snippet has been automatically generated and should be regarded as a code template only.
5819    * // It will require modifications to work:
5820    * // - It may require correct/in-range values for request initialization.
5821    * // - It may require specifying regional endpoints when creating the service client as shown in
5822    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5823    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5824    *   ChannelPartnerRepricingConfig channelPartnerRepricingConfig =
5825    *       ChannelPartnerRepricingConfig.newBuilder().build();
5826    *   ChannelPartnerRepricingConfig response =
5827    *       cloudChannelServiceClient.updateChannelPartnerRepricingConfig(
5828    *           channelPartnerRepricingConfig);
5829    * }
5830    * }</pre>
5831    *
5832    * @param channelPartnerRepricingConfig Required. The ChannelPartnerRepricingConfig object to
5833    *     update.
5834    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5835    */
updateChannelPartnerRepricingConfig( ChannelPartnerRepricingConfig channelPartnerRepricingConfig)5836   public final ChannelPartnerRepricingConfig updateChannelPartnerRepricingConfig(
5837       ChannelPartnerRepricingConfig channelPartnerRepricingConfig) {
5838     UpdateChannelPartnerRepricingConfigRequest request =
5839         UpdateChannelPartnerRepricingConfigRequest.newBuilder()
5840             .setChannelPartnerRepricingConfig(channelPartnerRepricingConfig)
5841             .build();
5842     return updateChannelPartnerRepricingConfig(request);
5843   }
5844 
5845   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5846   /**
5847    * Updates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific
5848    * ChannelPartner's bill. This method overwrites the existing CustomerRepricingConfig.
5849    *
5850    * <p>You can only update configs if the
5851    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5852    * is a future month. To make changes to configs for the current month, use
5853    * [CreateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig],
5854    * taking note of its restrictions. You cannot update the
5855    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
5856    *
5857    * <p>When updating a config in the future:
5858    *
5859    * <ul>
5860    *   <li>This config must already exist.
5861    * </ul>
5862    *
5863    * <p>Possible Error Codes:
5864    *
5865    * <ul>
5866    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5867    *       different.
5868    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
5869    *       the updated config is for the current month or past months.
5870    *   <li>NOT_FOUND: The
5871    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5872    *       specified does not exist or is not associated with the given account.
5873    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5874    *       contact Cloud Channel support.
5875    * </ul>
5876    *
5877    * <p>Return Value: If successful, the updated
5878    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5879    * resource, otherwise returns an error.
5880    *
5881    * <p>Sample code:
5882    *
5883    * <pre>{@code
5884    * // This snippet has been automatically generated and should be regarded as a code template only.
5885    * // It will require modifications to work:
5886    * // - It may require correct/in-range values for request initialization.
5887    * // - It may require specifying regional endpoints when creating the service client as shown in
5888    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5889    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5890    *   UpdateChannelPartnerRepricingConfigRequest request =
5891    *       UpdateChannelPartnerRepricingConfigRequest.newBuilder()
5892    *           .setChannelPartnerRepricingConfig(ChannelPartnerRepricingConfig.newBuilder().build())
5893    *           .build();
5894    *   ChannelPartnerRepricingConfig response =
5895    *       cloudChannelServiceClient.updateChannelPartnerRepricingConfig(request);
5896    * }
5897    * }</pre>
5898    *
5899    * @param request The request object containing all of the parameters for the API call.
5900    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5901    */
updateChannelPartnerRepricingConfig( UpdateChannelPartnerRepricingConfigRequest request)5902   public final ChannelPartnerRepricingConfig updateChannelPartnerRepricingConfig(
5903       UpdateChannelPartnerRepricingConfigRequest request) {
5904     return updateChannelPartnerRepricingConfigCallable().call(request);
5905   }
5906 
5907   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5908   /**
5909    * Updates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific
5910    * ChannelPartner's bill. This method overwrites the existing CustomerRepricingConfig.
5911    *
5912    * <p>You can only update configs if the
5913    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5914    * is a future month. To make changes to configs for the current month, use
5915    * [CreateChannelPartnerRepricingConfig][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerRepricingConfig],
5916    * taking note of its restrictions. You cannot update the
5917    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month].
5918    *
5919    * <p>When updating a config in the future:
5920    *
5921    * <ul>
5922    *   <li>This config must already exist.
5923    * </ul>
5924    *
5925    * <p>Possible Error Codes:
5926    *
5927    * <ul>
5928    *   <li>PERMISSION_DENIED: If the account making the request and the account being queried are
5929    *       different.
5930    *   <li>INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if
5931    *       the updated config is for the current month or past months.
5932    *   <li>NOT_FOUND: The
5933    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5934    *       specified does not exist or is not associated with the given account.
5935    *   <li>INTERNAL: Any non-user error related to technical issues in the backend. In this case,
5936    *       contact Cloud Channel support.
5937    * </ul>
5938    *
5939    * <p>Return Value: If successful, the updated
5940    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5941    * resource, otherwise returns an error.
5942    *
5943    * <p>Sample code:
5944    *
5945    * <pre>{@code
5946    * // This snippet has been automatically generated and should be regarded as a code template only.
5947    * // It will require modifications to work:
5948    * // - It may require correct/in-range values for request initialization.
5949    * // - It may require specifying regional endpoints when creating the service client as shown in
5950    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5951    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
5952    *   UpdateChannelPartnerRepricingConfigRequest request =
5953    *       UpdateChannelPartnerRepricingConfigRequest.newBuilder()
5954    *           .setChannelPartnerRepricingConfig(ChannelPartnerRepricingConfig.newBuilder().build())
5955    *           .build();
5956    *   ApiFuture<ChannelPartnerRepricingConfig> future =
5957    *       cloudChannelServiceClient
5958    *           .updateChannelPartnerRepricingConfigCallable()
5959    *           .futureCall(request);
5960    *   // Do something.
5961    *   ChannelPartnerRepricingConfig response = future.get();
5962    * }
5963    * }</pre>
5964    */
5965   public final UnaryCallable<
5966           UpdateChannelPartnerRepricingConfigRequest, ChannelPartnerRepricingConfig>
updateChannelPartnerRepricingConfigCallable()5967       updateChannelPartnerRepricingConfigCallable() {
5968     return stub.updateChannelPartnerRepricingConfigCallable();
5969   }
5970 
5971   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5972   /**
5973    * Deletes the given
5974    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5975    * permanently. You can only delete configs if their
5976    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
5977    * is set to a date after the current month.
5978    *
5979    * <p>Possible error codes:
5980    *
5981    * <ul>
5982    *   <li>PERMISSION_DENIED: The account making the request does not own this customer.
5983    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
5984    *   <li>FAILED_PRECONDITION: The
5985    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] is
5986    *       active or in the past.
5987    *   <li>NOT_FOUND: No
5988    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
5989    *       found for the name in the request.
5990    * </ul>
5991    *
5992    * <p>Sample code:
5993    *
5994    * <pre>{@code
5995    * // This snippet has been automatically generated and should be regarded as a code template only.
5996    * // It will require modifications to work:
5997    * // - It may require correct/in-range values for request initialization.
5998    * // - It may require specifying regional endpoints when creating the service client as shown in
5999    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6000    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6001    *   ChannelPartnerRepricingConfigName name =
6002    *       ChannelPartnerRepricingConfigName.of(
6003    *           "[ACCOUNT]", "[CHANNEL_PARTNER]", "[CHANNEL_PARTNER_REPRICING_CONFIG]");
6004    *   cloudChannelServiceClient.deleteChannelPartnerRepricingConfig(name);
6005    * }
6006    * }</pre>
6007    *
6008    * @param name Required. The resource name of the channel partner repricing config rule to delete.
6009    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
6010    */
deleteChannelPartnerRepricingConfig(ChannelPartnerRepricingConfigName name)6011   public final void deleteChannelPartnerRepricingConfig(ChannelPartnerRepricingConfigName name) {
6012     DeleteChannelPartnerRepricingConfigRequest request =
6013         DeleteChannelPartnerRepricingConfigRequest.newBuilder()
6014             .setName(name == null ? null : name.toString())
6015             .build();
6016     deleteChannelPartnerRepricingConfig(request);
6017   }
6018 
6019   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6020   /**
6021    * Deletes the given
6022    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
6023    * permanently. You can only delete configs if their
6024    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
6025    * is set to a date after the current month.
6026    *
6027    * <p>Possible error codes:
6028    *
6029    * <ul>
6030    *   <li>PERMISSION_DENIED: The account making the request does not own this customer.
6031    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6032    *   <li>FAILED_PRECONDITION: The
6033    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] is
6034    *       active or in the past.
6035    *   <li>NOT_FOUND: No
6036    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
6037    *       found for the name in the request.
6038    * </ul>
6039    *
6040    * <p>Sample code:
6041    *
6042    * <pre>{@code
6043    * // This snippet has been automatically generated and should be regarded as a code template only.
6044    * // It will require modifications to work:
6045    * // - It may require correct/in-range values for request initialization.
6046    * // - It may require specifying regional endpoints when creating the service client as shown in
6047    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6048    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6049    *   String name =
6050    *       ChannelPartnerRepricingConfigName.of(
6051    *               "[ACCOUNT]", "[CHANNEL_PARTNER]", "[CHANNEL_PARTNER_REPRICING_CONFIG]")
6052    *           .toString();
6053    *   cloudChannelServiceClient.deleteChannelPartnerRepricingConfig(name);
6054    * }
6055    * }</pre>
6056    *
6057    * @param name Required. The resource name of the channel partner repricing config rule to delete.
6058    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
6059    */
deleteChannelPartnerRepricingConfig(String name)6060   public final void deleteChannelPartnerRepricingConfig(String name) {
6061     DeleteChannelPartnerRepricingConfigRequest request =
6062         DeleteChannelPartnerRepricingConfigRequest.newBuilder().setName(name).build();
6063     deleteChannelPartnerRepricingConfig(request);
6064   }
6065 
6066   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6067   /**
6068    * Deletes the given
6069    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
6070    * permanently. You can only delete configs if their
6071    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
6072    * is set to a date after the current month.
6073    *
6074    * <p>Possible error codes:
6075    *
6076    * <ul>
6077    *   <li>PERMISSION_DENIED: The account making the request does not own this customer.
6078    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6079    *   <li>FAILED_PRECONDITION: The
6080    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] is
6081    *       active or in the past.
6082    *   <li>NOT_FOUND: No
6083    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
6084    *       found for the name in the request.
6085    * </ul>
6086    *
6087    * <p>Sample code:
6088    *
6089    * <pre>{@code
6090    * // This snippet has been automatically generated and should be regarded as a code template only.
6091    * // It will require modifications to work:
6092    * // - It may require correct/in-range values for request initialization.
6093    * // - It may require specifying regional endpoints when creating the service client as shown in
6094    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6095    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6096    *   DeleteChannelPartnerRepricingConfigRequest request =
6097    *       DeleteChannelPartnerRepricingConfigRequest.newBuilder()
6098    *           .setName(
6099    *               ChannelPartnerRepricingConfigName.of(
6100    *                       "[ACCOUNT]", "[CHANNEL_PARTNER]", "[CHANNEL_PARTNER_REPRICING_CONFIG]")
6101    *                   .toString())
6102    *           .build();
6103    *   cloudChannelServiceClient.deleteChannelPartnerRepricingConfig(request);
6104    * }
6105    * }</pre>
6106    *
6107    * @param request The request object containing all of the parameters for the API call.
6108    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
6109    */
deleteChannelPartnerRepricingConfig( DeleteChannelPartnerRepricingConfigRequest request)6110   public final void deleteChannelPartnerRepricingConfig(
6111       DeleteChannelPartnerRepricingConfigRequest request) {
6112     deleteChannelPartnerRepricingConfigCallable().call(request);
6113   }
6114 
6115   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6116   /**
6117    * Deletes the given
6118    * [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
6119    * permanently. You can only delete configs if their
6120    * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
6121    * is set to a date after the current month.
6122    *
6123    * <p>Possible error codes:
6124    *
6125    * <ul>
6126    *   <li>PERMISSION_DENIED: The account making the request does not own this customer.
6127    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6128    *   <li>FAILED_PRECONDITION: The
6129    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig] is
6130    *       active or in the past.
6131    *   <li>NOT_FOUND: No
6132    *       [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
6133    *       found for the name in the request.
6134    * </ul>
6135    *
6136    * <p>Sample code:
6137    *
6138    * <pre>{@code
6139    * // This snippet has been automatically generated and should be regarded as a code template only.
6140    * // It will require modifications to work:
6141    * // - It may require correct/in-range values for request initialization.
6142    * // - It may require specifying regional endpoints when creating the service client as shown in
6143    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6144    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6145    *   DeleteChannelPartnerRepricingConfigRequest request =
6146    *       DeleteChannelPartnerRepricingConfigRequest.newBuilder()
6147    *           .setName(
6148    *               ChannelPartnerRepricingConfigName.of(
6149    *                       "[ACCOUNT]", "[CHANNEL_PARTNER]", "[CHANNEL_PARTNER_REPRICING_CONFIG]")
6150    *                   .toString())
6151    *           .build();
6152    *   ApiFuture<Empty> future =
6153    *       cloudChannelServiceClient
6154    *           .deleteChannelPartnerRepricingConfigCallable()
6155    *           .futureCall(request);
6156    *   // Do something.
6157    *   future.get();
6158    * }
6159    * }</pre>
6160    */
6161   public final UnaryCallable<DeleteChannelPartnerRepricingConfigRequest, Empty>
deleteChannelPartnerRepricingConfigCallable()6162       deleteChannelPartnerRepricingConfigCallable() {
6163     return stub.deleteChannelPartnerRepricingConfigCallable();
6164   }
6165 
6166   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6167   /**
6168    * Returns the requested [Offer][google.cloud.channel.v1.Offer] resource.
6169    *
6170    * <p>Possible error codes:
6171    *
6172    * <ul>
6173    *   <li>PERMISSION_DENIED: The entitlement doesn't belong to the reseller.
6174    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6175    *   <li>NOT_FOUND: Entitlement or offer was not found.
6176    * </ul>
6177    *
6178    * <p>Return value: The [Offer][google.cloud.channel.v1.Offer] resource.
6179    *
6180    * <p>Sample code:
6181    *
6182    * <pre>{@code
6183    * // This snippet has been automatically generated and should be regarded as a code template only.
6184    * // It will require modifications to work:
6185    * // - It may require correct/in-range values for request initialization.
6186    * // - It may require specifying regional endpoints when creating the service client as shown in
6187    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6188    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6189    *   LookupOfferRequest request =
6190    *       LookupOfferRequest.newBuilder()
6191    *           .setEntitlement(
6192    *               EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString())
6193    *           .build();
6194    *   Offer response = cloudChannelServiceClient.lookupOffer(request);
6195    * }
6196    * }</pre>
6197    *
6198    * @param request The request object containing all of the parameters for the API call.
6199    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
6200    */
lookupOffer(LookupOfferRequest request)6201   public final Offer lookupOffer(LookupOfferRequest request) {
6202     return lookupOfferCallable().call(request);
6203   }
6204 
6205   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6206   /**
6207    * Returns the requested [Offer][google.cloud.channel.v1.Offer] resource.
6208    *
6209    * <p>Possible error codes:
6210    *
6211    * <ul>
6212    *   <li>PERMISSION_DENIED: The entitlement doesn't belong to the reseller.
6213    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6214    *   <li>NOT_FOUND: Entitlement or offer was not found.
6215    * </ul>
6216    *
6217    * <p>Return value: The [Offer][google.cloud.channel.v1.Offer] resource.
6218    *
6219    * <p>Sample code:
6220    *
6221    * <pre>{@code
6222    * // This snippet has been automatically generated and should be regarded as a code template only.
6223    * // It will require modifications to work:
6224    * // - It may require correct/in-range values for request initialization.
6225    * // - It may require specifying regional endpoints when creating the service client as shown in
6226    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6227    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6228    *   LookupOfferRequest request =
6229    *       LookupOfferRequest.newBuilder()
6230    *           .setEntitlement(
6231    *               EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString())
6232    *           .build();
6233    *   ApiFuture<Offer> future = cloudChannelServiceClient.lookupOfferCallable().futureCall(request);
6234    *   // Do something.
6235    *   Offer response = future.get();
6236    * }
6237    * }</pre>
6238    */
lookupOfferCallable()6239   public final UnaryCallable<LookupOfferRequest, Offer> lookupOfferCallable() {
6240     return stub.lookupOfferCallable();
6241   }
6242 
6243   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6244   /**
6245    * Lists the Products the reseller is authorized to sell.
6246    *
6247    * <p>Possible error codes:
6248    *
6249    * <ul>
6250    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6251    * </ul>
6252    *
6253    * <p>Sample code:
6254    *
6255    * <pre>{@code
6256    * // This snippet has been automatically generated and should be regarded as a code template only.
6257    * // It will require modifications to work:
6258    * // - It may require correct/in-range values for request initialization.
6259    * // - It may require specifying regional endpoints when creating the service client as shown in
6260    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6261    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6262    *   ListProductsRequest request =
6263    *       ListProductsRequest.newBuilder()
6264    *           .setAccount("account-1177318867")
6265    *           .setPageSize(883849137)
6266    *           .setPageToken("pageToken873572522")
6267    *           .setLanguageCode("languageCode-2092349083")
6268    *           .build();
6269    *   for (Product element : cloudChannelServiceClient.listProducts(request).iterateAll()) {
6270    *     // doThingsWith(element);
6271    *   }
6272    * }
6273    * }</pre>
6274    *
6275    * @param request The request object containing all of the parameters for the API call.
6276    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
6277    */
listProducts(ListProductsRequest request)6278   public final ListProductsPagedResponse listProducts(ListProductsRequest request) {
6279     return listProductsPagedCallable().call(request);
6280   }
6281 
6282   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6283   /**
6284    * Lists the Products the reseller is authorized to sell.
6285    *
6286    * <p>Possible error codes:
6287    *
6288    * <ul>
6289    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6290    * </ul>
6291    *
6292    * <p>Sample code:
6293    *
6294    * <pre>{@code
6295    * // This snippet has been automatically generated and should be regarded as a code template only.
6296    * // It will require modifications to work:
6297    * // - It may require correct/in-range values for request initialization.
6298    * // - It may require specifying regional endpoints when creating the service client as shown in
6299    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6300    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6301    *   ListProductsRequest request =
6302    *       ListProductsRequest.newBuilder()
6303    *           .setAccount("account-1177318867")
6304    *           .setPageSize(883849137)
6305    *           .setPageToken("pageToken873572522")
6306    *           .setLanguageCode("languageCode-2092349083")
6307    *           .build();
6308    *   ApiFuture<Product> future =
6309    *       cloudChannelServiceClient.listProductsPagedCallable().futureCall(request);
6310    *   // Do something.
6311    *   for (Product element : future.get().iterateAll()) {
6312    *     // doThingsWith(element);
6313    *   }
6314    * }
6315    * }</pre>
6316    */
6317   public final UnaryCallable<ListProductsRequest, ListProductsPagedResponse>
listProductsPagedCallable()6318       listProductsPagedCallable() {
6319     return stub.listProductsPagedCallable();
6320   }
6321 
6322   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6323   /**
6324    * Lists the Products the reseller is authorized to sell.
6325    *
6326    * <p>Possible error codes:
6327    *
6328    * <ul>
6329    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6330    * </ul>
6331    *
6332    * <p>Sample code:
6333    *
6334    * <pre>{@code
6335    * // This snippet has been automatically generated and should be regarded as a code template only.
6336    * // It will require modifications to work:
6337    * // - It may require correct/in-range values for request initialization.
6338    * // - It may require specifying regional endpoints when creating the service client as shown in
6339    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6340    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6341    *   ListProductsRequest request =
6342    *       ListProductsRequest.newBuilder()
6343    *           .setAccount("account-1177318867")
6344    *           .setPageSize(883849137)
6345    *           .setPageToken("pageToken873572522")
6346    *           .setLanguageCode("languageCode-2092349083")
6347    *           .build();
6348    *   while (true) {
6349    *     ListProductsResponse response =
6350    *         cloudChannelServiceClient.listProductsCallable().call(request);
6351    *     for (Product element : response.getProductsList()) {
6352    *       // doThingsWith(element);
6353    *     }
6354    *     String nextPageToken = response.getNextPageToken();
6355    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
6356    *       request = request.toBuilder().setPageToken(nextPageToken).build();
6357    *     } else {
6358    *       break;
6359    *     }
6360    *   }
6361    * }
6362    * }</pre>
6363    */
listProductsCallable()6364   public final UnaryCallable<ListProductsRequest, ListProductsResponse> listProductsCallable() {
6365     return stub.listProductsCallable();
6366   }
6367 
6368   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6369   /**
6370    * Lists the SKUs for a product the reseller is authorized to sell.
6371    *
6372    * <p>Possible error codes:
6373    *
6374    * <ul>
6375    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6376    * </ul>
6377    *
6378    * <p>Sample code:
6379    *
6380    * <pre>{@code
6381    * // This snippet has been automatically generated and should be regarded as a code template only.
6382    * // It will require modifications to work:
6383    * // - It may require correct/in-range values for request initialization.
6384    * // - It may require specifying regional endpoints when creating the service client as shown in
6385    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6386    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6387    *   ListSkusRequest request =
6388    *       ListSkusRequest.newBuilder()
6389    *           .setParent(ProductName.of("[PRODUCT]").toString())
6390    *           .setAccount("account-1177318867")
6391    *           .setPageSize(883849137)
6392    *           .setPageToken("pageToken873572522")
6393    *           .setLanguageCode("languageCode-2092349083")
6394    *           .build();
6395    *   for (Sku element : cloudChannelServiceClient.listSkus(request).iterateAll()) {
6396    *     // doThingsWith(element);
6397    *   }
6398    * }
6399    * }</pre>
6400    *
6401    * @param request The request object containing all of the parameters for the API call.
6402    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
6403    */
listSkus(ListSkusRequest request)6404   public final ListSkusPagedResponse listSkus(ListSkusRequest request) {
6405     return listSkusPagedCallable().call(request);
6406   }
6407 
6408   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6409   /**
6410    * Lists the SKUs for a product the reseller is authorized to sell.
6411    *
6412    * <p>Possible error codes:
6413    *
6414    * <ul>
6415    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6416    * </ul>
6417    *
6418    * <p>Sample code:
6419    *
6420    * <pre>{@code
6421    * // This snippet has been automatically generated and should be regarded as a code template only.
6422    * // It will require modifications to work:
6423    * // - It may require correct/in-range values for request initialization.
6424    * // - It may require specifying regional endpoints when creating the service client as shown in
6425    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6426    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6427    *   ListSkusRequest request =
6428    *       ListSkusRequest.newBuilder()
6429    *           .setParent(ProductName.of("[PRODUCT]").toString())
6430    *           .setAccount("account-1177318867")
6431    *           .setPageSize(883849137)
6432    *           .setPageToken("pageToken873572522")
6433    *           .setLanguageCode("languageCode-2092349083")
6434    *           .build();
6435    *   ApiFuture<Sku> future = cloudChannelServiceClient.listSkusPagedCallable().futureCall(request);
6436    *   // Do something.
6437    *   for (Sku element : future.get().iterateAll()) {
6438    *     // doThingsWith(element);
6439    *   }
6440    * }
6441    * }</pre>
6442    */
listSkusPagedCallable()6443   public final UnaryCallable<ListSkusRequest, ListSkusPagedResponse> listSkusPagedCallable() {
6444     return stub.listSkusPagedCallable();
6445   }
6446 
6447   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6448   /**
6449    * Lists the SKUs for a product the reseller is authorized to sell.
6450    *
6451    * <p>Possible error codes:
6452    *
6453    * <ul>
6454    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6455    * </ul>
6456    *
6457    * <p>Sample code:
6458    *
6459    * <pre>{@code
6460    * // This snippet has been automatically generated and should be regarded as a code template only.
6461    * // It will require modifications to work:
6462    * // - It may require correct/in-range values for request initialization.
6463    * // - It may require specifying regional endpoints when creating the service client as shown in
6464    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6465    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6466    *   ListSkusRequest request =
6467    *       ListSkusRequest.newBuilder()
6468    *           .setParent(ProductName.of("[PRODUCT]").toString())
6469    *           .setAccount("account-1177318867")
6470    *           .setPageSize(883849137)
6471    *           .setPageToken("pageToken873572522")
6472    *           .setLanguageCode("languageCode-2092349083")
6473    *           .build();
6474    *   while (true) {
6475    *     ListSkusResponse response = cloudChannelServiceClient.listSkusCallable().call(request);
6476    *     for (Sku element : response.getSkusList()) {
6477    *       // doThingsWith(element);
6478    *     }
6479    *     String nextPageToken = response.getNextPageToken();
6480    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
6481    *       request = request.toBuilder().setPageToken(nextPageToken).build();
6482    *     } else {
6483    *       break;
6484    *     }
6485    *   }
6486    * }
6487    * }</pre>
6488    */
listSkusCallable()6489   public final UnaryCallable<ListSkusRequest, ListSkusResponse> listSkusCallable() {
6490     return stub.listSkusCallable();
6491   }
6492 
6493   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6494   /**
6495    * Lists the Offers the reseller can sell.
6496    *
6497    * <p>Possible error codes:
6498    *
6499    * <ul>
6500    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6501    * </ul>
6502    *
6503    * <p>Sample code:
6504    *
6505    * <pre>{@code
6506    * // This snippet has been automatically generated and should be regarded as a code template only.
6507    * // It will require modifications to work:
6508    * // - It may require correct/in-range values for request initialization.
6509    * // - It may require specifying regional endpoints when creating the service client as shown in
6510    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6511    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6512    *   ListOffersRequest request =
6513    *       ListOffersRequest.newBuilder()
6514    *           .setParent("parent-995424086")
6515    *           .setPageSize(883849137)
6516    *           .setPageToken("pageToken873572522")
6517    *           .setFilter("filter-1274492040")
6518    *           .setLanguageCode("languageCode-2092349083")
6519    *           .setShowFutureOffers(true)
6520    *           .build();
6521    *   for (Offer element : cloudChannelServiceClient.listOffers(request).iterateAll()) {
6522    *     // doThingsWith(element);
6523    *   }
6524    * }
6525    * }</pre>
6526    *
6527    * @param request The request object containing all of the parameters for the API call.
6528    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
6529    */
listOffers(ListOffersRequest request)6530   public final ListOffersPagedResponse listOffers(ListOffersRequest request) {
6531     return listOffersPagedCallable().call(request);
6532   }
6533 
6534   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6535   /**
6536    * Lists the Offers the reseller can sell.
6537    *
6538    * <p>Possible error codes:
6539    *
6540    * <ul>
6541    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6542    * </ul>
6543    *
6544    * <p>Sample code:
6545    *
6546    * <pre>{@code
6547    * // This snippet has been automatically generated and should be regarded as a code template only.
6548    * // It will require modifications to work:
6549    * // - It may require correct/in-range values for request initialization.
6550    * // - It may require specifying regional endpoints when creating the service client as shown in
6551    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6552    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6553    *   ListOffersRequest request =
6554    *       ListOffersRequest.newBuilder()
6555    *           .setParent("parent-995424086")
6556    *           .setPageSize(883849137)
6557    *           .setPageToken("pageToken873572522")
6558    *           .setFilter("filter-1274492040")
6559    *           .setLanguageCode("languageCode-2092349083")
6560    *           .setShowFutureOffers(true)
6561    *           .build();
6562    *   ApiFuture<Offer> future =
6563    *       cloudChannelServiceClient.listOffersPagedCallable().futureCall(request);
6564    *   // Do something.
6565    *   for (Offer element : future.get().iterateAll()) {
6566    *     // doThingsWith(element);
6567    *   }
6568    * }
6569    * }</pre>
6570    */
listOffersPagedCallable()6571   public final UnaryCallable<ListOffersRequest, ListOffersPagedResponse> listOffersPagedCallable() {
6572     return stub.listOffersPagedCallable();
6573   }
6574 
6575   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6576   /**
6577    * Lists the Offers the reseller can sell.
6578    *
6579    * <p>Possible error codes:
6580    *
6581    * <ul>
6582    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6583    * </ul>
6584    *
6585    * <p>Sample code:
6586    *
6587    * <pre>{@code
6588    * // This snippet has been automatically generated and should be regarded as a code template only.
6589    * // It will require modifications to work:
6590    * // - It may require correct/in-range values for request initialization.
6591    * // - It may require specifying regional endpoints when creating the service client as shown in
6592    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6593    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6594    *   ListOffersRequest request =
6595    *       ListOffersRequest.newBuilder()
6596    *           .setParent("parent-995424086")
6597    *           .setPageSize(883849137)
6598    *           .setPageToken("pageToken873572522")
6599    *           .setFilter("filter-1274492040")
6600    *           .setLanguageCode("languageCode-2092349083")
6601    *           .setShowFutureOffers(true)
6602    *           .build();
6603    *   while (true) {
6604    *     ListOffersResponse response = cloudChannelServiceClient.listOffersCallable().call(request);
6605    *     for (Offer element : response.getOffersList()) {
6606    *       // doThingsWith(element);
6607    *     }
6608    *     String nextPageToken = response.getNextPageToken();
6609    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
6610    *       request = request.toBuilder().setPageToken(nextPageToken).build();
6611    *     } else {
6612    *       break;
6613    *     }
6614    *   }
6615    * }
6616    * }</pre>
6617    */
listOffersCallable()6618   public final UnaryCallable<ListOffersRequest, ListOffersResponse> listOffersCallable() {
6619     return stub.listOffersCallable();
6620   }
6621 
6622   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6623   /**
6624    * Lists the following:
6625    *
6626    * <ul>
6627    *   <li>SKUs that you can purchase for a customer
6628    *   <li>SKUs that you can upgrade or downgrade for an entitlement.
6629    * </ul>
6630    *
6631    * <p>Possible error codes:
6632    *
6633    * <ul>
6634    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
6635    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6636    * </ul>
6637    *
6638    * <p>Sample code:
6639    *
6640    * <pre>{@code
6641    * // This snippet has been automatically generated and should be regarded as a code template only.
6642    * // It will require modifications to work:
6643    * // - It may require correct/in-range values for request initialization.
6644    * // - It may require specifying regional endpoints when creating the service client as shown in
6645    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6646    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6647    *   ListPurchasableSkusRequest request =
6648    *       ListPurchasableSkusRequest.newBuilder()
6649    *           .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
6650    *           .setPageSize(883849137)
6651    *           .setPageToken("pageToken873572522")
6652    *           .setLanguageCode("languageCode-2092349083")
6653    *           .build();
6654    *   for (PurchasableSku element :
6655    *       cloudChannelServiceClient.listPurchasableSkus(request).iterateAll()) {
6656    *     // doThingsWith(element);
6657    *   }
6658    * }
6659    * }</pre>
6660    *
6661    * @param request The request object containing all of the parameters for the API call.
6662    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
6663    */
listPurchasableSkus( ListPurchasableSkusRequest request)6664   public final ListPurchasableSkusPagedResponse listPurchasableSkus(
6665       ListPurchasableSkusRequest request) {
6666     return listPurchasableSkusPagedCallable().call(request);
6667   }
6668 
6669   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6670   /**
6671    * Lists the following:
6672    *
6673    * <ul>
6674    *   <li>SKUs that you can purchase for a customer
6675    *   <li>SKUs that you can upgrade or downgrade for an entitlement.
6676    * </ul>
6677    *
6678    * <p>Possible error codes:
6679    *
6680    * <ul>
6681    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
6682    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6683    * </ul>
6684    *
6685    * <p>Sample code:
6686    *
6687    * <pre>{@code
6688    * // This snippet has been automatically generated and should be regarded as a code template only.
6689    * // It will require modifications to work:
6690    * // - It may require correct/in-range values for request initialization.
6691    * // - It may require specifying regional endpoints when creating the service client as shown in
6692    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6693    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6694    *   ListPurchasableSkusRequest request =
6695    *       ListPurchasableSkusRequest.newBuilder()
6696    *           .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
6697    *           .setPageSize(883849137)
6698    *           .setPageToken("pageToken873572522")
6699    *           .setLanguageCode("languageCode-2092349083")
6700    *           .build();
6701    *   ApiFuture<PurchasableSku> future =
6702    *       cloudChannelServiceClient.listPurchasableSkusPagedCallable().futureCall(request);
6703    *   // Do something.
6704    *   for (PurchasableSku element : future.get().iterateAll()) {
6705    *     // doThingsWith(element);
6706    *   }
6707    * }
6708    * }</pre>
6709    */
6710   public final UnaryCallable<ListPurchasableSkusRequest, ListPurchasableSkusPagedResponse>
listPurchasableSkusPagedCallable()6711       listPurchasableSkusPagedCallable() {
6712     return stub.listPurchasableSkusPagedCallable();
6713   }
6714 
6715   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6716   /**
6717    * Lists the following:
6718    *
6719    * <ul>
6720    *   <li>SKUs that you can purchase for a customer
6721    *   <li>SKUs that you can upgrade or downgrade for an entitlement.
6722    * </ul>
6723    *
6724    * <p>Possible error codes:
6725    *
6726    * <ul>
6727    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller.
6728    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6729    * </ul>
6730    *
6731    * <p>Sample code:
6732    *
6733    * <pre>{@code
6734    * // This snippet has been automatically generated and should be regarded as a code template only.
6735    * // It will require modifications to work:
6736    * // - It may require correct/in-range values for request initialization.
6737    * // - It may require specifying regional endpoints when creating the service client as shown in
6738    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6739    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6740    *   ListPurchasableSkusRequest request =
6741    *       ListPurchasableSkusRequest.newBuilder()
6742    *           .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
6743    *           .setPageSize(883849137)
6744    *           .setPageToken("pageToken873572522")
6745    *           .setLanguageCode("languageCode-2092349083")
6746    *           .build();
6747    *   while (true) {
6748    *     ListPurchasableSkusResponse response =
6749    *         cloudChannelServiceClient.listPurchasableSkusCallable().call(request);
6750    *     for (PurchasableSku element : response.getPurchasableSkusList()) {
6751    *       // doThingsWith(element);
6752    *     }
6753    *     String nextPageToken = response.getNextPageToken();
6754    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
6755    *       request = request.toBuilder().setPageToken(nextPageToken).build();
6756    *     } else {
6757    *       break;
6758    *     }
6759    *   }
6760    * }
6761    * }</pre>
6762    */
6763   public final UnaryCallable<ListPurchasableSkusRequest, ListPurchasableSkusResponse>
listPurchasableSkusCallable()6764       listPurchasableSkusCallable() {
6765     return stub.listPurchasableSkusCallable();
6766   }
6767 
6768   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6769   /**
6770    * Lists the following:
6771    *
6772    * <ul>
6773    *   <li>Offers that you can purchase for a customer.
6774    *   <li>Offers that you can change for an entitlement.
6775    * </ul>
6776    *
6777    * <p>Possible error codes:
6778    *
6779    * <ul>
6780    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller
6781    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6782    * </ul>
6783    *
6784    * <p>Sample code:
6785    *
6786    * <pre>{@code
6787    * // This snippet has been automatically generated and should be regarded as a code template only.
6788    * // It will require modifications to work:
6789    * // - It may require correct/in-range values for request initialization.
6790    * // - It may require specifying regional endpoints when creating the service client as shown in
6791    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6792    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6793    *   ListPurchasableOffersRequest request =
6794    *       ListPurchasableOffersRequest.newBuilder()
6795    *           .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
6796    *           .setPageSize(883849137)
6797    *           .setPageToken("pageToken873572522")
6798    *           .setLanguageCode("languageCode-2092349083")
6799    *           .build();
6800    *   for (PurchasableOffer element :
6801    *       cloudChannelServiceClient.listPurchasableOffers(request).iterateAll()) {
6802    *     // doThingsWith(element);
6803    *   }
6804    * }
6805    * }</pre>
6806    *
6807    * @param request The request object containing all of the parameters for the API call.
6808    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
6809    */
listPurchasableOffers( ListPurchasableOffersRequest request)6810   public final ListPurchasableOffersPagedResponse listPurchasableOffers(
6811       ListPurchasableOffersRequest request) {
6812     return listPurchasableOffersPagedCallable().call(request);
6813   }
6814 
6815   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6816   /**
6817    * Lists the following:
6818    *
6819    * <ul>
6820    *   <li>Offers that you can purchase for a customer.
6821    *   <li>Offers that you can change for an entitlement.
6822    * </ul>
6823    *
6824    * <p>Possible error codes:
6825    *
6826    * <ul>
6827    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller
6828    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6829    * </ul>
6830    *
6831    * <p>Sample code:
6832    *
6833    * <pre>{@code
6834    * // This snippet has been automatically generated and should be regarded as a code template only.
6835    * // It will require modifications to work:
6836    * // - It may require correct/in-range values for request initialization.
6837    * // - It may require specifying regional endpoints when creating the service client as shown in
6838    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6839    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6840    *   ListPurchasableOffersRequest request =
6841    *       ListPurchasableOffersRequest.newBuilder()
6842    *           .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
6843    *           .setPageSize(883849137)
6844    *           .setPageToken("pageToken873572522")
6845    *           .setLanguageCode("languageCode-2092349083")
6846    *           .build();
6847    *   ApiFuture<PurchasableOffer> future =
6848    *       cloudChannelServiceClient.listPurchasableOffersPagedCallable().futureCall(request);
6849    *   // Do something.
6850    *   for (PurchasableOffer element : future.get().iterateAll()) {
6851    *     // doThingsWith(element);
6852    *   }
6853    * }
6854    * }</pre>
6855    */
6856   public final UnaryCallable<ListPurchasableOffersRequest, ListPurchasableOffersPagedResponse>
listPurchasableOffersPagedCallable()6857       listPurchasableOffersPagedCallable() {
6858     return stub.listPurchasableOffersPagedCallable();
6859   }
6860 
6861   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6862   /**
6863    * Lists the following:
6864    *
6865    * <ul>
6866    *   <li>Offers that you can purchase for a customer.
6867    *   <li>Offers that you can change for an entitlement.
6868    * </ul>
6869    *
6870    * <p>Possible error codes:
6871    *
6872    * <ul>
6873    *   <li>PERMISSION_DENIED: The customer doesn't belong to the reseller
6874    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6875    * </ul>
6876    *
6877    * <p>Sample code:
6878    *
6879    * <pre>{@code
6880    * // This snippet has been automatically generated and should be regarded as a code template only.
6881    * // It will require modifications to work:
6882    * // - It may require correct/in-range values for request initialization.
6883    * // - It may require specifying regional endpoints when creating the service client as shown in
6884    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6885    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6886    *   ListPurchasableOffersRequest request =
6887    *       ListPurchasableOffersRequest.newBuilder()
6888    *           .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString())
6889    *           .setPageSize(883849137)
6890    *           .setPageToken("pageToken873572522")
6891    *           .setLanguageCode("languageCode-2092349083")
6892    *           .build();
6893    *   while (true) {
6894    *     ListPurchasableOffersResponse response =
6895    *         cloudChannelServiceClient.listPurchasableOffersCallable().call(request);
6896    *     for (PurchasableOffer element : response.getPurchasableOffersList()) {
6897    *       // doThingsWith(element);
6898    *     }
6899    *     String nextPageToken = response.getNextPageToken();
6900    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
6901    *       request = request.toBuilder().setPageToken(nextPageToken).build();
6902    *     } else {
6903    *       break;
6904    *     }
6905    *   }
6906    * }
6907    * }</pre>
6908    */
6909   public final UnaryCallable<ListPurchasableOffersRequest, ListPurchasableOffersResponse>
listPurchasableOffersCallable()6910       listPurchasableOffersCallable() {
6911     return stub.listPurchasableOffersCallable();
6912   }
6913 
6914   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6915   /**
6916    * Registers a service account with subscriber privileges on the Cloud Pub/Sub topic for this
6917    * Channel Services account. After you create a subscriber, you get the events through
6918    * [SubscriberEvent][google.cloud.channel.v1.SubscriberEvent]
6919    *
6920    * <p>Possible error codes:
6921    *
6922    * <ul>
6923    *   <li>PERMISSION_DENIED: The reseller account making the request and the provided reseller
6924    *       account are different, or the impersonated user is not a super admin.
6925    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6926    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
6927    *       Channel support.
6928    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
6929    *       Channel support.
6930    * </ul>
6931    *
6932    * <p>Return value: The topic name with the registered service email address.
6933    *
6934    * <p>Sample code:
6935    *
6936    * <pre>{@code
6937    * // This snippet has been automatically generated and should be regarded as a code template only.
6938    * // It will require modifications to work:
6939    * // - It may require correct/in-range values for request initialization.
6940    * // - It may require specifying regional endpoints when creating the service client as shown in
6941    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6942    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6943    *   RegisterSubscriberRequest request =
6944    *       RegisterSubscriberRequest.newBuilder()
6945    *           .setAccount("account-1177318867")
6946    *           .setServiceAccount("serviceAccount1079137720")
6947    *           .build();
6948    *   RegisterSubscriberResponse response = cloudChannelServiceClient.registerSubscriber(request);
6949    * }
6950    * }</pre>
6951    *
6952    * @param request The request object containing all of the parameters for the API call.
6953    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
6954    */
registerSubscriber(RegisterSubscriberRequest request)6955   public final RegisterSubscriberResponse registerSubscriber(RegisterSubscriberRequest request) {
6956     return registerSubscriberCallable().call(request);
6957   }
6958 
6959   // AUTO-GENERATED DOCUMENTATION AND METHOD.
6960   /**
6961    * Registers a service account with subscriber privileges on the Cloud Pub/Sub topic for this
6962    * Channel Services account. After you create a subscriber, you get the events through
6963    * [SubscriberEvent][google.cloud.channel.v1.SubscriberEvent]
6964    *
6965    * <p>Possible error codes:
6966    *
6967    * <ul>
6968    *   <li>PERMISSION_DENIED: The reseller account making the request and the provided reseller
6969    *       account are different, or the impersonated user is not a super admin.
6970    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
6971    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
6972    *       Channel support.
6973    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
6974    *       Channel support.
6975    * </ul>
6976    *
6977    * <p>Return value: The topic name with the registered service email address.
6978    *
6979    * <p>Sample code:
6980    *
6981    * <pre>{@code
6982    * // This snippet has been automatically generated and should be regarded as a code template only.
6983    * // It will require modifications to work:
6984    * // - It may require correct/in-range values for request initialization.
6985    * // - It may require specifying regional endpoints when creating the service client as shown in
6986    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6987    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
6988    *   RegisterSubscriberRequest request =
6989    *       RegisterSubscriberRequest.newBuilder()
6990    *           .setAccount("account-1177318867")
6991    *           .setServiceAccount("serviceAccount1079137720")
6992    *           .build();
6993    *   ApiFuture<RegisterSubscriberResponse> future =
6994    *       cloudChannelServiceClient.registerSubscriberCallable().futureCall(request);
6995    *   // Do something.
6996    *   RegisterSubscriberResponse response = future.get();
6997    * }
6998    * }</pre>
6999    */
7000   public final UnaryCallable<RegisterSubscriberRequest, RegisterSubscriberResponse>
registerSubscriberCallable()7001       registerSubscriberCallable() {
7002     return stub.registerSubscriberCallable();
7003   }
7004 
7005   // AUTO-GENERATED DOCUMENTATION AND METHOD.
7006   /**
7007    * Unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for
7008    * this Channel Services account. If there are no service accounts left with subscriber
7009    * privileges, this deletes the topic. You can call ListSubscribers to check for these accounts.
7010    *
7011    * <p>Possible error codes:
7012    *
7013    * <ul>
7014    *   <li>PERMISSION_DENIED: The reseller account making the request and the provided reseller
7015    *       account are different, or the impersonated user is not a super admin.
7016    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
7017    *   <li>NOT_FOUND: The topic resource doesn't exist.
7018    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
7019    *       Channel support.
7020    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
7021    *       Channel support.
7022    * </ul>
7023    *
7024    * <p>Return value: The topic name that unregistered the service email address. Returns a success
7025    * response if the service email address wasn't registered with the topic.
7026    *
7027    * <p>Sample code:
7028    *
7029    * <pre>{@code
7030    * // This snippet has been automatically generated and should be regarded as a code template only.
7031    * // It will require modifications to work:
7032    * // - It may require correct/in-range values for request initialization.
7033    * // - It may require specifying regional endpoints when creating the service client as shown in
7034    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
7035    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
7036    *   UnregisterSubscriberRequest request =
7037    *       UnregisterSubscriberRequest.newBuilder()
7038    *           .setAccount("account-1177318867")
7039    *           .setServiceAccount("serviceAccount1079137720")
7040    *           .build();
7041    *   UnregisterSubscriberResponse response =
7042    *       cloudChannelServiceClient.unregisterSubscriber(request);
7043    * }
7044    * }</pre>
7045    *
7046    * @param request The request object containing all of the parameters for the API call.
7047    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
7048    */
unregisterSubscriber( UnregisterSubscriberRequest request)7049   public final UnregisterSubscriberResponse unregisterSubscriber(
7050       UnregisterSubscriberRequest request) {
7051     return unregisterSubscriberCallable().call(request);
7052   }
7053 
7054   // AUTO-GENERATED DOCUMENTATION AND METHOD.
7055   /**
7056    * Unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for
7057    * this Channel Services account. If there are no service accounts left with subscriber
7058    * privileges, this deletes the topic. You can call ListSubscribers to check for these accounts.
7059    *
7060    * <p>Possible error codes:
7061    *
7062    * <ul>
7063    *   <li>PERMISSION_DENIED: The reseller account making the request and the provided reseller
7064    *       account are different, or the impersonated user is not a super admin.
7065    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
7066    *   <li>NOT_FOUND: The topic resource doesn't exist.
7067    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
7068    *       Channel support.
7069    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
7070    *       Channel support.
7071    * </ul>
7072    *
7073    * <p>Return value: The topic name that unregistered the service email address. Returns a success
7074    * response if the service email address wasn't registered with the topic.
7075    *
7076    * <p>Sample code:
7077    *
7078    * <pre>{@code
7079    * // This snippet has been automatically generated and should be regarded as a code template only.
7080    * // It will require modifications to work:
7081    * // - It may require correct/in-range values for request initialization.
7082    * // - It may require specifying regional endpoints when creating the service client as shown in
7083    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
7084    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
7085    *   UnregisterSubscriberRequest request =
7086    *       UnregisterSubscriberRequest.newBuilder()
7087    *           .setAccount("account-1177318867")
7088    *           .setServiceAccount("serviceAccount1079137720")
7089    *           .build();
7090    *   ApiFuture<UnregisterSubscriberResponse> future =
7091    *       cloudChannelServiceClient.unregisterSubscriberCallable().futureCall(request);
7092    *   // Do something.
7093    *   UnregisterSubscriberResponse response = future.get();
7094    * }
7095    * }</pre>
7096    */
7097   public final UnaryCallable<UnregisterSubscriberRequest, UnregisterSubscriberResponse>
unregisterSubscriberCallable()7098       unregisterSubscriberCallable() {
7099     return stub.unregisterSubscriberCallable();
7100   }
7101 
7102   // AUTO-GENERATED DOCUMENTATION AND METHOD.
7103   /**
7104    * Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this
7105    * Channel Services account.
7106    *
7107    * <p>Possible error codes:
7108    *
7109    * <ul>
7110    *   <li>PERMISSION_DENIED: The reseller account making the request and the provided reseller
7111    *       account are different, or the impersonated user is not a super admin.
7112    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
7113    *   <li>NOT_FOUND: The topic resource doesn't exist.
7114    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
7115    *       Channel support.
7116    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
7117    *       Channel support.
7118    * </ul>
7119    *
7120    * <p>Return value: A list of service email addresses.
7121    *
7122    * <p>Sample code:
7123    *
7124    * <pre>{@code
7125    * // This snippet has been automatically generated and should be regarded as a code template only.
7126    * // It will require modifications to work:
7127    * // - It may require correct/in-range values for request initialization.
7128    * // - It may require specifying regional endpoints when creating the service client as shown in
7129    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
7130    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
7131    *   ListSubscribersRequest request =
7132    *       ListSubscribersRequest.newBuilder()
7133    *           .setAccount("account-1177318867")
7134    *           .setPageSize(883849137)
7135    *           .setPageToken("pageToken873572522")
7136    *           .build();
7137    *   for (String element : cloudChannelServiceClient.listSubscribers(request).iterateAll()) {
7138    *     // doThingsWith(element);
7139    *   }
7140    * }
7141    * }</pre>
7142    *
7143    * @param request The request object containing all of the parameters for the API call.
7144    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
7145    */
listSubscribers(ListSubscribersRequest request)7146   public final ListSubscribersPagedResponse listSubscribers(ListSubscribersRequest request) {
7147     return listSubscribersPagedCallable().call(request);
7148   }
7149 
7150   // AUTO-GENERATED DOCUMENTATION AND METHOD.
7151   /**
7152    * Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this
7153    * Channel Services account.
7154    *
7155    * <p>Possible error codes:
7156    *
7157    * <ul>
7158    *   <li>PERMISSION_DENIED: The reseller account making the request and the provided reseller
7159    *       account are different, or the impersonated user is not a super admin.
7160    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
7161    *   <li>NOT_FOUND: The topic resource doesn't exist.
7162    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
7163    *       Channel support.
7164    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
7165    *       Channel support.
7166    * </ul>
7167    *
7168    * <p>Return value: A list of service email addresses.
7169    *
7170    * <p>Sample code:
7171    *
7172    * <pre>{@code
7173    * // This snippet has been automatically generated and should be regarded as a code template only.
7174    * // It will require modifications to work:
7175    * // - It may require correct/in-range values for request initialization.
7176    * // - It may require specifying regional endpoints when creating the service client as shown in
7177    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
7178    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
7179    *   ListSubscribersRequest request =
7180    *       ListSubscribersRequest.newBuilder()
7181    *           .setAccount("account-1177318867")
7182    *           .setPageSize(883849137)
7183    *           .setPageToken("pageToken873572522")
7184    *           .build();
7185    *   ApiFuture<String> future =
7186    *       cloudChannelServiceClient.listSubscribersPagedCallable().futureCall(request);
7187    *   // Do something.
7188    *   for (String element : future.get().iterateAll()) {
7189    *     // doThingsWith(element);
7190    *   }
7191    * }
7192    * }</pre>
7193    */
7194   public final UnaryCallable<ListSubscribersRequest, ListSubscribersPagedResponse>
listSubscribersPagedCallable()7195       listSubscribersPagedCallable() {
7196     return stub.listSubscribersPagedCallable();
7197   }
7198 
7199   // AUTO-GENERATED DOCUMENTATION AND METHOD.
7200   /**
7201    * Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this
7202    * Channel Services account.
7203    *
7204    * <p>Possible error codes:
7205    *
7206    * <ul>
7207    *   <li>PERMISSION_DENIED: The reseller account making the request and the provided reseller
7208    *       account are different, or the impersonated user is not a super admin.
7209    *   <li>INVALID_ARGUMENT: Required request parameters are missing or invalid.
7210    *   <li>NOT_FOUND: The topic resource doesn't exist.
7211    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud
7212    *       Channel support.
7213    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud
7214    *       Channel support.
7215    * </ul>
7216    *
7217    * <p>Return value: A list of service email addresses.
7218    *
7219    * <p>Sample code:
7220    *
7221    * <pre>{@code
7222    * // This snippet has been automatically generated and should be regarded as a code template only.
7223    * // It will require modifications to work:
7224    * // - It may require correct/in-range values for request initialization.
7225    * // - It may require specifying regional endpoints when creating the service client as shown in
7226    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
7227    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
7228    *   ListSubscribersRequest request =
7229    *       ListSubscribersRequest.newBuilder()
7230    *           .setAccount("account-1177318867")
7231    *           .setPageSize(883849137)
7232    *           .setPageToken("pageToken873572522")
7233    *           .build();
7234    *   while (true) {
7235    *     ListSubscribersResponse response =
7236    *         cloudChannelServiceClient.listSubscribersCallable().call(request);
7237    *     for (String element : response.getServiceAccountsList()) {
7238    *       // doThingsWith(element);
7239    *     }
7240    *     String nextPageToken = response.getNextPageToken();
7241    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
7242    *       request = request.toBuilder().setPageToken(nextPageToken).build();
7243    *     } else {
7244    *       break;
7245    *     }
7246    *   }
7247    * }
7248    * }</pre>
7249    */
7250   public final UnaryCallable<ListSubscribersRequest, ListSubscribersResponse>
listSubscribersCallable()7251       listSubscribersCallable() {
7252     return stub.listSubscribersCallable();
7253   }
7254 
7255   // AUTO-GENERATED DOCUMENTATION AND METHOD.
7256   /**
7257    * List entitlement history.
7258    *
7259    * <p>Possible error codes:
7260    *
7261    * <ul>
7262    *   <li>PERMISSION_DENIED: The reseller account making the request and the provided reseller
7263    *       account are different.
7264    *   <li>INVALID_ARGUMENT: Missing or invalid required fields in the request.
7265    *   <li>NOT_FOUND: The parent resource doesn't exist. Usually the result of an invalid name
7266    *       parameter.
7267    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. In this case,
7268    *       contact CloudChannel support.
7269    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. In this case,
7270    *       contact Cloud Channel support.
7271    * </ul>
7272    *
7273    * <p>Return value: List of [EntitlementChange][google.cloud.channel.v1.EntitlementChange]s.
7274    *
7275    * <p>Sample code:
7276    *
7277    * <pre>{@code
7278    * // This snippet has been automatically generated and should be regarded as a code template only.
7279    * // It will require modifications to work:
7280    * // - It may require correct/in-range values for request initialization.
7281    * // - It may require specifying regional endpoints when creating the service client as shown in
7282    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
7283    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
7284    *   EntitlementName parent = EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]");
7285    *   for (EntitlementChange element :
7286    *       cloudChannelServiceClient.listEntitlementChanges(parent).iterateAll()) {
7287    *     // doThingsWith(element);
7288    *   }
7289    * }
7290    * }</pre>
7291    *
7292    * @param parent Required. The resource name of the entitlement for which to list entitlement
7293    *     changes. The `-` wildcard may be used to match entitlements across a customer. Formats:
7294    *     <p>&#42; accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} &#42;
7295    *     accounts/{account_id}/customers/{customer_id}/entitlements/-
7296    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
7297    */
listEntitlementChanges(EntitlementName parent)7298   public final ListEntitlementChangesPagedResponse listEntitlementChanges(EntitlementName parent) {
7299     ListEntitlementChangesRequest request =
7300         ListEntitlementChangesRequest.newBuilder()
7301             .setParent(parent == null ? null : parent.toString())
7302             .build();
7303     return listEntitlementChanges(request);
7304   }
7305 
7306   // AUTO-GENERATED DOCUMENTATION AND METHOD.
7307   /**
7308    * List entitlement history.
7309    *
7310    * <p>Possible error codes:
7311    *
7312    * <ul>
7313    *   <li>PERMISSION_DENIED: The reseller account making the request and the provided reseller
7314    *       account are different.
7315    *   <li>INVALID_ARGUMENT: Missing or invalid required fields in the request.
7316    *   <li>NOT_FOUND: The parent resource doesn't exist. Usually the result of an invalid name
7317    *       parameter.
7318    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. In this case,
7319    *       contact CloudChannel support.
7320    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. In this case,
7321    *       contact Cloud Channel support.
7322    * </ul>
7323    *
7324    * <p>Return value: List of [EntitlementChange][google.cloud.channel.v1.EntitlementChange]s.
7325    *
7326    * <p>Sample code:
7327    *
7328    * <pre>{@code
7329    * // This snippet has been automatically generated and should be regarded as a code template only.
7330    * // It will require modifications to work:
7331    * // - It may require correct/in-range values for request initialization.
7332    * // - It may require specifying regional endpoints when creating the service client as shown in
7333    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
7334    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
7335    *   String parent = EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString();
7336    *   for (EntitlementChange element :
7337    *       cloudChannelServiceClient.listEntitlementChanges(parent).iterateAll()) {
7338    *     // doThingsWith(element);
7339    *   }
7340    * }
7341    * }</pre>
7342    *
7343    * @param parent Required. The resource name of the entitlement for which to list entitlement
7344    *     changes. The `-` wildcard may be used to match entitlements across a customer. Formats:
7345    *     <p>&#42; accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} &#42;
7346    *     accounts/{account_id}/customers/{customer_id}/entitlements/-
7347    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
7348    */
listEntitlementChanges(String parent)7349   public final ListEntitlementChangesPagedResponse listEntitlementChanges(String parent) {
7350     ListEntitlementChangesRequest request =
7351         ListEntitlementChangesRequest.newBuilder().setParent(parent).build();
7352     return listEntitlementChanges(request);
7353   }
7354 
7355   // AUTO-GENERATED DOCUMENTATION AND METHOD.
7356   /**
7357    * List entitlement history.
7358    *
7359    * <p>Possible error codes:
7360    *
7361    * <ul>
7362    *   <li>PERMISSION_DENIED: The reseller account making the request and the provided reseller
7363    *       account are different.
7364    *   <li>INVALID_ARGUMENT: Missing or invalid required fields in the request.
7365    *   <li>NOT_FOUND: The parent resource doesn't exist. Usually the result of an invalid name
7366    *       parameter.
7367    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. In this case,
7368    *       contact CloudChannel support.
7369    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. In this case,
7370    *       contact Cloud Channel support.
7371    * </ul>
7372    *
7373    * <p>Return value: List of [EntitlementChange][google.cloud.channel.v1.EntitlementChange]s.
7374    *
7375    * <p>Sample code:
7376    *
7377    * <pre>{@code
7378    * // This snippet has been automatically generated and should be regarded as a code template only.
7379    * // It will require modifications to work:
7380    * // - It may require correct/in-range values for request initialization.
7381    * // - It may require specifying regional endpoints when creating the service client as shown in
7382    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
7383    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
7384    *   ListEntitlementChangesRequest request =
7385    *       ListEntitlementChangesRequest.newBuilder()
7386    *           .setParent(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString())
7387    *           .setPageSize(883849137)
7388    *           .setPageToken("pageToken873572522")
7389    *           .setFilter("filter-1274492040")
7390    *           .build();
7391    *   for (EntitlementChange element :
7392    *       cloudChannelServiceClient.listEntitlementChanges(request).iterateAll()) {
7393    *     // doThingsWith(element);
7394    *   }
7395    * }
7396    * }</pre>
7397    *
7398    * @param request The request object containing all of the parameters for the API call.
7399    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
7400    */
listEntitlementChanges( ListEntitlementChangesRequest request)7401   public final ListEntitlementChangesPagedResponse listEntitlementChanges(
7402       ListEntitlementChangesRequest request) {
7403     return listEntitlementChangesPagedCallable().call(request);
7404   }
7405 
7406   // AUTO-GENERATED DOCUMENTATION AND METHOD.
7407   /**
7408    * List entitlement history.
7409    *
7410    * <p>Possible error codes:
7411    *
7412    * <ul>
7413    *   <li>PERMISSION_DENIED: The reseller account making the request and the provided reseller
7414    *       account are different.
7415    *   <li>INVALID_ARGUMENT: Missing or invalid required fields in the request.
7416    *   <li>NOT_FOUND: The parent resource doesn't exist. Usually the result of an invalid name
7417    *       parameter.
7418    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. In this case,
7419    *       contact CloudChannel support.
7420    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. In this case,
7421    *       contact Cloud Channel support.
7422    * </ul>
7423    *
7424    * <p>Return value: List of [EntitlementChange][google.cloud.channel.v1.EntitlementChange]s.
7425    *
7426    * <p>Sample code:
7427    *
7428    * <pre>{@code
7429    * // This snippet has been automatically generated and should be regarded as a code template only.
7430    * // It will require modifications to work:
7431    * // - It may require correct/in-range values for request initialization.
7432    * // - It may require specifying regional endpoints when creating the service client as shown in
7433    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
7434    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
7435    *   ListEntitlementChangesRequest request =
7436    *       ListEntitlementChangesRequest.newBuilder()
7437    *           .setParent(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString())
7438    *           .setPageSize(883849137)
7439    *           .setPageToken("pageToken873572522")
7440    *           .setFilter("filter-1274492040")
7441    *           .build();
7442    *   ApiFuture<EntitlementChange> future =
7443    *       cloudChannelServiceClient.listEntitlementChangesPagedCallable().futureCall(request);
7444    *   // Do something.
7445    *   for (EntitlementChange element : future.get().iterateAll()) {
7446    *     // doThingsWith(element);
7447    *   }
7448    * }
7449    * }</pre>
7450    */
7451   public final UnaryCallable<ListEntitlementChangesRequest, ListEntitlementChangesPagedResponse>
listEntitlementChangesPagedCallable()7452       listEntitlementChangesPagedCallable() {
7453     return stub.listEntitlementChangesPagedCallable();
7454   }
7455 
7456   // AUTO-GENERATED DOCUMENTATION AND METHOD.
7457   /**
7458    * List entitlement history.
7459    *
7460    * <p>Possible error codes:
7461    *
7462    * <ul>
7463    *   <li>PERMISSION_DENIED: The reseller account making the request and the provided reseller
7464    *       account are different.
7465    *   <li>INVALID_ARGUMENT: Missing or invalid required fields in the request.
7466    *   <li>NOT_FOUND: The parent resource doesn't exist. Usually the result of an invalid name
7467    *       parameter.
7468    *   <li>INTERNAL: Any non-user error related to a technical issue in the backend. In this case,
7469    *       contact CloudChannel support.
7470    *   <li>UNKNOWN: Any non-user error related to a technical issue in the backend. In this case,
7471    *       contact Cloud Channel support.
7472    * </ul>
7473    *
7474    * <p>Return value: List of [EntitlementChange][google.cloud.channel.v1.EntitlementChange]s.
7475    *
7476    * <p>Sample code:
7477    *
7478    * <pre>{@code
7479    * // This snippet has been automatically generated and should be regarded as a code template only.
7480    * // It will require modifications to work:
7481    * // - It may require correct/in-range values for request initialization.
7482    * // - It may require specifying regional endpoints when creating the service client as shown in
7483    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
7484    * try (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
7485    *   ListEntitlementChangesRequest request =
7486    *       ListEntitlementChangesRequest.newBuilder()
7487    *           .setParent(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString())
7488    *           .setPageSize(883849137)
7489    *           .setPageToken("pageToken873572522")
7490    *           .setFilter("filter-1274492040")
7491    *           .build();
7492    *   while (true) {
7493    *     ListEntitlementChangesResponse response =
7494    *         cloudChannelServiceClient.listEntitlementChangesCallable().call(request);
7495    *     for (EntitlementChange element : response.getEntitlementChangesList()) {
7496    *       // doThingsWith(element);
7497    *     }
7498    *     String nextPageToken = response.getNextPageToken();
7499    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
7500    *       request = request.toBuilder().setPageToken(nextPageToken).build();
7501    *     } else {
7502    *       break;
7503    *     }
7504    *   }
7505    * }
7506    * }</pre>
7507    */
7508   public final UnaryCallable<ListEntitlementChangesRequest, ListEntitlementChangesResponse>
listEntitlementChangesCallable()7509       listEntitlementChangesCallable() {
7510     return stub.listEntitlementChangesCallable();
7511   }
7512 
7513   @Override
close()7514   public final void close() {
7515     stub.close();
7516   }
7517 
7518   @Override
shutdown()7519   public void shutdown() {
7520     stub.shutdown();
7521   }
7522 
7523   @Override
isShutdown()7524   public boolean isShutdown() {
7525     return stub.isShutdown();
7526   }
7527 
7528   @Override
isTerminated()7529   public boolean isTerminated() {
7530     return stub.isTerminated();
7531   }
7532 
7533   @Override
shutdownNow()7534   public void shutdownNow() {
7535     stub.shutdownNow();
7536   }
7537 
7538   @Override
awaitTermination(long duration, TimeUnit unit)7539   public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
7540     return stub.awaitTermination(duration, unit);
7541   }
7542 
7543   public static class ListCustomersPagedResponse
7544       extends AbstractPagedListResponse<
7545           ListCustomersRequest,
7546           ListCustomersResponse,
7547           Customer,
7548           ListCustomersPage,
7549           ListCustomersFixedSizeCollection> {
7550 
createAsync( PageContext<ListCustomersRequest, ListCustomersResponse, Customer> context, ApiFuture<ListCustomersResponse> futureResponse)7551     public static ApiFuture<ListCustomersPagedResponse> createAsync(
7552         PageContext<ListCustomersRequest, ListCustomersResponse, Customer> context,
7553         ApiFuture<ListCustomersResponse> futureResponse) {
7554       ApiFuture<ListCustomersPage> futurePage =
7555           ListCustomersPage.createEmptyPage().createPageAsync(context, futureResponse);
7556       return ApiFutures.transform(
7557           futurePage,
7558           input -> new ListCustomersPagedResponse(input),
7559           MoreExecutors.directExecutor());
7560     }
7561 
ListCustomersPagedResponse(ListCustomersPage page)7562     private ListCustomersPagedResponse(ListCustomersPage page) {
7563       super(page, ListCustomersFixedSizeCollection.createEmptyCollection());
7564     }
7565   }
7566 
7567   public static class ListCustomersPage
7568       extends AbstractPage<
7569           ListCustomersRequest, ListCustomersResponse, Customer, ListCustomersPage> {
7570 
ListCustomersPage( PageContext<ListCustomersRequest, ListCustomersResponse, Customer> context, ListCustomersResponse response)7571     private ListCustomersPage(
7572         PageContext<ListCustomersRequest, ListCustomersResponse, Customer> context,
7573         ListCustomersResponse response) {
7574       super(context, response);
7575     }
7576 
createEmptyPage()7577     private static ListCustomersPage createEmptyPage() {
7578       return new ListCustomersPage(null, null);
7579     }
7580 
7581     @Override
createPage( PageContext<ListCustomersRequest, ListCustomersResponse, Customer> context, ListCustomersResponse response)7582     protected ListCustomersPage createPage(
7583         PageContext<ListCustomersRequest, ListCustomersResponse, Customer> context,
7584         ListCustomersResponse response) {
7585       return new ListCustomersPage(context, response);
7586     }
7587 
7588     @Override
createPageAsync( PageContext<ListCustomersRequest, ListCustomersResponse, Customer> context, ApiFuture<ListCustomersResponse> futureResponse)7589     public ApiFuture<ListCustomersPage> createPageAsync(
7590         PageContext<ListCustomersRequest, ListCustomersResponse, Customer> context,
7591         ApiFuture<ListCustomersResponse> futureResponse) {
7592       return super.createPageAsync(context, futureResponse);
7593     }
7594   }
7595 
7596   public static class ListCustomersFixedSizeCollection
7597       extends AbstractFixedSizeCollection<
7598           ListCustomersRequest,
7599           ListCustomersResponse,
7600           Customer,
7601           ListCustomersPage,
7602           ListCustomersFixedSizeCollection> {
7603 
ListCustomersFixedSizeCollection(List<ListCustomersPage> pages, int collectionSize)7604     private ListCustomersFixedSizeCollection(List<ListCustomersPage> pages, int collectionSize) {
7605       super(pages, collectionSize);
7606     }
7607 
createEmptyCollection()7608     private static ListCustomersFixedSizeCollection createEmptyCollection() {
7609       return new ListCustomersFixedSizeCollection(null, 0);
7610     }
7611 
7612     @Override
createCollection( List<ListCustomersPage> pages, int collectionSize)7613     protected ListCustomersFixedSizeCollection createCollection(
7614         List<ListCustomersPage> pages, int collectionSize) {
7615       return new ListCustomersFixedSizeCollection(pages, collectionSize);
7616     }
7617   }
7618 
7619   public static class ListEntitlementsPagedResponse
7620       extends AbstractPagedListResponse<
7621           ListEntitlementsRequest,
7622           ListEntitlementsResponse,
7623           Entitlement,
7624           ListEntitlementsPage,
7625           ListEntitlementsFixedSizeCollection> {
7626 
createAsync( PageContext<ListEntitlementsRequest, ListEntitlementsResponse, Entitlement> context, ApiFuture<ListEntitlementsResponse> futureResponse)7627     public static ApiFuture<ListEntitlementsPagedResponse> createAsync(
7628         PageContext<ListEntitlementsRequest, ListEntitlementsResponse, Entitlement> context,
7629         ApiFuture<ListEntitlementsResponse> futureResponse) {
7630       ApiFuture<ListEntitlementsPage> futurePage =
7631           ListEntitlementsPage.createEmptyPage().createPageAsync(context, futureResponse);
7632       return ApiFutures.transform(
7633           futurePage,
7634           input -> new ListEntitlementsPagedResponse(input),
7635           MoreExecutors.directExecutor());
7636     }
7637 
ListEntitlementsPagedResponse(ListEntitlementsPage page)7638     private ListEntitlementsPagedResponse(ListEntitlementsPage page) {
7639       super(page, ListEntitlementsFixedSizeCollection.createEmptyCollection());
7640     }
7641   }
7642 
7643   public static class ListEntitlementsPage
7644       extends AbstractPage<
7645           ListEntitlementsRequest, ListEntitlementsResponse, Entitlement, ListEntitlementsPage> {
7646 
ListEntitlementsPage( PageContext<ListEntitlementsRequest, ListEntitlementsResponse, Entitlement> context, ListEntitlementsResponse response)7647     private ListEntitlementsPage(
7648         PageContext<ListEntitlementsRequest, ListEntitlementsResponse, Entitlement> context,
7649         ListEntitlementsResponse response) {
7650       super(context, response);
7651     }
7652 
createEmptyPage()7653     private static ListEntitlementsPage createEmptyPage() {
7654       return new ListEntitlementsPage(null, null);
7655     }
7656 
7657     @Override
createPage( PageContext<ListEntitlementsRequest, ListEntitlementsResponse, Entitlement> context, ListEntitlementsResponse response)7658     protected ListEntitlementsPage createPage(
7659         PageContext<ListEntitlementsRequest, ListEntitlementsResponse, Entitlement> context,
7660         ListEntitlementsResponse response) {
7661       return new ListEntitlementsPage(context, response);
7662     }
7663 
7664     @Override
createPageAsync( PageContext<ListEntitlementsRequest, ListEntitlementsResponse, Entitlement> context, ApiFuture<ListEntitlementsResponse> futureResponse)7665     public ApiFuture<ListEntitlementsPage> createPageAsync(
7666         PageContext<ListEntitlementsRequest, ListEntitlementsResponse, Entitlement> context,
7667         ApiFuture<ListEntitlementsResponse> futureResponse) {
7668       return super.createPageAsync(context, futureResponse);
7669     }
7670   }
7671 
7672   public static class ListEntitlementsFixedSizeCollection
7673       extends AbstractFixedSizeCollection<
7674           ListEntitlementsRequest,
7675           ListEntitlementsResponse,
7676           Entitlement,
7677           ListEntitlementsPage,
7678           ListEntitlementsFixedSizeCollection> {
7679 
ListEntitlementsFixedSizeCollection( List<ListEntitlementsPage> pages, int collectionSize)7680     private ListEntitlementsFixedSizeCollection(
7681         List<ListEntitlementsPage> pages, int collectionSize) {
7682       super(pages, collectionSize);
7683     }
7684 
createEmptyCollection()7685     private static ListEntitlementsFixedSizeCollection createEmptyCollection() {
7686       return new ListEntitlementsFixedSizeCollection(null, 0);
7687     }
7688 
7689     @Override
createCollection( List<ListEntitlementsPage> pages, int collectionSize)7690     protected ListEntitlementsFixedSizeCollection createCollection(
7691         List<ListEntitlementsPage> pages, int collectionSize) {
7692       return new ListEntitlementsFixedSizeCollection(pages, collectionSize);
7693     }
7694   }
7695 
7696   public static class ListTransferableSkusPagedResponse
7697       extends AbstractPagedListResponse<
7698           ListTransferableSkusRequest,
7699           ListTransferableSkusResponse,
7700           TransferableSku,
7701           ListTransferableSkusPage,
7702           ListTransferableSkusFixedSizeCollection> {
7703 
createAsync( PageContext<ListTransferableSkusRequest, ListTransferableSkusResponse, TransferableSku> context, ApiFuture<ListTransferableSkusResponse> futureResponse)7704     public static ApiFuture<ListTransferableSkusPagedResponse> createAsync(
7705         PageContext<ListTransferableSkusRequest, ListTransferableSkusResponse, TransferableSku>
7706             context,
7707         ApiFuture<ListTransferableSkusResponse> futureResponse) {
7708       ApiFuture<ListTransferableSkusPage> futurePage =
7709           ListTransferableSkusPage.createEmptyPage().createPageAsync(context, futureResponse);
7710       return ApiFutures.transform(
7711           futurePage,
7712           input -> new ListTransferableSkusPagedResponse(input),
7713           MoreExecutors.directExecutor());
7714     }
7715 
ListTransferableSkusPagedResponse(ListTransferableSkusPage page)7716     private ListTransferableSkusPagedResponse(ListTransferableSkusPage page) {
7717       super(page, ListTransferableSkusFixedSizeCollection.createEmptyCollection());
7718     }
7719   }
7720 
7721   public static class ListTransferableSkusPage
7722       extends AbstractPage<
7723           ListTransferableSkusRequest,
7724           ListTransferableSkusResponse,
7725           TransferableSku,
7726           ListTransferableSkusPage> {
7727 
ListTransferableSkusPage( PageContext<ListTransferableSkusRequest, ListTransferableSkusResponse, TransferableSku> context, ListTransferableSkusResponse response)7728     private ListTransferableSkusPage(
7729         PageContext<ListTransferableSkusRequest, ListTransferableSkusResponse, TransferableSku>
7730             context,
7731         ListTransferableSkusResponse response) {
7732       super(context, response);
7733     }
7734 
createEmptyPage()7735     private static ListTransferableSkusPage createEmptyPage() {
7736       return new ListTransferableSkusPage(null, null);
7737     }
7738 
7739     @Override
createPage( PageContext<ListTransferableSkusRequest, ListTransferableSkusResponse, TransferableSku> context, ListTransferableSkusResponse response)7740     protected ListTransferableSkusPage createPage(
7741         PageContext<ListTransferableSkusRequest, ListTransferableSkusResponse, TransferableSku>
7742             context,
7743         ListTransferableSkusResponse response) {
7744       return new ListTransferableSkusPage(context, response);
7745     }
7746 
7747     @Override
createPageAsync( PageContext<ListTransferableSkusRequest, ListTransferableSkusResponse, TransferableSku> context, ApiFuture<ListTransferableSkusResponse> futureResponse)7748     public ApiFuture<ListTransferableSkusPage> createPageAsync(
7749         PageContext<ListTransferableSkusRequest, ListTransferableSkusResponse, TransferableSku>
7750             context,
7751         ApiFuture<ListTransferableSkusResponse> futureResponse) {
7752       return super.createPageAsync(context, futureResponse);
7753     }
7754   }
7755 
7756   public static class ListTransferableSkusFixedSizeCollection
7757       extends AbstractFixedSizeCollection<
7758           ListTransferableSkusRequest,
7759           ListTransferableSkusResponse,
7760           TransferableSku,
7761           ListTransferableSkusPage,
7762           ListTransferableSkusFixedSizeCollection> {
7763 
ListTransferableSkusFixedSizeCollection( List<ListTransferableSkusPage> pages, int collectionSize)7764     private ListTransferableSkusFixedSizeCollection(
7765         List<ListTransferableSkusPage> pages, int collectionSize) {
7766       super(pages, collectionSize);
7767     }
7768 
createEmptyCollection()7769     private static ListTransferableSkusFixedSizeCollection createEmptyCollection() {
7770       return new ListTransferableSkusFixedSizeCollection(null, 0);
7771     }
7772 
7773     @Override
createCollection( List<ListTransferableSkusPage> pages, int collectionSize)7774     protected ListTransferableSkusFixedSizeCollection createCollection(
7775         List<ListTransferableSkusPage> pages, int collectionSize) {
7776       return new ListTransferableSkusFixedSizeCollection(pages, collectionSize);
7777     }
7778   }
7779 
7780   public static class ListTransferableOffersPagedResponse
7781       extends AbstractPagedListResponse<
7782           ListTransferableOffersRequest,
7783           ListTransferableOffersResponse,
7784           TransferableOffer,
7785           ListTransferableOffersPage,
7786           ListTransferableOffersFixedSizeCollection> {
7787 
createAsync( PageContext< ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer> context, ApiFuture<ListTransferableOffersResponse> futureResponse)7788     public static ApiFuture<ListTransferableOffersPagedResponse> createAsync(
7789         PageContext<
7790                 ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer>
7791             context,
7792         ApiFuture<ListTransferableOffersResponse> futureResponse) {
7793       ApiFuture<ListTransferableOffersPage> futurePage =
7794           ListTransferableOffersPage.createEmptyPage().createPageAsync(context, futureResponse);
7795       return ApiFutures.transform(
7796           futurePage,
7797           input -> new ListTransferableOffersPagedResponse(input),
7798           MoreExecutors.directExecutor());
7799     }
7800 
ListTransferableOffersPagedResponse(ListTransferableOffersPage page)7801     private ListTransferableOffersPagedResponse(ListTransferableOffersPage page) {
7802       super(page, ListTransferableOffersFixedSizeCollection.createEmptyCollection());
7803     }
7804   }
7805 
7806   public static class ListTransferableOffersPage
7807       extends AbstractPage<
7808           ListTransferableOffersRequest,
7809           ListTransferableOffersResponse,
7810           TransferableOffer,
7811           ListTransferableOffersPage> {
7812 
ListTransferableOffersPage( PageContext< ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer> context, ListTransferableOffersResponse response)7813     private ListTransferableOffersPage(
7814         PageContext<
7815                 ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer>
7816             context,
7817         ListTransferableOffersResponse response) {
7818       super(context, response);
7819     }
7820 
createEmptyPage()7821     private static ListTransferableOffersPage createEmptyPage() {
7822       return new ListTransferableOffersPage(null, null);
7823     }
7824 
7825     @Override
createPage( PageContext< ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer> context, ListTransferableOffersResponse response)7826     protected ListTransferableOffersPage createPage(
7827         PageContext<
7828                 ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer>
7829             context,
7830         ListTransferableOffersResponse response) {
7831       return new ListTransferableOffersPage(context, response);
7832     }
7833 
7834     @Override
createPageAsync( PageContext< ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer> context, ApiFuture<ListTransferableOffersResponse> futureResponse)7835     public ApiFuture<ListTransferableOffersPage> createPageAsync(
7836         PageContext<
7837                 ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer>
7838             context,
7839         ApiFuture<ListTransferableOffersResponse> futureResponse) {
7840       return super.createPageAsync(context, futureResponse);
7841     }
7842   }
7843 
7844   public static class ListTransferableOffersFixedSizeCollection
7845       extends AbstractFixedSizeCollection<
7846           ListTransferableOffersRequest,
7847           ListTransferableOffersResponse,
7848           TransferableOffer,
7849           ListTransferableOffersPage,
7850           ListTransferableOffersFixedSizeCollection> {
7851 
ListTransferableOffersFixedSizeCollection( List<ListTransferableOffersPage> pages, int collectionSize)7852     private ListTransferableOffersFixedSizeCollection(
7853         List<ListTransferableOffersPage> pages, int collectionSize) {
7854       super(pages, collectionSize);
7855     }
7856 
createEmptyCollection()7857     private static ListTransferableOffersFixedSizeCollection createEmptyCollection() {
7858       return new ListTransferableOffersFixedSizeCollection(null, 0);
7859     }
7860 
7861     @Override
createCollection( List<ListTransferableOffersPage> pages, int collectionSize)7862     protected ListTransferableOffersFixedSizeCollection createCollection(
7863         List<ListTransferableOffersPage> pages, int collectionSize) {
7864       return new ListTransferableOffersFixedSizeCollection(pages, collectionSize);
7865     }
7866   }
7867 
7868   public static class ListChannelPartnerLinksPagedResponse
7869       extends AbstractPagedListResponse<
7870           ListChannelPartnerLinksRequest,
7871           ListChannelPartnerLinksResponse,
7872           ChannelPartnerLink,
7873           ListChannelPartnerLinksPage,
7874           ListChannelPartnerLinksFixedSizeCollection> {
7875 
createAsync( PageContext< ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink> context, ApiFuture<ListChannelPartnerLinksResponse> futureResponse)7876     public static ApiFuture<ListChannelPartnerLinksPagedResponse> createAsync(
7877         PageContext<
7878                 ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink>
7879             context,
7880         ApiFuture<ListChannelPartnerLinksResponse> futureResponse) {
7881       ApiFuture<ListChannelPartnerLinksPage> futurePage =
7882           ListChannelPartnerLinksPage.createEmptyPage().createPageAsync(context, futureResponse);
7883       return ApiFutures.transform(
7884           futurePage,
7885           input -> new ListChannelPartnerLinksPagedResponse(input),
7886           MoreExecutors.directExecutor());
7887     }
7888 
ListChannelPartnerLinksPagedResponse(ListChannelPartnerLinksPage page)7889     private ListChannelPartnerLinksPagedResponse(ListChannelPartnerLinksPage page) {
7890       super(page, ListChannelPartnerLinksFixedSizeCollection.createEmptyCollection());
7891     }
7892   }
7893 
7894   public static class ListChannelPartnerLinksPage
7895       extends AbstractPage<
7896           ListChannelPartnerLinksRequest,
7897           ListChannelPartnerLinksResponse,
7898           ChannelPartnerLink,
7899           ListChannelPartnerLinksPage> {
7900 
ListChannelPartnerLinksPage( PageContext< ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink> context, ListChannelPartnerLinksResponse response)7901     private ListChannelPartnerLinksPage(
7902         PageContext<
7903                 ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink>
7904             context,
7905         ListChannelPartnerLinksResponse response) {
7906       super(context, response);
7907     }
7908 
createEmptyPage()7909     private static ListChannelPartnerLinksPage createEmptyPage() {
7910       return new ListChannelPartnerLinksPage(null, null);
7911     }
7912 
7913     @Override
createPage( PageContext< ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink> context, ListChannelPartnerLinksResponse response)7914     protected ListChannelPartnerLinksPage createPage(
7915         PageContext<
7916                 ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink>
7917             context,
7918         ListChannelPartnerLinksResponse response) {
7919       return new ListChannelPartnerLinksPage(context, response);
7920     }
7921 
7922     @Override
createPageAsync( PageContext< ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink> context, ApiFuture<ListChannelPartnerLinksResponse> futureResponse)7923     public ApiFuture<ListChannelPartnerLinksPage> createPageAsync(
7924         PageContext<
7925                 ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink>
7926             context,
7927         ApiFuture<ListChannelPartnerLinksResponse> futureResponse) {
7928       return super.createPageAsync(context, futureResponse);
7929     }
7930   }
7931 
7932   public static class ListChannelPartnerLinksFixedSizeCollection
7933       extends AbstractFixedSizeCollection<
7934           ListChannelPartnerLinksRequest,
7935           ListChannelPartnerLinksResponse,
7936           ChannelPartnerLink,
7937           ListChannelPartnerLinksPage,
7938           ListChannelPartnerLinksFixedSizeCollection> {
7939 
ListChannelPartnerLinksFixedSizeCollection( List<ListChannelPartnerLinksPage> pages, int collectionSize)7940     private ListChannelPartnerLinksFixedSizeCollection(
7941         List<ListChannelPartnerLinksPage> pages, int collectionSize) {
7942       super(pages, collectionSize);
7943     }
7944 
createEmptyCollection()7945     private static ListChannelPartnerLinksFixedSizeCollection createEmptyCollection() {
7946       return new ListChannelPartnerLinksFixedSizeCollection(null, 0);
7947     }
7948 
7949     @Override
createCollection( List<ListChannelPartnerLinksPage> pages, int collectionSize)7950     protected ListChannelPartnerLinksFixedSizeCollection createCollection(
7951         List<ListChannelPartnerLinksPage> pages, int collectionSize) {
7952       return new ListChannelPartnerLinksFixedSizeCollection(pages, collectionSize);
7953     }
7954   }
7955 
7956   public static class ListCustomerRepricingConfigsPagedResponse
7957       extends AbstractPagedListResponse<
7958           ListCustomerRepricingConfigsRequest,
7959           ListCustomerRepricingConfigsResponse,
7960           CustomerRepricingConfig,
7961           ListCustomerRepricingConfigsPage,
7962           ListCustomerRepricingConfigsFixedSizeCollection> {
7963 
createAsync( PageContext< ListCustomerRepricingConfigsRequest, ListCustomerRepricingConfigsResponse, CustomerRepricingConfig> context, ApiFuture<ListCustomerRepricingConfigsResponse> futureResponse)7964     public static ApiFuture<ListCustomerRepricingConfigsPagedResponse> createAsync(
7965         PageContext<
7966                 ListCustomerRepricingConfigsRequest,
7967                 ListCustomerRepricingConfigsResponse,
7968                 CustomerRepricingConfig>
7969             context,
7970         ApiFuture<ListCustomerRepricingConfigsResponse> futureResponse) {
7971       ApiFuture<ListCustomerRepricingConfigsPage> futurePage =
7972           ListCustomerRepricingConfigsPage.createEmptyPage()
7973               .createPageAsync(context, futureResponse);
7974       return ApiFutures.transform(
7975           futurePage,
7976           input -> new ListCustomerRepricingConfigsPagedResponse(input),
7977           MoreExecutors.directExecutor());
7978     }
7979 
ListCustomerRepricingConfigsPagedResponse(ListCustomerRepricingConfigsPage page)7980     private ListCustomerRepricingConfigsPagedResponse(ListCustomerRepricingConfigsPage page) {
7981       super(page, ListCustomerRepricingConfigsFixedSizeCollection.createEmptyCollection());
7982     }
7983   }
7984 
7985   public static class ListCustomerRepricingConfigsPage
7986       extends AbstractPage<
7987           ListCustomerRepricingConfigsRequest,
7988           ListCustomerRepricingConfigsResponse,
7989           CustomerRepricingConfig,
7990           ListCustomerRepricingConfigsPage> {
7991 
ListCustomerRepricingConfigsPage( PageContext< ListCustomerRepricingConfigsRequest, ListCustomerRepricingConfigsResponse, CustomerRepricingConfig> context, ListCustomerRepricingConfigsResponse response)7992     private ListCustomerRepricingConfigsPage(
7993         PageContext<
7994                 ListCustomerRepricingConfigsRequest,
7995                 ListCustomerRepricingConfigsResponse,
7996                 CustomerRepricingConfig>
7997             context,
7998         ListCustomerRepricingConfigsResponse response) {
7999       super(context, response);
8000     }
8001 
createEmptyPage()8002     private static ListCustomerRepricingConfigsPage createEmptyPage() {
8003       return new ListCustomerRepricingConfigsPage(null, null);
8004     }
8005 
8006     @Override
createPage( PageContext< ListCustomerRepricingConfigsRequest, ListCustomerRepricingConfigsResponse, CustomerRepricingConfig> context, ListCustomerRepricingConfigsResponse response)8007     protected ListCustomerRepricingConfigsPage createPage(
8008         PageContext<
8009                 ListCustomerRepricingConfigsRequest,
8010                 ListCustomerRepricingConfigsResponse,
8011                 CustomerRepricingConfig>
8012             context,
8013         ListCustomerRepricingConfigsResponse response) {
8014       return new ListCustomerRepricingConfigsPage(context, response);
8015     }
8016 
8017     @Override
createPageAsync( PageContext< ListCustomerRepricingConfigsRequest, ListCustomerRepricingConfigsResponse, CustomerRepricingConfig> context, ApiFuture<ListCustomerRepricingConfigsResponse> futureResponse)8018     public ApiFuture<ListCustomerRepricingConfigsPage> createPageAsync(
8019         PageContext<
8020                 ListCustomerRepricingConfigsRequest,
8021                 ListCustomerRepricingConfigsResponse,
8022                 CustomerRepricingConfig>
8023             context,
8024         ApiFuture<ListCustomerRepricingConfigsResponse> futureResponse) {
8025       return super.createPageAsync(context, futureResponse);
8026     }
8027   }
8028 
8029   public static class ListCustomerRepricingConfigsFixedSizeCollection
8030       extends AbstractFixedSizeCollection<
8031           ListCustomerRepricingConfigsRequest,
8032           ListCustomerRepricingConfigsResponse,
8033           CustomerRepricingConfig,
8034           ListCustomerRepricingConfigsPage,
8035           ListCustomerRepricingConfigsFixedSizeCollection> {
8036 
ListCustomerRepricingConfigsFixedSizeCollection( List<ListCustomerRepricingConfigsPage> pages, int collectionSize)8037     private ListCustomerRepricingConfigsFixedSizeCollection(
8038         List<ListCustomerRepricingConfigsPage> pages, int collectionSize) {
8039       super(pages, collectionSize);
8040     }
8041 
createEmptyCollection()8042     private static ListCustomerRepricingConfigsFixedSizeCollection createEmptyCollection() {
8043       return new ListCustomerRepricingConfigsFixedSizeCollection(null, 0);
8044     }
8045 
8046     @Override
createCollection( List<ListCustomerRepricingConfigsPage> pages, int collectionSize)8047     protected ListCustomerRepricingConfigsFixedSizeCollection createCollection(
8048         List<ListCustomerRepricingConfigsPage> pages, int collectionSize) {
8049       return new ListCustomerRepricingConfigsFixedSizeCollection(pages, collectionSize);
8050     }
8051   }
8052 
8053   public static class ListChannelPartnerRepricingConfigsPagedResponse
8054       extends AbstractPagedListResponse<
8055           ListChannelPartnerRepricingConfigsRequest,
8056           ListChannelPartnerRepricingConfigsResponse,
8057           ChannelPartnerRepricingConfig,
8058           ListChannelPartnerRepricingConfigsPage,
8059           ListChannelPartnerRepricingConfigsFixedSizeCollection> {
8060 
createAsync( PageContext< ListChannelPartnerRepricingConfigsRequest, ListChannelPartnerRepricingConfigsResponse, ChannelPartnerRepricingConfig> context, ApiFuture<ListChannelPartnerRepricingConfigsResponse> futureResponse)8061     public static ApiFuture<ListChannelPartnerRepricingConfigsPagedResponse> createAsync(
8062         PageContext<
8063                 ListChannelPartnerRepricingConfigsRequest,
8064                 ListChannelPartnerRepricingConfigsResponse,
8065                 ChannelPartnerRepricingConfig>
8066             context,
8067         ApiFuture<ListChannelPartnerRepricingConfigsResponse> futureResponse) {
8068       ApiFuture<ListChannelPartnerRepricingConfigsPage> futurePage =
8069           ListChannelPartnerRepricingConfigsPage.createEmptyPage()
8070               .createPageAsync(context, futureResponse);
8071       return ApiFutures.transform(
8072           futurePage,
8073           input -> new ListChannelPartnerRepricingConfigsPagedResponse(input),
8074           MoreExecutors.directExecutor());
8075     }
8076 
ListChannelPartnerRepricingConfigsPagedResponse( ListChannelPartnerRepricingConfigsPage page)8077     private ListChannelPartnerRepricingConfigsPagedResponse(
8078         ListChannelPartnerRepricingConfigsPage page) {
8079       super(page, ListChannelPartnerRepricingConfigsFixedSizeCollection.createEmptyCollection());
8080     }
8081   }
8082 
8083   public static class ListChannelPartnerRepricingConfigsPage
8084       extends AbstractPage<
8085           ListChannelPartnerRepricingConfigsRequest,
8086           ListChannelPartnerRepricingConfigsResponse,
8087           ChannelPartnerRepricingConfig,
8088           ListChannelPartnerRepricingConfigsPage> {
8089 
ListChannelPartnerRepricingConfigsPage( PageContext< ListChannelPartnerRepricingConfigsRequest, ListChannelPartnerRepricingConfigsResponse, ChannelPartnerRepricingConfig> context, ListChannelPartnerRepricingConfigsResponse response)8090     private ListChannelPartnerRepricingConfigsPage(
8091         PageContext<
8092                 ListChannelPartnerRepricingConfigsRequest,
8093                 ListChannelPartnerRepricingConfigsResponse,
8094                 ChannelPartnerRepricingConfig>
8095             context,
8096         ListChannelPartnerRepricingConfigsResponse response) {
8097       super(context, response);
8098     }
8099 
createEmptyPage()8100     private static ListChannelPartnerRepricingConfigsPage createEmptyPage() {
8101       return new ListChannelPartnerRepricingConfigsPage(null, null);
8102     }
8103 
8104     @Override
createPage( PageContext< ListChannelPartnerRepricingConfigsRequest, ListChannelPartnerRepricingConfigsResponse, ChannelPartnerRepricingConfig> context, ListChannelPartnerRepricingConfigsResponse response)8105     protected ListChannelPartnerRepricingConfigsPage createPage(
8106         PageContext<
8107                 ListChannelPartnerRepricingConfigsRequest,
8108                 ListChannelPartnerRepricingConfigsResponse,
8109                 ChannelPartnerRepricingConfig>
8110             context,
8111         ListChannelPartnerRepricingConfigsResponse response) {
8112       return new ListChannelPartnerRepricingConfigsPage(context, response);
8113     }
8114 
8115     @Override
createPageAsync( PageContext< ListChannelPartnerRepricingConfigsRequest, ListChannelPartnerRepricingConfigsResponse, ChannelPartnerRepricingConfig> context, ApiFuture<ListChannelPartnerRepricingConfigsResponse> futureResponse)8116     public ApiFuture<ListChannelPartnerRepricingConfigsPage> createPageAsync(
8117         PageContext<
8118                 ListChannelPartnerRepricingConfigsRequest,
8119                 ListChannelPartnerRepricingConfigsResponse,
8120                 ChannelPartnerRepricingConfig>
8121             context,
8122         ApiFuture<ListChannelPartnerRepricingConfigsResponse> futureResponse) {
8123       return super.createPageAsync(context, futureResponse);
8124     }
8125   }
8126 
8127   public static class ListChannelPartnerRepricingConfigsFixedSizeCollection
8128       extends AbstractFixedSizeCollection<
8129           ListChannelPartnerRepricingConfigsRequest,
8130           ListChannelPartnerRepricingConfigsResponse,
8131           ChannelPartnerRepricingConfig,
8132           ListChannelPartnerRepricingConfigsPage,
8133           ListChannelPartnerRepricingConfigsFixedSizeCollection> {
8134 
ListChannelPartnerRepricingConfigsFixedSizeCollection( List<ListChannelPartnerRepricingConfigsPage> pages, int collectionSize)8135     private ListChannelPartnerRepricingConfigsFixedSizeCollection(
8136         List<ListChannelPartnerRepricingConfigsPage> pages, int collectionSize) {
8137       super(pages, collectionSize);
8138     }
8139 
createEmptyCollection()8140     private static ListChannelPartnerRepricingConfigsFixedSizeCollection createEmptyCollection() {
8141       return new ListChannelPartnerRepricingConfigsFixedSizeCollection(null, 0);
8142     }
8143 
8144     @Override
createCollection( List<ListChannelPartnerRepricingConfigsPage> pages, int collectionSize)8145     protected ListChannelPartnerRepricingConfigsFixedSizeCollection createCollection(
8146         List<ListChannelPartnerRepricingConfigsPage> pages, int collectionSize) {
8147       return new ListChannelPartnerRepricingConfigsFixedSizeCollection(pages, collectionSize);
8148     }
8149   }
8150 
8151   public static class ListProductsPagedResponse
8152       extends AbstractPagedListResponse<
8153           ListProductsRequest,
8154           ListProductsResponse,
8155           Product,
8156           ListProductsPage,
8157           ListProductsFixedSizeCollection> {
8158 
createAsync( PageContext<ListProductsRequest, ListProductsResponse, Product> context, ApiFuture<ListProductsResponse> futureResponse)8159     public static ApiFuture<ListProductsPagedResponse> createAsync(
8160         PageContext<ListProductsRequest, ListProductsResponse, Product> context,
8161         ApiFuture<ListProductsResponse> futureResponse) {
8162       ApiFuture<ListProductsPage> futurePage =
8163           ListProductsPage.createEmptyPage().createPageAsync(context, futureResponse);
8164       return ApiFutures.transform(
8165           futurePage,
8166           input -> new ListProductsPagedResponse(input),
8167           MoreExecutors.directExecutor());
8168     }
8169 
ListProductsPagedResponse(ListProductsPage page)8170     private ListProductsPagedResponse(ListProductsPage page) {
8171       super(page, ListProductsFixedSizeCollection.createEmptyCollection());
8172     }
8173   }
8174 
8175   public static class ListProductsPage
8176       extends AbstractPage<ListProductsRequest, ListProductsResponse, Product, ListProductsPage> {
8177 
ListProductsPage( PageContext<ListProductsRequest, ListProductsResponse, Product> context, ListProductsResponse response)8178     private ListProductsPage(
8179         PageContext<ListProductsRequest, ListProductsResponse, Product> context,
8180         ListProductsResponse response) {
8181       super(context, response);
8182     }
8183 
createEmptyPage()8184     private static ListProductsPage createEmptyPage() {
8185       return new ListProductsPage(null, null);
8186     }
8187 
8188     @Override
createPage( PageContext<ListProductsRequest, ListProductsResponse, Product> context, ListProductsResponse response)8189     protected ListProductsPage createPage(
8190         PageContext<ListProductsRequest, ListProductsResponse, Product> context,
8191         ListProductsResponse response) {
8192       return new ListProductsPage(context, response);
8193     }
8194 
8195     @Override
createPageAsync( PageContext<ListProductsRequest, ListProductsResponse, Product> context, ApiFuture<ListProductsResponse> futureResponse)8196     public ApiFuture<ListProductsPage> createPageAsync(
8197         PageContext<ListProductsRequest, ListProductsResponse, Product> context,
8198         ApiFuture<ListProductsResponse> futureResponse) {
8199       return super.createPageAsync(context, futureResponse);
8200     }
8201   }
8202 
8203   public static class ListProductsFixedSizeCollection
8204       extends AbstractFixedSizeCollection<
8205           ListProductsRequest,
8206           ListProductsResponse,
8207           Product,
8208           ListProductsPage,
8209           ListProductsFixedSizeCollection> {
8210 
ListProductsFixedSizeCollection(List<ListProductsPage> pages, int collectionSize)8211     private ListProductsFixedSizeCollection(List<ListProductsPage> pages, int collectionSize) {
8212       super(pages, collectionSize);
8213     }
8214 
createEmptyCollection()8215     private static ListProductsFixedSizeCollection createEmptyCollection() {
8216       return new ListProductsFixedSizeCollection(null, 0);
8217     }
8218 
8219     @Override
createCollection( List<ListProductsPage> pages, int collectionSize)8220     protected ListProductsFixedSizeCollection createCollection(
8221         List<ListProductsPage> pages, int collectionSize) {
8222       return new ListProductsFixedSizeCollection(pages, collectionSize);
8223     }
8224   }
8225 
8226   public static class ListSkusPagedResponse
8227       extends AbstractPagedListResponse<
8228           ListSkusRequest, ListSkusResponse, Sku, ListSkusPage, ListSkusFixedSizeCollection> {
8229 
createAsync( PageContext<ListSkusRequest, ListSkusResponse, Sku> context, ApiFuture<ListSkusResponse> futureResponse)8230     public static ApiFuture<ListSkusPagedResponse> createAsync(
8231         PageContext<ListSkusRequest, ListSkusResponse, Sku> context,
8232         ApiFuture<ListSkusResponse> futureResponse) {
8233       ApiFuture<ListSkusPage> futurePage =
8234           ListSkusPage.createEmptyPage().createPageAsync(context, futureResponse);
8235       return ApiFutures.transform(
8236           futurePage, input -> new ListSkusPagedResponse(input), MoreExecutors.directExecutor());
8237     }
8238 
ListSkusPagedResponse(ListSkusPage page)8239     private ListSkusPagedResponse(ListSkusPage page) {
8240       super(page, ListSkusFixedSizeCollection.createEmptyCollection());
8241     }
8242   }
8243 
8244   public static class ListSkusPage
8245       extends AbstractPage<ListSkusRequest, ListSkusResponse, Sku, ListSkusPage> {
8246 
ListSkusPage( PageContext<ListSkusRequest, ListSkusResponse, Sku> context, ListSkusResponse response)8247     private ListSkusPage(
8248         PageContext<ListSkusRequest, ListSkusResponse, Sku> context, ListSkusResponse response) {
8249       super(context, response);
8250     }
8251 
createEmptyPage()8252     private static ListSkusPage createEmptyPage() {
8253       return new ListSkusPage(null, null);
8254     }
8255 
8256     @Override
createPage( PageContext<ListSkusRequest, ListSkusResponse, Sku> context, ListSkusResponse response)8257     protected ListSkusPage createPage(
8258         PageContext<ListSkusRequest, ListSkusResponse, Sku> context, ListSkusResponse response) {
8259       return new ListSkusPage(context, response);
8260     }
8261 
8262     @Override
createPageAsync( PageContext<ListSkusRequest, ListSkusResponse, Sku> context, ApiFuture<ListSkusResponse> futureResponse)8263     public ApiFuture<ListSkusPage> createPageAsync(
8264         PageContext<ListSkusRequest, ListSkusResponse, Sku> context,
8265         ApiFuture<ListSkusResponse> futureResponse) {
8266       return super.createPageAsync(context, futureResponse);
8267     }
8268   }
8269 
8270   public static class ListSkusFixedSizeCollection
8271       extends AbstractFixedSizeCollection<
8272           ListSkusRequest, ListSkusResponse, Sku, ListSkusPage, ListSkusFixedSizeCollection> {
8273 
ListSkusFixedSizeCollection(List<ListSkusPage> pages, int collectionSize)8274     private ListSkusFixedSizeCollection(List<ListSkusPage> pages, int collectionSize) {
8275       super(pages, collectionSize);
8276     }
8277 
createEmptyCollection()8278     private static ListSkusFixedSizeCollection createEmptyCollection() {
8279       return new ListSkusFixedSizeCollection(null, 0);
8280     }
8281 
8282     @Override
createCollection( List<ListSkusPage> pages, int collectionSize)8283     protected ListSkusFixedSizeCollection createCollection(
8284         List<ListSkusPage> pages, int collectionSize) {
8285       return new ListSkusFixedSizeCollection(pages, collectionSize);
8286     }
8287   }
8288 
8289   public static class ListOffersPagedResponse
8290       extends AbstractPagedListResponse<
8291           ListOffersRequest,
8292           ListOffersResponse,
8293           Offer,
8294           ListOffersPage,
8295           ListOffersFixedSizeCollection> {
8296 
createAsync( PageContext<ListOffersRequest, ListOffersResponse, Offer> context, ApiFuture<ListOffersResponse> futureResponse)8297     public static ApiFuture<ListOffersPagedResponse> createAsync(
8298         PageContext<ListOffersRequest, ListOffersResponse, Offer> context,
8299         ApiFuture<ListOffersResponse> futureResponse) {
8300       ApiFuture<ListOffersPage> futurePage =
8301           ListOffersPage.createEmptyPage().createPageAsync(context, futureResponse);
8302       return ApiFutures.transform(
8303           futurePage, input -> new ListOffersPagedResponse(input), MoreExecutors.directExecutor());
8304     }
8305 
ListOffersPagedResponse(ListOffersPage page)8306     private ListOffersPagedResponse(ListOffersPage page) {
8307       super(page, ListOffersFixedSizeCollection.createEmptyCollection());
8308     }
8309   }
8310 
8311   public static class ListOffersPage
8312       extends AbstractPage<ListOffersRequest, ListOffersResponse, Offer, ListOffersPage> {
8313 
ListOffersPage( PageContext<ListOffersRequest, ListOffersResponse, Offer> context, ListOffersResponse response)8314     private ListOffersPage(
8315         PageContext<ListOffersRequest, ListOffersResponse, Offer> context,
8316         ListOffersResponse response) {
8317       super(context, response);
8318     }
8319 
createEmptyPage()8320     private static ListOffersPage createEmptyPage() {
8321       return new ListOffersPage(null, null);
8322     }
8323 
8324     @Override
createPage( PageContext<ListOffersRequest, ListOffersResponse, Offer> context, ListOffersResponse response)8325     protected ListOffersPage createPage(
8326         PageContext<ListOffersRequest, ListOffersResponse, Offer> context,
8327         ListOffersResponse response) {
8328       return new ListOffersPage(context, response);
8329     }
8330 
8331     @Override
createPageAsync( PageContext<ListOffersRequest, ListOffersResponse, Offer> context, ApiFuture<ListOffersResponse> futureResponse)8332     public ApiFuture<ListOffersPage> createPageAsync(
8333         PageContext<ListOffersRequest, ListOffersResponse, Offer> context,
8334         ApiFuture<ListOffersResponse> futureResponse) {
8335       return super.createPageAsync(context, futureResponse);
8336     }
8337   }
8338 
8339   public static class ListOffersFixedSizeCollection
8340       extends AbstractFixedSizeCollection<
8341           ListOffersRequest,
8342           ListOffersResponse,
8343           Offer,
8344           ListOffersPage,
8345           ListOffersFixedSizeCollection> {
8346 
ListOffersFixedSizeCollection(List<ListOffersPage> pages, int collectionSize)8347     private ListOffersFixedSizeCollection(List<ListOffersPage> pages, int collectionSize) {
8348       super(pages, collectionSize);
8349     }
8350 
createEmptyCollection()8351     private static ListOffersFixedSizeCollection createEmptyCollection() {
8352       return new ListOffersFixedSizeCollection(null, 0);
8353     }
8354 
8355     @Override
createCollection( List<ListOffersPage> pages, int collectionSize)8356     protected ListOffersFixedSizeCollection createCollection(
8357         List<ListOffersPage> pages, int collectionSize) {
8358       return new ListOffersFixedSizeCollection(pages, collectionSize);
8359     }
8360   }
8361 
8362   public static class ListPurchasableSkusPagedResponse
8363       extends AbstractPagedListResponse<
8364           ListPurchasableSkusRequest,
8365           ListPurchasableSkusResponse,
8366           PurchasableSku,
8367           ListPurchasableSkusPage,
8368           ListPurchasableSkusFixedSizeCollection> {
8369 
createAsync( PageContext<ListPurchasableSkusRequest, ListPurchasableSkusResponse, PurchasableSku> context, ApiFuture<ListPurchasableSkusResponse> futureResponse)8370     public static ApiFuture<ListPurchasableSkusPagedResponse> createAsync(
8371         PageContext<ListPurchasableSkusRequest, ListPurchasableSkusResponse, PurchasableSku>
8372             context,
8373         ApiFuture<ListPurchasableSkusResponse> futureResponse) {
8374       ApiFuture<ListPurchasableSkusPage> futurePage =
8375           ListPurchasableSkusPage.createEmptyPage().createPageAsync(context, futureResponse);
8376       return ApiFutures.transform(
8377           futurePage,
8378           input -> new ListPurchasableSkusPagedResponse(input),
8379           MoreExecutors.directExecutor());
8380     }
8381 
ListPurchasableSkusPagedResponse(ListPurchasableSkusPage page)8382     private ListPurchasableSkusPagedResponse(ListPurchasableSkusPage page) {
8383       super(page, ListPurchasableSkusFixedSizeCollection.createEmptyCollection());
8384     }
8385   }
8386 
8387   public static class ListPurchasableSkusPage
8388       extends AbstractPage<
8389           ListPurchasableSkusRequest,
8390           ListPurchasableSkusResponse,
8391           PurchasableSku,
8392           ListPurchasableSkusPage> {
8393 
ListPurchasableSkusPage( PageContext<ListPurchasableSkusRequest, ListPurchasableSkusResponse, PurchasableSku> context, ListPurchasableSkusResponse response)8394     private ListPurchasableSkusPage(
8395         PageContext<ListPurchasableSkusRequest, ListPurchasableSkusResponse, PurchasableSku>
8396             context,
8397         ListPurchasableSkusResponse response) {
8398       super(context, response);
8399     }
8400 
createEmptyPage()8401     private static ListPurchasableSkusPage createEmptyPage() {
8402       return new ListPurchasableSkusPage(null, null);
8403     }
8404 
8405     @Override
createPage( PageContext<ListPurchasableSkusRequest, ListPurchasableSkusResponse, PurchasableSku> context, ListPurchasableSkusResponse response)8406     protected ListPurchasableSkusPage createPage(
8407         PageContext<ListPurchasableSkusRequest, ListPurchasableSkusResponse, PurchasableSku>
8408             context,
8409         ListPurchasableSkusResponse response) {
8410       return new ListPurchasableSkusPage(context, response);
8411     }
8412 
8413     @Override
createPageAsync( PageContext<ListPurchasableSkusRequest, ListPurchasableSkusResponse, PurchasableSku> context, ApiFuture<ListPurchasableSkusResponse> futureResponse)8414     public ApiFuture<ListPurchasableSkusPage> createPageAsync(
8415         PageContext<ListPurchasableSkusRequest, ListPurchasableSkusResponse, PurchasableSku>
8416             context,
8417         ApiFuture<ListPurchasableSkusResponse> futureResponse) {
8418       return super.createPageAsync(context, futureResponse);
8419     }
8420   }
8421 
8422   public static class ListPurchasableSkusFixedSizeCollection
8423       extends AbstractFixedSizeCollection<
8424           ListPurchasableSkusRequest,
8425           ListPurchasableSkusResponse,
8426           PurchasableSku,
8427           ListPurchasableSkusPage,
8428           ListPurchasableSkusFixedSizeCollection> {
8429 
ListPurchasableSkusFixedSizeCollection( List<ListPurchasableSkusPage> pages, int collectionSize)8430     private ListPurchasableSkusFixedSizeCollection(
8431         List<ListPurchasableSkusPage> pages, int collectionSize) {
8432       super(pages, collectionSize);
8433     }
8434 
createEmptyCollection()8435     private static ListPurchasableSkusFixedSizeCollection createEmptyCollection() {
8436       return new ListPurchasableSkusFixedSizeCollection(null, 0);
8437     }
8438 
8439     @Override
createCollection( List<ListPurchasableSkusPage> pages, int collectionSize)8440     protected ListPurchasableSkusFixedSizeCollection createCollection(
8441         List<ListPurchasableSkusPage> pages, int collectionSize) {
8442       return new ListPurchasableSkusFixedSizeCollection(pages, collectionSize);
8443     }
8444   }
8445 
8446   public static class ListPurchasableOffersPagedResponse
8447       extends AbstractPagedListResponse<
8448           ListPurchasableOffersRequest,
8449           ListPurchasableOffersResponse,
8450           PurchasableOffer,
8451           ListPurchasableOffersPage,
8452           ListPurchasableOffersFixedSizeCollection> {
8453 
createAsync( PageContext<ListPurchasableOffersRequest, ListPurchasableOffersResponse, PurchasableOffer> context, ApiFuture<ListPurchasableOffersResponse> futureResponse)8454     public static ApiFuture<ListPurchasableOffersPagedResponse> createAsync(
8455         PageContext<ListPurchasableOffersRequest, ListPurchasableOffersResponse, PurchasableOffer>
8456             context,
8457         ApiFuture<ListPurchasableOffersResponse> futureResponse) {
8458       ApiFuture<ListPurchasableOffersPage> futurePage =
8459           ListPurchasableOffersPage.createEmptyPage().createPageAsync(context, futureResponse);
8460       return ApiFutures.transform(
8461           futurePage,
8462           input -> new ListPurchasableOffersPagedResponse(input),
8463           MoreExecutors.directExecutor());
8464     }
8465 
ListPurchasableOffersPagedResponse(ListPurchasableOffersPage page)8466     private ListPurchasableOffersPagedResponse(ListPurchasableOffersPage page) {
8467       super(page, ListPurchasableOffersFixedSizeCollection.createEmptyCollection());
8468     }
8469   }
8470 
8471   public static class ListPurchasableOffersPage
8472       extends AbstractPage<
8473           ListPurchasableOffersRequest,
8474           ListPurchasableOffersResponse,
8475           PurchasableOffer,
8476           ListPurchasableOffersPage> {
8477 
ListPurchasableOffersPage( PageContext<ListPurchasableOffersRequest, ListPurchasableOffersResponse, PurchasableOffer> context, ListPurchasableOffersResponse response)8478     private ListPurchasableOffersPage(
8479         PageContext<ListPurchasableOffersRequest, ListPurchasableOffersResponse, PurchasableOffer>
8480             context,
8481         ListPurchasableOffersResponse response) {
8482       super(context, response);
8483     }
8484 
createEmptyPage()8485     private static ListPurchasableOffersPage createEmptyPage() {
8486       return new ListPurchasableOffersPage(null, null);
8487     }
8488 
8489     @Override
createPage( PageContext<ListPurchasableOffersRequest, ListPurchasableOffersResponse, PurchasableOffer> context, ListPurchasableOffersResponse response)8490     protected ListPurchasableOffersPage createPage(
8491         PageContext<ListPurchasableOffersRequest, ListPurchasableOffersResponse, PurchasableOffer>
8492             context,
8493         ListPurchasableOffersResponse response) {
8494       return new ListPurchasableOffersPage(context, response);
8495     }
8496 
8497     @Override
createPageAsync( PageContext<ListPurchasableOffersRequest, ListPurchasableOffersResponse, PurchasableOffer> context, ApiFuture<ListPurchasableOffersResponse> futureResponse)8498     public ApiFuture<ListPurchasableOffersPage> createPageAsync(
8499         PageContext<ListPurchasableOffersRequest, ListPurchasableOffersResponse, PurchasableOffer>
8500             context,
8501         ApiFuture<ListPurchasableOffersResponse> futureResponse) {
8502       return super.createPageAsync(context, futureResponse);
8503     }
8504   }
8505 
8506   public static class ListPurchasableOffersFixedSizeCollection
8507       extends AbstractFixedSizeCollection<
8508           ListPurchasableOffersRequest,
8509           ListPurchasableOffersResponse,
8510           PurchasableOffer,
8511           ListPurchasableOffersPage,
8512           ListPurchasableOffersFixedSizeCollection> {
8513 
ListPurchasableOffersFixedSizeCollection( List<ListPurchasableOffersPage> pages, int collectionSize)8514     private ListPurchasableOffersFixedSizeCollection(
8515         List<ListPurchasableOffersPage> pages, int collectionSize) {
8516       super(pages, collectionSize);
8517     }
8518 
createEmptyCollection()8519     private static ListPurchasableOffersFixedSizeCollection createEmptyCollection() {
8520       return new ListPurchasableOffersFixedSizeCollection(null, 0);
8521     }
8522 
8523     @Override
createCollection( List<ListPurchasableOffersPage> pages, int collectionSize)8524     protected ListPurchasableOffersFixedSizeCollection createCollection(
8525         List<ListPurchasableOffersPage> pages, int collectionSize) {
8526       return new ListPurchasableOffersFixedSizeCollection(pages, collectionSize);
8527     }
8528   }
8529 
8530   public static class ListSubscribersPagedResponse
8531       extends AbstractPagedListResponse<
8532           ListSubscribersRequest,
8533           ListSubscribersResponse,
8534           String,
8535           ListSubscribersPage,
8536           ListSubscribersFixedSizeCollection> {
8537 
createAsync( PageContext<ListSubscribersRequest, ListSubscribersResponse, String> context, ApiFuture<ListSubscribersResponse> futureResponse)8538     public static ApiFuture<ListSubscribersPagedResponse> createAsync(
8539         PageContext<ListSubscribersRequest, ListSubscribersResponse, String> context,
8540         ApiFuture<ListSubscribersResponse> futureResponse) {
8541       ApiFuture<ListSubscribersPage> futurePage =
8542           ListSubscribersPage.createEmptyPage().createPageAsync(context, futureResponse);
8543       return ApiFutures.transform(
8544           futurePage,
8545           input -> new ListSubscribersPagedResponse(input),
8546           MoreExecutors.directExecutor());
8547     }
8548 
ListSubscribersPagedResponse(ListSubscribersPage page)8549     private ListSubscribersPagedResponse(ListSubscribersPage page) {
8550       super(page, ListSubscribersFixedSizeCollection.createEmptyCollection());
8551     }
8552   }
8553 
8554   public static class ListSubscribersPage
8555       extends AbstractPage<
8556           ListSubscribersRequest, ListSubscribersResponse, String, ListSubscribersPage> {
8557 
ListSubscribersPage( PageContext<ListSubscribersRequest, ListSubscribersResponse, String> context, ListSubscribersResponse response)8558     private ListSubscribersPage(
8559         PageContext<ListSubscribersRequest, ListSubscribersResponse, String> context,
8560         ListSubscribersResponse response) {
8561       super(context, response);
8562     }
8563 
createEmptyPage()8564     private static ListSubscribersPage createEmptyPage() {
8565       return new ListSubscribersPage(null, null);
8566     }
8567 
8568     @Override
createPage( PageContext<ListSubscribersRequest, ListSubscribersResponse, String> context, ListSubscribersResponse response)8569     protected ListSubscribersPage createPage(
8570         PageContext<ListSubscribersRequest, ListSubscribersResponse, String> context,
8571         ListSubscribersResponse response) {
8572       return new ListSubscribersPage(context, response);
8573     }
8574 
8575     @Override
createPageAsync( PageContext<ListSubscribersRequest, ListSubscribersResponse, String> context, ApiFuture<ListSubscribersResponse> futureResponse)8576     public ApiFuture<ListSubscribersPage> createPageAsync(
8577         PageContext<ListSubscribersRequest, ListSubscribersResponse, String> context,
8578         ApiFuture<ListSubscribersResponse> futureResponse) {
8579       return super.createPageAsync(context, futureResponse);
8580     }
8581   }
8582 
8583   public static class ListSubscribersFixedSizeCollection
8584       extends AbstractFixedSizeCollection<
8585           ListSubscribersRequest,
8586           ListSubscribersResponse,
8587           String,
8588           ListSubscribersPage,
8589           ListSubscribersFixedSizeCollection> {
8590 
ListSubscribersFixedSizeCollection( List<ListSubscribersPage> pages, int collectionSize)8591     private ListSubscribersFixedSizeCollection(
8592         List<ListSubscribersPage> pages, int collectionSize) {
8593       super(pages, collectionSize);
8594     }
8595 
createEmptyCollection()8596     private static ListSubscribersFixedSizeCollection createEmptyCollection() {
8597       return new ListSubscribersFixedSizeCollection(null, 0);
8598     }
8599 
8600     @Override
createCollection( List<ListSubscribersPage> pages, int collectionSize)8601     protected ListSubscribersFixedSizeCollection createCollection(
8602         List<ListSubscribersPage> pages, int collectionSize) {
8603       return new ListSubscribersFixedSizeCollection(pages, collectionSize);
8604     }
8605   }
8606 
8607   public static class ListEntitlementChangesPagedResponse
8608       extends AbstractPagedListResponse<
8609           ListEntitlementChangesRequest,
8610           ListEntitlementChangesResponse,
8611           EntitlementChange,
8612           ListEntitlementChangesPage,
8613           ListEntitlementChangesFixedSizeCollection> {
8614 
createAsync( PageContext< ListEntitlementChangesRequest, ListEntitlementChangesResponse, EntitlementChange> context, ApiFuture<ListEntitlementChangesResponse> futureResponse)8615     public static ApiFuture<ListEntitlementChangesPagedResponse> createAsync(
8616         PageContext<
8617                 ListEntitlementChangesRequest, ListEntitlementChangesResponse, EntitlementChange>
8618             context,
8619         ApiFuture<ListEntitlementChangesResponse> futureResponse) {
8620       ApiFuture<ListEntitlementChangesPage> futurePage =
8621           ListEntitlementChangesPage.createEmptyPage().createPageAsync(context, futureResponse);
8622       return ApiFutures.transform(
8623           futurePage,
8624           input -> new ListEntitlementChangesPagedResponse(input),
8625           MoreExecutors.directExecutor());
8626     }
8627 
ListEntitlementChangesPagedResponse(ListEntitlementChangesPage page)8628     private ListEntitlementChangesPagedResponse(ListEntitlementChangesPage page) {
8629       super(page, ListEntitlementChangesFixedSizeCollection.createEmptyCollection());
8630     }
8631   }
8632 
8633   public static class ListEntitlementChangesPage
8634       extends AbstractPage<
8635           ListEntitlementChangesRequest,
8636           ListEntitlementChangesResponse,
8637           EntitlementChange,
8638           ListEntitlementChangesPage> {
8639 
ListEntitlementChangesPage( PageContext< ListEntitlementChangesRequest, ListEntitlementChangesResponse, EntitlementChange> context, ListEntitlementChangesResponse response)8640     private ListEntitlementChangesPage(
8641         PageContext<
8642                 ListEntitlementChangesRequest, ListEntitlementChangesResponse, EntitlementChange>
8643             context,
8644         ListEntitlementChangesResponse response) {
8645       super(context, response);
8646     }
8647 
createEmptyPage()8648     private static ListEntitlementChangesPage createEmptyPage() {
8649       return new ListEntitlementChangesPage(null, null);
8650     }
8651 
8652     @Override
createPage( PageContext< ListEntitlementChangesRequest, ListEntitlementChangesResponse, EntitlementChange> context, ListEntitlementChangesResponse response)8653     protected ListEntitlementChangesPage createPage(
8654         PageContext<
8655                 ListEntitlementChangesRequest, ListEntitlementChangesResponse, EntitlementChange>
8656             context,
8657         ListEntitlementChangesResponse response) {
8658       return new ListEntitlementChangesPage(context, response);
8659     }
8660 
8661     @Override
createPageAsync( PageContext< ListEntitlementChangesRequest, ListEntitlementChangesResponse, EntitlementChange> context, ApiFuture<ListEntitlementChangesResponse> futureResponse)8662     public ApiFuture<ListEntitlementChangesPage> createPageAsync(
8663         PageContext<
8664                 ListEntitlementChangesRequest, ListEntitlementChangesResponse, EntitlementChange>
8665             context,
8666         ApiFuture<ListEntitlementChangesResponse> futureResponse) {
8667       return super.createPageAsync(context, futureResponse);
8668     }
8669   }
8670 
8671   public static class ListEntitlementChangesFixedSizeCollection
8672       extends AbstractFixedSizeCollection<
8673           ListEntitlementChangesRequest,
8674           ListEntitlementChangesResponse,
8675           EntitlementChange,
8676           ListEntitlementChangesPage,
8677           ListEntitlementChangesFixedSizeCollection> {
8678 
ListEntitlementChangesFixedSizeCollection( List<ListEntitlementChangesPage> pages, int collectionSize)8679     private ListEntitlementChangesFixedSizeCollection(
8680         List<ListEntitlementChangesPage> pages, int collectionSize) {
8681       super(pages, collectionSize);
8682     }
8683 
createEmptyCollection()8684     private static ListEntitlementChangesFixedSizeCollection createEmptyCollection() {
8685       return new ListEntitlementChangesFixedSizeCollection(null, 0);
8686     }
8687 
8688     @Override
createCollection( List<ListEntitlementChangesPage> pages, int collectionSize)8689     protected ListEntitlementChangesFixedSizeCollection createCollection(
8690         List<ListEntitlementChangesPage> pages, int collectionSize) {
8691       return new ListEntitlementChangesFixedSizeCollection(pages, collectionSize);
8692     }
8693   }
8694 }
8695