• 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.dlp.v2;
18 
19 import com.google.api.core.ApiFuture;
20 import com.google.api.core.ApiFutures;
21 import com.google.api.gax.core.BackgroundResource;
22 import com.google.api.gax.paging.AbstractFixedSizeCollection;
23 import com.google.api.gax.paging.AbstractPage;
24 import com.google.api.gax.paging.AbstractPagedListResponse;
25 import com.google.api.gax.rpc.PageContext;
26 import com.google.api.gax.rpc.UnaryCallable;
27 import com.google.cloud.dlp.v2.stub.DlpServiceStub;
28 import com.google.cloud.dlp.v2.stub.DlpServiceStubSettings;
29 import com.google.common.util.concurrent.MoreExecutors;
30 import com.google.privacy.dlp.v2.ActivateJobTriggerRequest;
31 import com.google.privacy.dlp.v2.CancelDlpJobRequest;
32 import com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest;
33 import com.google.privacy.dlp.v2.CreateDlpJobRequest;
34 import com.google.privacy.dlp.v2.CreateInspectTemplateRequest;
35 import com.google.privacy.dlp.v2.CreateJobTriggerRequest;
36 import com.google.privacy.dlp.v2.CreateStoredInfoTypeRequest;
37 import com.google.privacy.dlp.v2.DeidentifyContentRequest;
38 import com.google.privacy.dlp.v2.DeidentifyContentResponse;
39 import com.google.privacy.dlp.v2.DeidentifyTemplate;
40 import com.google.privacy.dlp.v2.DeidentifyTemplateName;
41 import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest;
42 import com.google.privacy.dlp.v2.DeleteDlpJobRequest;
43 import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest;
44 import com.google.privacy.dlp.v2.DeleteJobTriggerRequest;
45 import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest;
46 import com.google.privacy.dlp.v2.DlpJob;
47 import com.google.privacy.dlp.v2.DlpJobName;
48 import com.google.privacy.dlp.v2.FinishDlpJobRequest;
49 import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest;
50 import com.google.privacy.dlp.v2.GetDlpJobRequest;
51 import com.google.privacy.dlp.v2.GetInspectTemplateRequest;
52 import com.google.privacy.dlp.v2.GetJobTriggerRequest;
53 import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest;
54 import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest;
55 import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest;
56 import com.google.privacy.dlp.v2.HybridInspectResponse;
57 import com.google.privacy.dlp.v2.InspectContentRequest;
58 import com.google.privacy.dlp.v2.InspectContentResponse;
59 import com.google.privacy.dlp.v2.InspectJobConfig;
60 import com.google.privacy.dlp.v2.InspectTemplate;
61 import com.google.privacy.dlp.v2.InspectTemplateName;
62 import com.google.privacy.dlp.v2.JobTrigger;
63 import com.google.privacy.dlp.v2.JobTriggerName;
64 import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest;
65 import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse;
66 import com.google.privacy.dlp.v2.ListDlpJobsRequest;
67 import com.google.privacy.dlp.v2.ListDlpJobsResponse;
68 import com.google.privacy.dlp.v2.ListInfoTypesRequest;
69 import com.google.privacy.dlp.v2.ListInfoTypesResponse;
70 import com.google.privacy.dlp.v2.ListInspectTemplatesRequest;
71 import com.google.privacy.dlp.v2.ListInspectTemplatesResponse;
72 import com.google.privacy.dlp.v2.ListJobTriggersRequest;
73 import com.google.privacy.dlp.v2.ListJobTriggersResponse;
74 import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest;
75 import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse;
76 import com.google.privacy.dlp.v2.LocationName;
77 import com.google.privacy.dlp.v2.OrganizationLocationName;
78 import com.google.privacy.dlp.v2.OrganizationName;
79 import com.google.privacy.dlp.v2.ProjectName;
80 import com.google.privacy.dlp.v2.RedactImageRequest;
81 import com.google.privacy.dlp.v2.RedactImageResponse;
82 import com.google.privacy.dlp.v2.ReidentifyContentRequest;
83 import com.google.privacy.dlp.v2.ReidentifyContentResponse;
84 import com.google.privacy.dlp.v2.RiskAnalysisJobConfig;
85 import com.google.privacy.dlp.v2.StoredInfoType;
86 import com.google.privacy.dlp.v2.StoredInfoTypeConfig;
87 import com.google.privacy.dlp.v2.StoredInfoTypeName;
88 import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest;
89 import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest;
90 import com.google.privacy.dlp.v2.UpdateJobTriggerRequest;
91 import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest;
92 import com.google.protobuf.Empty;
93 import com.google.protobuf.FieldMask;
94 import java.io.IOException;
95 import java.util.List;
96 import java.util.concurrent.TimeUnit;
97 import javax.annotation.Generated;
98 
99 // AUTO-GENERATED DOCUMENTATION AND CLASS.
100 /**
101  * Service Description: The Cloud Data Loss Prevention (DLP) API is a service that allows clients to
102  * detect the presence of Personally Identifiable Information (PII) and other privacy-sensitive data
103  * in user-supplied, unstructured data streams, like text blocks or images. The service also
104  * includes methods for sensitive data redaction and scheduling of data scans on Google Cloud
105  * Platform based data sets.
106  *
107  * <p>To learn more about concepts and find how-to guides see https://cloud.google.com/dlp/docs/.
108  *
109  * <p>This class provides the ability to make remote calls to the backing service through method
110  * calls that map to API methods. Sample code to get started:
111  *
112  * <pre>{@code
113  * // This snippet has been automatically generated and should be regarded as a code template only.
114  * // It will require modifications to work:
115  * // - It may require correct/in-range values for request initialization.
116  * // - It may require specifying regional endpoints when creating the service client as shown in
117  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
118  * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
119  *   InspectContentRequest request =
120  *       InspectContentRequest.newBuilder()
121  *           .setParent(ProjectName.of("[PROJECT]").toString())
122  *           .setInspectConfig(InspectConfig.newBuilder().build())
123  *           .setItem(ContentItem.newBuilder().build())
124  *           .setInspectTemplateName("inspectTemplateName1828857433")
125  *           .setLocationId("locationId1541836720")
126  *           .build();
127  *   InspectContentResponse response = dlpServiceClient.inspectContent(request);
128  * }
129  * }</pre>
130  *
131  * <p>Note: close() needs to be called on the DlpServiceClient object to clean up resources such as
132  * threads. In the example above, try-with-resources is used, which automatically calls close().
133  *
134  * <p>The surface of this class includes several types of Java methods for each of the API's
135  * methods:
136  *
137  * <ol>
138  *   <li>A "flattened" method. With this type of method, the fields of the request type have been
139  *       converted into function parameters. It may be the case that not all fields are available as
140  *       parameters, and not every API method will have a flattened method entry point.
141  *   <li>A "request object" method. This type of method only takes one parameter, a request object,
142  *       which must be constructed before the call. Not every API method will have a request object
143  *       method.
144  *   <li>A "callable" method. This type of method takes no parameters and returns an immutable API
145  *       callable object, which can be used to initiate calls to the service.
146  * </ol>
147  *
148  * <p>See the individual methods for example code.
149  *
150  * <p>Many parameters require resource names to be formatted in a particular way. To assist with
151  * these names, this class includes a format method for each type of name, and additionally a parse
152  * method to extract the individual identifiers contained within names that are returned.
153  *
154  * <p>This class can be customized by passing in a custom instance of DlpServiceSettings to
155  * create(). For example:
156  *
157  * <p>To customize credentials:
158  *
159  * <pre>{@code
160  * // This snippet has been automatically generated and should be regarded as a code template only.
161  * // It will require modifications to work:
162  * // - It may require correct/in-range values for request initialization.
163  * // - It may require specifying regional endpoints when creating the service client as shown in
164  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
165  * DlpServiceSettings dlpServiceSettings =
166  *     DlpServiceSettings.newBuilder()
167  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
168  *         .build();
169  * DlpServiceClient dlpServiceClient = DlpServiceClient.create(dlpServiceSettings);
170  * }</pre>
171  *
172  * <p>To customize the endpoint:
173  *
174  * <pre>{@code
175  * // This snippet has been automatically generated and should be regarded as a code template only.
176  * // It will require modifications to work:
177  * // - It may require correct/in-range values for request initialization.
178  * // - It may require specifying regional endpoints when creating the service client as shown in
179  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
180  * DlpServiceSettings dlpServiceSettings =
181  *     DlpServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
182  * DlpServiceClient dlpServiceClient = DlpServiceClient.create(dlpServiceSettings);
183  * }</pre>
184  *
185  * <p>To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
186  * the wire:
187  *
188  * <pre>{@code
189  * // This snippet has been automatically generated and should be regarded as a code template only.
190  * // It will require modifications to work:
191  * // - It may require correct/in-range values for request initialization.
192  * // - It may require specifying regional endpoints when creating the service client as shown in
193  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
194  * DlpServiceSettings dlpServiceSettings = DlpServiceSettings.newHttpJsonBuilder().build();
195  * DlpServiceClient dlpServiceClient = DlpServiceClient.create(dlpServiceSettings);
196  * }</pre>
197  *
198  * <p>Please refer to the GitHub repository's samples for more quickstart code snippets.
199  */
200 @Generated("by gapic-generator-java")
201 public class DlpServiceClient implements BackgroundResource {
202   private final DlpServiceSettings settings;
203   private final DlpServiceStub stub;
204 
205   /** Constructs an instance of DlpServiceClient with default settings. */
create()206   public static final DlpServiceClient create() throws IOException {
207     return create(DlpServiceSettings.newBuilder().build());
208   }
209 
210   /**
211    * Constructs an instance of DlpServiceClient, using the given settings. The channels are created
212    * based on the settings passed in, or defaults for any settings that are not set.
213    */
create(DlpServiceSettings settings)214   public static final DlpServiceClient create(DlpServiceSettings settings) throws IOException {
215     return new DlpServiceClient(settings);
216   }
217 
218   /**
219    * Constructs an instance of DlpServiceClient, using the given stub for making calls. This is for
220    * advanced usage - prefer using create(DlpServiceSettings).
221    */
create(DlpServiceStub stub)222   public static final DlpServiceClient create(DlpServiceStub stub) {
223     return new DlpServiceClient(stub);
224   }
225 
226   /**
227    * Constructs an instance of DlpServiceClient, using the given settings. This is protected so that
228    * it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
229    */
DlpServiceClient(DlpServiceSettings settings)230   protected DlpServiceClient(DlpServiceSettings settings) throws IOException {
231     this.settings = settings;
232     this.stub = ((DlpServiceStubSettings) settings.getStubSettings()).createStub();
233   }
234 
DlpServiceClient(DlpServiceStub stub)235   protected DlpServiceClient(DlpServiceStub stub) {
236     this.settings = null;
237     this.stub = stub;
238   }
239 
getSettings()240   public final DlpServiceSettings getSettings() {
241     return settings;
242   }
243 
getStub()244   public DlpServiceStub getStub() {
245     return stub;
246   }
247 
248   // AUTO-GENERATED DOCUMENTATION AND METHOD.
249   /**
250    * Finds potentially sensitive info in content. This method has limits on input size, processing
251    * time, and output size.
252    *
253    * <p>When no InfoTypes or CustomInfoTypes are specified in this request, the system will
254    * automatically choose what detectors to run. By default this may be all types, but may change
255    * over time as detectors are updated.
256    *
257    * <p>For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and
258    * https://cloud.google.com/dlp/docs/inspecting-text,
259    *
260    * <p>Sample code:
261    *
262    * <pre>{@code
263    * // This snippet has been automatically generated and should be regarded as a code template only.
264    * // It will require modifications to work:
265    * // - It may require correct/in-range values for request initialization.
266    * // - It may require specifying regional endpoints when creating the service client as shown in
267    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
268    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
269    *   InspectContentRequest request =
270    *       InspectContentRequest.newBuilder()
271    *           .setParent(ProjectName.of("[PROJECT]").toString())
272    *           .setInspectConfig(InspectConfig.newBuilder().build())
273    *           .setItem(ContentItem.newBuilder().build())
274    *           .setInspectTemplateName("inspectTemplateName1828857433")
275    *           .setLocationId("locationId1541836720")
276    *           .build();
277    *   InspectContentResponse response = dlpServiceClient.inspectContent(request);
278    * }
279    * }</pre>
280    *
281    * @param request The request object containing all of the parameters for the API call.
282    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
283    */
inspectContent(InspectContentRequest request)284   public final InspectContentResponse inspectContent(InspectContentRequest request) {
285     return inspectContentCallable().call(request);
286   }
287 
288   // AUTO-GENERATED DOCUMENTATION AND METHOD.
289   /**
290    * Finds potentially sensitive info in content. This method has limits on input size, processing
291    * time, and output size.
292    *
293    * <p>When no InfoTypes or CustomInfoTypes are specified in this request, the system will
294    * automatically choose what detectors to run. By default this may be all types, but may change
295    * over time as detectors are updated.
296    *
297    * <p>For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and
298    * https://cloud.google.com/dlp/docs/inspecting-text,
299    *
300    * <p>Sample code:
301    *
302    * <pre>{@code
303    * // This snippet has been automatically generated and should be regarded as a code template only.
304    * // It will require modifications to work:
305    * // - It may require correct/in-range values for request initialization.
306    * // - It may require specifying regional endpoints when creating the service client as shown in
307    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
308    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
309    *   InspectContentRequest request =
310    *       InspectContentRequest.newBuilder()
311    *           .setParent(ProjectName.of("[PROJECT]").toString())
312    *           .setInspectConfig(InspectConfig.newBuilder().build())
313    *           .setItem(ContentItem.newBuilder().build())
314    *           .setInspectTemplateName("inspectTemplateName1828857433")
315    *           .setLocationId("locationId1541836720")
316    *           .build();
317    *   ApiFuture<InspectContentResponse> future =
318    *       dlpServiceClient.inspectContentCallable().futureCall(request);
319    *   // Do something.
320    *   InspectContentResponse response = future.get();
321    * }
322    * }</pre>
323    */
324   public final UnaryCallable<InspectContentRequest, InspectContentResponse>
inspectContentCallable()325       inspectContentCallable() {
326     return stub.inspectContentCallable();
327   }
328 
329   // AUTO-GENERATED DOCUMENTATION AND METHOD.
330   /**
331    * Redacts potentially sensitive info from an image. This method has limits on input size,
332    * processing time, and output size. See
333    * https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more.
334    *
335    * <p>When no InfoTypes or CustomInfoTypes are specified in this request, the system will
336    * automatically choose what detectors to run. By default this may be all types, but may change
337    * over time as detectors are updated.
338    *
339    * <p>Sample code:
340    *
341    * <pre>{@code
342    * // This snippet has been automatically generated and should be regarded as a code template only.
343    * // It will require modifications to work:
344    * // - It may require correct/in-range values for request initialization.
345    * // - It may require specifying regional endpoints when creating the service client as shown in
346    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
347    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
348    *   RedactImageRequest request =
349    *       RedactImageRequest.newBuilder()
350    *           .setParent(ProjectName.of("[PROJECT]").toString())
351    *           .setLocationId("locationId1541836720")
352    *           .setInspectConfig(InspectConfig.newBuilder().build())
353    *           .addAllImageRedactionConfigs(new ArrayList<RedactImageRequest.ImageRedactionConfig>())
354    *           .setIncludeFindings(true)
355    *           .setByteItem(ByteContentItem.newBuilder().build())
356    *           .build();
357    *   RedactImageResponse response = dlpServiceClient.redactImage(request);
358    * }
359    * }</pre>
360    *
361    * @param request The request object containing all of the parameters for the API call.
362    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
363    */
redactImage(RedactImageRequest request)364   public final RedactImageResponse redactImage(RedactImageRequest request) {
365     return redactImageCallable().call(request);
366   }
367 
368   // AUTO-GENERATED DOCUMENTATION AND METHOD.
369   /**
370    * Redacts potentially sensitive info from an image. This method has limits on input size,
371    * processing time, and output size. See
372    * https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more.
373    *
374    * <p>When no InfoTypes or CustomInfoTypes are specified in this request, the system will
375    * automatically choose what detectors to run. By default this may be all types, but may change
376    * over time as detectors are updated.
377    *
378    * <p>Sample code:
379    *
380    * <pre>{@code
381    * // This snippet has been automatically generated and should be regarded as a code template only.
382    * // It will require modifications to work:
383    * // - It may require correct/in-range values for request initialization.
384    * // - It may require specifying regional endpoints when creating the service client as shown in
385    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
386    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
387    *   RedactImageRequest request =
388    *       RedactImageRequest.newBuilder()
389    *           .setParent(ProjectName.of("[PROJECT]").toString())
390    *           .setLocationId("locationId1541836720")
391    *           .setInspectConfig(InspectConfig.newBuilder().build())
392    *           .addAllImageRedactionConfigs(new ArrayList<RedactImageRequest.ImageRedactionConfig>())
393    *           .setIncludeFindings(true)
394    *           .setByteItem(ByteContentItem.newBuilder().build())
395    *           .build();
396    *   ApiFuture<RedactImageResponse> future =
397    *       dlpServiceClient.redactImageCallable().futureCall(request);
398    *   // Do something.
399    *   RedactImageResponse response = future.get();
400    * }
401    * }</pre>
402    */
redactImageCallable()403   public final UnaryCallable<RedactImageRequest, RedactImageResponse> redactImageCallable() {
404     return stub.redactImageCallable();
405   }
406 
407   // AUTO-GENERATED DOCUMENTATION AND METHOD.
408   /**
409    * De-identifies potentially sensitive info from a ContentItem. This method has limits on input
410    * size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn
411    * more.
412    *
413    * <p>When no InfoTypes or CustomInfoTypes are specified in this request, the system will
414    * automatically choose what detectors to run. By default this may be all types, but may change
415    * over time as detectors are updated.
416    *
417    * <p>Sample code:
418    *
419    * <pre>{@code
420    * // This snippet has been automatically generated and should be regarded as a code template only.
421    * // It will require modifications to work:
422    * // - It may require correct/in-range values for request initialization.
423    * // - It may require specifying regional endpoints when creating the service client as shown in
424    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
425    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
426    *   DeidentifyContentRequest request =
427    *       DeidentifyContentRequest.newBuilder()
428    *           .setParent(ProjectName.of("[PROJECT]").toString())
429    *           .setDeidentifyConfig(DeidentifyConfig.newBuilder().build())
430    *           .setInspectConfig(InspectConfig.newBuilder().build())
431    *           .setItem(ContentItem.newBuilder().build())
432    *           .setInspectTemplateName("inspectTemplateName1828857433")
433    *           .setDeidentifyTemplateName("deidentifyTemplateName-1374666414")
434    *           .setLocationId("locationId1541836720")
435    *           .build();
436    *   DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request);
437    * }
438    * }</pre>
439    *
440    * @param request The request object containing all of the parameters for the API call.
441    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
442    */
deidentifyContent(DeidentifyContentRequest request)443   public final DeidentifyContentResponse deidentifyContent(DeidentifyContentRequest request) {
444     return deidentifyContentCallable().call(request);
445   }
446 
447   // AUTO-GENERATED DOCUMENTATION AND METHOD.
448   /**
449    * De-identifies potentially sensitive info from a ContentItem. This method has limits on input
450    * size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn
451    * more.
452    *
453    * <p>When no InfoTypes or CustomInfoTypes are specified in this request, the system will
454    * automatically choose what detectors to run. By default this may be all types, but may change
455    * over time as detectors are updated.
456    *
457    * <p>Sample code:
458    *
459    * <pre>{@code
460    * // This snippet has been automatically generated and should be regarded as a code template only.
461    * // It will require modifications to work:
462    * // - It may require correct/in-range values for request initialization.
463    * // - It may require specifying regional endpoints when creating the service client as shown in
464    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
465    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
466    *   DeidentifyContentRequest request =
467    *       DeidentifyContentRequest.newBuilder()
468    *           .setParent(ProjectName.of("[PROJECT]").toString())
469    *           .setDeidentifyConfig(DeidentifyConfig.newBuilder().build())
470    *           .setInspectConfig(InspectConfig.newBuilder().build())
471    *           .setItem(ContentItem.newBuilder().build())
472    *           .setInspectTemplateName("inspectTemplateName1828857433")
473    *           .setDeidentifyTemplateName("deidentifyTemplateName-1374666414")
474    *           .setLocationId("locationId1541836720")
475    *           .build();
476    *   ApiFuture<DeidentifyContentResponse> future =
477    *       dlpServiceClient.deidentifyContentCallable().futureCall(request);
478    *   // Do something.
479    *   DeidentifyContentResponse response = future.get();
480    * }
481    * }</pre>
482    */
483   public final UnaryCallable<DeidentifyContentRequest, DeidentifyContentResponse>
deidentifyContentCallable()484       deidentifyContentCallable() {
485     return stub.deidentifyContentCallable();
486   }
487 
488   // AUTO-GENERATED DOCUMENTATION AND METHOD.
489   /**
490    * Re-identifies content that has been de-identified. See
491    * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
492    * to learn more.
493    *
494    * <p>Sample code:
495    *
496    * <pre>{@code
497    * // This snippet has been automatically generated and should be regarded as a code template only.
498    * // It will require modifications to work:
499    * // - It may require correct/in-range values for request initialization.
500    * // - It may require specifying regional endpoints when creating the service client as shown in
501    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
502    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
503    *   ReidentifyContentRequest request =
504    *       ReidentifyContentRequest.newBuilder()
505    *           .setParent(ProjectName.of("[PROJECT]").toString())
506    *           .setReidentifyConfig(DeidentifyConfig.newBuilder().build())
507    *           .setInspectConfig(InspectConfig.newBuilder().build())
508    *           .setItem(ContentItem.newBuilder().build())
509    *           .setInspectTemplateName("inspectTemplateName1828857433")
510    *           .setReidentifyTemplateName("reidentifyTemplateName157316612")
511    *           .setLocationId("locationId1541836720")
512    *           .build();
513    *   ReidentifyContentResponse response = dlpServiceClient.reidentifyContent(request);
514    * }
515    * }</pre>
516    *
517    * @param request The request object containing all of the parameters for the API call.
518    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
519    */
reidentifyContent(ReidentifyContentRequest request)520   public final ReidentifyContentResponse reidentifyContent(ReidentifyContentRequest request) {
521     return reidentifyContentCallable().call(request);
522   }
523 
524   // AUTO-GENERATED DOCUMENTATION AND METHOD.
525   /**
526    * Re-identifies content that has been de-identified. See
527    * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
528    * to learn more.
529    *
530    * <p>Sample code:
531    *
532    * <pre>{@code
533    * // This snippet has been automatically generated and should be regarded as a code template only.
534    * // It will require modifications to work:
535    * // - It may require correct/in-range values for request initialization.
536    * // - It may require specifying regional endpoints when creating the service client as shown in
537    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
538    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
539    *   ReidentifyContentRequest request =
540    *       ReidentifyContentRequest.newBuilder()
541    *           .setParent(ProjectName.of("[PROJECT]").toString())
542    *           .setReidentifyConfig(DeidentifyConfig.newBuilder().build())
543    *           .setInspectConfig(InspectConfig.newBuilder().build())
544    *           .setItem(ContentItem.newBuilder().build())
545    *           .setInspectTemplateName("inspectTemplateName1828857433")
546    *           .setReidentifyTemplateName("reidentifyTemplateName157316612")
547    *           .setLocationId("locationId1541836720")
548    *           .build();
549    *   ApiFuture<ReidentifyContentResponse> future =
550    *       dlpServiceClient.reidentifyContentCallable().futureCall(request);
551    *   // Do something.
552    *   ReidentifyContentResponse response = future.get();
553    * }
554    * }</pre>
555    */
556   public final UnaryCallable<ReidentifyContentRequest, ReidentifyContentResponse>
reidentifyContentCallable()557       reidentifyContentCallable() {
558     return stub.reidentifyContentCallable();
559   }
560 
561   // AUTO-GENERATED DOCUMENTATION AND METHOD.
562   /**
563    * Returns a list of the sensitive information types that DLP API supports. See
564    * https://cloud.google.com/dlp/docs/infotypes-reference to learn more.
565    *
566    * <p>Sample code:
567    *
568    * <pre>{@code
569    * // This snippet has been automatically generated and should be regarded as a code template only.
570    * // It will require modifications to work:
571    * // - It may require correct/in-range values for request initialization.
572    * // - It may require specifying regional endpoints when creating the service client as shown in
573    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
574    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
575    *   String parent = "parent-995424086";
576    *   ListInfoTypesResponse response = dlpServiceClient.listInfoTypes(parent);
577    * }
578    * }</pre>
579    *
580    * @param parent The parent resource name.
581    *     <p>The format of this value is as follows:
582    *     <p>locations/&lt;var&gt;LOCATION_ID&lt;/var&gt;
583    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
584    */
listInfoTypes(String parent)585   public final ListInfoTypesResponse listInfoTypes(String parent) {
586     ListInfoTypesRequest request = ListInfoTypesRequest.newBuilder().setParent(parent).build();
587     return listInfoTypes(request);
588   }
589 
590   // AUTO-GENERATED DOCUMENTATION AND METHOD.
591   /**
592    * Returns a list of the sensitive information types that DLP API supports. See
593    * https://cloud.google.com/dlp/docs/infotypes-reference to learn more.
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 (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
604    *   ListInfoTypesRequest request =
605    *       ListInfoTypesRequest.newBuilder()
606    *           .setParent("parent-995424086")
607    *           .setLanguageCode("languageCode-2092349083")
608    *           .setFilter("filter-1274492040")
609    *           .setLocationId("locationId1541836720")
610    *           .build();
611    *   ListInfoTypesResponse response = dlpServiceClient.listInfoTypes(request);
612    * }
613    * }</pre>
614    *
615    * @param request The request object containing all of the parameters for the API call.
616    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
617    */
listInfoTypes(ListInfoTypesRequest request)618   public final ListInfoTypesResponse listInfoTypes(ListInfoTypesRequest request) {
619     return listInfoTypesCallable().call(request);
620   }
621 
622   // AUTO-GENERATED DOCUMENTATION AND METHOD.
623   /**
624    * Returns a list of the sensitive information types that DLP API supports. See
625    * https://cloud.google.com/dlp/docs/infotypes-reference to learn more.
626    *
627    * <p>Sample code:
628    *
629    * <pre>{@code
630    * // This snippet has been automatically generated and should be regarded as a code template only.
631    * // It will require modifications to work:
632    * // - It may require correct/in-range values for request initialization.
633    * // - It may require specifying regional endpoints when creating the service client as shown in
634    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
635    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
636    *   ListInfoTypesRequest request =
637    *       ListInfoTypesRequest.newBuilder()
638    *           .setParent("parent-995424086")
639    *           .setLanguageCode("languageCode-2092349083")
640    *           .setFilter("filter-1274492040")
641    *           .setLocationId("locationId1541836720")
642    *           .build();
643    *   ApiFuture<ListInfoTypesResponse> future =
644    *       dlpServiceClient.listInfoTypesCallable().futureCall(request);
645    *   // Do something.
646    *   ListInfoTypesResponse response = future.get();
647    * }
648    * }</pre>
649    */
listInfoTypesCallable()650   public final UnaryCallable<ListInfoTypesRequest, ListInfoTypesResponse> listInfoTypesCallable() {
651     return stub.listInfoTypesCallable();
652   }
653 
654   // AUTO-GENERATED DOCUMENTATION AND METHOD.
655   /**
656    * Creates an InspectTemplate for reusing frequently used configuration for inspecting content,
657    * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
658    *
659    * <p>Sample code:
660    *
661    * <pre>{@code
662    * // This snippet has been automatically generated and should be regarded as a code template only.
663    * // It will require modifications to work:
664    * // - It may require correct/in-range values for request initialization.
665    * // - It may require specifying regional endpoints when creating the service client as shown in
666    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
667    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
668    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
669    *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
670    *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
671    * }
672    * }</pre>
673    *
674    * @param parent Required. Parent resource name.
675    *     <p>The format of this value varies depending on the scope of the request (project or
676    *     organization) and whether you have [specified a processing
677    *     location](https://cloud.google.com/dlp/docs/specifying-location):
678    *     <p>+ Projects scope, location specified:&lt;br/&gt;
679    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
680    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
681    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
682    *     specified:&lt;br/&gt;
683    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
684    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
685    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
686    *     <p>The following example `parent` string specifies a parent project with the identifier
687    *     `example-project`, and specifies the `europe-west3` location for processing data:
688    *     <p>parent=projects/example-project/locations/europe-west3
689    * @param inspectTemplate Required. The InspectTemplate to create.
690    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
691    */
createInspectTemplate( LocationName parent, InspectTemplate inspectTemplate)692   public final InspectTemplate createInspectTemplate(
693       LocationName parent, InspectTemplate inspectTemplate) {
694     CreateInspectTemplateRequest request =
695         CreateInspectTemplateRequest.newBuilder()
696             .setParent(parent == null ? null : parent.toString())
697             .setInspectTemplate(inspectTemplate)
698             .build();
699     return createInspectTemplate(request);
700   }
701 
702   // AUTO-GENERATED DOCUMENTATION AND METHOD.
703   /**
704    * Creates an InspectTemplate for reusing frequently used configuration for inspecting content,
705    * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
706    *
707    * <p>Sample code:
708    *
709    * <pre>{@code
710    * // This snippet has been automatically generated and should be regarded as a code template only.
711    * // It will require modifications to work:
712    * // - It may require correct/in-range values for request initialization.
713    * // - It may require specifying regional endpoints when creating the service client as shown in
714    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
715    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
716    *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
717    *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
718    *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
719    * }
720    * }</pre>
721    *
722    * @param parent Required. Parent resource name.
723    *     <p>The format of this value varies depending on the scope of the request (project or
724    *     organization) and whether you have [specified a processing
725    *     location](https://cloud.google.com/dlp/docs/specifying-location):
726    *     <p>+ Projects scope, location specified:&lt;br/&gt;
727    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
728    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
729    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
730    *     specified:&lt;br/&gt;
731    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
732    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
733    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
734    *     <p>The following example `parent` string specifies a parent project with the identifier
735    *     `example-project`, and specifies the `europe-west3` location for processing data:
736    *     <p>parent=projects/example-project/locations/europe-west3
737    * @param inspectTemplate Required. The InspectTemplate to create.
738    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
739    */
createInspectTemplate( OrganizationLocationName parent, InspectTemplate inspectTemplate)740   public final InspectTemplate createInspectTemplate(
741       OrganizationLocationName parent, InspectTemplate inspectTemplate) {
742     CreateInspectTemplateRequest request =
743         CreateInspectTemplateRequest.newBuilder()
744             .setParent(parent == null ? null : parent.toString())
745             .setInspectTemplate(inspectTemplate)
746             .build();
747     return createInspectTemplate(request);
748   }
749 
750   // AUTO-GENERATED DOCUMENTATION AND METHOD.
751   /**
752    * Creates an InspectTemplate for reusing frequently used configuration for inspecting content,
753    * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
754    *
755    * <p>Sample code:
756    *
757    * <pre>{@code
758    * // This snippet has been automatically generated and should be regarded as a code template only.
759    * // It will require modifications to work:
760    * // - It may require correct/in-range values for request initialization.
761    * // - It may require specifying regional endpoints when creating the service client as shown in
762    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
763    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
764    *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
765    *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
766    *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
767    * }
768    * }</pre>
769    *
770    * @param parent Required. Parent resource name.
771    *     <p>The format of this value varies depending on the scope of the request (project or
772    *     organization) and whether you have [specified a processing
773    *     location](https://cloud.google.com/dlp/docs/specifying-location):
774    *     <p>+ Projects scope, location specified:&lt;br/&gt;
775    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
776    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
777    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
778    *     specified:&lt;br/&gt;
779    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
780    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
781    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
782    *     <p>The following example `parent` string specifies a parent project with the identifier
783    *     `example-project`, and specifies the `europe-west3` location for processing data:
784    *     <p>parent=projects/example-project/locations/europe-west3
785    * @param inspectTemplate Required. The InspectTemplate to create.
786    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
787    */
createInspectTemplate( OrganizationName parent, InspectTemplate inspectTemplate)788   public final InspectTemplate createInspectTemplate(
789       OrganizationName parent, InspectTemplate inspectTemplate) {
790     CreateInspectTemplateRequest request =
791         CreateInspectTemplateRequest.newBuilder()
792             .setParent(parent == null ? null : parent.toString())
793             .setInspectTemplate(inspectTemplate)
794             .build();
795     return createInspectTemplate(request);
796   }
797 
798   // AUTO-GENERATED DOCUMENTATION AND METHOD.
799   /**
800    * Creates an InspectTemplate for reusing frequently used configuration for inspecting content,
801    * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
802    *
803    * <p>Sample code:
804    *
805    * <pre>{@code
806    * // This snippet has been automatically generated and should be regarded as a code template only.
807    * // It will require modifications to work:
808    * // - It may require correct/in-range values for request initialization.
809    * // - It may require specifying regional endpoints when creating the service client as shown in
810    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
811    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
812    *   ProjectName parent = ProjectName.of("[PROJECT]");
813    *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
814    *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
815    * }
816    * }</pre>
817    *
818    * @param parent Required. Parent resource name.
819    *     <p>The format of this value varies depending on the scope of the request (project or
820    *     organization) and whether you have [specified a processing
821    *     location](https://cloud.google.com/dlp/docs/specifying-location):
822    *     <p>+ Projects scope, location specified:&lt;br/&gt;
823    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
824    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
825    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
826    *     specified:&lt;br/&gt;
827    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
828    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
829    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
830    *     <p>The following example `parent` string specifies a parent project with the identifier
831    *     `example-project`, and specifies the `europe-west3` location for processing data:
832    *     <p>parent=projects/example-project/locations/europe-west3
833    * @param inspectTemplate Required. The InspectTemplate to create.
834    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
835    */
createInspectTemplate( ProjectName parent, InspectTemplate inspectTemplate)836   public final InspectTemplate createInspectTemplate(
837       ProjectName parent, InspectTemplate inspectTemplate) {
838     CreateInspectTemplateRequest request =
839         CreateInspectTemplateRequest.newBuilder()
840             .setParent(parent == null ? null : parent.toString())
841             .setInspectTemplate(inspectTemplate)
842             .build();
843     return createInspectTemplate(request);
844   }
845 
846   // AUTO-GENERATED DOCUMENTATION AND METHOD.
847   /**
848    * Creates an InspectTemplate for reusing frequently used configuration for inspecting content,
849    * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
850    *
851    * <p>Sample code:
852    *
853    * <pre>{@code
854    * // This snippet has been automatically generated and should be regarded as a code template only.
855    * // It will require modifications to work:
856    * // - It may require correct/in-range values for request initialization.
857    * // - It may require specifying regional endpoints when creating the service client as shown in
858    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
859    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
860    *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
861    *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
862    *   InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
863    * }
864    * }</pre>
865    *
866    * @param parent Required. Parent resource name.
867    *     <p>The format of this value varies depending on the scope of the request (project or
868    *     organization) and whether you have [specified a processing
869    *     location](https://cloud.google.com/dlp/docs/specifying-location):
870    *     <p>+ Projects scope, location specified:&lt;br/&gt;
871    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
872    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
873    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
874    *     specified:&lt;br/&gt;
875    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
876    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
877    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
878    *     <p>The following example `parent` string specifies a parent project with the identifier
879    *     `example-project`, and specifies the `europe-west3` location for processing data:
880    *     <p>parent=projects/example-project/locations/europe-west3
881    * @param inspectTemplate Required. The InspectTemplate to create.
882    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
883    */
createInspectTemplate( String parent, InspectTemplate inspectTemplate)884   public final InspectTemplate createInspectTemplate(
885       String parent, InspectTemplate inspectTemplate) {
886     CreateInspectTemplateRequest request =
887         CreateInspectTemplateRequest.newBuilder()
888             .setParent(parent)
889             .setInspectTemplate(inspectTemplate)
890             .build();
891     return createInspectTemplate(request);
892   }
893 
894   // AUTO-GENERATED DOCUMENTATION AND METHOD.
895   /**
896    * Creates an InspectTemplate for reusing frequently used configuration for inspecting content,
897    * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
898    *
899    * <p>Sample code:
900    *
901    * <pre>{@code
902    * // This snippet has been automatically generated and should be regarded as a code template only.
903    * // It will require modifications to work:
904    * // - It may require correct/in-range values for request initialization.
905    * // - It may require specifying regional endpoints when creating the service client as shown in
906    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
907    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
908    *   CreateInspectTemplateRequest request =
909    *       CreateInspectTemplateRequest.newBuilder()
910    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
911    *           .setInspectTemplate(InspectTemplate.newBuilder().build())
912    *           .setTemplateId("templateId1304010549")
913    *           .setLocationId("locationId1541836720")
914    *           .build();
915    *   InspectTemplate response = dlpServiceClient.createInspectTemplate(request);
916    * }
917    * }</pre>
918    *
919    * @param request The request object containing all of the parameters for the API call.
920    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
921    */
createInspectTemplate(CreateInspectTemplateRequest request)922   public final InspectTemplate createInspectTemplate(CreateInspectTemplateRequest request) {
923     return createInspectTemplateCallable().call(request);
924   }
925 
926   // AUTO-GENERATED DOCUMENTATION AND METHOD.
927   /**
928    * Creates an InspectTemplate for reusing frequently used configuration for inspecting content,
929    * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
930    *
931    * <p>Sample code:
932    *
933    * <pre>{@code
934    * // This snippet has been automatically generated and should be regarded as a code template only.
935    * // It will require modifications to work:
936    * // - It may require correct/in-range values for request initialization.
937    * // - It may require specifying regional endpoints when creating the service client as shown in
938    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
939    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
940    *   CreateInspectTemplateRequest request =
941    *       CreateInspectTemplateRequest.newBuilder()
942    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
943    *           .setInspectTemplate(InspectTemplate.newBuilder().build())
944    *           .setTemplateId("templateId1304010549")
945    *           .setLocationId("locationId1541836720")
946    *           .build();
947    *   ApiFuture<InspectTemplate> future =
948    *       dlpServiceClient.createInspectTemplateCallable().futureCall(request);
949    *   // Do something.
950    *   InspectTemplate response = future.get();
951    * }
952    * }</pre>
953    */
954   public final UnaryCallable<CreateInspectTemplateRequest, InspectTemplate>
createInspectTemplateCallable()955       createInspectTemplateCallable() {
956     return stub.createInspectTemplateCallable();
957   }
958 
959   // AUTO-GENERATED DOCUMENTATION AND METHOD.
960   /**
961    * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
962    * more.
963    *
964    * <p>Sample code:
965    *
966    * <pre>{@code
967    * // This snippet has been automatically generated and should be regarded as a code template only.
968    * // It will require modifications to work:
969    * // - It may require correct/in-range values for request initialization.
970    * // - It may require specifying regional endpoints when creating the service client as shown in
971    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
972    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
973    *   InspectTemplateName name =
974    *       InspectTemplateName.ofOrganizationInspectTemplateName(
975    *           "[ORGANIZATION]", "[INSPECT_TEMPLATE]");
976    *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
977    *   FieldMask updateMask = FieldMask.newBuilder().build();
978    *   InspectTemplate response =
979    *       dlpServiceClient.updateInspectTemplate(name, inspectTemplate, updateMask);
980    * }
981    * }</pre>
982    *
983    * @param name Required. Resource name of organization and inspectTemplate to be updated, for
984    *     example `organizations/433245324/inspectTemplates/432452342` or
985    *     projects/project-id/inspectTemplates/432452342.
986    * @param inspectTemplate New InspectTemplate value.
987    * @param updateMask Mask to control which fields get updated.
988    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
989    */
updateInspectTemplate( InspectTemplateName name, InspectTemplate inspectTemplate, FieldMask updateMask)990   public final InspectTemplate updateInspectTemplate(
991       InspectTemplateName name, InspectTemplate inspectTemplate, FieldMask updateMask) {
992     UpdateInspectTemplateRequest request =
993         UpdateInspectTemplateRequest.newBuilder()
994             .setName(name == null ? null : name.toString())
995             .setInspectTemplate(inspectTemplate)
996             .setUpdateMask(updateMask)
997             .build();
998     return updateInspectTemplate(request);
999   }
1000 
1001   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1002   /**
1003    * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
1004    * more.
1005    *
1006    * <p>Sample code:
1007    *
1008    * <pre>{@code
1009    * // This snippet has been automatically generated and should be regarded as a code template only.
1010    * // It will require modifications to work:
1011    * // - It may require correct/in-range values for request initialization.
1012    * // - It may require specifying regional endpoints when creating the service client as shown in
1013    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1014    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1015    *   String name =
1016    *       InspectTemplateName.ofOrganizationInspectTemplateName(
1017    *               "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
1018    *           .toString();
1019    *   InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
1020    *   FieldMask updateMask = FieldMask.newBuilder().build();
1021    *   InspectTemplate response =
1022    *       dlpServiceClient.updateInspectTemplate(name, inspectTemplate, updateMask);
1023    * }
1024    * }</pre>
1025    *
1026    * @param name Required. Resource name of organization and inspectTemplate to be updated, for
1027    *     example `organizations/433245324/inspectTemplates/432452342` or
1028    *     projects/project-id/inspectTemplates/432452342.
1029    * @param inspectTemplate New InspectTemplate value.
1030    * @param updateMask Mask to control which fields get updated.
1031    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1032    */
updateInspectTemplate( String name, InspectTemplate inspectTemplate, FieldMask updateMask)1033   public final InspectTemplate updateInspectTemplate(
1034       String name, InspectTemplate inspectTemplate, FieldMask updateMask) {
1035     UpdateInspectTemplateRequest request =
1036         UpdateInspectTemplateRequest.newBuilder()
1037             .setName(name)
1038             .setInspectTemplate(inspectTemplate)
1039             .setUpdateMask(updateMask)
1040             .build();
1041     return updateInspectTemplate(request);
1042   }
1043 
1044   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1045   /**
1046    * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
1047    * more.
1048    *
1049    * <p>Sample code:
1050    *
1051    * <pre>{@code
1052    * // This snippet has been automatically generated and should be regarded as a code template only.
1053    * // It will require modifications to work:
1054    * // - It may require correct/in-range values for request initialization.
1055    * // - It may require specifying regional endpoints when creating the service client as shown in
1056    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1057    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1058    *   UpdateInspectTemplateRequest request =
1059    *       UpdateInspectTemplateRequest.newBuilder()
1060    *           .setName(
1061    *               InspectTemplateName.ofOrganizationInspectTemplateName(
1062    *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
1063    *                   .toString())
1064    *           .setInspectTemplate(InspectTemplate.newBuilder().build())
1065    *           .setUpdateMask(FieldMask.newBuilder().build())
1066    *           .build();
1067    *   InspectTemplate response = dlpServiceClient.updateInspectTemplate(request);
1068    * }
1069    * }</pre>
1070    *
1071    * @param request The request object containing all of the parameters for the API call.
1072    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1073    */
updateInspectTemplate(UpdateInspectTemplateRequest request)1074   public final InspectTemplate updateInspectTemplate(UpdateInspectTemplateRequest request) {
1075     return updateInspectTemplateCallable().call(request);
1076   }
1077 
1078   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1079   /**
1080    * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
1081    * more.
1082    *
1083    * <p>Sample code:
1084    *
1085    * <pre>{@code
1086    * // This snippet has been automatically generated and should be regarded as a code template only.
1087    * // It will require modifications to work:
1088    * // - It may require correct/in-range values for request initialization.
1089    * // - It may require specifying regional endpoints when creating the service client as shown in
1090    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1091    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1092    *   UpdateInspectTemplateRequest request =
1093    *       UpdateInspectTemplateRequest.newBuilder()
1094    *           .setName(
1095    *               InspectTemplateName.ofOrganizationInspectTemplateName(
1096    *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
1097    *                   .toString())
1098    *           .setInspectTemplate(InspectTemplate.newBuilder().build())
1099    *           .setUpdateMask(FieldMask.newBuilder().build())
1100    *           .build();
1101    *   ApiFuture<InspectTemplate> future =
1102    *       dlpServiceClient.updateInspectTemplateCallable().futureCall(request);
1103    *   // Do something.
1104    *   InspectTemplate response = future.get();
1105    * }
1106    * }</pre>
1107    */
1108   public final UnaryCallable<UpdateInspectTemplateRequest, InspectTemplate>
updateInspectTemplateCallable()1109       updateInspectTemplateCallable() {
1110     return stub.updateInspectTemplateCallable();
1111   }
1112 
1113   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1114   /**
1115    * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
1116    * more.
1117    *
1118    * <p>Sample code:
1119    *
1120    * <pre>{@code
1121    * // This snippet has been automatically generated and should be regarded as a code template only.
1122    * // It will require modifications to work:
1123    * // - It may require correct/in-range values for request initialization.
1124    * // - It may require specifying regional endpoints when creating the service client as shown in
1125    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1126    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1127    *   InspectTemplateName name =
1128    *       InspectTemplateName.ofOrganizationInspectTemplateName(
1129    *           "[ORGANIZATION]", "[INSPECT_TEMPLATE]");
1130    *   InspectTemplate response = dlpServiceClient.getInspectTemplate(name);
1131    * }
1132    * }</pre>
1133    *
1134    * @param name Required. Resource name of the organization and inspectTemplate to be read, for
1135    *     example `organizations/433245324/inspectTemplates/432452342` or
1136    *     projects/project-id/inspectTemplates/432452342.
1137    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1138    */
getInspectTemplate(InspectTemplateName name)1139   public final InspectTemplate getInspectTemplate(InspectTemplateName name) {
1140     GetInspectTemplateRequest request =
1141         GetInspectTemplateRequest.newBuilder()
1142             .setName(name == null ? null : name.toString())
1143             .build();
1144     return getInspectTemplate(request);
1145   }
1146 
1147   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1148   /**
1149    * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
1150    * more.
1151    *
1152    * <p>Sample code:
1153    *
1154    * <pre>{@code
1155    * // This snippet has been automatically generated and should be regarded as a code template only.
1156    * // It will require modifications to work:
1157    * // - It may require correct/in-range values for request initialization.
1158    * // - It may require specifying regional endpoints when creating the service client as shown in
1159    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1160    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1161    *   String name =
1162    *       InspectTemplateName.ofOrganizationInspectTemplateName(
1163    *               "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
1164    *           .toString();
1165    *   InspectTemplate response = dlpServiceClient.getInspectTemplate(name);
1166    * }
1167    * }</pre>
1168    *
1169    * @param name Required. Resource name of the organization and inspectTemplate to be read, for
1170    *     example `organizations/433245324/inspectTemplates/432452342` or
1171    *     projects/project-id/inspectTemplates/432452342.
1172    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1173    */
getInspectTemplate(String name)1174   public final InspectTemplate getInspectTemplate(String name) {
1175     GetInspectTemplateRequest request =
1176         GetInspectTemplateRequest.newBuilder().setName(name).build();
1177     return getInspectTemplate(request);
1178   }
1179 
1180   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1181   /**
1182    * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
1183    * more.
1184    *
1185    * <p>Sample code:
1186    *
1187    * <pre>{@code
1188    * // This snippet has been automatically generated and should be regarded as a code template only.
1189    * // It will require modifications to work:
1190    * // - It may require correct/in-range values for request initialization.
1191    * // - It may require specifying regional endpoints when creating the service client as shown in
1192    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1193    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1194    *   GetInspectTemplateRequest request =
1195    *       GetInspectTemplateRequest.newBuilder()
1196    *           .setName(
1197    *               InspectTemplateName.ofOrganizationInspectTemplateName(
1198    *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
1199    *                   .toString())
1200    *           .build();
1201    *   InspectTemplate response = dlpServiceClient.getInspectTemplate(request);
1202    * }
1203    * }</pre>
1204    *
1205    * @param request The request object containing all of the parameters for the API call.
1206    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1207    */
getInspectTemplate(GetInspectTemplateRequest request)1208   public final InspectTemplate getInspectTemplate(GetInspectTemplateRequest request) {
1209     return getInspectTemplateCallable().call(request);
1210   }
1211 
1212   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1213   /**
1214    * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
1215    * more.
1216    *
1217    * <p>Sample code:
1218    *
1219    * <pre>{@code
1220    * // This snippet has been automatically generated and should be regarded as a code template only.
1221    * // It will require modifications to work:
1222    * // - It may require correct/in-range values for request initialization.
1223    * // - It may require specifying regional endpoints when creating the service client as shown in
1224    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1225    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1226    *   GetInspectTemplateRequest request =
1227    *       GetInspectTemplateRequest.newBuilder()
1228    *           .setName(
1229    *               InspectTemplateName.ofOrganizationInspectTemplateName(
1230    *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
1231    *                   .toString())
1232    *           .build();
1233    *   ApiFuture<InspectTemplate> future =
1234    *       dlpServiceClient.getInspectTemplateCallable().futureCall(request);
1235    *   // Do something.
1236    *   InspectTemplate response = future.get();
1237    * }
1238    * }</pre>
1239    */
1240   public final UnaryCallable<GetInspectTemplateRequest, InspectTemplate>
getInspectTemplateCallable()1241       getInspectTemplateCallable() {
1242     return stub.getInspectTemplateCallable();
1243   }
1244 
1245   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1246   /**
1247    * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1248    *
1249    * <p>Sample code:
1250    *
1251    * <pre>{@code
1252    * // This snippet has been automatically generated and should be regarded as a code template only.
1253    * // It will require modifications to work:
1254    * // - It may require correct/in-range values for request initialization.
1255    * // - It may require specifying regional endpoints when creating the service client as shown in
1256    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1257    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1258    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
1259    *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
1260    *     // doThingsWith(element);
1261    *   }
1262    * }
1263    * }</pre>
1264    *
1265    * @param parent Required. Parent resource name.
1266    *     <p>The format of this value varies depending on the scope of the request (project or
1267    *     organization) and whether you have [specified a processing
1268    *     location](https://cloud.google.com/dlp/docs/specifying-location):
1269    *     <p>+ Projects scope, location specified:&lt;br/&gt;
1270    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1271    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
1272    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
1273    *     specified:&lt;br/&gt;
1274    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1275    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
1276    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
1277    *     <p>The following example `parent` string specifies a parent project with the identifier
1278    *     `example-project`, and specifies the `europe-west3` location for processing data:
1279    *     <p>parent=projects/example-project/locations/europe-west3
1280    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1281    */
listInspectTemplates(LocationName parent)1282   public final ListInspectTemplatesPagedResponse listInspectTemplates(LocationName parent) {
1283     ListInspectTemplatesRequest request =
1284         ListInspectTemplatesRequest.newBuilder()
1285             .setParent(parent == null ? null : parent.toString())
1286             .build();
1287     return listInspectTemplates(request);
1288   }
1289 
1290   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1291   /**
1292    * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1293    *
1294    * <p>Sample code:
1295    *
1296    * <pre>{@code
1297    * // This snippet has been automatically generated and should be regarded as a code template only.
1298    * // It will require modifications to work:
1299    * // - It may require correct/in-range values for request initialization.
1300    * // - It may require specifying regional endpoints when creating the service client as shown in
1301    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1302    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1303    *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
1304    *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
1305    *     // doThingsWith(element);
1306    *   }
1307    * }
1308    * }</pre>
1309    *
1310    * @param parent Required. Parent resource name.
1311    *     <p>The format of this value varies depending on the scope of the request (project or
1312    *     organization) and whether you have [specified a processing
1313    *     location](https://cloud.google.com/dlp/docs/specifying-location):
1314    *     <p>+ Projects scope, location specified:&lt;br/&gt;
1315    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1316    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
1317    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
1318    *     specified:&lt;br/&gt;
1319    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1320    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
1321    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
1322    *     <p>The following example `parent` string specifies a parent project with the identifier
1323    *     `example-project`, and specifies the `europe-west3` location for processing data:
1324    *     <p>parent=projects/example-project/locations/europe-west3
1325    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1326    */
listInspectTemplates( OrganizationLocationName parent)1327   public final ListInspectTemplatesPagedResponse listInspectTemplates(
1328       OrganizationLocationName parent) {
1329     ListInspectTemplatesRequest request =
1330         ListInspectTemplatesRequest.newBuilder()
1331             .setParent(parent == null ? null : parent.toString())
1332             .build();
1333     return listInspectTemplates(request);
1334   }
1335 
1336   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1337   /**
1338    * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1339    *
1340    * <p>Sample code:
1341    *
1342    * <pre>{@code
1343    * // This snippet has been automatically generated and should be regarded as a code template only.
1344    * // It will require modifications to work:
1345    * // - It may require correct/in-range values for request initialization.
1346    * // - It may require specifying regional endpoints when creating the service client as shown in
1347    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1348    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1349    *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
1350    *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
1351    *     // doThingsWith(element);
1352    *   }
1353    * }
1354    * }</pre>
1355    *
1356    * @param parent Required. Parent resource name.
1357    *     <p>The format of this value varies depending on the scope of the request (project or
1358    *     organization) and whether you have [specified a processing
1359    *     location](https://cloud.google.com/dlp/docs/specifying-location):
1360    *     <p>+ Projects scope, location specified:&lt;br/&gt;
1361    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1362    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
1363    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
1364    *     specified:&lt;br/&gt;
1365    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1366    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
1367    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
1368    *     <p>The following example `parent` string specifies a parent project with the identifier
1369    *     `example-project`, and specifies the `europe-west3` location for processing data:
1370    *     <p>parent=projects/example-project/locations/europe-west3
1371    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1372    */
listInspectTemplates(OrganizationName parent)1373   public final ListInspectTemplatesPagedResponse listInspectTemplates(OrganizationName parent) {
1374     ListInspectTemplatesRequest request =
1375         ListInspectTemplatesRequest.newBuilder()
1376             .setParent(parent == null ? null : parent.toString())
1377             .build();
1378     return listInspectTemplates(request);
1379   }
1380 
1381   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1382   /**
1383    * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1384    *
1385    * <p>Sample code:
1386    *
1387    * <pre>{@code
1388    * // This snippet has been automatically generated and should be regarded as a code template only.
1389    * // It will require modifications to work:
1390    * // - It may require correct/in-range values for request initialization.
1391    * // - It may require specifying regional endpoints when creating the service client as shown in
1392    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1393    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1394    *   ProjectName parent = ProjectName.of("[PROJECT]");
1395    *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
1396    *     // doThingsWith(element);
1397    *   }
1398    * }
1399    * }</pre>
1400    *
1401    * @param parent Required. Parent resource name.
1402    *     <p>The format of this value varies depending on the scope of the request (project or
1403    *     organization) and whether you have [specified a processing
1404    *     location](https://cloud.google.com/dlp/docs/specifying-location):
1405    *     <p>+ Projects scope, location specified:&lt;br/&gt;
1406    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1407    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
1408    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
1409    *     specified:&lt;br/&gt;
1410    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1411    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
1412    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
1413    *     <p>The following example `parent` string specifies a parent project with the identifier
1414    *     `example-project`, and specifies the `europe-west3` location for processing data:
1415    *     <p>parent=projects/example-project/locations/europe-west3
1416    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1417    */
listInspectTemplates(ProjectName parent)1418   public final ListInspectTemplatesPagedResponse listInspectTemplates(ProjectName parent) {
1419     ListInspectTemplatesRequest request =
1420         ListInspectTemplatesRequest.newBuilder()
1421             .setParent(parent == null ? null : parent.toString())
1422             .build();
1423     return listInspectTemplates(request);
1424   }
1425 
1426   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1427   /**
1428    * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1429    *
1430    * <p>Sample code:
1431    *
1432    * <pre>{@code
1433    * // This snippet has been automatically generated and should be regarded as a code template only.
1434    * // It will require modifications to work:
1435    * // - It may require correct/in-range values for request initialization.
1436    * // - It may require specifying regional endpoints when creating the service client as shown in
1437    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1438    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1439    *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
1440    *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
1441    *     // doThingsWith(element);
1442    *   }
1443    * }
1444    * }</pre>
1445    *
1446    * @param parent Required. Parent resource name.
1447    *     <p>The format of this value varies depending on the scope of the request (project or
1448    *     organization) and whether you have [specified a processing
1449    *     location](https://cloud.google.com/dlp/docs/specifying-location):
1450    *     <p>+ Projects scope, location specified:&lt;br/&gt;
1451    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1452    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
1453    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
1454    *     specified:&lt;br/&gt;
1455    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1456    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
1457    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
1458    *     <p>The following example `parent` string specifies a parent project with the identifier
1459    *     `example-project`, and specifies the `europe-west3` location for processing data:
1460    *     <p>parent=projects/example-project/locations/europe-west3
1461    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1462    */
listInspectTemplates(String parent)1463   public final ListInspectTemplatesPagedResponse listInspectTemplates(String parent) {
1464     ListInspectTemplatesRequest request =
1465         ListInspectTemplatesRequest.newBuilder().setParent(parent).build();
1466     return listInspectTemplates(request);
1467   }
1468 
1469   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1470   /**
1471    * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1472    *
1473    * <p>Sample code:
1474    *
1475    * <pre>{@code
1476    * // This snippet has been automatically generated and should be regarded as a code template only.
1477    * // It will require modifications to work:
1478    * // - It may require correct/in-range values for request initialization.
1479    * // - It may require specifying regional endpoints when creating the service client as shown in
1480    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1481    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1482    *   ListInspectTemplatesRequest request =
1483    *       ListInspectTemplatesRequest.newBuilder()
1484    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
1485    *           .setPageToken("pageToken873572522")
1486    *           .setPageSize(883849137)
1487    *           .setOrderBy("orderBy-1207110587")
1488    *           .setLocationId("locationId1541836720")
1489    *           .build();
1490    *   for (InspectTemplate element : dlpServiceClient.listInspectTemplates(request).iterateAll()) {
1491    *     // doThingsWith(element);
1492    *   }
1493    * }
1494    * }</pre>
1495    *
1496    * @param request The request object containing all of the parameters for the API call.
1497    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1498    */
listInspectTemplates( ListInspectTemplatesRequest request)1499   public final ListInspectTemplatesPagedResponse listInspectTemplates(
1500       ListInspectTemplatesRequest request) {
1501     return listInspectTemplatesPagedCallable().call(request);
1502   }
1503 
1504   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1505   /**
1506    * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1507    *
1508    * <p>Sample code:
1509    *
1510    * <pre>{@code
1511    * // This snippet has been automatically generated and should be regarded as a code template only.
1512    * // It will require modifications to work:
1513    * // - It may require correct/in-range values for request initialization.
1514    * // - It may require specifying regional endpoints when creating the service client as shown in
1515    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1516    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1517    *   ListInspectTemplatesRequest request =
1518    *       ListInspectTemplatesRequest.newBuilder()
1519    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
1520    *           .setPageToken("pageToken873572522")
1521    *           .setPageSize(883849137)
1522    *           .setOrderBy("orderBy-1207110587")
1523    *           .setLocationId("locationId1541836720")
1524    *           .build();
1525    *   ApiFuture<InspectTemplate> future =
1526    *       dlpServiceClient.listInspectTemplatesPagedCallable().futureCall(request);
1527    *   // Do something.
1528    *   for (InspectTemplate element : future.get().iterateAll()) {
1529    *     // doThingsWith(element);
1530    *   }
1531    * }
1532    * }</pre>
1533    */
1534   public final UnaryCallable<ListInspectTemplatesRequest, ListInspectTemplatesPagedResponse>
listInspectTemplatesPagedCallable()1535       listInspectTemplatesPagedCallable() {
1536     return stub.listInspectTemplatesPagedCallable();
1537   }
1538 
1539   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1540   /**
1541    * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1542    *
1543    * <p>Sample code:
1544    *
1545    * <pre>{@code
1546    * // This snippet has been automatically generated and should be regarded as a code template only.
1547    * // It will require modifications to work:
1548    * // - It may require correct/in-range values for request initialization.
1549    * // - It may require specifying regional endpoints when creating the service client as shown in
1550    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1551    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1552    *   ListInspectTemplatesRequest request =
1553    *       ListInspectTemplatesRequest.newBuilder()
1554    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
1555    *           .setPageToken("pageToken873572522")
1556    *           .setPageSize(883849137)
1557    *           .setOrderBy("orderBy-1207110587")
1558    *           .setLocationId("locationId1541836720")
1559    *           .build();
1560    *   while (true) {
1561    *     ListInspectTemplatesResponse response =
1562    *         dlpServiceClient.listInspectTemplatesCallable().call(request);
1563    *     for (InspectTemplate element : response.getInspectTemplatesList()) {
1564    *       // doThingsWith(element);
1565    *     }
1566    *     String nextPageToken = response.getNextPageToken();
1567    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
1568    *       request = request.toBuilder().setPageToken(nextPageToken).build();
1569    *     } else {
1570    *       break;
1571    *     }
1572    *   }
1573    * }
1574    * }</pre>
1575    */
1576   public final UnaryCallable<ListInspectTemplatesRequest, ListInspectTemplatesResponse>
listInspectTemplatesCallable()1577       listInspectTemplatesCallable() {
1578     return stub.listInspectTemplatesCallable();
1579   }
1580 
1581   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1582   /**
1583    * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
1584    * more.
1585    *
1586    * <p>Sample code:
1587    *
1588    * <pre>{@code
1589    * // This snippet has been automatically generated and should be regarded as a code template only.
1590    * // It will require modifications to work:
1591    * // - It may require correct/in-range values for request initialization.
1592    * // - It may require specifying regional endpoints when creating the service client as shown in
1593    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1594    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1595    *   InspectTemplateName name =
1596    *       InspectTemplateName.ofOrganizationInspectTemplateName(
1597    *           "[ORGANIZATION]", "[INSPECT_TEMPLATE]");
1598    *   dlpServiceClient.deleteInspectTemplate(name);
1599    * }
1600    * }</pre>
1601    *
1602    * @param name Required. Resource name of the organization and inspectTemplate to be deleted, for
1603    *     example `organizations/433245324/inspectTemplates/432452342` or
1604    *     projects/project-id/inspectTemplates/432452342.
1605    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1606    */
deleteInspectTemplate(InspectTemplateName name)1607   public final void deleteInspectTemplate(InspectTemplateName name) {
1608     DeleteInspectTemplateRequest request =
1609         DeleteInspectTemplateRequest.newBuilder()
1610             .setName(name == null ? null : name.toString())
1611             .build();
1612     deleteInspectTemplate(request);
1613   }
1614 
1615   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1616   /**
1617    * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
1618    * more.
1619    *
1620    * <p>Sample code:
1621    *
1622    * <pre>{@code
1623    * // This snippet has been automatically generated and should be regarded as a code template only.
1624    * // It will require modifications to work:
1625    * // - It may require correct/in-range values for request initialization.
1626    * // - It may require specifying regional endpoints when creating the service client as shown in
1627    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1628    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1629    *   String name =
1630    *       InspectTemplateName.ofOrganizationInspectTemplateName(
1631    *               "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
1632    *           .toString();
1633    *   dlpServiceClient.deleteInspectTemplate(name);
1634    * }
1635    * }</pre>
1636    *
1637    * @param name Required. Resource name of the organization and inspectTemplate to be deleted, for
1638    *     example `organizations/433245324/inspectTemplates/432452342` or
1639    *     projects/project-id/inspectTemplates/432452342.
1640    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1641    */
deleteInspectTemplate(String name)1642   public final void deleteInspectTemplate(String name) {
1643     DeleteInspectTemplateRequest request =
1644         DeleteInspectTemplateRequest.newBuilder().setName(name).build();
1645     deleteInspectTemplate(request);
1646   }
1647 
1648   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1649   /**
1650    * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
1651    * more.
1652    *
1653    * <p>Sample code:
1654    *
1655    * <pre>{@code
1656    * // This snippet has been automatically generated and should be regarded as a code template only.
1657    * // It will require modifications to work:
1658    * // - It may require correct/in-range values for request initialization.
1659    * // - It may require specifying regional endpoints when creating the service client as shown in
1660    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1661    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1662    *   DeleteInspectTemplateRequest request =
1663    *       DeleteInspectTemplateRequest.newBuilder()
1664    *           .setName(
1665    *               InspectTemplateName.ofOrganizationInspectTemplateName(
1666    *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
1667    *                   .toString())
1668    *           .build();
1669    *   dlpServiceClient.deleteInspectTemplate(request);
1670    * }
1671    * }</pre>
1672    *
1673    * @param request The request object containing all of the parameters for the API call.
1674    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1675    */
deleteInspectTemplate(DeleteInspectTemplateRequest request)1676   public final void deleteInspectTemplate(DeleteInspectTemplateRequest request) {
1677     deleteInspectTemplateCallable().call(request);
1678   }
1679 
1680   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1681   /**
1682    * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
1683    * more.
1684    *
1685    * <p>Sample code:
1686    *
1687    * <pre>{@code
1688    * // This snippet has been automatically generated and should be regarded as a code template only.
1689    * // It will require modifications to work:
1690    * // - It may require correct/in-range values for request initialization.
1691    * // - It may require specifying regional endpoints when creating the service client as shown in
1692    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1693    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1694    *   DeleteInspectTemplateRequest request =
1695    *       DeleteInspectTemplateRequest.newBuilder()
1696    *           .setName(
1697    *               InspectTemplateName.ofOrganizationInspectTemplateName(
1698    *                       "[ORGANIZATION]", "[INSPECT_TEMPLATE]")
1699    *                   .toString())
1700    *           .build();
1701    *   ApiFuture<Empty> future =
1702    *       dlpServiceClient.deleteInspectTemplateCallable().futureCall(request);
1703    *   // Do something.
1704    *   future.get();
1705    * }
1706    * }</pre>
1707    */
deleteInspectTemplateCallable()1708   public final UnaryCallable<DeleteInspectTemplateRequest, Empty> deleteInspectTemplateCallable() {
1709     return stub.deleteInspectTemplateCallable();
1710   }
1711 
1712   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1713   /**
1714    * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying
1715    * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
1716    * learn more.
1717    *
1718    * <p>Sample code:
1719    *
1720    * <pre>{@code
1721    * // This snippet has been automatically generated and should be regarded as a code template only.
1722    * // It will require modifications to work:
1723    * // - It may require correct/in-range values for request initialization.
1724    * // - It may require specifying regional endpoints when creating the service client as shown in
1725    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1726    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1727    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
1728    *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
1729    *   DeidentifyTemplate response =
1730    *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
1731    * }
1732    * }</pre>
1733    *
1734    * @param parent Required. Parent resource name.
1735    *     <p>The format of this value varies depending on the scope of the request (project or
1736    *     organization) and whether you have [specified a processing
1737    *     location](https://cloud.google.com/dlp/docs/specifying-location):
1738    *     <p>+ Projects scope, location specified:&lt;br/&gt;
1739    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1740    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
1741    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
1742    *     specified:&lt;br/&gt;
1743    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1744    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
1745    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
1746    *     <p>The following example `parent` string specifies a parent project with the identifier
1747    *     `example-project`, and specifies the `europe-west3` location for processing data:
1748    *     <p>parent=projects/example-project/locations/europe-west3
1749    * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
1750    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1751    */
createDeidentifyTemplate( LocationName parent, DeidentifyTemplate deidentifyTemplate)1752   public final DeidentifyTemplate createDeidentifyTemplate(
1753       LocationName parent, DeidentifyTemplate deidentifyTemplate) {
1754     CreateDeidentifyTemplateRequest request =
1755         CreateDeidentifyTemplateRequest.newBuilder()
1756             .setParent(parent == null ? null : parent.toString())
1757             .setDeidentifyTemplate(deidentifyTemplate)
1758             .build();
1759     return createDeidentifyTemplate(request);
1760   }
1761 
1762   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1763   /**
1764    * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying
1765    * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
1766    * learn more.
1767    *
1768    * <p>Sample code:
1769    *
1770    * <pre>{@code
1771    * // This snippet has been automatically generated and should be regarded as a code template only.
1772    * // It will require modifications to work:
1773    * // - It may require correct/in-range values for request initialization.
1774    * // - It may require specifying regional endpoints when creating the service client as shown in
1775    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1776    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1777    *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
1778    *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
1779    *   DeidentifyTemplate response =
1780    *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
1781    * }
1782    * }</pre>
1783    *
1784    * @param parent Required. Parent resource name.
1785    *     <p>The format of this value varies depending on the scope of the request (project or
1786    *     organization) and whether you have [specified a processing
1787    *     location](https://cloud.google.com/dlp/docs/specifying-location):
1788    *     <p>+ Projects scope, location specified:&lt;br/&gt;
1789    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1790    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
1791    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
1792    *     specified:&lt;br/&gt;
1793    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1794    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
1795    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
1796    *     <p>The following example `parent` string specifies a parent project with the identifier
1797    *     `example-project`, and specifies the `europe-west3` location for processing data:
1798    *     <p>parent=projects/example-project/locations/europe-west3
1799    * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
1800    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1801    */
createDeidentifyTemplate( OrganizationLocationName parent, DeidentifyTemplate deidentifyTemplate)1802   public final DeidentifyTemplate createDeidentifyTemplate(
1803       OrganizationLocationName parent, DeidentifyTemplate deidentifyTemplate) {
1804     CreateDeidentifyTemplateRequest request =
1805         CreateDeidentifyTemplateRequest.newBuilder()
1806             .setParent(parent == null ? null : parent.toString())
1807             .setDeidentifyTemplate(deidentifyTemplate)
1808             .build();
1809     return createDeidentifyTemplate(request);
1810   }
1811 
1812   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1813   /**
1814    * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying
1815    * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
1816    * learn more.
1817    *
1818    * <p>Sample code:
1819    *
1820    * <pre>{@code
1821    * // This snippet has been automatically generated and should be regarded as a code template only.
1822    * // It will require modifications to work:
1823    * // - It may require correct/in-range values for request initialization.
1824    * // - It may require specifying regional endpoints when creating the service client as shown in
1825    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1826    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1827    *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
1828    *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
1829    *   DeidentifyTemplate response =
1830    *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
1831    * }
1832    * }</pre>
1833    *
1834    * @param parent Required. Parent resource name.
1835    *     <p>The format of this value varies depending on the scope of the request (project or
1836    *     organization) and whether you have [specified a processing
1837    *     location](https://cloud.google.com/dlp/docs/specifying-location):
1838    *     <p>+ Projects scope, location specified:&lt;br/&gt;
1839    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1840    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
1841    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
1842    *     specified:&lt;br/&gt;
1843    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1844    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
1845    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
1846    *     <p>The following example `parent` string specifies a parent project with the identifier
1847    *     `example-project`, and specifies the `europe-west3` location for processing data:
1848    *     <p>parent=projects/example-project/locations/europe-west3
1849    * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
1850    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1851    */
createDeidentifyTemplate( OrganizationName parent, DeidentifyTemplate deidentifyTemplate)1852   public final DeidentifyTemplate createDeidentifyTemplate(
1853       OrganizationName parent, DeidentifyTemplate deidentifyTemplate) {
1854     CreateDeidentifyTemplateRequest request =
1855         CreateDeidentifyTemplateRequest.newBuilder()
1856             .setParent(parent == null ? null : parent.toString())
1857             .setDeidentifyTemplate(deidentifyTemplate)
1858             .build();
1859     return createDeidentifyTemplate(request);
1860   }
1861 
1862   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1863   /**
1864    * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying
1865    * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
1866    * learn more.
1867    *
1868    * <p>Sample code:
1869    *
1870    * <pre>{@code
1871    * // This snippet has been automatically generated and should be regarded as a code template only.
1872    * // It will require modifications to work:
1873    * // - It may require correct/in-range values for request initialization.
1874    * // - It may require specifying regional endpoints when creating the service client as shown in
1875    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1876    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1877    *   ProjectName parent = ProjectName.of("[PROJECT]");
1878    *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
1879    *   DeidentifyTemplate response =
1880    *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
1881    * }
1882    * }</pre>
1883    *
1884    * @param parent Required. Parent resource name.
1885    *     <p>The format of this value varies depending on the scope of the request (project or
1886    *     organization) and whether you have [specified a processing
1887    *     location](https://cloud.google.com/dlp/docs/specifying-location):
1888    *     <p>+ Projects scope, location specified:&lt;br/&gt;
1889    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1890    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
1891    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
1892    *     specified:&lt;br/&gt;
1893    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1894    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
1895    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
1896    *     <p>The following example `parent` string specifies a parent project with the identifier
1897    *     `example-project`, and specifies the `europe-west3` location for processing data:
1898    *     <p>parent=projects/example-project/locations/europe-west3
1899    * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
1900    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1901    */
createDeidentifyTemplate( ProjectName parent, DeidentifyTemplate deidentifyTemplate)1902   public final DeidentifyTemplate createDeidentifyTemplate(
1903       ProjectName parent, DeidentifyTemplate deidentifyTemplate) {
1904     CreateDeidentifyTemplateRequest request =
1905         CreateDeidentifyTemplateRequest.newBuilder()
1906             .setParent(parent == null ? null : parent.toString())
1907             .setDeidentifyTemplate(deidentifyTemplate)
1908             .build();
1909     return createDeidentifyTemplate(request);
1910   }
1911 
1912   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1913   /**
1914    * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying
1915    * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
1916    * learn more.
1917    *
1918    * <p>Sample code:
1919    *
1920    * <pre>{@code
1921    * // This snippet has been automatically generated and should be regarded as a code template only.
1922    * // It will require modifications to work:
1923    * // - It may require correct/in-range values for request initialization.
1924    * // - It may require specifying regional endpoints when creating the service client as shown in
1925    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1926    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1927    *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
1928    *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
1929    *   DeidentifyTemplate response =
1930    *       dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
1931    * }
1932    * }</pre>
1933    *
1934    * @param parent Required. Parent resource name.
1935    *     <p>The format of this value varies depending on the scope of the request (project or
1936    *     organization) and whether you have [specified a processing
1937    *     location](https://cloud.google.com/dlp/docs/specifying-location):
1938    *     <p>+ Projects scope, location specified:&lt;br/&gt;
1939    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1940    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
1941    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
1942    *     specified:&lt;br/&gt;
1943    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
1944    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
1945    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
1946    *     <p>The following example `parent` string specifies a parent project with the identifier
1947    *     `example-project`, and specifies the `europe-west3` location for processing data:
1948    *     <p>parent=projects/example-project/locations/europe-west3
1949    * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
1950    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1951    */
createDeidentifyTemplate( String parent, DeidentifyTemplate deidentifyTemplate)1952   public final DeidentifyTemplate createDeidentifyTemplate(
1953       String parent, DeidentifyTemplate deidentifyTemplate) {
1954     CreateDeidentifyTemplateRequest request =
1955         CreateDeidentifyTemplateRequest.newBuilder()
1956             .setParent(parent)
1957             .setDeidentifyTemplate(deidentifyTemplate)
1958             .build();
1959     return createDeidentifyTemplate(request);
1960   }
1961 
1962   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1963   /**
1964    * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying
1965    * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
1966    * learn more.
1967    *
1968    * <p>Sample code:
1969    *
1970    * <pre>{@code
1971    * // This snippet has been automatically generated and should be regarded as a code template only.
1972    * // It will require modifications to work:
1973    * // - It may require correct/in-range values for request initialization.
1974    * // - It may require specifying regional endpoints when creating the service client as shown in
1975    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1976    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
1977    *   CreateDeidentifyTemplateRequest request =
1978    *       CreateDeidentifyTemplateRequest.newBuilder()
1979    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
1980    *           .setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
1981    *           .setTemplateId("templateId1304010549")
1982    *           .setLocationId("locationId1541836720")
1983    *           .build();
1984    *   DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(request);
1985    * }
1986    * }</pre>
1987    *
1988    * @param request The request object containing all of the parameters for the API call.
1989    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1990    */
createDeidentifyTemplate( CreateDeidentifyTemplateRequest request)1991   public final DeidentifyTemplate createDeidentifyTemplate(
1992       CreateDeidentifyTemplateRequest request) {
1993     return createDeidentifyTemplateCallable().call(request);
1994   }
1995 
1996   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1997   /**
1998    * Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying
1999    * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2000    * learn more.
2001    *
2002    * <p>Sample code:
2003    *
2004    * <pre>{@code
2005    * // This snippet has been automatically generated and should be regarded as a code template only.
2006    * // It will require modifications to work:
2007    * // - It may require correct/in-range values for request initialization.
2008    * // - It may require specifying regional endpoints when creating the service client as shown in
2009    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2010    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2011    *   CreateDeidentifyTemplateRequest request =
2012    *       CreateDeidentifyTemplateRequest.newBuilder()
2013    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
2014    *           .setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
2015    *           .setTemplateId("templateId1304010549")
2016    *           .setLocationId("locationId1541836720")
2017    *           .build();
2018    *   ApiFuture<DeidentifyTemplate> future =
2019    *       dlpServiceClient.createDeidentifyTemplateCallable().futureCall(request);
2020    *   // Do something.
2021    *   DeidentifyTemplate response = future.get();
2022    * }
2023    * }</pre>
2024    */
2025   public final UnaryCallable<CreateDeidentifyTemplateRequest, DeidentifyTemplate>
createDeidentifyTemplateCallable()2026       createDeidentifyTemplateCallable() {
2027     return stub.createDeidentifyTemplateCallable();
2028   }
2029 
2030   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2031   /**
2032    * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid
2033    * to learn more.
2034    *
2035    * <p>Sample code:
2036    *
2037    * <pre>{@code
2038    * // This snippet has been automatically generated and should be regarded as a code template only.
2039    * // It will require modifications to work:
2040    * // - It may require correct/in-range values for request initialization.
2041    * // - It may require specifying regional endpoints when creating the service client as shown in
2042    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2043    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2044    *   DeidentifyTemplateName name =
2045    *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
2046    *           "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
2047    *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
2048    *   FieldMask updateMask = FieldMask.newBuilder().build();
2049    *   DeidentifyTemplate response =
2050    *       dlpServiceClient.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask);
2051    * }
2052    * }</pre>
2053    *
2054    * @param name Required. Resource name of organization and deidentify template to be updated, for
2055    *     example `organizations/433245324/deidentifyTemplates/432452342` or
2056    *     projects/project-id/deidentifyTemplates/432452342.
2057    * @param deidentifyTemplate New DeidentifyTemplate value.
2058    * @param updateMask Mask to control which fields get updated.
2059    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2060    */
updateDeidentifyTemplate( DeidentifyTemplateName name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask)2061   public final DeidentifyTemplate updateDeidentifyTemplate(
2062       DeidentifyTemplateName name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask) {
2063     UpdateDeidentifyTemplateRequest request =
2064         UpdateDeidentifyTemplateRequest.newBuilder()
2065             .setName(name == null ? null : name.toString())
2066             .setDeidentifyTemplate(deidentifyTemplate)
2067             .setUpdateMask(updateMask)
2068             .build();
2069     return updateDeidentifyTemplate(request);
2070   }
2071 
2072   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2073   /**
2074    * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid
2075    * to learn more.
2076    *
2077    * <p>Sample code:
2078    *
2079    * <pre>{@code
2080    * // This snippet has been automatically generated and should be regarded as a code template only.
2081    * // It will require modifications to work:
2082    * // - It may require correct/in-range values for request initialization.
2083    * // - It may require specifying regional endpoints when creating the service client as shown in
2084    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2085    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2086    *   String name =
2087    *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
2088    *               "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
2089    *           .toString();
2090    *   DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
2091    *   FieldMask updateMask = FieldMask.newBuilder().build();
2092    *   DeidentifyTemplate response =
2093    *       dlpServiceClient.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask);
2094    * }
2095    * }</pre>
2096    *
2097    * @param name Required. Resource name of organization and deidentify template to be updated, for
2098    *     example `organizations/433245324/deidentifyTemplates/432452342` or
2099    *     projects/project-id/deidentifyTemplates/432452342.
2100    * @param deidentifyTemplate New DeidentifyTemplate value.
2101    * @param updateMask Mask to control which fields get updated.
2102    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2103    */
updateDeidentifyTemplate( String name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask)2104   public final DeidentifyTemplate updateDeidentifyTemplate(
2105       String name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask) {
2106     UpdateDeidentifyTemplateRequest request =
2107         UpdateDeidentifyTemplateRequest.newBuilder()
2108             .setName(name)
2109             .setDeidentifyTemplate(deidentifyTemplate)
2110             .setUpdateMask(updateMask)
2111             .build();
2112     return updateDeidentifyTemplate(request);
2113   }
2114 
2115   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2116   /**
2117    * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid
2118    * to learn more.
2119    *
2120    * <p>Sample code:
2121    *
2122    * <pre>{@code
2123    * // This snippet has been automatically generated and should be regarded as a code template only.
2124    * // It will require modifications to work:
2125    * // - It may require correct/in-range values for request initialization.
2126    * // - It may require specifying regional endpoints when creating the service client as shown in
2127    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2128    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2129    *   UpdateDeidentifyTemplateRequest request =
2130    *       UpdateDeidentifyTemplateRequest.newBuilder()
2131    *           .setName(
2132    *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
2133    *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
2134    *                   .toString())
2135    *           .setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
2136    *           .setUpdateMask(FieldMask.newBuilder().build())
2137    *           .build();
2138    *   DeidentifyTemplate response = dlpServiceClient.updateDeidentifyTemplate(request);
2139    * }
2140    * }</pre>
2141    *
2142    * @param request The request object containing all of the parameters for the API call.
2143    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2144    */
updateDeidentifyTemplate( UpdateDeidentifyTemplateRequest request)2145   public final DeidentifyTemplate updateDeidentifyTemplate(
2146       UpdateDeidentifyTemplateRequest request) {
2147     return updateDeidentifyTemplateCallable().call(request);
2148   }
2149 
2150   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2151   /**
2152    * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid
2153    * to learn more.
2154    *
2155    * <p>Sample code:
2156    *
2157    * <pre>{@code
2158    * // This snippet has been automatically generated and should be regarded as a code template only.
2159    * // It will require modifications to work:
2160    * // - It may require correct/in-range values for request initialization.
2161    * // - It may require specifying regional endpoints when creating the service client as shown in
2162    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2163    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2164    *   UpdateDeidentifyTemplateRequest request =
2165    *       UpdateDeidentifyTemplateRequest.newBuilder()
2166    *           .setName(
2167    *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
2168    *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
2169    *                   .toString())
2170    *           .setDeidentifyTemplate(DeidentifyTemplate.newBuilder().build())
2171    *           .setUpdateMask(FieldMask.newBuilder().build())
2172    *           .build();
2173    *   ApiFuture<DeidentifyTemplate> future =
2174    *       dlpServiceClient.updateDeidentifyTemplateCallable().futureCall(request);
2175    *   // Do something.
2176    *   DeidentifyTemplate response = future.get();
2177    * }
2178    * }</pre>
2179    */
2180   public final UnaryCallable<UpdateDeidentifyTemplateRequest, DeidentifyTemplate>
updateDeidentifyTemplateCallable()2181       updateDeidentifyTemplateCallable() {
2182     return stub.updateDeidentifyTemplateCallable();
2183   }
2184 
2185   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2186   /**
2187    * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2188    * learn more.
2189    *
2190    * <p>Sample code:
2191    *
2192    * <pre>{@code
2193    * // This snippet has been automatically generated and should be regarded as a code template only.
2194    * // It will require modifications to work:
2195    * // - It may require correct/in-range values for request initialization.
2196    * // - It may require specifying regional endpoints when creating the service client as shown in
2197    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2198    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2199    *   DeidentifyTemplateName name =
2200    *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
2201    *           "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
2202    *   DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(name);
2203    * }
2204    * }</pre>
2205    *
2206    * @param name Required. Resource name of the organization and deidentify template to be read, for
2207    *     example `organizations/433245324/deidentifyTemplates/432452342` or
2208    *     projects/project-id/deidentifyTemplates/432452342.
2209    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2210    */
getDeidentifyTemplate(DeidentifyTemplateName name)2211   public final DeidentifyTemplate getDeidentifyTemplate(DeidentifyTemplateName name) {
2212     GetDeidentifyTemplateRequest request =
2213         GetDeidentifyTemplateRequest.newBuilder()
2214             .setName(name == null ? null : name.toString())
2215             .build();
2216     return getDeidentifyTemplate(request);
2217   }
2218 
2219   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2220   /**
2221    * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2222    * learn more.
2223    *
2224    * <p>Sample code:
2225    *
2226    * <pre>{@code
2227    * // This snippet has been automatically generated and should be regarded as a code template only.
2228    * // It will require modifications to work:
2229    * // - It may require correct/in-range values for request initialization.
2230    * // - It may require specifying regional endpoints when creating the service client as shown in
2231    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2232    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2233    *   String name =
2234    *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
2235    *               "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
2236    *           .toString();
2237    *   DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(name);
2238    * }
2239    * }</pre>
2240    *
2241    * @param name Required. Resource name of the organization and deidentify template to be read, for
2242    *     example `organizations/433245324/deidentifyTemplates/432452342` or
2243    *     projects/project-id/deidentifyTemplates/432452342.
2244    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2245    */
getDeidentifyTemplate(String name)2246   public final DeidentifyTemplate getDeidentifyTemplate(String name) {
2247     GetDeidentifyTemplateRequest request =
2248         GetDeidentifyTemplateRequest.newBuilder().setName(name).build();
2249     return getDeidentifyTemplate(request);
2250   }
2251 
2252   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2253   /**
2254    * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2255    * learn more.
2256    *
2257    * <p>Sample code:
2258    *
2259    * <pre>{@code
2260    * // This snippet has been automatically generated and should be regarded as a code template only.
2261    * // It will require modifications to work:
2262    * // - It may require correct/in-range values for request initialization.
2263    * // - It may require specifying regional endpoints when creating the service client as shown in
2264    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2265    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2266    *   GetDeidentifyTemplateRequest request =
2267    *       GetDeidentifyTemplateRequest.newBuilder()
2268    *           .setName(
2269    *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
2270    *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
2271    *                   .toString())
2272    *           .build();
2273    *   DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(request);
2274    * }
2275    * }</pre>
2276    *
2277    * @param request The request object containing all of the parameters for the API call.
2278    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2279    */
getDeidentifyTemplate(GetDeidentifyTemplateRequest request)2280   public final DeidentifyTemplate getDeidentifyTemplate(GetDeidentifyTemplateRequest request) {
2281     return getDeidentifyTemplateCallable().call(request);
2282   }
2283 
2284   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2285   /**
2286    * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2287    * learn more.
2288    *
2289    * <p>Sample code:
2290    *
2291    * <pre>{@code
2292    * // This snippet has been automatically generated and should be regarded as a code template only.
2293    * // It will require modifications to work:
2294    * // - It may require correct/in-range values for request initialization.
2295    * // - It may require specifying regional endpoints when creating the service client as shown in
2296    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2297    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2298    *   GetDeidentifyTemplateRequest request =
2299    *       GetDeidentifyTemplateRequest.newBuilder()
2300    *           .setName(
2301    *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
2302    *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
2303    *                   .toString())
2304    *           .build();
2305    *   ApiFuture<DeidentifyTemplate> future =
2306    *       dlpServiceClient.getDeidentifyTemplateCallable().futureCall(request);
2307    *   // Do something.
2308    *   DeidentifyTemplate response = future.get();
2309    * }
2310    * }</pre>
2311    */
2312   public final UnaryCallable<GetDeidentifyTemplateRequest, DeidentifyTemplate>
getDeidentifyTemplateCallable()2313       getDeidentifyTemplateCallable() {
2314     return stub.getDeidentifyTemplateCallable();
2315   }
2316 
2317   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2318   /**
2319    * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2320    * learn more.
2321    *
2322    * <p>Sample code:
2323    *
2324    * <pre>{@code
2325    * // This snippet has been automatically generated and should be regarded as a code template only.
2326    * // It will require modifications to work:
2327    * // - It may require correct/in-range values for request initialization.
2328    * // - It may require specifying regional endpoints when creating the service client as shown in
2329    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2330    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2331    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
2332    *   for (DeidentifyTemplate element :
2333    *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
2334    *     // doThingsWith(element);
2335    *   }
2336    * }
2337    * }</pre>
2338    *
2339    * @param parent Required. Parent resource name.
2340    *     <p>The format of this value varies depending on the scope of the request (project or
2341    *     organization) and whether you have [specified a processing
2342    *     location](https://cloud.google.com/dlp/docs/specifying-location):
2343    *     <p>+ Projects scope, location specified:&lt;br/&gt;
2344    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2345    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2346    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
2347    *     specified:&lt;br/&gt;
2348    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2349    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
2350    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
2351    *     <p>The following example `parent` string specifies a parent project with the identifier
2352    *     `example-project`, and specifies the `europe-west3` location for processing data:
2353    *     <p>parent=projects/example-project/locations/europe-west3
2354    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2355    */
listDeidentifyTemplates(LocationName parent)2356   public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(LocationName parent) {
2357     ListDeidentifyTemplatesRequest request =
2358         ListDeidentifyTemplatesRequest.newBuilder()
2359             .setParent(parent == null ? null : parent.toString())
2360             .build();
2361     return listDeidentifyTemplates(request);
2362   }
2363 
2364   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2365   /**
2366    * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2367    * learn more.
2368    *
2369    * <p>Sample code:
2370    *
2371    * <pre>{@code
2372    * // This snippet has been automatically generated and should be regarded as a code template only.
2373    * // It will require modifications to work:
2374    * // - It may require correct/in-range values for request initialization.
2375    * // - It may require specifying regional endpoints when creating the service client as shown in
2376    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2377    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2378    *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
2379    *   for (DeidentifyTemplate element :
2380    *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
2381    *     // doThingsWith(element);
2382    *   }
2383    * }
2384    * }</pre>
2385    *
2386    * @param parent Required. Parent resource name.
2387    *     <p>The format of this value varies depending on the scope of the request (project or
2388    *     organization) and whether you have [specified a processing
2389    *     location](https://cloud.google.com/dlp/docs/specifying-location):
2390    *     <p>+ Projects scope, location specified:&lt;br/&gt;
2391    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2392    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2393    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
2394    *     specified:&lt;br/&gt;
2395    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2396    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
2397    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
2398    *     <p>The following example `parent` string specifies a parent project with the identifier
2399    *     `example-project`, and specifies the `europe-west3` location for processing data:
2400    *     <p>parent=projects/example-project/locations/europe-west3
2401    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2402    */
listDeidentifyTemplates( OrganizationLocationName parent)2403   public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(
2404       OrganizationLocationName parent) {
2405     ListDeidentifyTemplatesRequest request =
2406         ListDeidentifyTemplatesRequest.newBuilder()
2407             .setParent(parent == null ? null : parent.toString())
2408             .build();
2409     return listDeidentifyTemplates(request);
2410   }
2411 
2412   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2413   /**
2414    * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2415    * learn more.
2416    *
2417    * <p>Sample code:
2418    *
2419    * <pre>{@code
2420    * // This snippet has been automatically generated and should be regarded as a code template only.
2421    * // It will require modifications to work:
2422    * // - It may require correct/in-range values for request initialization.
2423    * // - It may require specifying regional endpoints when creating the service client as shown in
2424    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2425    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2426    *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
2427    *   for (DeidentifyTemplate element :
2428    *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
2429    *     // doThingsWith(element);
2430    *   }
2431    * }
2432    * }</pre>
2433    *
2434    * @param parent Required. Parent resource name.
2435    *     <p>The format of this value varies depending on the scope of the request (project or
2436    *     organization) and whether you have [specified a processing
2437    *     location](https://cloud.google.com/dlp/docs/specifying-location):
2438    *     <p>+ Projects scope, location specified:&lt;br/&gt;
2439    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2440    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2441    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
2442    *     specified:&lt;br/&gt;
2443    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2444    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
2445    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
2446    *     <p>The following example `parent` string specifies a parent project with the identifier
2447    *     `example-project`, and specifies the `europe-west3` location for processing data:
2448    *     <p>parent=projects/example-project/locations/europe-west3
2449    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2450    */
listDeidentifyTemplates( OrganizationName parent)2451   public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(
2452       OrganizationName parent) {
2453     ListDeidentifyTemplatesRequest request =
2454         ListDeidentifyTemplatesRequest.newBuilder()
2455             .setParent(parent == null ? null : parent.toString())
2456             .build();
2457     return listDeidentifyTemplates(request);
2458   }
2459 
2460   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2461   /**
2462    * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2463    * learn more.
2464    *
2465    * <p>Sample code:
2466    *
2467    * <pre>{@code
2468    * // This snippet has been automatically generated and should be regarded as a code template only.
2469    * // It will require modifications to work:
2470    * // - It may require correct/in-range values for request initialization.
2471    * // - It may require specifying regional endpoints when creating the service client as shown in
2472    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2473    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2474    *   ProjectName parent = ProjectName.of("[PROJECT]");
2475    *   for (DeidentifyTemplate element :
2476    *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
2477    *     // doThingsWith(element);
2478    *   }
2479    * }
2480    * }</pre>
2481    *
2482    * @param parent Required. Parent resource name.
2483    *     <p>The format of this value varies depending on the scope of the request (project or
2484    *     organization) and whether you have [specified a processing
2485    *     location](https://cloud.google.com/dlp/docs/specifying-location):
2486    *     <p>+ Projects scope, location specified:&lt;br/&gt;
2487    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2488    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2489    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
2490    *     specified:&lt;br/&gt;
2491    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2492    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
2493    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
2494    *     <p>The following example `parent` string specifies a parent project with the identifier
2495    *     `example-project`, and specifies the `europe-west3` location for processing data:
2496    *     <p>parent=projects/example-project/locations/europe-west3
2497    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2498    */
listDeidentifyTemplates(ProjectName parent)2499   public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(ProjectName parent) {
2500     ListDeidentifyTemplatesRequest request =
2501         ListDeidentifyTemplatesRequest.newBuilder()
2502             .setParent(parent == null ? null : parent.toString())
2503             .build();
2504     return listDeidentifyTemplates(request);
2505   }
2506 
2507   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2508   /**
2509    * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2510    * learn more.
2511    *
2512    * <p>Sample code:
2513    *
2514    * <pre>{@code
2515    * // This snippet has been automatically generated and should be regarded as a code template only.
2516    * // It will require modifications to work:
2517    * // - It may require correct/in-range values for request initialization.
2518    * // - It may require specifying regional endpoints when creating the service client as shown in
2519    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2520    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2521    *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
2522    *   for (DeidentifyTemplate element :
2523    *       dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
2524    *     // doThingsWith(element);
2525    *   }
2526    * }
2527    * }</pre>
2528    *
2529    * @param parent Required. Parent resource name.
2530    *     <p>The format of this value varies depending on the scope of the request (project or
2531    *     organization) and whether you have [specified a processing
2532    *     location](https://cloud.google.com/dlp/docs/specifying-location):
2533    *     <p>+ Projects scope, location specified:&lt;br/&gt;
2534    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2535    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2536    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
2537    *     specified:&lt;br/&gt;
2538    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2539    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
2540    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
2541    *     <p>The following example `parent` string specifies a parent project with the identifier
2542    *     `example-project`, and specifies the `europe-west3` location for processing data:
2543    *     <p>parent=projects/example-project/locations/europe-west3
2544    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2545    */
listDeidentifyTemplates(String parent)2546   public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(String parent) {
2547     ListDeidentifyTemplatesRequest request =
2548         ListDeidentifyTemplatesRequest.newBuilder().setParent(parent).build();
2549     return listDeidentifyTemplates(request);
2550   }
2551 
2552   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2553   /**
2554    * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2555    * learn more.
2556    *
2557    * <p>Sample code:
2558    *
2559    * <pre>{@code
2560    * // This snippet has been automatically generated and should be regarded as a code template only.
2561    * // It will require modifications to work:
2562    * // - It may require correct/in-range values for request initialization.
2563    * // - It may require specifying regional endpoints when creating the service client as shown in
2564    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2565    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2566    *   ListDeidentifyTemplatesRequest request =
2567    *       ListDeidentifyTemplatesRequest.newBuilder()
2568    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
2569    *           .setPageToken("pageToken873572522")
2570    *           .setPageSize(883849137)
2571    *           .setOrderBy("orderBy-1207110587")
2572    *           .setLocationId("locationId1541836720")
2573    *           .build();
2574    *   for (DeidentifyTemplate element :
2575    *       dlpServiceClient.listDeidentifyTemplates(request).iterateAll()) {
2576    *     // doThingsWith(element);
2577    *   }
2578    * }
2579    * }</pre>
2580    *
2581    * @param request The request object containing all of the parameters for the API call.
2582    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2583    */
listDeidentifyTemplates( ListDeidentifyTemplatesRequest request)2584   public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(
2585       ListDeidentifyTemplatesRequest request) {
2586     return listDeidentifyTemplatesPagedCallable().call(request);
2587   }
2588 
2589   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2590   /**
2591    * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2592    * learn more.
2593    *
2594    * <p>Sample code:
2595    *
2596    * <pre>{@code
2597    * // This snippet has been automatically generated and should be regarded as a code template only.
2598    * // It will require modifications to work:
2599    * // - It may require correct/in-range values for request initialization.
2600    * // - It may require specifying regional endpoints when creating the service client as shown in
2601    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2602    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2603    *   ListDeidentifyTemplatesRequest request =
2604    *       ListDeidentifyTemplatesRequest.newBuilder()
2605    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
2606    *           .setPageToken("pageToken873572522")
2607    *           .setPageSize(883849137)
2608    *           .setOrderBy("orderBy-1207110587")
2609    *           .setLocationId("locationId1541836720")
2610    *           .build();
2611    *   ApiFuture<DeidentifyTemplate> future =
2612    *       dlpServiceClient.listDeidentifyTemplatesPagedCallable().futureCall(request);
2613    *   // Do something.
2614    *   for (DeidentifyTemplate element : future.get().iterateAll()) {
2615    *     // doThingsWith(element);
2616    *   }
2617    * }
2618    * }</pre>
2619    */
2620   public final UnaryCallable<ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesPagedResponse>
listDeidentifyTemplatesPagedCallable()2621       listDeidentifyTemplatesPagedCallable() {
2622     return stub.listDeidentifyTemplatesPagedCallable();
2623   }
2624 
2625   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2626   /**
2627    * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2628    * learn more.
2629    *
2630    * <p>Sample code:
2631    *
2632    * <pre>{@code
2633    * // This snippet has been automatically generated and should be regarded as a code template only.
2634    * // It will require modifications to work:
2635    * // - It may require correct/in-range values for request initialization.
2636    * // - It may require specifying regional endpoints when creating the service client as shown in
2637    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2638    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2639    *   ListDeidentifyTemplatesRequest request =
2640    *       ListDeidentifyTemplatesRequest.newBuilder()
2641    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
2642    *           .setPageToken("pageToken873572522")
2643    *           .setPageSize(883849137)
2644    *           .setOrderBy("orderBy-1207110587")
2645    *           .setLocationId("locationId1541836720")
2646    *           .build();
2647    *   while (true) {
2648    *     ListDeidentifyTemplatesResponse response =
2649    *         dlpServiceClient.listDeidentifyTemplatesCallable().call(request);
2650    *     for (DeidentifyTemplate element : response.getDeidentifyTemplatesList()) {
2651    *       // doThingsWith(element);
2652    *     }
2653    *     String nextPageToken = response.getNextPageToken();
2654    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
2655    *       request = request.toBuilder().setPageToken(nextPageToken).build();
2656    *     } else {
2657    *       break;
2658    *     }
2659    *   }
2660    * }
2661    * }</pre>
2662    */
2663   public final UnaryCallable<ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse>
listDeidentifyTemplatesCallable()2664       listDeidentifyTemplatesCallable() {
2665     return stub.listDeidentifyTemplatesCallable();
2666   }
2667 
2668   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2669   /**
2670    * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2671    * learn more.
2672    *
2673    * <p>Sample code:
2674    *
2675    * <pre>{@code
2676    * // This snippet has been automatically generated and should be regarded as a code template only.
2677    * // It will require modifications to work:
2678    * // - It may require correct/in-range values for request initialization.
2679    * // - It may require specifying regional endpoints when creating the service client as shown in
2680    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2681    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2682    *   DeidentifyTemplateName name =
2683    *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
2684    *           "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
2685    *   dlpServiceClient.deleteDeidentifyTemplate(name);
2686    * }
2687    * }</pre>
2688    *
2689    * @param name Required. Resource name of the organization and deidentify template to be deleted,
2690    *     for example `organizations/433245324/deidentifyTemplates/432452342` or
2691    *     projects/project-id/deidentifyTemplates/432452342.
2692    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2693    */
deleteDeidentifyTemplate(DeidentifyTemplateName name)2694   public final void deleteDeidentifyTemplate(DeidentifyTemplateName name) {
2695     DeleteDeidentifyTemplateRequest request =
2696         DeleteDeidentifyTemplateRequest.newBuilder()
2697             .setName(name == null ? null : name.toString())
2698             .build();
2699     deleteDeidentifyTemplate(request);
2700   }
2701 
2702   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2703   /**
2704    * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2705    * learn more.
2706    *
2707    * <p>Sample code:
2708    *
2709    * <pre>{@code
2710    * // This snippet has been automatically generated and should be regarded as a code template only.
2711    * // It will require modifications to work:
2712    * // - It may require correct/in-range values for request initialization.
2713    * // - It may require specifying regional endpoints when creating the service client as shown in
2714    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2715    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2716    *   String name =
2717    *       DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
2718    *               "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
2719    *           .toString();
2720    *   dlpServiceClient.deleteDeidentifyTemplate(name);
2721    * }
2722    * }</pre>
2723    *
2724    * @param name Required. Resource name of the organization and deidentify template to be deleted,
2725    *     for example `organizations/433245324/deidentifyTemplates/432452342` or
2726    *     projects/project-id/deidentifyTemplates/432452342.
2727    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2728    */
deleteDeidentifyTemplate(String name)2729   public final void deleteDeidentifyTemplate(String name) {
2730     DeleteDeidentifyTemplateRequest request =
2731         DeleteDeidentifyTemplateRequest.newBuilder().setName(name).build();
2732     deleteDeidentifyTemplate(request);
2733   }
2734 
2735   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2736   /**
2737    * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2738    * learn more.
2739    *
2740    * <p>Sample code:
2741    *
2742    * <pre>{@code
2743    * // This snippet has been automatically generated and should be regarded as a code template only.
2744    * // It will require modifications to work:
2745    * // - It may require correct/in-range values for request initialization.
2746    * // - It may require specifying regional endpoints when creating the service client as shown in
2747    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2748    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2749    *   DeleteDeidentifyTemplateRequest request =
2750    *       DeleteDeidentifyTemplateRequest.newBuilder()
2751    *           .setName(
2752    *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
2753    *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
2754    *                   .toString())
2755    *           .build();
2756    *   dlpServiceClient.deleteDeidentifyTemplate(request);
2757    * }
2758    * }</pre>
2759    *
2760    * @param request The request object containing all of the parameters for the API call.
2761    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2762    */
deleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest request)2763   public final void deleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest request) {
2764     deleteDeidentifyTemplateCallable().call(request);
2765   }
2766 
2767   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2768   /**
2769    * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
2770    * learn more.
2771    *
2772    * <p>Sample code:
2773    *
2774    * <pre>{@code
2775    * // This snippet has been automatically generated and should be regarded as a code template only.
2776    * // It will require modifications to work:
2777    * // - It may require correct/in-range values for request initialization.
2778    * // - It may require specifying regional endpoints when creating the service client as shown in
2779    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2780    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2781    *   DeleteDeidentifyTemplateRequest request =
2782    *       DeleteDeidentifyTemplateRequest.newBuilder()
2783    *           .setName(
2784    *               DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName(
2785    *                       "[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]")
2786    *                   .toString())
2787    *           .build();
2788    *   ApiFuture<Empty> future =
2789    *       dlpServiceClient.deleteDeidentifyTemplateCallable().futureCall(request);
2790    *   // Do something.
2791    *   future.get();
2792    * }
2793    * }</pre>
2794    */
2795   public final UnaryCallable<DeleteDeidentifyTemplateRequest, Empty>
deleteDeidentifyTemplateCallable()2796       deleteDeidentifyTemplateCallable() {
2797     return stub.deleteDeidentifyTemplateCallable();
2798   }
2799 
2800   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2801   /**
2802    * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
2803    * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
2804    *
2805    * <p>Sample code:
2806    *
2807    * <pre>{@code
2808    * // This snippet has been automatically generated and should be regarded as a code template only.
2809    * // It will require modifications to work:
2810    * // - It may require correct/in-range values for request initialization.
2811    * // - It may require specifying regional endpoints when creating the service client as shown in
2812    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2813    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2814    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
2815    *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
2816    *   JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
2817    * }
2818    * }</pre>
2819    *
2820    * @param parent Required. Parent resource name.
2821    *     <p>The format of this value varies depending on whether you have [specified a processing
2822    *     location](https://cloud.google.com/dlp/docs/specifying-location):
2823    *     <p>+ Projects scope, location specified:&lt;br/&gt;
2824    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2825    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2826    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
2827    *     <p>The following example `parent` string specifies a parent project with the identifier
2828    *     `example-project`, and specifies the `europe-west3` location for processing data:
2829    *     <p>parent=projects/example-project/locations/europe-west3
2830    * @param jobTrigger Required. The JobTrigger to create.
2831    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2832    */
createJobTrigger(LocationName parent, JobTrigger jobTrigger)2833   public final JobTrigger createJobTrigger(LocationName parent, JobTrigger jobTrigger) {
2834     CreateJobTriggerRequest request =
2835         CreateJobTriggerRequest.newBuilder()
2836             .setParent(parent == null ? null : parent.toString())
2837             .setJobTrigger(jobTrigger)
2838             .build();
2839     return createJobTrigger(request);
2840   }
2841 
2842   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2843   /**
2844    * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
2845    * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
2846    *
2847    * <p>Sample code:
2848    *
2849    * <pre>{@code
2850    * // This snippet has been automatically generated and should be regarded as a code template only.
2851    * // It will require modifications to work:
2852    * // - It may require correct/in-range values for request initialization.
2853    * // - It may require specifying regional endpoints when creating the service client as shown in
2854    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2855    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2856    *   ProjectName parent = ProjectName.of("[PROJECT]");
2857    *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
2858    *   JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
2859    * }
2860    * }</pre>
2861    *
2862    * @param parent Required. Parent resource name.
2863    *     <p>The format of this value varies depending on whether you have [specified a processing
2864    *     location](https://cloud.google.com/dlp/docs/specifying-location):
2865    *     <p>+ Projects scope, location specified:&lt;br/&gt;
2866    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2867    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2868    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
2869    *     <p>The following example `parent` string specifies a parent project with the identifier
2870    *     `example-project`, and specifies the `europe-west3` location for processing data:
2871    *     <p>parent=projects/example-project/locations/europe-west3
2872    * @param jobTrigger Required. The JobTrigger to create.
2873    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2874    */
createJobTrigger(ProjectName parent, JobTrigger jobTrigger)2875   public final JobTrigger createJobTrigger(ProjectName parent, JobTrigger jobTrigger) {
2876     CreateJobTriggerRequest request =
2877         CreateJobTriggerRequest.newBuilder()
2878             .setParent(parent == null ? null : parent.toString())
2879             .setJobTrigger(jobTrigger)
2880             .build();
2881     return createJobTrigger(request);
2882   }
2883 
2884   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2885   /**
2886    * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
2887    * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
2888    *
2889    * <p>Sample code:
2890    *
2891    * <pre>{@code
2892    * // This snippet has been automatically generated and should be regarded as a code template only.
2893    * // It will require modifications to work:
2894    * // - It may require correct/in-range values for request initialization.
2895    * // - It may require specifying regional endpoints when creating the service client as shown in
2896    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2897    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2898    *   String parent = ProjectName.of("[PROJECT]").toString();
2899    *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
2900    *   JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
2901    * }
2902    * }</pre>
2903    *
2904    * @param parent Required. Parent resource name.
2905    *     <p>The format of this value varies depending on whether you have [specified a processing
2906    *     location](https://cloud.google.com/dlp/docs/specifying-location):
2907    *     <p>+ Projects scope, location specified:&lt;br/&gt;
2908    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
2909    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
2910    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
2911    *     <p>The following example `parent` string specifies a parent project with the identifier
2912    *     `example-project`, and specifies the `europe-west3` location for processing data:
2913    *     <p>parent=projects/example-project/locations/europe-west3
2914    * @param jobTrigger Required. The JobTrigger to create.
2915    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2916    */
createJobTrigger(String parent, JobTrigger jobTrigger)2917   public final JobTrigger createJobTrigger(String parent, JobTrigger jobTrigger) {
2918     CreateJobTriggerRequest request =
2919         CreateJobTriggerRequest.newBuilder().setParent(parent).setJobTrigger(jobTrigger).build();
2920     return createJobTrigger(request);
2921   }
2922 
2923   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2924   /**
2925    * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
2926    * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
2927    *
2928    * <p>Sample code:
2929    *
2930    * <pre>{@code
2931    * // This snippet has been automatically generated and should be regarded as a code template only.
2932    * // It will require modifications to work:
2933    * // - It may require correct/in-range values for request initialization.
2934    * // - It may require specifying regional endpoints when creating the service client as shown in
2935    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2936    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2937    *   CreateJobTriggerRequest request =
2938    *       CreateJobTriggerRequest.newBuilder()
2939    *           .setParent(ProjectName.of("[PROJECT]").toString())
2940    *           .setJobTrigger(JobTrigger.newBuilder().build())
2941    *           .setTriggerId("triggerId-648752909")
2942    *           .setLocationId("locationId1541836720")
2943    *           .build();
2944    *   JobTrigger response = dlpServiceClient.createJobTrigger(request);
2945    * }
2946    * }</pre>
2947    *
2948    * @param request The request object containing all of the parameters for the API call.
2949    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2950    */
createJobTrigger(CreateJobTriggerRequest request)2951   public final JobTrigger createJobTrigger(CreateJobTriggerRequest request) {
2952     return createJobTriggerCallable().call(request);
2953   }
2954 
2955   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2956   /**
2957    * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
2958    * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
2959    *
2960    * <p>Sample code:
2961    *
2962    * <pre>{@code
2963    * // This snippet has been automatically generated and should be regarded as a code template only.
2964    * // It will require modifications to work:
2965    * // - It may require correct/in-range values for request initialization.
2966    * // - It may require specifying regional endpoints when creating the service client as shown in
2967    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2968    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
2969    *   CreateJobTriggerRequest request =
2970    *       CreateJobTriggerRequest.newBuilder()
2971    *           .setParent(ProjectName.of("[PROJECT]").toString())
2972    *           .setJobTrigger(JobTrigger.newBuilder().build())
2973    *           .setTriggerId("triggerId-648752909")
2974    *           .setLocationId("locationId1541836720")
2975    *           .build();
2976    *   ApiFuture<JobTrigger> future =
2977    *       dlpServiceClient.createJobTriggerCallable().futureCall(request);
2978    *   // Do something.
2979    *   JobTrigger response = future.get();
2980    * }
2981    * }</pre>
2982    */
createJobTriggerCallable()2983   public final UnaryCallable<CreateJobTriggerRequest, JobTrigger> createJobTriggerCallable() {
2984     return stub.createJobTriggerCallable();
2985   }
2986 
2987   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2988   /**
2989    * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
2990    * more.
2991    *
2992    * <p>Sample code:
2993    *
2994    * <pre>{@code
2995    * // This snippet has been automatically generated and should be regarded as a code template only.
2996    * // It will require modifications to work:
2997    * // - It may require correct/in-range values for request initialization.
2998    * // - It may require specifying regional endpoints when creating the service client as shown in
2999    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3000    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3001    *   JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
3002    *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
3003    *   FieldMask updateMask = FieldMask.newBuilder().build();
3004    *   JobTrigger response = dlpServiceClient.updateJobTrigger(name, jobTrigger, updateMask);
3005    * }
3006    * }</pre>
3007    *
3008    * @param name Required. Resource name of the project and the triggeredJob, for example
3009    *     `projects/dlp-test-project/jobTriggers/53234423`.
3010    * @param jobTrigger New JobTrigger value.
3011    * @param updateMask Mask to control which fields get updated.
3012    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3013    */
updateJobTrigger( JobTriggerName name, JobTrigger jobTrigger, FieldMask updateMask)3014   public final JobTrigger updateJobTrigger(
3015       JobTriggerName name, JobTrigger jobTrigger, FieldMask updateMask) {
3016     UpdateJobTriggerRequest request =
3017         UpdateJobTriggerRequest.newBuilder()
3018             .setName(name == null ? null : name.toString())
3019             .setJobTrigger(jobTrigger)
3020             .setUpdateMask(updateMask)
3021             .build();
3022     return updateJobTrigger(request);
3023   }
3024 
3025   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3026   /**
3027    * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
3028    * more.
3029    *
3030    * <p>Sample code:
3031    *
3032    * <pre>{@code
3033    * // This snippet has been automatically generated and should be regarded as a code template only.
3034    * // It will require modifications to work:
3035    * // - It may require correct/in-range values for request initialization.
3036    * // - It may require specifying regional endpoints when creating the service client as shown in
3037    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3038    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3039    *   String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
3040    *   JobTrigger jobTrigger = JobTrigger.newBuilder().build();
3041    *   FieldMask updateMask = FieldMask.newBuilder().build();
3042    *   JobTrigger response = dlpServiceClient.updateJobTrigger(name, jobTrigger, updateMask);
3043    * }
3044    * }</pre>
3045    *
3046    * @param name Required. Resource name of the project and the triggeredJob, for example
3047    *     `projects/dlp-test-project/jobTriggers/53234423`.
3048    * @param jobTrigger New JobTrigger value.
3049    * @param updateMask Mask to control which fields get updated.
3050    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3051    */
updateJobTrigger( String name, JobTrigger jobTrigger, FieldMask updateMask)3052   public final JobTrigger updateJobTrigger(
3053       String name, JobTrigger jobTrigger, FieldMask updateMask) {
3054     UpdateJobTriggerRequest request =
3055         UpdateJobTriggerRequest.newBuilder()
3056             .setName(name)
3057             .setJobTrigger(jobTrigger)
3058             .setUpdateMask(updateMask)
3059             .build();
3060     return updateJobTrigger(request);
3061   }
3062 
3063   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3064   /**
3065    * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
3066    * more.
3067    *
3068    * <p>Sample code:
3069    *
3070    * <pre>{@code
3071    * // This snippet has been automatically generated and should be regarded as a code template only.
3072    * // It will require modifications to work:
3073    * // - It may require correct/in-range values for request initialization.
3074    * // - It may require specifying regional endpoints when creating the service client as shown in
3075    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3076    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3077    *   UpdateJobTriggerRequest request =
3078    *       UpdateJobTriggerRequest.newBuilder()
3079    *           .setName(
3080    *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
3081    *           .setJobTrigger(JobTrigger.newBuilder().build())
3082    *           .setUpdateMask(FieldMask.newBuilder().build())
3083    *           .build();
3084    *   JobTrigger response = dlpServiceClient.updateJobTrigger(request);
3085    * }
3086    * }</pre>
3087    *
3088    * @param request The request object containing all of the parameters for the API call.
3089    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3090    */
updateJobTrigger(UpdateJobTriggerRequest request)3091   public final JobTrigger updateJobTrigger(UpdateJobTriggerRequest request) {
3092     return updateJobTriggerCallable().call(request);
3093   }
3094 
3095   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3096   /**
3097    * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
3098    * more.
3099    *
3100    * <p>Sample code:
3101    *
3102    * <pre>{@code
3103    * // This snippet has been automatically generated and should be regarded as a code template only.
3104    * // It will require modifications to work:
3105    * // - It may require correct/in-range values for request initialization.
3106    * // - It may require specifying regional endpoints when creating the service client as shown in
3107    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3108    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3109    *   UpdateJobTriggerRequest request =
3110    *       UpdateJobTriggerRequest.newBuilder()
3111    *           .setName(
3112    *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
3113    *           .setJobTrigger(JobTrigger.newBuilder().build())
3114    *           .setUpdateMask(FieldMask.newBuilder().build())
3115    *           .build();
3116    *   ApiFuture<JobTrigger> future =
3117    *       dlpServiceClient.updateJobTriggerCallable().futureCall(request);
3118    *   // Do something.
3119    *   JobTrigger response = future.get();
3120    * }
3121    * }</pre>
3122    */
updateJobTriggerCallable()3123   public final UnaryCallable<UpdateJobTriggerRequest, JobTrigger> updateJobTriggerCallable() {
3124     return stub.updateJobTriggerCallable();
3125   }
3126 
3127   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3128   /**
3129    * Inspect hybrid content and store findings to a trigger. The inspection will be processed
3130    * asynchronously. To review the findings monitor the jobs within the trigger.
3131    *
3132    * <p>Sample code:
3133    *
3134    * <pre>{@code
3135    * // This snippet has been automatically generated and should be regarded as a code template only.
3136    * // It will require modifications to work:
3137    * // - It may require correct/in-range values for request initialization.
3138    * // - It may require specifying regional endpoints when creating the service client as shown in
3139    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3140    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3141    *   JobTriggerName name =
3142    *       JobTriggerName.ofProjectLocationJobTriggerName(
3143    *           "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]");
3144    *   HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(name);
3145    * }
3146    * }</pre>
3147    *
3148    * @param name Required. Resource name of the trigger to execute a hybrid inspect on, for example
3149    *     `projects/dlp-test-project/jobTriggers/53234423`.
3150    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3151    */
hybridInspectJobTrigger(JobTriggerName name)3152   public final HybridInspectResponse hybridInspectJobTrigger(JobTriggerName name) {
3153     HybridInspectJobTriggerRequest request =
3154         HybridInspectJobTriggerRequest.newBuilder()
3155             .setName(name == null ? null : name.toString())
3156             .build();
3157     return hybridInspectJobTrigger(request);
3158   }
3159 
3160   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3161   /**
3162    * Inspect hybrid content and store findings to a trigger. The inspection will be processed
3163    * asynchronously. To review the findings monitor the jobs within the trigger.
3164    *
3165    * <p>Sample code:
3166    *
3167    * <pre>{@code
3168    * // This snippet has been automatically generated and should be regarded as a code template only.
3169    * // It will require modifications to work:
3170    * // - It may require correct/in-range values for request initialization.
3171    * // - It may require specifying regional endpoints when creating the service client as shown in
3172    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3173    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3174    *   String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
3175    *   HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(name);
3176    * }
3177    * }</pre>
3178    *
3179    * @param name Required. Resource name of the trigger to execute a hybrid inspect on, for example
3180    *     `projects/dlp-test-project/jobTriggers/53234423`.
3181    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3182    */
hybridInspectJobTrigger(String name)3183   public final HybridInspectResponse hybridInspectJobTrigger(String name) {
3184     HybridInspectJobTriggerRequest request =
3185         HybridInspectJobTriggerRequest.newBuilder().setName(name).build();
3186     return hybridInspectJobTrigger(request);
3187   }
3188 
3189   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3190   /**
3191    * Inspect hybrid content and store findings to a trigger. The inspection will be processed
3192    * asynchronously. To review the findings monitor the jobs within the trigger.
3193    *
3194    * <p>Sample code:
3195    *
3196    * <pre>{@code
3197    * // This snippet has been automatically generated and should be regarded as a code template only.
3198    * // It will require modifications to work:
3199    * // - It may require correct/in-range values for request initialization.
3200    * // - It may require specifying regional endpoints when creating the service client as shown in
3201    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3202    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3203    *   HybridInspectJobTriggerRequest request =
3204    *       HybridInspectJobTriggerRequest.newBuilder()
3205    *           .setName(
3206    *               JobTriggerName.ofProjectLocationJobTriggerName(
3207    *                       "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]")
3208    *                   .toString())
3209    *           .setHybridItem(HybridContentItem.newBuilder().build())
3210    *           .build();
3211    *   HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(request);
3212    * }
3213    * }</pre>
3214    *
3215    * @param request The request object containing all of the parameters for the API call.
3216    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3217    */
hybridInspectJobTrigger( HybridInspectJobTriggerRequest request)3218   public final HybridInspectResponse hybridInspectJobTrigger(
3219       HybridInspectJobTriggerRequest request) {
3220     return hybridInspectJobTriggerCallable().call(request);
3221   }
3222 
3223   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3224   /**
3225    * Inspect hybrid content and store findings to a trigger. The inspection will be processed
3226    * asynchronously. To review the findings monitor the jobs within the trigger.
3227    *
3228    * <p>Sample code:
3229    *
3230    * <pre>{@code
3231    * // This snippet has been automatically generated and should be regarded as a code template only.
3232    * // It will require modifications to work:
3233    * // - It may require correct/in-range values for request initialization.
3234    * // - It may require specifying regional endpoints when creating the service client as shown in
3235    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3236    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3237    *   HybridInspectJobTriggerRequest request =
3238    *       HybridInspectJobTriggerRequest.newBuilder()
3239    *           .setName(
3240    *               JobTriggerName.ofProjectLocationJobTriggerName(
3241    *                       "[PROJECT]", "[LOCATION]", "[JOB_TRIGGER]")
3242    *                   .toString())
3243    *           .setHybridItem(HybridContentItem.newBuilder().build())
3244    *           .build();
3245    *   ApiFuture<HybridInspectResponse> future =
3246    *       dlpServiceClient.hybridInspectJobTriggerCallable().futureCall(request);
3247    *   // Do something.
3248    *   HybridInspectResponse response = future.get();
3249    * }
3250    * }</pre>
3251    */
3252   public final UnaryCallable<HybridInspectJobTriggerRequest, HybridInspectResponse>
hybridInspectJobTriggerCallable()3253       hybridInspectJobTriggerCallable() {
3254     return stub.hybridInspectJobTriggerCallable();
3255   }
3256 
3257   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3258   /**
3259    * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
3260    *
3261    * <p>Sample code:
3262    *
3263    * <pre>{@code
3264    * // This snippet has been automatically generated and should be regarded as a code template only.
3265    * // It will require modifications to work:
3266    * // - It may require correct/in-range values for request initialization.
3267    * // - It may require specifying regional endpoints when creating the service client as shown in
3268    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3269    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3270    *   JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
3271    *   JobTrigger response = dlpServiceClient.getJobTrigger(name);
3272    * }
3273    * }</pre>
3274    *
3275    * @param name Required. Resource name of the project and the triggeredJob, for example
3276    *     `projects/dlp-test-project/jobTriggers/53234423`.
3277    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3278    */
getJobTrigger(JobTriggerName name)3279   public final JobTrigger getJobTrigger(JobTriggerName name) {
3280     GetJobTriggerRequest request =
3281         GetJobTriggerRequest.newBuilder().setName(name == null ? null : name.toString()).build();
3282     return getJobTrigger(request);
3283   }
3284 
3285   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3286   /**
3287    * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
3288    *
3289    * <p>Sample code:
3290    *
3291    * <pre>{@code
3292    * // This snippet has been automatically generated and should be regarded as a code template only.
3293    * // It will require modifications to work:
3294    * // - It may require correct/in-range values for request initialization.
3295    * // - It may require specifying regional endpoints when creating the service client as shown in
3296    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3297    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3298    *   String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
3299    *   JobTrigger response = dlpServiceClient.getJobTrigger(name);
3300    * }
3301    * }</pre>
3302    *
3303    * @param name Required. Resource name of the project and the triggeredJob, for example
3304    *     `projects/dlp-test-project/jobTriggers/53234423`.
3305    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3306    */
getJobTrigger(String name)3307   public final JobTrigger getJobTrigger(String name) {
3308     GetJobTriggerRequest request = GetJobTriggerRequest.newBuilder().setName(name).build();
3309     return getJobTrigger(request);
3310   }
3311 
3312   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3313   /**
3314    * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
3315    *
3316    * <p>Sample code:
3317    *
3318    * <pre>{@code
3319    * // This snippet has been automatically generated and should be regarded as a code template only.
3320    * // It will require modifications to work:
3321    * // - It may require correct/in-range values for request initialization.
3322    * // - It may require specifying regional endpoints when creating the service client as shown in
3323    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3324    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3325    *   GetJobTriggerRequest request =
3326    *       GetJobTriggerRequest.newBuilder()
3327    *           .setName(
3328    *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
3329    *           .build();
3330    *   JobTrigger response = dlpServiceClient.getJobTrigger(request);
3331    * }
3332    * }</pre>
3333    *
3334    * @param request The request object containing all of the parameters for the API call.
3335    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3336    */
getJobTrigger(GetJobTriggerRequest request)3337   public final JobTrigger getJobTrigger(GetJobTriggerRequest request) {
3338     return getJobTriggerCallable().call(request);
3339   }
3340 
3341   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3342   /**
3343    * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
3344    *
3345    * <p>Sample code:
3346    *
3347    * <pre>{@code
3348    * // This snippet has been automatically generated and should be regarded as a code template only.
3349    * // It will require modifications to work:
3350    * // - It may require correct/in-range values for request initialization.
3351    * // - It may require specifying regional endpoints when creating the service client as shown in
3352    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3353    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3354    *   GetJobTriggerRequest request =
3355    *       GetJobTriggerRequest.newBuilder()
3356    *           .setName(
3357    *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
3358    *           .build();
3359    *   ApiFuture<JobTrigger> future = dlpServiceClient.getJobTriggerCallable().futureCall(request);
3360    *   // Do something.
3361    *   JobTrigger response = future.get();
3362    * }
3363    * }</pre>
3364    */
getJobTriggerCallable()3365   public final UnaryCallable<GetJobTriggerRequest, JobTrigger> getJobTriggerCallable() {
3366     return stub.getJobTriggerCallable();
3367   }
3368 
3369   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3370   /**
3371    * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
3372    *
3373    * <p>Sample code:
3374    *
3375    * <pre>{@code
3376    * // This snippet has been automatically generated and should be regarded as a code template only.
3377    * // It will require modifications to work:
3378    * // - It may require correct/in-range values for request initialization.
3379    * // - It may require specifying regional endpoints when creating the service client as shown in
3380    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3381    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3382    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
3383    *   for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
3384    *     // doThingsWith(element);
3385    *   }
3386    * }
3387    * }</pre>
3388    *
3389    * @param parent Required. Parent resource name.
3390    *     <p>The format of this value varies depending on whether you have [specified a processing
3391    *     location](https://cloud.google.com/dlp/docs/specifying-location):
3392    *     <p>+ Projects scope, location specified:&lt;br/&gt;
3393    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
3394    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
3395    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
3396    *     <p>The following example `parent` string specifies a parent project with the identifier
3397    *     `example-project`, and specifies the `europe-west3` location for processing data:
3398    *     <p>parent=projects/example-project/locations/europe-west3
3399    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3400    */
listJobTriggers(LocationName parent)3401   public final ListJobTriggersPagedResponse listJobTriggers(LocationName parent) {
3402     ListJobTriggersRequest request =
3403         ListJobTriggersRequest.newBuilder()
3404             .setParent(parent == null ? null : parent.toString())
3405             .build();
3406     return listJobTriggers(request);
3407   }
3408 
3409   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3410   /**
3411    * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
3412    *
3413    * <p>Sample code:
3414    *
3415    * <pre>{@code
3416    * // This snippet has been automatically generated and should be regarded as a code template only.
3417    * // It will require modifications to work:
3418    * // - It may require correct/in-range values for request initialization.
3419    * // - It may require specifying regional endpoints when creating the service client as shown in
3420    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3421    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3422    *   ProjectName parent = ProjectName.of("[PROJECT]");
3423    *   for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
3424    *     // doThingsWith(element);
3425    *   }
3426    * }
3427    * }</pre>
3428    *
3429    * @param parent Required. Parent resource name.
3430    *     <p>The format of this value varies depending on whether you have [specified a processing
3431    *     location](https://cloud.google.com/dlp/docs/specifying-location):
3432    *     <p>+ Projects scope, location specified:&lt;br/&gt;
3433    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
3434    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
3435    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
3436    *     <p>The following example `parent` string specifies a parent project with the identifier
3437    *     `example-project`, and specifies the `europe-west3` location for processing data:
3438    *     <p>parent=projects/example-project/locations/europe-west3
3439    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3440    */
listJobTriggers(ProjectName parent)3441   public final ListJobTriggersPagedResponse listJobTriggers(ProjectName parent) {
3442     ListJobTriggersRequest request =
3443         ListJobTriggersRequest.newBuilder()
3444             .setParent(parent == null ? null : parent.toString())
3445             .build();
3446     return listJobTriggers(request);
3447   }
3448 
3449   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3450   /**
3451    * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
3452    *
3453    * <p>Sample code:
3454    *
3455    * <pre>{@code
3456    * // This snippet has been automatically generated and should be regarded as a code template only.
3457    * // It will require modifications to work:
3458    * // - It may require correct/in-range values for request initialization.
3459    * // - It may require specifying regional endpoints when creating the service client as shown in
3460    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3461    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3462    *   String parent = ProjectName.of("[PROJECT]").toString();
3463    *   for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
3464    *     // doThingsWith(element);
3465    *   }
3466    * }
3467    * }</pre>
3468    *
3469    * @param parent Required. Parent resource name.
3470    *     <p>The format of this value varies depending on whether you have [specified a processing
3471    *     location](https://cloud.google.com/dlp/docs/specifying-location):
3472    *     <p>+ Projects scope, location specified:&lt;br/&gt;
3473    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
3474    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
3475    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
3476    *     <p>The following example `parent` string specifies a parent project with the identifier
3477    *     `example-project`, and specifies the `europe-west3` location for processing data:
3478    *     <p>parent=projects/example-project/locations/europe-west3
3479    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3480    */
listJobTriggers(String parent)3481   public final ListJobTriggersPagedResponse listJobTriggers(String parent) {
3482     ListJobTriggersRequest request = ListJobTriggersRequest.newBuilder().setParent(parent).build();
3483     return listJobTriggers(request);
3484   }
3485 
3486   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3487   /**
3488    * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
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 (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3499    *   ListJobTriggersRequest request =
3500    *       ListJobTriggersRequest.newBuilder()
3501    *           .setParent(ProjectName.of("[PROJECT]").toString())
3502    *           .setPageToken("pageToken873572522")
3503    *           .setPageSize(883849137)
3504    *           .setOrderBy("orderBy-1207110587")
3505    *           .setFilter("filter-1274492040")
3506    *           .setType(DlpJobType.forNumber(0))
3507    *           .setLocationId("locationId1541836720")
3508    *           .build();
3509    *   for (JobTrigger element : dlpServiceClient.listJobTriggers(request).iterateAll()) {
3510    *     // doThingsWith(element);
3511    *   }
3512    * }
3513    * }</pre>
3514    *
3515    * @param request The request object containing all of the parameters for the API call.
3516    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3517    */
listJobTriggers(ListJobTriggersRequest request)3518   public final ListJobTriggersPagedResponse listJobTriggers(ListJobTriggersRequest request) {
3519     return listJobTriggersPagedCallable().call(request);
3520   }
3521 
3522   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3523   /**
3524    * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
3525    *
3526    * <p>Sample code:
3527    *
3528    * <pre>{@code
3529    * // This snippet has been automatically generated and should be regarded as a code template only.
3530    * // It will require modifications to work:
3531    * // - It may require correct/in-range values for request initialization.
3532    * // - It may require specifying regional endpoints when creating the service client as shown in
3533    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3534    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3535    *   ListJobTriggersRequest request =
3536    *       ListJobTriggersRequest.newBuilder()
3537    *           .setParent(ProjectName.of("[PROJECT]").toString())
3538    *           .setPageToken("pageToken873572522")
3539    *           .setPageSize(883849137)
3540    *           .setOrderBy("orderBy-1207110587")
3541    *           .setFilter("filter-1274492040")
3542    *           .setType(DlpJobType.forNumber(0))
3543    *           .setLocationId("locationId1541836720")
3544    *           .build();
3545    *   ApiFuture<JobTrigger> future =
3546    *       dlpServiceClient.listJobTriggersPagedCallable().futureCall(request);
3547    *   // Do something.
3548    *   for (JobTrigger element : future.get().iterateAll()) {
3549    *     // doThingsWith(element);
3550    *   }
3551    * }
3552    * }</pre>
3553    */
3554   public final UnaryCallable<ListJobTriggersRequest, ListJobTriggersPagedResponse>
listJobTriggersPagedCallable()3555       listJobTriggersPagedCallable() {
3556     return stub.listJobTriggersPagedCallable();
3557   }
3558 
3559   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3560   /**
3561    * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
3562    *
3563    * <p>Sample code:
3564    *
3565    * <pre>{@code
3566    * // This snippet has been automatically generated and should be regarded as a code template only.
3567    * // It will require modifications to work:
3568    * // - It may require correct/in-range values for request initialization.
3569    * // - It may require specifying regional endpoints when creating the service client as shown in
3570    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3571    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3572    *   ListJobTriggersRequest request =
3573    *       ListJobTriggersRequest.newBuilder()
3574    *           .setParent(ProjectName.of("[PROJECT]").toString())
3575    *           .setPageToken("pageToken873572522")
3576    *           .setPageSize(883849137)
3577    *           .setOrderBy("orderBy-1207110587")
3578    *           .setFilter("filter-1274492040")
3579    *           .setType(DlpJobType.forNumber(0))
3580    *           .setLocationId("locationId1541836720")
3581    *           .build();
3582    *   while (true) {
3583    *     ListJobTriggersResponse response = dlpServiceClient.listJobTriggersCallable().call(request);
3584    *     for (JobTrigger element : response.getJobTriggersList()) {
3585    *       // doThingsWith(element);
3586    *     }
3587    *     String nextPageToken = response.getNextPageToken();
3588    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
3589    *       request = request.toBuilder().setPageToken(nextPageToken).build();
3590    *     } else {
3591    *       break;
3592    *     }
3593    *   }
3594    * }
3595    * }</pre>
3596    */
3597   public final UnaryCallable<ListJobTriggersRequest, ListJobTriggersResponse>
listJobTriggersCallable()3598       listJobTriggersCallable() {
3599     return stub.listJobTriggersCallable();
3600   }
3601 
3602   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3603   /**
3604    * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
3605    * more.
3606    *
3607    * <p>Sample code:
3608    *
3609    * <pre>{@code
3610    * // This snippet has been automatically generated and should be regarded as a code template only.
3611    * // It will require modifications to work:
3612    * // - It may require correct/in-range values for request initialization.
3613    * // - It may require specifying regional endpoints when creating the service client as shown in
3614    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3615    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3616    *   JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
3617    *   dlpServiceClient.deleteJobTrigger(name);
3618    * }
3619    * }</pre>
3620    *
3621    * @param name Required. Resource name of the project and the triggeredJob, for example
3622    *     `projects/dlp-test-project/jobTriggers/53234423`.
3623    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3624    */
deleteJobTrigger(JobTriggerName name)3625   public final void deleteJobTrigger(JobTriggerName name) {
3626     DeleteJobTriggerRequest request =
3627         DeleteJobTriggerRequest.newBuilder().setName(name == null ? null : name.toString()).build();
3628     deleteJobTrigger(request);
3629   }
3630 
3631   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3632   /**
3633    * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
3634    * more.
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 (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3645    *   String name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString();
3646    *   dlpServiceClient.deleteJobTrigger(name);
3647    * }
3648    * }</pre>
3649    *
3650    * @param name Required. Resource name of the project and the triggeredJob, for example
3651    *     `projects/dlp-test-project/jobTriggers/53234423`.
3652    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3653    */
deleteJobTrigger(String name)3654   public final void deleteJobTrigger(String name) {
3655     DeleteJobTriggerRequest request = DeleteJobTriggerRequest.newBuilder().setName(name).build();
3656     deleteJobTrigger(request);
3657   }
3658 
3659   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3660   /**
3661    * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
3662    * more.
3663    *
3664    * <p>Sample code:
3665    *
3666    * <pre>{@code
3667    * // This snippet has been automatically generated and should be regarded as a code template only.
3668    * // It will require modifications to work:
3669    * // - It may require correct/in-range values for request initialization.
3670    * // - It may require specifying regional endpoints when creating the service client as shown in
3671    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3672    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3673    *   DeleteJobTriggerRequest request =
3674    *       DeleteJobTriggerRequest.newBuilder()
3675    *           .setName(
3676    *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
3677    *           .build();
3678    *   dlpServiceClient.deleteJobTrigger(request);
3679    * }
3680    * }</pre>
3681    *
3682    * @param request The request object containing all of the parameters for the API call.
3683    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3684    */
deleteJobTrigger(DeleteJobTriggerRequest request)3685   public final void deleteJobTrigger(DeleteJobTriggerRequest request) {
3686     deleteJobTriggerCallable().call(request);
3687   }
3688 
3689   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3690   /**
3691    * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
3692    * more.
3693    *
3694    * <p>Sample code:
3695    *
3696    * <pre>{@code
3697    * // This snippet has been automatically generated and should be regarded as a code template only.
3698    * // It will require modifications to work:
3699    * // - It may require correct/in-range values for request initialization.
3700    * // - It may require specifying regional endpoints when creating the service client as shown in
3701    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3702    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3703    *   DeleteJobTriggerRequest request =
3704    *       DeleteJobTriggerRequest.newBuilder()
3705    *           .setName(
3706    *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
3707    *           .build();
3708    *   ApiFuture<Empty> future = dlpServiceClient.deleteJobTriggerCallable().futureCall(request);
3709    *   // Do something.
3710    *   future.get();
3711    * }
3712    * }</pre>
3713    */
deleteJobTriggerCallable()3714   public final UnaryCallable<DeleteJobTriggerRequest, Empty> deleteJobTriggerCallable() {
3715     return stub.deleteJobTriggerCallable();
3716   }
3717 
3718   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3719   /**
3720    * Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the
3721    * trigger event to occur.
3722    *
3723    * <p>Sample code:
3724    *
3725    * <pre>{@code
3726    * // This snippet has been automatically generated and should be regarded as a code template only.
3727    * // It will require modifications to work:
3728    * // - It may require correct/in-range values for request initialization.
3729    * // - It may require specifying regional endpoints when creating the service client as shown in
3730    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3731    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3732    *   ActivateJobTriggerRequest request =
3733    *       ActivateJobTriggerRequest.newBuilder()
3734    *           .setName(
3735    *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
3736    *           .build();
3737    *   DlpJob response = dlpServiceClient.activateJobTrigger(request);
3738    * }
3739    * }</pre>
3740    *
3741    * @param request The request object containing all of the parameters for the API call.
3742    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3743    */
activateJobTrigger(ActivateJobTriggerRequest request)3744   public final DlpJob activateJobTrigger(ActivateJobTriggerRequest request) {
3745     return activateJobTriggerCallable().call(request);
3746   }
3747 
3748   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3749   /**
3750    * Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the
3751    * trigger event to occur.
3752    *
3753    * <p>Sample code:
3754    *
3755    * <pre>{@code
3756    * // This snippet has been automatically generated and should be regarded as a code template only.
3757    * // It will require modifications to work:
3758    * // - It may require correct/in-range values for request initialization.
3759    * // - It may require specifying regional endpoints when creating the service client as shown in
3760    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3761    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3762    *   ActivateJobTriggerRequest request =
3763    *       ActivateJobTriggerRequest.newBuilder()
3764    *           .setName(
3765    *               JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]").toString())
3766    *           .build();
3767    *   ApiFuture<DlpJob> future = dlpServiceClient.activateJobTriggerCallable().futureCall(request);
3768    *   // Do something.
3769    *   DlpJob response = future.get();
3770    * }
3771    * }</pre>
3772    */
activateJobTriggerCallable()3773   public final UnaryCallable<ActivateJobTriggerRequest, DlpJob> activateJobTriggerCallable() {
3774     return stub.activateJobTriggerCallable();
3775   }
3776 
3777   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3778   /**
3779    * Creates a new job to inspect storage or calculate risk metrics. See
3780    * https://cloud.google.com/dlp/docs/inspecting-storage and
3781    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
3782    *
3783    * <p>When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
3784    * automatically choose what detectors to run. By default this may be all types, but may change
3785    * over time as detectors are updated.
3786    *
3787    * <p>Sample code:
3788    *
3789    * <pre>{@code
3790    * // This snippet has been automatically generated and should be regarded as a code template only.
3791    * // It will require modifications to work:
3792    * // - It may require correct/in-range values for request initialization.
3793    * // - It may require specifying regional endpoints when creating the service client as shown in
3794    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3795    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3796    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
3797    *   InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
3798    *   DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
3799    * }
3800    * }</pre>
3801    *
3802    * @param parent Required. Parent resource name.
3803    *     <p>The format of this value varies depending on whether you have [specified a processing
3804    *     location](https://cloud.google.com/dlp/docs/specifying-location):
3805    *     <p>+ Projects scope, location specified:&lt;br/&gt;
3806    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
3807    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
3808    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
3809    *     <p>The following example `parent` string specifies a parent project with the identifier
3810    *     `example-project`, and specifies the `europe-west3` location for processing data:
3811    *     <p>parent=projects/example-project/locations/europe-west3
3812    * @param inspectJob An inspection job scans a storage repository for InfoTypes.
3813    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3814    */
createDlpJob(LocationName parent, InspectJobConfig inspectJob)3815   public final DlpJob createDlpJob(LocationName parent, InspectJobConfig inspectJob) {
3816     CreateDlpJobRequest request =
3817         CreateDlpJobRequest.newBuilder()
3818             .setParent(parent == null ? null : parent.toString())
3819             .setInspectJob(inspectJob)
3820             .build();
3821     return createDlpJob(request);
3822   }
3823 
3824   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3825   /**
3826    * Creates a new job to inspect storage or calculate risk metrics. See
3827    * https://cloud.google.com/dlp/docs/inspecting-storage and
3828    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
3829    *
3830    * <p>When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
3831    * automatically choose what detectors to run. By default this may be all types, but may change
3832    * over time as detectors are updated.
3833    *
3834    * <p>Sample code:
3835    *
3836    * <pre>{@code
3837    * // This snippet has been automatically generated and should be regarded as a code template only.
3838    * // It will require modifications to work:
3839    * // - It may require correct/in-range values for request initialization.
3840    * // - It may require specifying regional endpoints when creating the service client as shown in
3841    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3842    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3843    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
3844    *   RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
3845    *   DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
3846    * }
3847    * }</pre>
3848    *
3849    * @param parent Required. Parent resource name.
3850    *     <p>The format of this value varies depending on whether you have [specified a processing
3851    *     location](https://cloud.google.com/dlp/docs/specifying-location):
3852    *     <p>+ Projects scope, location specified:&lt;br/&gt;
3853    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
3854    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
3855    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
3856    *     <p>The following example `parent` string specifies a parent project with the identifier
3857    *     `example-project`, and specifies the `europe-west3` location for processing data:
3858    *     <p>parent=projects/example-project/locations/europe-west3
3859    * @param riskJob A risk analysis job calculates re-identification risk metrics for a BigQuery
3860    *     table.
3861    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3862    */
createDlpJob(LocationName parent, RiskAnalysisJobConfig riskJob)3863   public final DlpJob createDlpJob(LocationName parent, RiskAnalysisJobConfig riskJob) {
3864     CreateDlpJobRequest request =
3865         CreateDlpJobRequest.newBuilder()
3866             .setParent(parent == null ? null : parent.toString())
3867             .setRiskJob(riskJob)
3868             .build();
3869     return createDlpJob(request);
3870   }
3871 
3872   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3873   /**
3874    * Creates a new job to inspect storage or calculate risk metrics. See
3875    * https://cloud.google.com/dlp/docs/inspecting-storage and
3876    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
3877    *
3878    * <p>When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
3879    * automatically choose what detectors to run. By default this may be all types, but may change
3880    * over time as detectors are updated.
3881    *
3882    * <p>Sample code:
3883    *
3884    * <pre>{@code
3885    * // This snippet has been automatically generated and should be regarded as a code template only.
3886    * // It will require modifications to work:
3887    * // - It may require correct/in-range values for request initialization.
3888    * // - It may require specifying regional endpoints when creating the service client as shown in
3889    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3890    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3891    *   ProjectName parent = ProjectName.of("[PROJECT]");
3892    *   InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
3893    *   DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
3894    * }
3895    * }</pre>
3896    *
3897    * @param parent Required. Parent resource name.
3898    *     <p>The format of this value varies depending on whether you have [specified a processing
3899    *     location](https://cloud.google.com/dlp/docs/specifying-location):
3900    *     <p>+ Projects scope, location specified:&lt;br/&gt;
3901    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
3902    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
3903    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
3904    *     <p>The following example `parent` string specifies a parent project with the identifier
3905    *     `example-project`, and specifies the `europe-west3` location for processing data:
3906    *     <p>parent=projects/example-project/locations/europe-west3
3907    * @param inspectJob An inspection job scans a storage repository for InfoTypes.
3908    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3909    */
createDlpJob(ProjectName parent, InspectJobConfig inspectJob)3910   public final DlpJob createDlpJob(ProjectName parent, InspectJobConfig inspectJob) {
3911     CreateDlpJobRequest request =
3912         CreateDlpJobRequest.newBuilder()
3913             .setParent(parent == null ? null : parent.toString())
3914             .setInspectJob(inspectJob)
3915             .build();
3916     return createDlpJob(request);
3917   }
3918 
3919   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3920   /**
3921    * Creates a new job to inspect storage or calculate risk metrics. See
3922    * https://cloud.google.com/dlp/docs/inspecting-storage and
3923    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
3924    *
3925    * <p>When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
3926    * automatically choose what detectors to run. By default this may be all types, but may change
3927    * over time as detectors are updated.
3928    *
3929    * <p>Sample code:
3930    *
3931    * <pre>{@code
3932    * // This snippet has been automatically generated and should be regarded as a code template only.
3933    * // It will require modifications to work:
3934    * // - It may require correct/in-range values for request initialization.
3935    * // - It may require specifying regional endpoints when creating the service client as shown in
3936    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3937    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3938    *   ProjectName parent = ProjectName.of("[PROJECT]");
3939    *   RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
3940    *   DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
3941    * }
3942    * }</pre>
3943    *
3944    * @param parent Required. Parent resource name.
3945    *     <p>The format of this value varies depending on whether you have [specified a processing
3946    *     location](https://cloud.google.com/dlp/docs/specifying-location):
3947    *     <p>+ Projects scope, location specified:&lt;br/&gt;
3948    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
3949    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
3950    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
3951    *     <p>The following example `parent` string specifies a parent project with the identifier
3952    *     `example-project`, and specifies the `europe-west3` location for processing data:
3953    *     <p>parent=projects/example-project/locations/europe-west3
3954    * @param riskJob A risk analysis job calculates re-identification risk metrics for a BigQuery
3955    *     table.
3956    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3957    */
createDlpJob(ProjectName parent, RiskAnalysisJobConfig riskJob)3958   public final DlpJob createDlpJob(ProjectName parent, RiskAnalysisJobConfig riskJob) {
3959     CreateDlpJobRequest request =
3960         CreateDlpJobRequest.newBuilder()
3961             .setParent(parent == null ? null : parent.toString())
3962             .setRiskJob(riskJob)
3963             .build();
3964     return createDlpJob(request);
3965   }
3966 
3967   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3968   /**
3969    * Creates a new job to inspect storage or calculate risk metrics. See
3970    * https://cloud.google.com/dlp/docs/inspecting-storage and
3971    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
3972    *
3973    * <p>When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
3974    * automatically choose what detectors to run. By default this may be all types, but may change
3975    * over time as detectors are updated.
3976    *
3977    * <p>Sample code:
3978    *
3979    * <pre>{@code
3980    * // This snippet has been automatically generated and should be regarded as a code template only.
3981    * // It will require modifications to work:
3982    * // - It may require correct/in-range values for request initialization.
3983    * // - It may require specifying regional endpoints when creating the service client as shown in
3984    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3985    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
3986    *   String parent = ProjectName.of("[PROJECT]").toString();
3987    *   InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
3988    *   DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
3989    * }
3990    * }</pre>
3991    *
3992    * @param parent Required. Parent resource name.
3993    *     <p>The format of this value varies depending on whether you have [specified a processing
3994    *     location](https://cloud.google.com/dlp/docs/specifying-location):
3995    *     <p>+ Projects scope, location specified:&lt;br/&gt;
3996    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
3997    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
3998    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
3999    *     <p>The following example `parent` string specifies a parent project with the identifier
4000    *     `example-project`, and specifies the `europe-west3` location for processing data:
4001    *     <p>parent=projects/example-project/locations/europe-west3
4002    * @param inspectJob An inspection job scans a storage repository for InfoTypes.
4003    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4004    */
createDlpJob(String parent, InspectJobConfig inspectJob)4005   public final DlpJob createDlpJob(String parent, InspectJobConfig inspectJob) {
4006     CreateDlpJobRequest request =
4007         CreateDlpJobRequest.newBuilder().setParent(parent).setInspectJob(inspectJob).build();
4008     return createDlpJob(request);
4009   }
4010 
4011   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4012   /**
4013    * Creates a new job to inspect storage or calculate risk metrics. See
4014    * https://cloud.google.com/dlp/docs/inspecting-storage and
4015    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4016    *
4017    * <p>When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
4018    * automatically choose what detectors to run. By default this may be all types, but may change
4019    * over time as detectors are updated.
4020    *
4021    * <p>Sample code:
4022    *
4023    * <pre>{@code
4024    * // This snippet has been automatically generated and should be regarded as a code template only.
4025    * // It will require modifications to work:
4026    * // - It may require correct/in-range values for request initialization.
4027    * // - It may require specifying regional endpoints when creating the service client as shown in
4028    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4029    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4030    *   String parent = ProjectName.of("[PROJECT]").toString();
4031    *   RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
4032    *   DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
4033    * }
4034    * }</pre>
4035    *
4036    * @param parent Required. Parent resource name.
4037    *     <p>The format of this value varies depending on whether you have [specified a processing
4038    *     location](https://cloud.google.com/dlp/docs/specifying-location):
4039    *     <p>+ Projects scope, location specified:&lt;br/&gt;
4040    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4041    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
4042    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
4043    *     <p>The following example `parent` string specifies a parent project with the identifier
4044    *     `example-project`, and specifies the `europe-west3` location for processing data:
4045    *     <p>parent=projects/example-project/locations/europe-west3
4046    * @param riskJob A risk analysis job calculates re-identification risk metrics for a BigQuery
4047    *     table.
4048    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4049    */
createDlpJob(String parent, RiskAnalysisJobConfig riskJob)4050   public final DlpJob createDlpJob(String parent, RiskAnalysisJobConfig riskJob) {
4051     CreateDlpJobRequest request =
4052         CreateDlpJobRequest.newBuilder().setParent(parent).setRiskJob(riskJob).build();
4053     return createDlpJob(request);
4054   }
4055 
4056   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4057   /**
4058    * Creates a new job to inspect storage or calculate risk metrics. See
4059    * https://cloud.google.com/dlp/docs/inspecting-storage and
4060    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4061    *
4062    * <p>When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
4063    * automatically choose what detectors to run. By default this may be all types, but may change
4064    * over time as detectors are updated.
4065    *
4066    * <p>Sample code:
4067    *
4068    * <pre>{@code
4069    * // This snippet has been automatically generated and should be regarded as a code template only.
4070    * // It will require modifications to work:
4071    * // - It may require correct/in-range values for request initialization.
4072    * // - It may require specifying regional endpoints when creating the service client as shown in
4073    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4074    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4075    *   CreateDlpJobRequest request =
4076    *       CreateDlpJobRequest.newBuilder()
4077    *           .setParent(ProjectName.of("[PROJECT]").toString())
4078    *           .setJobId("jobId101296568")
4079    *           .setLocationId("locationId1541836720")
4080    *           .build();
4081    *   DlpJob response = dlpServiceClient.createDlpJob(request);
4082    * }
4083    * }</pre>
4084    *
4085    * @param request The request object containing all of the parameters for the API call.
4086    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4087    */
createDlpJob(CreateDlpJobRequest request)4088   public final DlpJob createDlpJob(CreateDlpJobRequest request) {
4089     return createDlpJobCallable().call(request);
4090   }
4091 
4092   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4093   /**
4094    * Creates a new job to inspect storage or calculate risk metrics. See
4095    * https://cloud.google.com/dlp/docs/inspecting-storage and
4096    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4097    *
4098    * <p>When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
4099    * automatically choose what detectors to run. By default this may be all types, but may change
4100    * over time as detectors are updated.
4101    *
4102    * <p>Sample code:
4103    *
4104    * <pre>{@code
4105    * // This snippet has been automatically generated and should be regarded as a code template only.
4106    * // It will require modifications to work:
4107    * // - It may require correct/in-range values for request initialization.
4108    * // - It may require specifying regional endpoints when creating the service client as shown in
4109    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4110    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4111    *   CreateDlpJobRequest request =
4112    *       CreateDlpJobRequest.newBuilder()
4113    *           .setParent(ProjectName.of("[PROJECT]").toString())
4114    *           .setJobId("jobId101296568")
4115    *           .setLocationId("locationId1541836720")
4116    *           .build();
4117    *   ApiFuture<DlpJob> future = dlpServiceClient.createDlpJobCallable().futureCall(request);
4118    *   // Do something.
4119    *   DlpJob response = future.get();
4120    * }
4121    * }</pre>
4122    */
createDlpJobCallable()4123   public final UnaryCallable<CreateDlpJobRequest, DlpJob> createDlpJobCallable() {
4124     return stub.createDlpJobCallable();
4125   }
4126 
4127   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4128   /**
4129    * Lists DlpJobs that match the specified filter in the request. See
4130    * https://cloud.google.com/dlp/docs/inspecting-storage and
4131    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4132    *
4133    * <p>Sample code:
4134    *
4135    * <pre>{@code
4136    * // This snippet has been automatically generated and should be regarded as a code template only.
4137    * // It will require modifications to work:
4138    * // - It may require correct/in-range values for request initialization.
4139    * // - It may require specifying regional endpoints when creating the service client as shown in
4140    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4141    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4142    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
4143    *   for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
4144    *     // doThingsWith(element);
4145    *   }
4146    * }
4147    * }</pre>
4148    *
4149    * @param parent Required. Parent resource name.
4150    *     <p>The format of this value varies depending on whether you have [specified a processing
4151    *     location](https://cloud.google.com/dlp/docs/specifying-location):
4152    *     <p>+ Projects scope, location specified:&lt;br/&gt;
4153    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4154    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
4155    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
4156    *     <p>The following example `parent` string specifies a parent project with the identifier
4157    *     `example-project`, and specifies the `europe-west3` location for processing data:
4158    *     <p>parent=projects/example-project/locations/europe-west3
4159    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4160    */
listDlpJobs(LocationName parent)4161   public final ListDlpJobsPagedResponse listDlpJobs(LocationName parent) {
4162     ListDlpJobsRequest request =
4163         ListDlpJobsRequest.newBuilder()
4164             .setParent(parent == null ? null : parent.toString())
4165             .build();
4166     return listDlpJobs(request);
4167   }
4168 
4169   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4170   /**
4171    * Lists DlpJobs that match the specified filter in the request. See
4172    * https://cloud.google.com/dlp/docs/inspecting-storage and
4173    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4174    *
4175    * <p>Sample code:
4176    *
4177    * <pre>{@code
4178    * // This snippet has been automatically generated and should be regarded as a code template only.
4179    * // It will require modifications to work:
4180    * // - It may require correct/in-range values for request initialization.
4181    * // - It may require specifying regional endpoints when creating the service client as shown in
4182    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4183    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4184    *   ProjectName parent = ProjectName.of("[PROJECT]");
4185    *   for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
4186    *     // doThingsWith(element);
4187    *   }
4188    * }
4189    * }</pre>
4190    *
4191    * @param parent Required. Parent resource name.
4192    *     <p>The format of this value varies depending on whether you have [specified a processing
4193    *     location](https://cloud.google.com/dlp/docs/specifying-location):
4194    *     <p>+ Projects scope, location specified:&lt;br/&gt;
4195    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4196    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
4197    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
4198    *     <p>The following example `parent` string specifies a parent project with the identifier
4199    *     `example-project`, and specifies the `europe-west3` location for processing data:
4200    *     <p>parent=projects/example-project/locations/europe-west3
4201    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4202    */
listDlpJobs(ProjectName parent)4203   public final ListDlpJobsPagedResponse listDlpJobs(ProjectName parent) {
4204     ListDlpJobsRequest request =
4205         ListDlpJobsRequest.newBuilder()
4206             .setParent(parent == null ? null : parent.toString())
4207             .build();
4208     return listDlpJobs(request);
4209   }
4210 
4211   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4212   /**
4213    * Lists DlpJobs that match the specified filter in the request. See
4214    * https://cloud.google.com/dlp/docs/inspecting-storage and
4215    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4216    *
4217    * <p>Sample code:
4218    *
4219    * <pre>{@code
4220    * // This snippet has been automatically generated and should be regarded as a code template only.
4221    * // It will require modifications to work:
4222    * // - It may require correct/in-range values for request initialization.
4223    * // - It may require specifying regional endpoints when creating the service client as shown in
4224    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4225    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4226    *   String parent = ProjectName.of("[PROJECT]").toString();
4227    *   for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
4228    *     // doThingsWith(element);
4229    *   }
4230    * }
4231    * }</pre>
4232    *
4233    * @param parent Required. Parent resource name.
4234    *     <p>The format of this value varies depending on whether you have [specified a processing
4235    *     location](https://cloud.google.com/dlp/docs/specifying-location):
4236    *     <p>+ Projects scope, location specified:&lt;br/&gt;
4237    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4238    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
4239    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
4240    *     <p>The following example `parent` string specifies a parent project with the identifier
4241    *     `example-project`, and specifies the `europe-west3` location for processing data:
4242    *     <p>parent=projects/example-project/locations/europe-west3
4243    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4244    */
listDlpJobs(String parent)4245   public final ListDlpJobsPagedResponse listDlpJobs(String parent) {
4246     ListDlpJobsRequest request = ListDlpJobsRequest.newBuilder().setParent(parent).build();
4247     return listDlpJobs(request);
4248   }
4249 
4250   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4251   /**
4252    * Lists DlpJobs that match the specified filter in the request. See
4253    * https://cloud.google.com/dlp/docs/inspecting-storage and
4254    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4255    *
4256    * <p>Sample code:
4257    *
4258    * <pre>{@code
4259    * // This snippet has been automatically generated and should be regarded as a code template only.
4260    * // It will require modifications to work:
4261    * // - It may require correct/in-range values for request initialization.
4262    * // - It may require specifying regional endpoints when creating the service client as shown in
4263    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4264    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4265    *   ListDlpJobsRequest request =
4266    *       ListDlpJobsRequest.newBuilder()
4267    *           .setParent(ProjectName.of("[PROJECT]").toString())
4268    *           .setFilter("filter-1274492040")
4269    *           .setPageSize(883849137)
4270    *           .setPageToken("pageToken873572522")
4271    *           .setType(DlpJobType.forNumber(0))
4272    *           .setOrderBy("orderBy-1207110587")
4273    *           .setLocationId("locationId1541836720")
4274    *           .build();
4275    *   for (DlpJob element : dlpServiceClient.listDlpJobs(request).iterateAll()) {
4276    *     // doThingsWith(element);
4277    *   }
4278    * }
4279    * }</pre>
4280    *
4281    * @param request The request object containing all of the parameters for the API call.
4282    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4283    */
listDlpJobs(ListDlpJobsRequest request)4284   public final ListDlpJobsPagedResponse listDlpJobs(ListDlpJobsRequest request) {
4285     return listDlpJobsPagedCallable().call(request);
4286   }
4287 
4288   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4289   /**
4290    * Lists DlpJobs that match the specified filter in the request. See
4291    * https://cloud.google.com/dlp/docs/inspecting-storage and
4292    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4293    *
4294    * <p>Sample code:
4295    *
4296    * <pre>{@code
4297    * // This snippet has been automatically generated and should be regarded as a code template only.
4298    * // It will require modifications to work:
4299    * // - It may require correct/in-range values for request initialization.
4300    * // - It may require specifying regional endpoints when creating the service client as shown in
4301    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4302    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4303    *   ListDlpJobsRequest request =
4304    *       ListDlpJobsRequest.newBuilder()
4305    *           .setParent(ProjectName.of("[PROJECT]").toString())
4306    *           .setFilter("filter-1274492040")
4307    *           .setPageSize(883849137)
4308    *           .setPageToken("pageToken873572522")
4309    *           .setType(DlpJobType.forNumber(0))
4310    *           .setOrderBy("orderBy-1207110587")
4311    *           .setLocationId("locationId1541836720")
4312    *           .build();
4313    *   ApiFuture<DlpJob> future = dlpServiceClient.listDlpJobsPagedCallable().futureCall(request);
4314    *   // Do something.
4315    *   for (DlpJob element : future.get().iterateAll()) {
4316    *     // doThingsWith(element);
4317    *   }
4318    * }
4319    * }</pre>
4320    */
4321   public final UnaryCallable<ListDlpJobsRequest, ListDlpJobsPagedResponse>
listDlpJobsPagedCallable()4322       listDlpJobsPagedCallable() {
4323     return stub.listDlpJobsPagedCallable();
4324   }
4325 
4326   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4327   /**
4328    * Lists DlpJobs that match the specified filter in the request. See
4329    * https://cloud.google.com/dlp/docs/inspecting-storage and
4330    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4331    *
4332    * <p>Sample code:
4333    *
4334    * <pre>{@code
4335    * // This snippet has been automatically generated and should be regarded as a code template only.
4336    * // It will require modifications to work:
4337    * // - It may require correct/in-range values for request initialization.
4338    * // - It may require specifying regional endpoints when creating the service client as shown in
4339    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4340    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4341    *   ListDlpJobsRequest request =
4342    *       ListDlpJobsRequest.newBuilder()
4343    *           .setParent(ProjectName.of("[PROJECT]").toString())
4344    *           .setFilter("filter-1274492040")
4345    *           .setPageSize(883849137)
4346    *           .setPageToken("pageToken873572522")
4347    *           .setType(DlpJobType.forNumber(0))
4348    *           .setOrderBy("orderBy-1207110587")
4349    *           .setLocationId("locationId1541836720")
4350    *           .build();
4351    *   while (true) {
4352    *     ListDlpJobsResponse response = dlpServiceClient.listDlpJobsCallable().call(request);
4353    *     for (DlpJob element : response.getJobsList()) {
4354    *       // doThingsWith(element);
4355    *     }
4356    *     String nextPageToken = response.getNextPageToken();
4357    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
4358    *       request = request.toBuilder().setPageToken(nextPageToken).build();
4359    *     } else {
4360    *       break;
4361    *     }
4362    *   }
4363    * }
4364    * }</pre>
4365    */
listDlpJobsCallable()4366   public final UnaryCallable<ListDlpJobsRequest, ListDlpJobsResponse> listDlpJobsCallable() {
4367     return stub.listDlpJobsCallable();
4368   }
4369 
4370   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4371   /**
4372    * Gets the latest state of a long-running DlpJob. See
4373    * https://cloud.google.com/dlp/docs/inspecting-storage and
4374    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4375    *
4376    * <p>Sample code:
4377    *
4378    * <pre>{@code
4379    * // This snippet has been automatically generated and should be regarded as a code template only.
4380    * // It will require modifications to work:
4381    * // - It may require correct/in-range values for request initialization.
4382    * // - It may require specifying regional endpoints when creating the service client as shown in
4383    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4384    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4385    *   DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
4386    *   DlpJob response = dlpServiceClient.getDlpJob(name);
4387    * }
4388    * }</pre>
4389    *
4390    * @param name Required. The name of the DlpJob resource.
4391    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4392    */
getDlpJob(DlpJobName name)4393   public final DlpJob getDlpJob(DlpJobName name) {
4394     GetDlpJobRequest request =
4395         GetDlpJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
4396     return getDlpJob(request);
4397   }
4398 
4399   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4400   /**
4401    * Gets the latest state of a long-running DlpJob. See
4402    * https://cloud.google.com/dlp/docs/inspecting-storage and
4403    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4404    *
4405    * <p>Sample code:
4406    *
4407    * <pre>{@code
4408    * // This snippet has been automatically generated and should be regarded as a code template only.
4409    * // It will require modifications to work:
4410    * // - It may require correct/in-range values for request initialization.
4411    * // - It may require specifying regional endpoints when creating the service client as shown in
4412    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4413    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4414    *   String name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString();
4415    *   DlpJob response = dlpServiceClient.getDlpJob(name);
4416    * }
4417    * }</pre>
4418    *
4419    * @param name Required. The name of the DlpJob resource.
4420    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4421    */
getDlpJob(String name)4422   public final DlpJob getDlpJob(String name) {
4423     GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(name).build();
4424     return getDlpJob(request);
4425   }
4426 
4427   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4428   /**
4429    * Gets the latest state of a long-running DlpJob. See
4430    * https://cloud.google.com/dlp/docs/inspecting-storage and
4431    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4432    *
4433    * <p>Sample code:
4434    *
4435    * <pre>{@code
4436    * // This snippet has been automatically generated and should be regarded as a code template only.
4437    * // It will require modifications to work:
4438    * // - It may require correct/in-range values for request initialization.
4439    * // - It may require specifying regional endpoints when creating the service client as shown in
4440    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4441    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4442    *   GetDlpJobRequest request =
4443    *       GetDlpJobRequest.newBuilder()
4444    *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
4445    *           .build();
4446    *   DlpJob response = dlpServiceClient.getDlpJob(request);
4447    * }
4448    * }</pre>
4449    *
4450    * @param request The request object containing all of the parameters for the API call.
4451    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4452    */
getDlpJob(GetDlpJobRequest request)4453   public final DlpJob getDlpJob(GetDlpJobRequest request) {
4454     return getDlpJobCallable().call(request);
4455   }
4456 
4457   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4458   /**
4459    * Gets the latest state of a long-running DlpJob. See
4460    * https://cloud.google.com/dlp/docs/inspecting-storage and
4461    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4462    *
4463    * <p>Sample code:
4464    *
4465    * <pre>{@code
4466    * // This snippet has been automatically generated and should be regarded as a code template only.
4467    * // It will require modifications to work:
4468    * // - It may require correct/in-range values for request initialization.
4469    * // - It may require specifying regional endpoints when creating the service client as shown in
4470    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4471    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4472    *   GetDlpJobRequest request =
4473    *       GetDlpJobRequest.newBuilder()
4474    *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
4475    *           .build();
4476    *   ApiFuture<DlpJob> future = dlpServiceClient.getDlpJobCallable().futureCall(request);
4477    *   // Do something.
4478    *   DlpJob response = future.get();
4479    * }
4480    * }</pre>
4481    */
getDlpJobCallable()4482   public final UnaryCallable<GetDlpJobRequest, DlpJob> getDlpJobCallable() {
4483     return stub.getDlpJobCallable();
4484   }
4485 
4486   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4487   /**
4488    * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in
4489    * the DlpJob result. The job will be canceled if possible. See
4490    * https://cloud.google.com/dlp/docs/inspecting-storage and
4491    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4492    *
4493    * <p>Sample code:
4494    *
4495    * <pre>{@code
4496    * // This snippet has been automatically generated and should be regarded as a code template only.
4497    * // It will require modifications to work:
4498    * // - It may require correct/in-range values for request initialization.
4499    * // - It may require specifying regional endpoints when creating the service client as shown in
4500    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4501    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4502    *   DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
4503    *   dlpServiceClient.deleteDlpJob(name);
4504    * }
4505    * }</pre>
4506    *
4507    * @param name Required. The name of the DlpJob resource to be deleted.
4508    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4509    */
deleteDlpJob(DlpJobName name)4510   public final void deleteDlpJob(DlpJobName name) {
4511     DeleteDlpJobRequest request =
4512         DeleteDlpJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
4513     deleteDlpJob(request);
4514   }
4515 
4516   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4517   /**
4518    * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in
4519    * the DlpJob result. The job will be canceled if possible. See
4520    * https://cloud.google.com/dlp/docs/inspecting-storage and
4521    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4522    *
4523    * <p>Sample code:
4524    *
4525    * <pre>{@code
4526    * // This snippet has been automatically generated and should be regarded as a code template only.
4527    * // It will require modifications to work:
4528    * // - It may require correct/in-range values for request initialization.
4529    * // - It may require specifying regional endpoints when creating the service client as shown in
4530    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4531    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4532    *   String name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString();
4533    *   dlpServiceClient.deleteDlpJob(name);
4534    * }
4535    * }</pre>
4536    *
4537    * @param name Required. The name of the DlpJob resource to be deleted.
4538    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4539    */
deleteDlpJob(String name)4540   public final void deleteDlpJob(String name) {
4541     DeleteDlpJobRequest request = DeleteDlpJobRequest.newBuilder().setName(name).build();
4542     deleteDlpJob(request);
4543   }
4544 
4545   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4546   /**
4547    * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in
4548    * the DlpJob result. The job will be canceled if possible. See
4549    * https://cloud.google.com/dlp/docs/inspecting-storage and
4550    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4551    *
4552    * <p>Sample code:
4553    *
4554    * <pre>{@code
4555    * // This snippet has been automatically generated and should be regarded as a code template only.
4556    * // It will require modifications to work:
4557    * // - It may require correct/in-range values for request initialization.
4558    * // - It may require specifying regional endpoints when creating the service client as shown in
4559    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4560    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4561    *   DeleteDlpJobRequest request =
4562    *       DeleteDlpJobRequest.newBuilder()
4563    *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
4564    *           .build();
4565    *   dlpServiceClient.deleteDlpJob(request);
4566    * }
4567    * }</pre>
4568    *
4569    * @param request The request object containing all of the parameters for the API call.
4570    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4571    */
deleteDlpJob(DeleteDlpJobRequest request)4572   public final void deleteDlpJob(DeleteDlpJobRequest request) {
4573     deleteDlpJobCallable().call(request);
4574   }
4575 
4576   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4577   /**
4578    * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in
4579    * the DlpJob result. The job will be canceled if possible. See
4580    * https://cloud.google.com/dlp/docs/inspecting-storage and
4581    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4582    *
4583    * <p>Sample code:
4584    *
4585    * <pre>{@code
4586    * // This snippet has been automatically generated and should be regarded as a code template only.
4587    * // It will require modifications to work:
4588    * // - It may require correct/in-range values for request initialization.
4589    * // - It may require specifying regional endpoints when creating the service client as shown in
4590    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4591    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4592    *   DeleteDlpJobRequest request =
4593    *       DeleteDlpJobRequest.newBuilder()
4594    *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
4595    *           .build();
4596    *   ApiFuture<Empty> future = dlpServiceClient.deleteDlpJobCallable().futureCall(request);
4597    *   // Do something.
4598    *   future.get();
4599    * }
4600    * }</pre>
4601    */
deleteDlpJobCallable()4602   public final UnaryCallable<DeleteDlpJobRequest, Empty> deleteDlpJobCallable() {
4603     return stub.deleteDlpJobCallable();
4604   }
4605 
4606   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4607   /**
4608    * Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to
4609    * cancel the DlpJob, but success is not guaranteed. See
4610    * https://cloud.google.com/dlp/docs/inspecting-storage and
4611    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4612    *
4613    * <p>Sample code:
4614    *
4615    * <pre>{@code
4616    * // This snippet has been automatically generated and should be regarded as a code template only.
4617    * // It will require modifications to work:
4618    * // - It may require correct/in-range values for request initialization.
4619    * // - It may require specifying regional endpoints when creating the service client as shown in
4620    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4621    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4622    *   CancelDlpJobRequest request =
4623    *       CancelDlpJobRequest.newBuilder()
4624    *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
4625    *           .build();
4626    *   dlpServiceClient.cancelDlpJob(request);
4627    * }
4628    * }</pre>
4629    *
4630    * @param request The request object containing all of the parameters for the API call.
4631    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4632    */
cancelDlpJob(CancelDlpJobRequest request)4633   public final void cancelDlpJob(CancelDlpJobRequest request) {
4634     cancelDlpJobCallable().call(request);
4635   }
4636 
4637   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4638   /**
4639    * Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to
4640    * cancel the DlpJob, but success is not guaranteed. See
4641    * https://cloud.google.com/dlp/docs/inspecting-storage and
4642    * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
4643    *
4644    * <p>Sample code:
4645    *
4646    * <pre>{@code
4647    * // This snippet has been automatically generated and should be regarded as a code template only.
4648    * // It will require modifications to work:
4649    * // - It may require correct/in-range values for request initialization.
4650    * // - It may require specifying regional endpoints when creating the service client as shown in
4651    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4652    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4653    *   CancelDlpJobRequest request =
4654    *       CancelDlpJobRequest.newBuilder()
4655    *           .setName(DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString())
4656    *           .build();
4657    *   ApiFuture<Empty> future = dlpServiceClient.cancelDlpJobCallable().futureCall(request);
4658    *   // Do something.
4659    *   future.get();
4660    * }
4661    * }</pre>
4662    */
cancelDlpJobCallable()4663   public final UnaryCallable<CancelDlpJobRequest, Empty> cancelDlpJobCallable() {
4664     return stub.cancelDlpJobCallable();
4665   }
4666 
4667   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4668   /**
4669    * Creates a pre-built stored infoType to be used for inspection. See
4670    * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
4671    *
4672    * <p>Sample code:
4673    *
4674    * <pre>{@code
4675    * // This snippet has been automatically generated and should be regarded as a code template only.
4676    * // It will require modifications to work:
4677    * // - It may require correct/in-range values for request initialization.
4678    * // - It may require specifying regional endpoints when creating the service client as shown in
4679    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4680    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4681    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
4682    *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
4683    *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
4684    * }
4685    * }</pre>
4686    *
4687    * @param parent Required. Parent resource name.
4688    *     <p>The format of this value varies depending on the scope of the request (project or
4689    *     organization) and whether you have [specified a processing
4690    *     location](https://cloud.google.com/dlp/docs/specifying-location):
4691    *     <p>+ Projects scope, location specified:&lt;br/&gt;
4692    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4693    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
4694    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
4695    *     specified:&lt;br/&gt;
4696    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4697    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
4698    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
4699    *     <p>The following example `parent` string specifies a parent project with the identifier
4700    *     `example-project`, and specifies the `europe-west3` location for processing data:
4701    *     <p>parent=projects/example-project/locations/europe-west3
4702    * @param config Required. Configuration of the storedInfoType to create.
4703    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4704    */
createStoredInfoType( LocationName parent, StoredInfoTypeConfig config)4705   public final StoredInfoType createStoredInfoType(
4706       LocationName parent, StoredInfoTypeConfig config) {
4707     CreateStoredInfoTypeRequest request =
4708         CreateStoredInfoTypeRequest.newBuilder()
4709             .setParent(parent == null ? null : parent.toString())
4710             .setConfig(config)
4711             .build();
4712     return createStoredInfoType(request);
4713   }
4714 
4715   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4716   /**
4717    * Creates a pre-built stored infoType to be used for inspection. See
4718    * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
4719    *
4720    * <p>Sample code:
4721    *
4722    * <pre>{@code
4723    * // This snippet has been automatically generated and should be regarded as a code template only.
4724    * // It will require modifications to work:
4725    * // - It may require correct/in-range values for request initialization.
4726    * // - It may require specifying regional endpoints when creating the service client as shown in
4727    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4728    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4729    *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
4730    *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
4731    *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
4732    * }
4733    * }</pre>
4734    *
4735    * @param parent Required. Parent resource name.
4736    *     <p>The format of this value varies depending on the scope of the request (project or
4737    *     organization) and whether you have [specified a processing
4738    *     location](https://cloud.google.com/dlp/docs/specifying-location):
4739    *     <p>+ Projects scope, location specified:&lt;br/&gt;
4740    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4741    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
4742    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
4743    *     specified:&lt;br/&gt;
4744    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4745    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
4746    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
4747    *     <p>The following example `parent` string specifies a parent project with the identifier
4748    *     `example-project`, and specifies the `europe-west3` location for processing data:
4749    *     <p>parent=projects/example-project/locations/europe-west3
4750    * @param config Required. Configuration of the storedInfoType to create.
4751    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4752    */
createStoredInfoType( OrganizationLocationName parent, StoredInfoTypeConfig config)4753   public final StoredInfoType createStoredInfoType(
4754       OrganizationLocationName parent, StoredInfoTypeConfig config) {
4755     CreateStoredInfoTypeRequest request =
4756         CreateStoredInfoTypeRequest.newBuilder()
4757             .setParent(parent == null ? null : parent.toString())
4758             .setConfig(config)
4759             .build();
4760     return createStoredInfoType(request);
4761   }
4762 
4763   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4764   /**
4765    * Creates a pre-built stored infoType to be used for inspection. See
4766    * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
4767    *
4768    * <p>Sample code:
4769    *
4770    * <pre>{@code
4771    * // This snippet has been automatically generated and should be regarded as a code template only.
4772    * // It will require modifications to work:
4773    * // - It may require correct/in-range values for request initialization.
4774    * // - It may require specifying regional endpoints when creating the service client as shown in
4775    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4776    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4777    *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
4778    *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
4779    *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
4780    * }
4781    * }</pre>
4782    *
4783    * @param parent Required. Parent resource name.
4784    *     <p>The format of this value varies depending on the scope of the request (project or
4785    *     organization) and whether you have [specified a processing
4786    *     location](https://cloud.google.com/dlp/docs/specifying-location):
4787    *     <p>+ Projects scope, location specified:&lt;br/&gt;
4788    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4789    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
4790    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
4791    *     specified:&lt;br/&gt;
4792    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4793    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
4794    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
4795    *     <p>The following example `parent` string specifies a parent project with the identifier
4796    *     `example-project`, and specifies the `europe-west3` location for processing data:
4797    *     <p>parent=projects/example-project/locations/europe-west3
4798    * @param config Required. Configuration of the storedInfoType to create.
4799    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4800    */
createStoredInfoType( OrganizationName parent, StoredInfoTypeConfig config)4801   public final StoredInfoType createStoredInfoType(
4802       OrganizationName parent, StoredInfoTypeConfig config) {
4803     CreateStoredInfoTypeRequest request =
4804         CreateStoredInfoTypeRequest.newBuilder()
4805             .setParent(parent == null ? null : parent.toString())
4806             .setConfig(config)
4807             .build();
4808     return createStoredInfoType(request);
4809   }
4810 
4811   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4812   /**
4813    * Creates a pre-built stored infoType to be used for inspection. See
4814    * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
4815    *
4816    * <p>Sample code:
4817    *
4818    * <pre>{@code
4819    * // This snippet has been automatically generated and should be regarded as a code template only.
4820    * // It will require modifications to work:
4821    * // - It may require correct/in-range values for request initialization.
4822    * // - It may require specifying regional endpoints when creating the service client as shown in
4823    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4824    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4825    *   ProjectName parent = ProjectName.of("[PROJECT]");
4826    *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
4827    *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
4828    * }
4829    * }</pre>
4830    *
4831    * @param parent Required. Parent resource name.
4832    *     <p>The format of this value varies depending on the scope of the request (project or
4833    *     organization) and whether you have [specified a processing
4834    *     location](https://cloud.google.com/dlp/docs/specifying-location):
4835    *     <p>+ Projects scope, location specified:&lt;br/&gt;
4836    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4837    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
4838    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
4839    *     specified:&lt;br/&gt;
4840    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4841    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
4842    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
4843    *     <p>The following example `parent` string specifies a parent project with the identifier
4844    *     `example-project`, and specifies the `europe-west3` location for processing data:
4845    *     <p>parent=projects/example-project/locations/europe-west3
4846    * @param config Required. Configuration of the storedInfoType to create.
4847    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4848    */
createStoredInfoType( ProjectName parent, StoredInfoTypeConfig config)4849   public final StoredInfoType createStoredInfoType(
4850       ProjectName parent, StoredInfoTypeConfig config) {
4851     CreateStoredInfoTypeRequest request =
4852         CreateStoredInfoTypeRequest.newBuilder()
4853             .setParent(parent == null ? null : parent.toString())
4854             .setConfig(config)
4855             .build();
4856     return createStoredInfoType(request);
4857   }
4858 
4859   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4860   /**
4861    * Creates a pre-built stored infoType to be used for inspection. See
4862    * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
4863    *
4864    * <p>Sample code:
4865    *
4866    * <pre>{@code
4867    * // This snippet has been automatically generated and should be regarded as a code template only.
4868    * // It will require modifications to work:
4869    * // - It may require correct/in-range values for request initialization.
4870    * // - It may require specifying regional endpoints when creating the service client as shown in
4871    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4872    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4873    *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
4874    *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
4875    *   StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
4876    * }
4877    * }</pre>
4878    *
4879    * @param parent Required. Parent resource name.
4880    *     <p>The format of this value varies depending on the scope of the request (project or
4881    *     organization) and whether you have [specified a processing
4882    *     location](https://cloud.google.com/dlp/docs/specifying-location):
4883    *     <p>+ Projects scope, location specified:&lt;br/&gt;
4884    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4885    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
4886    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt; + Organizations scope, location
4887    *     specified:&lt;br/&gt;
4888    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
4889    *     + Organizations scope, no location specified (defaults to global):&lt;br/&gt;
4890    *     `organizations/`&lt;var&gt;ORG_ID&lt;/var&gt;
4891    *     <p>The following example `parent` string specifies a parent project with the identifier
4892    *     `example-project`, and specifies the `europe-west3` location for processing data:
4893    *     <p>parent=projects/example-project/locations/europe-west3
4894    * @param config Required. Configuration of the storedInfoType to create.
4895    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4896    */
createStoredInfoType(String parent, StoredInfoTypeConfig config)4897   public final StoredInfoType createStoredInfoType(String parent, StoredInfoTypeConfig config) {
4898     CreateStoredInfoTypeRequest request =
4899         CreateStoredInfoTypeRequest.newBuilder().setParent(parent).setConfig(config).build();
4900     return createStoredInfoType(request);
4901   }
4902 
4903   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4904   /**
4905    * Creates a pre-built stored infoType to be used for inspection. See
4906    * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
4907    *
4908    * <p>Sample code:
4909    *
4910    * <pre>{@code
4911    * // This snippet has been automatically generated and should be regarded as a code template only.
4912    * // It will require modifications to work:
4913    * // - It may require correct/in-range values for request initialization.
4914    * // - It may require specifying regional endpoints when creating the service client as shown in
4915    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4916    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4917    *   CreateStoredInfoTypeRequest request =
4918    *       CreateStoredInfoTypeRequest.newBuilder()
4919    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
4920    *           .setConfig(StoredInfoTypeConfig.newBuilder().build())
4921    *           .setStoredInfoTypeId("storedInfoTypeId-1409591226")
4922    *           .setLocationId("locationId1541836720")
4923    *           .build();
4924    *   StoredInfoType response = dlpServiceClient.createStoredInfoType(request);
4925    * }
4926    * }</pre>
4927    *
4928    * @param request The request object containing all of the parameters for the API call.
4929    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4930    */
createStoredInfoType(CreateStoredInfoTypeRequest request)4931   public final StoredInfoType createStoredInfoType(CreateStoredInfoTypeRequest request) {
4932     return createStoredInfoTypeCallable().call(request);
4933   }
4934 
4935   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4936   /**
4937    * Creates a pre-built stored infoType to be used for inspection. See
4938    * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
4939    *
4940    * <p>Sample code:
4941    *
4942    * <pre>{@code
4943    * // This snippet has been automatically generated and should be regarded as a code template only.
4944    * // It will require modifications to work:
4945    * // - It may require correct/in-range values for request initialization.
4946    * // - It may require specifying regional endpoints when creating the service client as shown in
4947    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4948    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4949    *   CreateStoredInfoTypeRequest request =
4950    *       CreateStoredInfoTypeRequest.newBuilder()
4951    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
4952    *           .setConfig(StoredInfoTypeConfig.newBuilder().build())
4953    *           .setStoredInfoTypeId("storedInfoTypeId-1409591226")
4954    *           .setLocationId("locationId1541836720")
4955    *           .build();
4956    *   ApiFuture<StoredInfoType> future =
4957    *       dlpServiceClient.createStoredInfoTypeCallable().futureCall(request);
4958    *   // Do something.
4959    *   StoredInfoType response = future.get();
4960    * }
4961    * }</pre>
4962    */
4963   public final UnaryCallable<CreateStoredInfoTypeRequest, StoredInfoType>
createStoredInfoTypeCallable()4964       createStoredInfoTypeCallable() {
4965     return stub.createStoredInfoTypeCallable();
4966   }
4967 
4968   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4969   /**
4970    * Updates the stored infoType by creating a new version. The existing version will continue to be
4971    * used until the new version is ready. See
4972    * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
4973    *
4974    * <p>Sample code:
4975    *
4976    * <pre>{@code
4977    * // This snippet has been automatically generated and should be regarded as a code template only.
4978    * // It will require modifications to work:
4979    * // - It may require correct/in-range values for request initialization.
4980    * // - It may require specifying regional endpoints when creating the service client as shown in
4981    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4982    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
4983    *   StoredInfoTypeName name =
4984    *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
4985    *           "[ORGANIZATION]", "[STORED_INFO_TYPE]");
4986    *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
4987    *   FieldMask updateMask = FieldMask.newBuilder().build();
4988    *   StoredInfoType response = dlpServiceClient.updateStoredInfoType(name, config, updateMask);
4989    * }
4990    * }</pre>
4991    *
4992    * @param name Required. Resource name of organization and storedInfoType to be updated, for
4993    *     example `organizations/433245324/storedInfoTypes/432452342` or
4994    *     projects/project-id/storedInfoTypes/432452342.
4995    * @param config Updated configuration for the storedInfoType. If not provided, a new version of
4996    *     the storedInfoType will be created with the existing configuration.
4997    * @param updateMask Mask to control which fields get updated.
4998    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4999    */
updateStoredInfoType( StoredInfoTypeName name, StoredInfoTypeConfig config, FieldMask updateMask)5000   public final StoredInfoType updateStoredInfoType(
5001       StoredInfoTypeName name, StoredInfoTypeConfig config, FieldMask updateMask) {
5002     UpdateStoredInfoTypeRequest request =
5003         UpdateStoredInfoTypeRequest.newBuilder()
5004             .setName(name == null ? null : name.toString())
5005             .setConfig(config)
5006             .setUpdateMask(updateMask)
5007             .build();
5008     return updateStoredInfoType(request);
5009   }
5010 
5011   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5012   /**
5013    * Updates the stored infoType by creating a new version. The existing version will continue to be
5014    * used until the new version is ready. See
5015    * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
5016    *
5017    * <p>Sample code:
5018    *
5019    * <pre>{@code
5020    * // This snippet has been automatically generated and should be regarded as a code template only.
5021    * // It will require modifications to work:
5022    * // - It may require correct/in-range values for request initialization.
5023    * // - It may require specifying regional endpoints when creating the service client as shown in
5024    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5025    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5026    *   String name =
5027    *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
5028    *               "[ORGANIZATION]", "[STORED_INFO_TYPE]")
5029    *           .toString();
5030    *   StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
5031    *   FieldMask updateMask = FieldMask.newBuilder().build();
5032    *   StoredInfoType response = dlpServiceClient.updateStoredInfoType(name, config, updateMask);
5033    * }
5034    * }</pre>
5035    *
5036    * @param name Required. Resource name of organization and storedInfoType to be updated, for
5037    *     example `organizations/433245324/storedInfoTypes/432452342` or
5038    *     projects/project-id/storedInfoTypes/432452342.
5039    * @param config Updated configuration for the storedInfoType. If not provided, a new version of
5040    *     the storedInfoType will be created with the existing configuration.
5041    * @param updateMask Mask to control which fields get updated.
5042    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5043    */
updateStoredInfoType( String name, StoredInfoTypeConfig config, FieldMask updateMask)5044   public final StoredInfoType updateStoredInfoType(
5045       String name, StoredInfoTypeConfig config, FieldMask updateMask) {
5046     UpdateStoredInfoTypeRequest request =
5047         UpdateStoredInfoTypeRequest.newBuilder()
5048             .setName(name)
5049             .setConfig(config)
5050             .setUpdateMask(updateMask)
5051             .build();
5052     return updateStoredInfoType(request);
5053   }
5054 
5055   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5056   /**
5057    * Updates the stored infoType by creating a new version. The existing version will continue to be
5058    * used until the new version is ready. See
5059    * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
5060    *
5061    * <p>Sample code:
5062    *
5063    * <pre>{@code
5064    * // This snippet has been automatically generated and should be regarded as a code template only.
5065    * // It will require modifications to work:
5066    * // - It may require correct/in-range values for request initialization.
5067    * // - It may require specifying regional endpoints when creating the service client as shown in
5068    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5069    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5070    *   UpdateStoredInfoTypeRequest request =
5071    *       UpdateStoredInfoTypeRequest.newBuilder()
5072    *           .setName(
5073    *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
5074    *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
5075    *                   .toString())
5076    *           .setConfig(StoredInfoTypeConfig.newBuilder().build())
5077    *           .setUpdateMask(FieldMask.newBuilder().build())
5078    *           .build();
5079    *   StoredInfoType response = dlpServiceClient.updateStoredInfoType(request);
5080    * }
5081    * }</pre>
5082    *
5083    * @param request The request object containing all of the parameters for the API call.
5084    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5085    */
updateStoredInfoType(UpdateStoredInfoTypeRequest request)5086   public final StoredInfoType updateStoredInfoType(UpdateStoredInfoTypeRequest request) {
5087     return updateStoredInfoTypeCallable().call(request);
5088   }
5089 
5090   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5091   /**
5092    * Updates the stored infoType by creating a new version. The existing version will continue to be
5093    * used until the new version is ready. See
5094    * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
5095    *
5096    * <p>Sample code:
5097    *
5098    * <pre>{@code
5099    * // This snippet has been automatically generated and should be regarded as a code template only.
5100    * // It will require modifications to work:
5101    * // - It may require correct/in-range values for request initialization.
5102    * // - It may require specifying regional endpoints when creating the service client as shown in
5103    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5104    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5105    *   UpdateStoredInfoTypeRequest request =
5106    *       UpdateStoredInfoTypeRequest.newBuilder()
5107    *           .setName(
5108    *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
5109    *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
5110    *                   .toString())
5111    *           .setConfig(StoredInfoTypeConfig.newBuilder().build())
5112    *           .setUpdateMask(FieldMask.newBuilder().build())
5113    *           .build();
5114    *   ApiFuture<StoredInfoType> future =
5115    *       dlpServiceClient.updateStoredInfoTypeCallable().futureCall(request);
5116    *   // Do something.
5117    *   StoredInfoType response = future.get();
5118    * }
5119    * }</pre>
5120    */
5121   public final UnaryCallable<UpdateStoredInfoTypeRequest, StoredInfoType>
updateStoredInfoTypeCallable()5122       updateStoredInfoTypeCallable() {
5123     return stub.updateStoredInfoTypeCallable();
5124   }
5125 
5126   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5127   /**
5128    * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5129    * learn more.
5130    *
5131    * <p>Sample code:
5132    *
5133    * <pre>{@code
5134    * // This snippet has been automatically generated and should be regarded as a code template only.
5135    * // It will require modifications to work:
5136    * // - It may require correct/in-range values for request initialization.
5137    * // - It may require specifying regional endpoints when creating the service client as shown in
5138    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5139    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5140    *   StoredInfoTypeName name =
5141    *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
5142    *           "[ORGANIZATION]", "[STORED_INFO_TYPE]");
5143    *   StoredInfoType response = dlpServiceClient.getStoredInfoType(name);
5144    * }
5145    * }</pre>
5146    *
5147    * @param name Required. Resource name of the organization and storedInfoType to be read, for
5148    *     example `organizations/433245324/storedInfoTypes/432452342` or
5149    *     projects/project-id/storedInfoTypes/432452342.
5150    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5151    */
getStoredInfoType(StoredInfoTypeName name)5152   public final StoredInfoType getStoredInfoType(StoredInfoTypeName name) {
5153     GetStoredInfoTypeRequest request =
5154         GetStoredInfoTypeRequest.newBuilder()
5155             .setName(name == null ? null : name.toString())
5156             .build();
5157     return getStoredInfoType(request);
5158   }
5159 
5160   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5161   /**
5162    * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5163    * learn more.
5164    *
5165    * <p>Sample code:
5166    *
5167    * <pre>{@code
5168    * // This snippet has been automatically generated and should be regarded as a code template only.
5169    * // It will require modifications to work:
5170    * // - It may require correct/in-range values for request initialization.
5171    * // - It may require specifying regional endpoints when creating the service client as shown in
5172    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5173    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5174    *   String name =
5175    *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
5176    *               "[ORGANIZATION]", "[STORED_INFO_TYPE]")
5177    *           .toString();
5178    *   StoredInfoType response = dlpServiceClient.getStoredInfoType(name);
5179    * }
5180    * }</pre>
5181    *
5182    * @param name Required. Resource name of the organization and storedInfoType to be read, for
5183    *     example `organizations/433245324/storedInfoTypes/432452342` or
5184    *     projects/project-id/storedInfoTypes/432452342.
5185    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5186    */
getStoredInfoType(String name)5187   public final StoredInfoType getStoredInfoType(String name) {
5188     GetStoredInfoTypeRequest request = GetStoredInfoTypeRequest.newBuilder().setName(name).build();
5189     return getStoredInfoType(request);
5190   }
5191 
5192   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5193   /**
5194    * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5195    * learn more.
5196    *
5197    * <p>Sample code:
5198    *
5199    * <pre>{@code
5200    * // This snippet has been automatically generated and should be regarded as a code template only.
5201    * // It will require modifications to work:
5202    * // - It may require correct/in-range values for request initialization.
5203    * // - It may require specifying regional endpoints when creating the service client as shown in
5204    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5205    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5206    *   GetStoredInfoTypeRequest request =
5207    *       GetStoredInfoTypeRequest.newBuilder()
5208    *           .setName(
5209    *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
5210    *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
5211    *                   .toString())
5212    *           .build();
5213    *   StoredInfoType response = dlpServiceClient.getStoredInfoType(request);
5214    * }
5215    * }</pre>
5216    *
5217    * @param request The request object containing all of the parameters for the API call.
5218    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5219    */
getStoredInfoType(GetStoredInfoTypeRequest request)5220   public final StoredInfoType getStoredInfoType(GetStoredInfoTypeRequest request) {
5221     return getStoredInfoTypeCallable().call(request);
5222   }
5223 
5224   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5225   /**
5226    * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5227    * learn more.
5228    *
5229    * <p>Sample code:
5230    *
5231    * <pre>{@code
5232    * // This snippet has been automatically generated and should be regarded as a code template only.
5233    * // It will require modifications to work:
5234    * // - It may require correct/in-range values for request initialization.
5235    * // - It may require specifying regional endpoints when creating the service client as shown in
5236    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5237    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5238    *   GetStoredInfoTypeRequest request =
5239    *       GetStoredInfoTypeRequest.newBuilder()
5240    *           .setName(
5241    *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
5242    *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
5243    *                   .toString())
5244    *           .build();
5245    *   ApiFuture<StoredInfoType> future =
5246    *       dlpServiceClient.getStoredInfoTypeCallable().futureCall(request);
5247    *   // Do something.
5248    *   StoredInfoType response = future.get();
5249    * }
5250    * }</pre>
5251    */
getStoredInfoTypeCallable()5252   public final UnaryCallable<GetStoredInfoTypeRequest, StoredInfoType> getStoredInfoTypeCallable() {
5253     return stub.getStoredInfoTypeCallable();
5254   }
5255 
5256   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5257   /**
5258    * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5259    * learn more.
5260    *
5261    * <p>Sample code:
5262    *
5263    * <pre>{@code
5264    * // This snippet has been automatically generated and should be regarded as a code template only.
5265    * // It will require modifications to work:
5266    * // - It may require correct/in-range values for request initialization.
5267    * // - It may require specifying regional endpoints when creating the service client as shown in
5268    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5269    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5270    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
5271    *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
5272    *     // doThingsWith(element);
5273    *   }
5274    * }
5275    * }</pre>
5276    *
5277    * @param parent Required. Parent resource name.
5278    *     <p>The format of this value varies depending on the scope of the request (project or
5279    *     organization) and whether you have [specified a processing
5280    *     location](https://cloud.google.com/dlp/docs/specifying-location):
5281    *     <p>+ Projects scope, location specified:&lt;br/&gt;
5282    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
5283    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
5284    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
5285    *     <p>The following example `parent` string specifies a parent project with the identifier
5286    *     `example-project`, and specifies the `europe-west3` location for processing data:
5287    *     <p>parent=projects/example-project/locations/europe-west3
5288    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5289    */
listStoredInfoTypes(LocationName parent)5290   public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(LocationName parent) {
5291     ListStoredInfoTypesRequest request =
5292         ListStoredInfoTypesRequest.newBuilder()
5293             .setParent(parent == null ? null : parent.toString())
5294             .build();
5295     return listStoredInfoTypes(request);
5296   }
5297 
5298   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5299   /**
5300    * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5301    * learn more.
5302    *
5303    * <p>Sample code:
5304    *
5305    * <pre>{@code
5306    * // This snippet has been automatically generated and should be regarded as a code template only.
5307    * // It will require modifications to work:
5308    * // - It may require correct/in-range values for request initialization.
5309    * // - It may require specifying regional endpoints when creating the service client as shown in
5310    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5311    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5312    *   OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
5313    *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
5314    *     // doThingsWith(element);
5315    *   }
5316    * }
5317    * }</pre>
5318    *
5319    * @param parent Required. Parent resource name.
5320    *     <p>The format of this value varies depending on the scope of the request (project or
5321    *     organization) and whether you have [specified a processing
5322    *     location](https://cloud.google.com/dlp/docs/specifying-location):
5323    *     <p>+ Projects scope, location specified:&lt;br/&gt;
5324    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
5325    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
5326    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
5327    *     <p>The following example `parent` string specifies a parent project with the identifier
5328    *     `example-project`, and specifies the `europe-west3` location for processing data:
5329    *     <p>parent=projects/example-project/locations/europe-west3
5330    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5331    */
listStoredInfoTypes( OrganizationLocationName parent)5332   public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(
5333       OrganizationLocationName parent) {
5334     ListStoredInfoTypesRequest request =
5335         ListStoredInfoTypesRequest.newBuilder()
5336             .setParent(parent == null ? null : parent.toString())
5337             .build();
5338     return listStoredInfoTypes(request);
5339   }
5340 
5341   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5342   /**
5343    * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5344    * learn more.
5345    *
5346    * <p>Sample code:
5347    *
5348    * <pre>{@code
5349    * // This snippet has been automatically generated and should be regarded as a code template only.
5350    * // It will require modifications to work:
5351    * // - It may require correct/in-range values for request initialization.
5352    * // - It may require specifying regional endpoints when creating the service client as shown in
5353    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5354    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5355    *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
5356    *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
5357    *     // doThingsWith(element);
5358    *   }
5359    * }
5360    * }</pre>
5361    *
5362    * @param parent Required. Parent resource name.
5363    *     <p>The format of this value varies depending on the scope of the request (project or
5364    *     organization) and whether you have [specified a processing
5365    *     location](https://cloud.google.com/dlp/docs/specifying-location):
5366    *     <p>+ Projects scope, location specified:&lt;br/&gt;
5367    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
5368    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
5369    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
5370    *     <p>The following example `parent` string specifies a parent project with the identifier
5371    *     `example-project`, and specifies the `europe-west3` location for processing data:
5372    *     <p>parent=projects/example-project/locations/europe-west3
5373    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5374    */
listStoredInfoTypes(OrganizationName parent)5375   public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(OrganizationName parent) {
5376     ListStoredInfoTypesRequest request =
5377         ListStoredInfoTypesRequest.newBuilder()
5378             .setParent(parent == null ? null : parent.toString())
5379             .build();
5380     return listStoredInfoTypes(request);
5381   }
5382 
5383   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5384   /**
5385    * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5386    * learn more.
5387    *
5388    * <p>Sample code:
5389    *
5390    * <pre>{@code
5391    * // This snippet has been automatically generated and should be regarded as a code template only.
5392    * // It will require modifications to work:
5393    * // - It may require correct/in-range values for request initialization.
5394    * // - It may require specifying regional endpoints when creating the service client as shown in
5395    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5396    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5397    *   ProjectName parent = ProjectName.of("[PROJECT]");
5398    *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
5399    *     // doThingsWith(element);
5400    *   }
5401    * }
5402    * }</pre>
5403    *
5404    * @param parent Required. Parent resource name.
5405    *     <p>The format of this value varies depending on the scope of the request (project or
5406    *     organization) and whether you have [specified a processing
5407    *     location](https://cloud.google.com/dlp/docs/specifying-location):
5408    *     <p>+ Projects scope, location specified:&lt;br/&gt;
5409    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
5410    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
5411    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
5412    *     <p>The following example `parent` string specifies a parent project with the identifier
5413    *     `example-project`, and specifies the `europe-west3` location for processing data:
5414    *     <p>parent=projects/example-project/locations/europe-west3
5415    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5416    */
listStoredInfoTypes(ProjectName parent)5417   public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(ProjectName parent) {
5418     ListStoredInfoTypesRequest request =
5419         ListStoredInfoTypesRequest.newBuilder()
5420             .setParent(parent == null ? null : parent.toString())
5421             .build();
5422     return listStoredInfoTypes(request);
5423   }
5424 
5425   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5426   /**
5427    * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5428    * learn more.
5429    *
5430    * <p>Sample code:
5431    *
5432    * <pre>{@code
5433    * // This snippet has been automatically generated and should be regarded as a code template only.
5434    * // It will require modifications to work:
5435    * // - It may require correct/in-range values for request initialization.
5436    * // - It may require specifying regional endpoints when creating the service client as shown in
5437    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5438    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5439    *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
5440    *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
5441    *     // doThingsWith(element);
5442    *   }
5443    * }
5444    * }</pre>
5445    *
5446    * @param parent Required. Parent resource name.
5447    *     <p>The format of this value varies depending on the scope of the request (project or
5448    *     organization) and whether you have [specified a processing
5449    *     location](https://cloud.google.com/dlp/docs/specifying-location):
5450    *     <p>+ Projects scope, location specified:&lt;br/&gt;
5451    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;`/locations/`&lt;var&gt;LOCATION_ID&lt;/var&gt;
5452    *     + Projects scope, no location specified (defaults to global):&lt;br/&gt;
5453    *     `projects/`&lt;var&gt;PROJECT_ID&lt;/var&gt;
5454    *     <p>The following example `parent` string specifies a parent project with the identifier
5455    *     `example-project`, and specifies the `europe-west3` location for processing data:
5456    *     <p>parent=projects/example-project/locations/europe-west3
5457    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5458    */
listStoredInfoTypes(String parent)5459   public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(String parent) {
5460     ListStoredInfoTypesRequest request =
5461         ListStoredInfoTypesRequest.newBuilder().setParent(parent).build();
5462     return listStoredInfoTypes(request);
5463   }
5464 
5465   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5466   /**
5467    * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5468    * learn more.
5469    *
5470    * <p>Sample code:
5471    *
5472    * <pre>{@code
5473    * // This snippet has been automatically generated and should be regarded as a code template only.
5474    * // It will require modifications to work:
5475    * // - It may require correct/in-range values for request initialization.
5476    * // - It may require specifying regional endpoints when creating the service client as shown in
5477    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5478    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5479    *   ListStoredInfoTypesRequest request =
5480    *       ListStoredInfoTypesRequest.newBuilder()
5481    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
5482    *           .setPageToken("pageToken873572522")
5483    *           .setPageSize(883849137)
5484    *           .setOrderBy("orderBy-1207110587")
5485    *           .setLocationId("locationId1541836720")
5486    *           .build();
5487    *   for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(request).iterateAll()) {
5488    *     // doThingsWith(element);
5489    *   }
5490    * }
5491    * }</pre>
5492    *
5493    * @param request The request object containing all of the parameters for the API call.
5494    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5495    */
listStoredInfoTypes( ListStoredInfoTypesRequest request)5496   public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(
5497       ListStoredInfoTypesRequest request) {
5498     return listStoredInfoTypesPagedCallable().call(request);
5499   }
5500 
5501   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5502   /**
5503    * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5504    * learn more.
5505    *
5506    * <p>Sample code:
5507    *
5508    * <pre>{@code
5509    * // This snippet has been automatically generated and should be regarded as a code template only.
5510    * // It will require modifications to work:
5511    * // - It may require correct/in-range values for request initialization.
5512    * // - It may require specifying regional endpoints when creating the service client as shown in
5513    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5514    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5515    *   ListStoredInfoTypesRequest request =
5516    *       ListStoredInfoTypesRequest.newBuilder()
5517    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
5518    *           .setPageToken("pageToken873572522")
5519    *           .setPageSize(883849137)
5520    *           .setOrderBy("orderBy-1207110587")
5521    *           .setLocationId("locationId1541836720")
5522    *           .build();
5523    *   ApiFuture<StoredInfoType> future =
5524    *       dlpServiceClient.listStoredInfoTypesPagedCallable().futureCall(request);
5525    *   // Do something.
5526    *   for (StoredInfoType element : future.get().iterateAll()) {
5527    *     // doThingsWith(element);
5528    *   }
5529    * }
5530    * }</pre>
5531    */
5532   public final UnaryCallable<ListStoredInfoTypesRequest, ListStoredInfoTypesPagedResponse>
listStoredInfoTypesPagedCallable()5533       listStoredInfoTypesPagedCallable() {
5534     return stub.listStoredInfoTypesPagedCallable();
5535   }
5536 
5537   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5538   /**
5539    * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5540    * learn more.
5541    *
5542    * <p>Sample code:
5543    *
5544    * <pre>{@code
5545    * // This snippet has been automatically generated and should be regarded as a code template only.
5546    * // It will require modifications to work:
5547    * // - It may require correct/in-range values for request initialization.
5548    * // - It may require specifying regional endpoints when creating the service client as shown in
5549    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5550    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5551    *   ListStoredInfoTypesRequest request =
5552    *       ListStoredInfoTypesRequest.newBuilder()
5553    *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
5554    *           .setPageToken("pageToken873572522")
5555    *           .setPageSize(883849137)
5556    *           .setOrderBy("orderBy-1207110587")
5557    *           .setLocationId("locationId1541836720")
5558    *           .build();
5559    *   while (true) {
5560    *     ListStoredInfoTypesResponse response =
5561    *         dlpServiceClient.listStoredInfoTypesCallable().call(request);
5562    *     for (StoredInfoType element : response.getStoredInfoTypesList()) {
5563    *       // doThingsWith(element);
5564    *     }
5565    *     String nextPageToken = response.getNextPageToken();
5566    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
5567    *       request = request.toBuilder().setPageToken(nextPageToken).build();
5568    *     } else {
5569    *       break;
5570    *     }
5571    *   }
5572    * }
5573    * }</pre>
5574    */
5575   public final UnaryCallable<ListStoredInfoTypesRequest, ListStoredInfoTypesResponse>
listStoredInfoTypesCallable()5576       listStoredInfoTypesCallable() {
5577     return stub.listStoredInfoTypesCallable();
5578   }
5579 
5580   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5581   /**
5582    * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5583    * learn more.
5584    *
5585    * <p>Sample code:
5586    *
5587    * <pre>{@code
5588    * // This snippet has been automatically generated and should be regarded as a code template only.
5589    * // It will require modifications to work:
5590    * // - It may require correct/in-range values for request initialization.
5591    * // - It may require specifying regional endpoints when creating the service client as shown in
5592    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5593    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5594    *   StoredInfoTypeName name =
5595    *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
5596    *           "[ORGANIZATION]", "[STORED_INFO_TYPE]");
5597    *   dlpServiceClient.deleteStoredInfoType(name);
5598    * }
5599    * }</pre>
5600    *
5601    * @param name Required. Resource name of the organization and storedInfoType to be deleted, for
5602    *     example `organizations/433245324/storedInfoTypes/432452342` or
5603    *     projects/project-id/storedInfoTypes/432452342.
5604    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5605    */
deleteStoredInfoType(StoredInfoTypeName name)5606   public final void deleteStoredInfoType(StoredInfoTypeName name) {
5607     DeleteStoredInfoTypeRequest request =
5608         DeleteStoredInfoTypeRequest.newBuilder()
5609             .setName(name == null ? null : name.toString())
5610             .build();
5611     deleteStoredInfoType(request);
5612   }
5613 
5614   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5615   /**
5616    * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5617    * learn more.
5618    *
5619    * <p>Sample code:
5620    *
5621    * <pre>{@code
5622    * // This snippet has been automatically generated and should be regarded as a code template only.
5623    * // It will require modifications to work:
5624    * // - It may require correct/in-range values for request initialization.
5625    * // - It may require specifying regional endpoints when creating the service client as shown in
5626    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5627    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5628    *   String name =
5629    *       StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
5630    *               "[ORGANIZATION]", "[STORED_INFO_TYPE]")
5631    *           .toString();
5632    *   dlpServiceClient.deleteStoredInfoType(name);
5633    * }
5634    * }</pre>
5635    *
5636    * @param name Required. Resource name of the organization and storedInfoType to be deleted, for
5637    *     example `organizations/433245324/storedInfoTypes/432452342` or
5638    *     projects/project-id/storedInfoTypes/432452342.
5639    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5640    */
deleteStoredInfoType(String name)5641   public final void deleteStoredInfoType(String name) {
5642     DeleteStoredInfoTypeRequest request =
5643         DeleteStoredInfoTypeRequest.newBuilder().setName(name).build();
5644     deleteStoredInfoType(request);
5645   }
5646 
5647   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5648   /**
5649    * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5650    * learn more.
5651    *
5652    * <p>Sample code:
5653    *
5654    * <pre>{@code
5655    * // This snippet has been automatically generated and should be regarded as a code template only.
5656    * // It will require modifications to work:
5657    * // - It may require correct/in-range values for request initialization.
5658    * // - It may require specifying regional endpoints when creating the service client as shown in
5659    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5660    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5661    *   DeleteStoredInfoTypeRequest request =
5662    *       DeleteStoredInfoTypeRequest.newBuilder()
5663    *           .setName(
5664    *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
5665    *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
5666    *                   .toString())
5667    *           .build();
5668    *   dlpServiceClient.deleteStoredInfoType(request);
5669    * }
5670    * }</pre>
5671    *
5672    * @param request The request object containing all of the parameters for the API call.
5673    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5674    */
deleteStoredInfoType(DeleteStoredInfoTypeRequest request)5675   public final void deleteStoredInfoType(DeleteStoredInfoTypeRequest request) {
5676     deleteStoredInfoTypeCallable().call(request);
5677   }
5678 
5679   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5680   /**
5681    * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
5682    * learn more.
5683    *
5684    * <p>Sample code:
5685    *
5686    * <pre>{@code
5687    * // This snippet has been automatically generated and should be regarded as a code template only.
5688    * // It will require modifications to work:
5689    * // - It may require correct/in-range values for request initialization.
5690    * // - It may require specifying regional endpoints when creating the service client as shown in
5691    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5692    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5693    *   DeleteStoredInfoTypeRequest request =
5694    *       DeleteStoredInfoTypeRequest.newBuilder()
5695    *           .setName(
5696    *               StoredInfoTypeName.ofOrganizationStoredInfoTypeName(
5697    *                       "[ORGANIZATION]", "[STORED_INFO_TYPE]")
5698    *                   .toString())
5699    *           .build();
5700    *   ApiFuture<Empty> future = dlpServiceClient.deleteStoredInfoTypeCallable().futureCall(request);
5701    *   // Do something.
5702    *   future.get();
5703    * }
5704    * }</pre>
5705    */
deleteStoredInfoTypeCallable()5706   public final UnaryCallable<DeleteStoredInfoTypeRequest, Empty> deleteStoredInfoTypeCallable() {
5707     return stub.deleteStoredInfoTypeCallable();
5708   }
5709 
5710   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5711   /**
5712    * Inspect hybrid content and store findings to a job. To review the findings, inspect the job.
5713    * Inspection will occur asynchronously.
5714    *
5715    * <p>Sample code:
5716    *
5717    * <pre>{@code
5718    * // This snippet has been automatically generated and should be regarded as a code template only.
5719    * // It will require modifications to work:
5720    * // - It may require correct/in-range values for request initialization.
5721    * // - It may require specifying regional endpoints when creating the service client as shown in
5722    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5723    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5724    *   DlpJobName name =
5725    *       DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]");
5726    *   HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(name);
5727    * }
5728    * }</pre>
5729    *
5730    * @param name Required. Resource name of the job to execute a hybrid inspect on, for example
5731    *     `projects/dlp-test-project/dlpJob/53234423`.
5732    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5733    */
hybridInspectDlpJob(DlpJobName name)5734   public final HybridInspectResponse hybridInspectDlpJob(DlpJobName name) {
5735     HybridInspectDlpJobRequest request =
5736         HybridInspectDlpJobRequest.newBuilder()
5737             .setName(name == null ? null : name.toString())
5738             .build();
5739     return hybridInspectDlpJob(request);
5740   }
5741 
5742   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5743   /**
5744    * Inspect hybrid content and store findings to a job. To review the findings, inspect the job.
5745    * Inspection will occur asynchronously.
5746    *
5747    * <p>Sample code:
5748    *
5749    * <pre>{@code
5750    * // This snippet has been automatically generated and should be regarded as a code template only.
5751    * // It will require modifications to work:
5752    * // - It may require correct/in-range values for request initialization.
5753    * // - It may require specifying regional endpoints when creating the service client as shown in
5754    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5755    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5756    *   String name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]").toString();
5757    *   HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(name);
5758    * }
5759    * }</pre>
5760    *
5761    * @param name Required. Resource name of the job to execute a hybrid inspect on, for example
5762    *     `projects/dlp-test-project/dlpJob/53234423`.
5763    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5764    */
hybridInspectDlpJob(String name)5765   public final HybridInspectResponse hybridInspectDlpJob(String name) {
5766     HybridInspectDlpJobRequest request =
5767         HybridInspectDlpJobRequest.newBuilder().setName(name).build();
5768     return hybridInspectDlpJob(request);
5769   }
5770 
5771   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5772   /**
5773    * Inspect hybrid content and store findings to a job. To review the findings, inspect the job.
5774    * Inspection will occur asynchronously.
5775    *
5776    * <p>Sample code:
5777    *
5778    * <pre>{@code
5779    * // This snippet has been automatically generated and should be regarded as a code template only.
5780    * // It will require modifications to work:
5781    * // - It may require correct/in-range values for request initialization.
5782    * // - It may require specifying regional endpoints when creating the service client as shown in
5783    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5784    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5785    *   HybridInspectDlpJobRequest request =
5786    *       HybridInspectDlpJobRequest.newBuilder()
5787    *           .setName(
5788    *               DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
5789    *                   .toString())
5790    *           .setHybridItem(HybridContentItem.newBuilder().build())
5791    *           .build();
5792    *   HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(request);
5793    * }
5794    * }</pre>
5795    *
5796    * @param request The request object containing all of the parameters for the API call.
5797    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5798    */
hybridInspectDlpJob(HybridInspectDlpJobRequest request)5799   public final HybridInspectResponse hybridInspectDlpJob(HybridInspectDlpJobRequest request) {
5800     return hybridInspectDlpJobCallable().call(request);
5801   }
5802 
5803   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5804   /**
5805    * Inspect hybrid content and store findings to a job. To review the findings, inspect the job.
5806    * Inspection will occur asynchronously.
5807    *
5808    * <p>Sample code:
5809    *
5810    * <pre>{@code
5811    * // This snippet has been automatically generated and should be regarded as a code template only.
5812    * // It will require modifications to work:
5813    * // - It may require correct/in-range values for request initialization.
5814    * // - It may require specifying regional endpoints when creating the service client as shown in
5815    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5816    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5817    *   HybridInspectDlpJobRequest request =
5818    *       HybridInspectDlpJobRequest.newBuilder()
5819    *           .setName(
5820    *               DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
5821    *                   .toString())
5822    *           .setHybridItem(HybridContentItem.newBuilder().build())
5823    *           .build();
5824    *   ApiFuture<HybridInspectResponse> future =
5825    *       dlpServiceClient.hybridInspectDlpJobCallable().futureCall(request);
5826    *   // Do something.
5827    *   HybridInspectResponse response = future.get();
5828    * }
5829    * }</pre>
5830    */
5831   public final UnaryCallable<HybridInspectDlpJobRequest, HybridInspectResponse>
hybridInspectDlpJobCallable()5832       hybridInspectDlpJobCallable() {
5833     return stub.hybridInspectDlpJobCallable();
5834   }
5835 
5836   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5837   /**
5838    * Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled
5839    * actions that have not yet run.
5840    *
5841    * <p>Sample code:
5842    *
5843    * <pre>{@code
5844    * // This snippet has been automatically generated and should be regarded as a code template only.
5845    * // It will require modifications to work:
5846    * // - It may require correct/in-range values for request initialization.
5847    * // - It may require specifying regional endpoints when creating the service client as shown in
5848    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5849    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5850    *   FinishDlpJobRequest request =
5851    *       FinishDlpJobRequest.newBuilder()
5852    *           .setName(
5853    *               DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
5854    *                   .toString())
5855    *           .build();
5856    *   dlpServiceClient.finishDlpJob(request);
5857    * }
5858    * }</pre>
5859    *
5860    * @param request The request object containing all of the parameters for the API call.
5861    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
5862    */
finishDlpJob(FinishDlpJobRequest request)5863   public final void finishDlpJob(FinishDlpJobRequest request) {
5864     finishDlpJobCallable().call(request);
5865   }
5866 
5867   // AUTO-GENERATED DOCUMENTATION AND METHOD.
5868   /**
5869    * Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled
5870    * actions that have not yet run.
5871    *
5872    * <p>Sample code:
5873    *
5874    * <pre>{@code
5875    * // This snippet has been automatically generated and should be regarded as a code template only.
5876    * // It will require modifications to work:
5877    * // - It may require correct/in-range values for request initialization.
5878    * // - It may require specifying regional endpoints when creating the service client as shown in
5879    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5880    * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
5881    *   FinishDlpJobRequest request =
5882    *       FinishDlpJobRequest.newBuilder()
5883    *           .setName(
5884    *               DlpJobName.ofProjectLocationDlpJobName("[PROJECT]", "[LOCATION]", "[DLP_JOB]")
5885    *                   .toString())
5886    *           .build();
5887    *   ApiFuture<Empty> future = dlpServiceClient.finishDlpJobCallable().futureCall(request);
5888    *   // Do something.
5889    *   future.get();
5890    * }
5891    * }</pre>
5892    */
finishDlpJobCallable()5893   public final UnaryCallable<FinishDlpJobRequest, Empty> finishDlpJobCallable() {
5894     return stub.finishDlpJobCallable();
5895   }
5896 
5897   @Override
close()5898   public final void close() {
5899     stub.close();
5900   }
5901 
5902   @Override
shutdown()5903   public void shutdown() {
5904     stub.shutdown();
5905   }
5906 
5907   @Override
isShutdown()5908   public boolean isShutdown() {
5909     return stub.isShutdown();
5910   }
5911 
5912   @Override
isTerminated()5913   public boolean isTerminated() {
5914     return stub.isTerminated();
5915   }
5916 
5917   @Override
shutdownNow()5918   public void shutdownNow() {
5919     stub.shutdownNow();
5920   }
5921 
5922   @Override
awaitTermination(long duration, TimeUnit unit)5923   public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
5924     return stub.awaitTermination(duration, unit);
5925   }
5926 
5927   public static class ListInspectTemplatesPagedResponse
5928       extends AbstractPagedListResponse<
5929           ListInspectTemplatesRequest,
5930           ListInspectTemplatesResponse,
5931           InspectTemplate,
5932           ListInspectTemplatesPage,
5933           ListInspectTemplatesFixedSizeCollection> {
5934 
createAsync( PageContext<ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate> context, ApiFuture<ListInspectTemplatesResponse> futureResponse)5935     public static ApiFuture<ListInspectTemplatesPagedResponse> createAsync(
5936         PageContext<ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate>
5937             context,
5938         ApiFuture<ListInspectTemplatesResponse> futureResponse) {
5939       ApiFuture<ListInspectTemplatesPage> futurePage =
5940           ListInspectTemplatesPage.createEmptyPage().createPageAsync(context, futureResponse);
5941       return ApiFutures.transform(
5942           futurePage,
5943           input -> new ListInspectTemplatesPagedResponse(input),
5944           MoreExecutors.directExecutor());
5945     }
5946 
ListInspectTemplatesPagedResponse(ListInspectTemplatesPage page)5947     private ListInspectTemplatesPagedResponse(ListInspectTemplatesPage page) {
5948       super(page, ListInspectTemplatesFixedSizeCollection.createEmptyCollection());
5949     }
5950   }
5951 
5952   public static class ListInspectTemplatesPage
5953       extends AbstractPage<
5954           ListInspectTemplatesRequest,
5955           ListInspectTemplatesResponse,
5956           InspectTemplate,
5957           ListInspectTemplatesPage> {
5958 
ListInspectTemplatesPage( PageContext<ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate> context, ListInspectTemplatesResponse response)5959     private ListInspectTemplatesPage(
5960         PageContext<ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate>
5961             context,
5962         ListInspectTemplatesResponse response) {
5963       super(context, response);
5964     }
5965 
createEmptyPage()5966     private static ListInspectTemplatesPage createEmptyPage() {
5967       return new ListInspectTemplatesPage(null, null);
5968     }
5969 
5970     @Override
createPage( PageContext<ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate> context, ListInspectTemplatesResponse response)5971     protected ListInspectTemplatesPage createPage(
5972         PageContext<ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate>
5973             context,
5974         ListInspectTemplatesResponse response) {
5975       return new ListInspectTemplatesPage(context, response);
5976     }
5977 
5978     @Override
createPageAsync( PageContext<ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate> context, ApiFuture<ListInspectTemplatesResponse> futureResponse)5979     public ApiFuture<ListInspectTemplatesPage> createPageAsync(
5980         PageContext<ListInspectTemplatesRequest, ListInspectTemplatesResponse, InspectTemplate>
5981             context,
5982         ApiFuture<ListInspectTemplatesResponse> futureResponse) {
5983       return super.createPageAsync(context, futureResponse);
5984     }
5985   }
5986 
5987   public static class ListInspectTemplatesFixedSizeCollection
5988       extends AbstractFixedSizeCollection<
5989           ListInspectTemplatesRequest,
5990           ListInspectTemplatesResponse,
5991           InspectTemplate,
5992           ListInspectTemplatesPage,
5993           ListInspectTemplatesFixedSizeCollection> {
5994 
ListInspectTemplatesFixedSizeCollection( List<ListInspectTemplatesPage> pages, int collectionSize)5995     private ListInspectTemplatesFixedSizeCollection(
5996         List<ListInspectTemplatesPage> pages, int collectionSize) {
5997       super(pages, collectionSize);
5998     }
5999 
createEmptyCollection()6000     private static ListInspectTemplatesFixedSizeCollection createEmptyCollection() {
6001       return new ListInspectTemplatesFixedSizeCollection(null, 0);
6002     }
6003 
6004     @Override
createCollection( List<ListInspectTemplatesPage> pages, int collectionSize)6005     protected ListInspectTemplatesFixedSizeCollection createCollection(
6006         List<ListInspectTemplatesPage> pages, int collectionSize) {
6007       return new ListInspectTemplatesFixedSizeCollection(pages, collectionSize);
6008     }
6009   }
6010 
6011   public static class ListDeidentifyTemplatesPagedResponse
6012       extends AbstractPagedListResponse<
6013           ListDeidentifyTemplatesRequest,
6014           ListDeidentifyTemplatesResponse,
6015           DeidentifyTemplate,
6016           ListDeidentifyTemplatesPage,
6017           ListDeidentifyTemplatesFixedSizeCollection> {
6018 
createAsync( PageContext< ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> context, ApiFuture<ListDeidentifyTemplatesResponse> futureResponse)6019     public static ApiFuture<ListDeidentifyTemplatesPagedResponse> createAsync(
6020         PageContext<
6021                 ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate>
6022             context,
6023         ApiFuture<ListDeidentifyTemplatesResponse> futureResponse) {
6024       ApiFuture<ListDeidentifyTemplatesPage> futurePage =
6025           ListDeidentifyTemplatesPage.createEmptyPage().createPageAsync(context, futureResponse);
6026       return ApiFutures.transform(
6027           futurePage,
6028           input -> new ListDeidentifyTemplatesPagedResponse(input),
6029           MoreExecutors.directExecutor());
6030     }
6031 
ListDeidentifyTemplatesPagedResponse(ListDeidentifyTemplatesPage page)6032     private ListDeidentifyTemplatesPagedResponse(ListDeidentifyTemplatesPage page) {
6033       super(page, ListDeidentifyTemplatesFixedSizeCollection.createEmptyCollection());
6034     }
6035   }
6036 
6037   public static class ListDeidentifyTemplatesPage
6038       extends AbstractPage<
6039           ListDeidentifyTemplatesRequest,
6040           ListDeidentifyTemplatesResponse,
6041           DeidentifyTemplate,
6042           ListDeidentifyTemplatesPage> {
6043 
ListDeidentifyTemplatesPage( PageContext< ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> context, ListDeidentifyTemplatesResponse response)6044     private ListDeidentifyTemplatesPage(
6045         PageContext<
6046                 ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate>
6047             context,
6048         ListDeidentifyTemplatesResponse response) {
6049       super(context, response);
6050     }
6051 
createEmptyPage()6052     private static ListDeidentifyTemplatesPage createEmptyPage() {
6053       return new ListDeidentifyTemplatesPage(null, null);
6054     }
6055 
6056     @Override
createPage( PageContext< ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> context, ListDeidentifyTemplatesResponse response)6057     protected ListDeidentifyTemplatesPage createPage(
6058         PageContext<
6059                 ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate>
6060             context,
6061         ListDeidentifyTemplatesResponse response) {
6062       return new ListDeidentifyTemplatesPage(context, response);
6063     }
6064 
6065     @Override
createPageAsync( PageContext< ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate> context, ApiFuture<ListDeidentifyTemplatesResponse> futureResponse)6066     public ApiFuture<ListDeidentifyTemplatesPage> createPageAsync(
6067         PageContext<
6068                 ListDeidentifyTemplatesRequest, ListDeidentifyTemplatesResponse, DeidentifyTemplate>
6069             context,
6070         ApiFuture<ListDeidentifyTemplatesResponse> futureResponse) {
6071       return super.createPageAsync(context, futureResponse);
6072     }
6073   }
6074 
6075   public static class ListDeidentifyTemplatesFixedSizeCollection
6076       extends AbstractFixedSizeCollection<
6077           ListDeidentifyTemplatesRequest,
6078           ListDeidentifyTemplatesResponse,
6079           DeidentifyTemplate,
6080           ListDeidentifyTemplatesPage,
6081           ListDeidentifyTemplatesFixedSizeCollection> {
6082 
ListDeidentifyTemplatesFixedSizeCollection( List<ListDeidentifyTemplatesPage> pages, int collectionSize)6083     private ListDeidentifyTemplatesFixedSizeCollection(
6084         List<ListDeidentifyTemplatesPage> pages, int collectionSize) {
6085       super(pages, collectionSize);
6086     }
6087 
createEmptyCollection()6088     private static ListDeidentifyTemplatesFixedSizeCollection createEmptyCollection() {
6089       return new ListDeidentifyTemplatesFixedSizeCollection(null, 0);
6090     }
6091 
6092     @Override
createCollection( List<ListDeidentifyTemplatesPage> pages, int collectionSize)6093     protected ListDeidentifyTemplatesFixedSizeCollection createCollection(
6094         List<ListDeidentifyTemplatesPage> pages, int collectionSize) {
6095       return new ListDeidentifyTemplatesFixedSizeCollection(pages, collectionSize);
6096     }
6097   }
6098 
6099   public static class ListJobTriggersPagedResponse
6100       extends AbstractPagedListResponse<
6101           ListJobTriggersRequest,
6102           ListJobTriggersResponse,
6103           JobTrigger,
6104           ListJobTriggersPage,
6105           ListJobTriggersFixedSizeCollection> {
6106 
createAsync( PageContext<ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger> context, ApiFuture<ListJobTriggersResponse> futureResponse)6107     public static ApiFuture<ListJobTriggersPagedResponse> createAsync(
6108         PageContext<ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger> context,
6109         ApiFuture<ListJobTriggersResponse> futureResponse) {
6110       ApiFuture<ListJobTriggersPage> futurePage =
6111           ListJobTriggersPage.createEmptyPage().createPageAsync(context, futureResponse);
6112       return ApiFutures.transform(
6113           futurePage,
6114           input -> new ListJobTriggersPagedResponse(input),
6115           MoreExecutors.directExecutor());
6116     }
6117 
ListJobTriggersPagedResponse(ListJobTriggersPage page)6118     private ListJobTriggersPagedResponse(ListJobTriggersPage page) {
6119       super(page, ListJobTriggersFixedSizeCollection.createEmptyCollection());
6120     }
6121   }
6122 
6123   public static class ListJobTriggersPage
6124       extends AbstractPage<
6125           ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger, ListJobTriggersPage> {
6126 
ListJobTriggersPage( PageContext<ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger> context, ListJobTriggersResponse response)6127     private ListJobTriggersPage(
6128         PageContext<ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger> context,
6129         ListJobTriggersResponse response) {
6130       super(context, response);
6131     }
6132 
createEmptyPage()6133     private static ListJobTriggersPage createEmptyPage() {
6134       return new ListJobTriggersPage(null, null);
6135     }
6136 
6137     @Override
createPage( PageContext<ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger> context, ListJobTriggersResponse response)6138     protected ListJobTriggersPage createPage(
6139         PageContext<ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger> context,
6140         ListJobTriggersResponse response) {
6141       return new ListJobTriggersPage(context, response);
6142     }
6143 
6144     @Override
createPageAsync( PageContext<ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger> context, ApiFuture<ListJobTriggersResponse> futureResponse)6145     public ApiFuture<ListJobTriggersPage> createPageAsync(
6146         PageContext<ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger> context,
6147         ApiFuture<ListJobTriggersResponse> futureResponse) {
6148       return super.createPageAsync(context, futureResponse);
6149     }
6150   }
6151 
6152   public static class ListJobTriggersFixedSizeCollection
6153       extends AbstractFixedSizeCollection<
6154           ListJobTriggersRequest,
6155           ListJobTriggersResponse,
6156           JobTrigger,
6157           ListJobTriggersPage,
6158           ListJobTriggersFixedSizeCollection> {
6159 
ListJobTriggersFixedSizeCollection( List<ListJobTriggersPage> pages, int collectionSize)6160     private ListJobTriggersFixedSizeCollection(
6161         List<ListJobTriggersPage> pages, int collectionSize) {
6162       super(pages, collectionSize);
6163     }
6164 
createEmptyCollection()6165     private static ListJobTriggersFixedSizeCollection createEmptyCollection() {
6166       return new ListJobTriggersFixedSizeCollection(null, 0);
6167     }
6168 
6169     @Override
createCollection( List<ListJobTriggersPage> pages, int collectionSize)6170     protected ListJobTriggersFixedSizeCollection createCollection(
6171         List<ListJobTriggersPage> pages, int collectionSize) {
6172       return new ListJobTriggersFixedSizeCollection(pages, collectionSize);
6173     }
6174   }
6175 
6176   public static class ListDlpJobsPagedResponse
6177       extends AbstractPagedListResponse<
6178           ListDlpJobsRequest,
6179           ListDlpJobsResponse,
6180           DlpJob,
6181           ListDlpJobsPage,
6182           ListDlpJobsFixedSizeCollection> {
6183 
createAsync( PageContext<ListDlpJobsRequest, ListDlpJobsResponse, DlpJob> context, ApiFuture<ListDlpJobsResponse> futureResponse)6184     public static ApiFuture<ListDlpJobsPagedResponse> createAsync(
6185         PageContext<ListDlpJobsRequest, ListDlpJobsResponse, DlpJob> context,
6186         ApiFuture<ListDlpJobsResponse> futureResponse) {
6187       ApiFuture<ListDlpJobsPage> futurePage =
6188           ListDlpJobsPage.createEmptyPage().createPageAsync(context, futureResponse);
6189       return ApiFutures.transform(
6190           futurePage, input -> new ListDlpJobsPagedResponse(input), MoreExecutors.directExecutor());
6191     }
6192 
ListDlpJobsPagedResponse(ListDlpJobsPage page)6193     private ListDlpJobsPagedResponse(ListDlpJobsPage page) {
6194       super(page, ListDlpJobsFixedSizeCollection.createEmptyCollection());
6195     }
6196   }
6197 
6198   public static class ListDlpJobsPage
6199       extends AbstractPage<ListDlpJobsRequest, ListDlpJobsResponse, DlpJob, ListDlpJobsPage> {
6200 
ListDlpJobsPage( PageContext<ListDlpJobsRequest, ListDlpJobsResponse, DlpJob> context, ListDlpJobsResponse response)6201     private ListDlpJobsPage(
6202         PageContext<ListDlpJobsRequest, ListDlpJobsResponse, DlpJob> context,
6203         ListDlpJobsResponse response) {
6204       super(context, response);
6205     }
6206 
createEmptyPage()6207     private static ListDlpJobsPage createEmptyPage() {
6208       return new ListDlpJobsPage(null, null);
6209     }
6210 
6211     @Override
createPage( PageContext<ListDlpJobsRequest, ListDlpJobsResponse, DlpJob> context, ListDlpJobsResponse response)6212     protected ListDlpJobsPage createPage(
6213         PageContext<ListDlpJobsRequest, ListDlpJobsResponse, DlpJob> context,
6214         ListDlpJobsResponse response) {
6215       return new ListDlpJobsPage(context, response);
6216     }
6217 
6218     @Override
createPageAsync( PageContext<ListDlpJobsRequest, ListDlpJobsResponse, DlpJob> context, ApiFuture<ListDlpJobsResponse> futureResponse)6219     public ApiFuture<ListDlpJobsPage> createPageAsync(
6220         PageContext<ListDlpJobsRequest, ListDlpJobsResponse, DlpJob> context,
6221         ApiFuture<ListDlpJobsResponse> futureResponse) {
6222       return super.createPageAsync(context, futureResponse);
6223     }
6224   }
6225 
6226   public static class ListDlpJobsFixedSizeCollection
6227       extends AbstractFixedSizeCollection<
6228           ListDlpJobsRequest,
6229           ListDlpJobsResponse,
6230           DlpJob,
6231           ListDlpJobsPage,
6232           ListDlpJobsFixedSizeCollection> {
6233 
ListDlpJobsFixedSizeCollection(List<ListDlpJobsPage> pages, int collectionSize)6234     private ListDlpJobsFixedSizeCollection(List<ListDlpJobsPage> pages, int collectionSize) {
6235       super(pages, collectionSize);
6236     }
6237 
createEmptyCollection()6238     private static ListDlpJobsFixedSizeCollection createEmptyCollection() {
6239       return new ListDlpJobsFixedSizeCollection(null, 0);
6240     }
6241 
6242     @Override
createCollection( List<ListDlpJobsPage> pages, int collectionSize)6243     protected ListDlpJobsFixedSizeCollection createCollection(
6244         List<ListDlpJobsPage> pages, int collectionSize) {
6245       return new ListDlpJobsFixedSizeCollection(pages, collectionSize);
6246     }
6247   }
6248 
6249   public static class ListStoredInfoTypesPagedResponse
6250       extends AbstractPagedListResponse<
6251           ListStoredInfoTypesRequest,
6252           ListStoredInfoTypesResponse,
6253           StoredInfoType,
6254           ListStoredInfoTypesPage,
6255           ListStoredInfoTypesFixedSizeCollection> {
6256 
createAsync( PageContext<ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType> context, ApiFuture<ListStoredInfoTypesResponse> futureResponse)6257     public static ApiFuture<ListStoredInfoTypesPagedResponse> createAsync(
6258         PageContext<ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType>
6259             context,
6260         ApiFuture<ListStoredInfoTypesResponse> futureResponse) {
6261       ApiFuture<ListStoredInfoTypesPage> futurePage =
6262           ListStoredInfoTypesPage.createEmptyPage().createPageAsync(context, futureResponse);
6263       return ApiFutures.transform(
6264           futurePage,
6265           input -> new ListStoredInfoTypesPagedResponse(input),
6266           MoreExecutors.directExecutor());
6267     }
6268 
ListStoredInfoTypesPagedResponse(ListStoredInfoTypesPage page)6269     private ListStoredInfoTypesPagedResponse(ListStoredInfoTypesPage page) {
6270       super(page, ListStoredInfoTypesFixedSizeCollection.createEmptyCollection());
6271     }
6272   }
6273 
6274   public static class ListStoredInfoTypesPage
6275       extends AbstractPage<
6276           ListStoredInfoTypesRequest,
6277           ListStoredInfoTypesResponse,
6278           StoredInfoType,
6279           ListStoredInfoTypesPage> {
6280 
ListStoredInfoTypesPage( PageContext<ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType> context, ListStoredInfoTypesResponse response)6281     private ListStoredInfoTypesPage(
6282         PageContext<ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType>
6283             context,
6284         ListStoredInfoTypesResponse response) {
6285       super(context, response);
6286     }
6287 
createEmptyPage()6288     private static ListStoredInfoTypesPage createEmptyPage() {
6289       return new ListStoredInfoTypesPage(null, null);
6290     }
6291 
6292     @Override
createPage( PageContext<ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType> context, ListStoredInfoTypesResponse response)6293     protected ListStoredInfoTypesPage createPage(
6294         PageContext<ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType>
6295             context,
6296         ListStoredInfoTypesResponse response) {
6297       return new ListStoredInfoTypesPage(context, response);
6298     }
6299 
6300     @Override
createPageAsync( PageContext<ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType> context, ApiFuture<ListStoredInfoTypesResponse> futureResponse)6301     public ApiFuture<ListStoredInfoTypesPage> createPageAsync(
6302         PageContext<ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, StoredInfoType>
6303             context,
6304         ApiFuture<ListStoredInfoTypesResponse> futureResponse) {
6305       return super.createPageAsync(context, futureResponse);
6306     }
6307   }
6308 
6309   public static class ListStoredInfoTypesFixedSizeCollection
6310       extends AbstractFixedSizeCollection<
6311           ListStoredInfoTypesRequest,
6312           ListStoredInfoTypesResponse,
6313           StoredInfoType,
6314           ListStoredInfoTypesPage,
6315           ListStoredInfoTypesFixedSizeCollection> {
6316 
ListStoredInfoTypesFixedSizeCollection( List<ListStoredInfoTypesPage> pages, int collectionSize)6317     private ListStoredInfoTypesFixedSizeCollection(
6318         List<ListStoredInfoTypesPage> pages, int collectionSize) {
6319       super(pages, collectionSize);
6320     }
6321 
createEmptyCollection()6322     private static ListStoredInfoTypesFixedSizeCollection createEmptyCollection() {
6323       return new ListStoredInfoTypesFixedSizeCollection(null, 0);
6324     }
6325 
6326     @Override
createCollection( List<ListStoredInfoTypesPage> pages, int collectionSize)6327     protected ListStoredInfoTypesFixedSizeCollection createCollection(
6328         List<ListStoredInfoTypesPage> pages, int collectionSize) {
6329       return new ListStoredInfoTypesFixedSizeCollection(pages, collectionSize);
6330     }
6331   }
6332 }
6333