diff --git a/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java b/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java index 9e951750..a7adc8b8 100644 --- a/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java +++ b/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java @@ -37,12 +37,14 @@ import com.google.privacy.dlp.v2.DeidentifyContentRequest; import com.google.privacy.dlp.v2.DeidentifyContentResponse; import com.google.privacy.dlp.v2.DeidentifyTemplate; +import com.google.privacy.dlp.v2.DeidentifyTemplateName; import com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; import com.google.privacy.dlp.v2.DeleteDlpJobRequest; import com.google.privacy.dlp.v2.DeleteInspectTemplateRequest; import com.google.privacy.dlp.v2.DeleteJobTriggerRequest; import com.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; import com.google.privacy.dlp.v2.DlpJob; +import com.google.privacy.dlp.v2.DlpJobName; import com.google.privacy.dlp.v2.FinishDlpJobRequest; import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest; import com.google.privacy.dlp.v2.GetDlpJobRequest; @@ -54,8 +56,11 @@ import com.google.privacy.dlp.v2.HybridInspectResponse; import com.google.privacy.dlp.v2.InspectContentRequest; import com.google.privacy.dlp.v2.InspectContentResponse; +import com.google.privacy.dlp.v2.InspectJobConfig; import com.google.privacy.dlp.v2.InspectTemplate; +import com.google.privacy.dlp.v2.InspectTemplateName; import com.google.privacy.dlp.v2.JobTrigger; +import com.google.privacy.dlp.v2.JobTriggerName; import com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; import com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; import com.google.privacy.dlp.v2.ListDlpJobsRequest; @@ -68,16 +73,24 @@ import com.google.privacy.dlp.v2.ListJobTriggersResponse; import com.google.privacy.dlp.v2.ListStoredInfoTypesRequest; import com.google.privacy.dlp.v2.ListStoredInfoTypesResponse; +import com.google.privacy.dlp.v2.LocationName; +import com.google.privacy.dlp.v2.OrganizationLocationName; +import com.google.privacy.dlp.v2.OrganizationName; +import com.google.privacy.dlp.v2.ProjectName; import com.google.privacy.dlp.v2.RedactImageRequest; import com.google.privacy.dlp.v2.RedactImageResponse; import com.google.privacy.dlp.v2.ReidentifyContentRequest; import com.google.privacy.dlp.v2.ReidentifyContentResponse; +import com.google.privacy.dlp.v2.RiskAnalysisJobConfig; import com.google.privacy.dlp.v2.StoredInfoType; +import com.google.privacy.dlp.v2.StoredInfoTypeConfig; +import com.google.privacy.dlp.v2.StoredInfoTypeName; import com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; import com.google.privacy.dlp.v2.UpdateInspectTemplateRequest; import com.google.privacy.dlp.v2.UpdateJobTriggerRequest; import com.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; import java.io.IOException; import java.util.List; import java.util.concurrent.TimeUnit; @@ -99,11 +112,8 @@ *
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * InspectContentRequest request = InspectContentRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * InspectContentResponse response = dlpServiceClient.inspectContent(request);
+ * String locationId = "";
+ * ListInfoTypesResponse response = dlpServiceClient.listInfoTypes(locationId);
* }
*
*
@@ -226,10 +236,7 @@ public DlpServiceStub getStub() {
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * InspectContentRequest request = InspectContentRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * InspectContentRequest request = InspectContentRequest.newBuilder().build();
* InspectContentResponse response = dlpServiceClient.inspectContent(request);
* }
*
@@ -257,10 +264,7 @@ public final InspectContentResponse inspectContent(InspectContentRequest request
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * InspectContentRequest request = InspectContentRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * InspectContentRequest request = InspectContentRequest.newBuilder().build();
* ApiFuture<InspectContentResponse> future = dlpServiceClient.inspectContentCallable().futureCall(request);
* // Do something
* InspectContentResponse response = future.get();
@@ -286,10 +290,7 @@ public final InspectContentResponse inspectContent(InspectContentRequest request
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * RedactImageRequest request = RedactImageRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * RedactImageRequest request = RedactImageRequest.newBuilder().build();
* RedactImageResponse response = dlpServiceClient.redactImage(request);
* }
*
@@ -315,10 +316,7 @@ public final RedactImageResponse redactImage(RedactImageRequest request) {
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * RedactImageRequest request = RedactImageRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * RedactImageRequest request = RedactImageRequest.newBuilder().build();
* ApiFuture<RedactImageResponse> future = dlpServiceClient.redactImageCallable().futureCall(request);
* // Do something
* RedactImageResponse response = future.get();
@@ -343,10 +341,7 @@ public final UnaryCallable redactImageC
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder().build();
* DeidentifyContentResponse response = dlpServiceClient.deidentifyContent(request);
* }
*
@@ -372,10 +367,7 @@ public final DeidentifyContentResponse deidentifyContent(DeidentifyContentReques
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
+ * DeidentifyContentRequest request = DeidentifyContentRequest.newBuilder().build();
* ApiFuture<DeidentifyContentResponse> future = dlpServiceClient.deidentifyContentCallable().futureCall(request);
* // Do something
* DeidentifyContentResponse response = future.get();
@@ -437,6 +429,29 @@ public final ReidentifyContentResponse reidentifyContent(ReidentifyContentReques
return stub.reidentifyContentCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Returns a list of the sensitive information types that the DLP API supports. See
+ * https://cloud.google.com/dlp/docs/infotypes-reference to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * String locationId = "";
+ * ListInfoTypesResponse response = dlpServiceClient.listInfoTypes(locationId);
+ * }
+ *
+ *
+ * @param locationId The geographic location to list info types. Reserved for future extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListInfoTypesResponse listInfoTypes(String locationId) {
+ ListInfoTypesRequest request =
+ ListInfoTypesRequest.newBuilder().setLocationId(locationId).build();
+ return listInfoTypes(request);
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Returns a list of the sensitive information types that the DLP API supports. See
@@ -487,19 +502,25 @@ public final UnaryCallable listInfo
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * CreateInspectTemplateRequest request = CreateInspectTemplateRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * InspectTemplate response = dlpServiceClient.createInspectTemplate(request);
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param inspectTemplate Required. The InspectTemplate to create.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final InspectTemplate createInspectTemplate(CreateInspectTemplateRequest request) {
- return createInspectTemplateCallable().call(request);
+ public final InspectTemplate createInspectTemplate(
+ OrganizationLocationName parent, InspectTemplate inspectTemplate) {
+ CreateInspectTemplateRequest request =
+ CreateInspectTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setInspectTemplate(inspectTemplate)
+ .build();
+ return createInspectTemplate(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
@@ -511,403 +532,2906 @@ public final InspectTemplate createInspectTemplate(CreateInspectTemplateRequest
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * CreateInspectTemplateRequest request = CreateInspectTemplateRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<InspectTemplate> future = dlpServiceClient.createInspectTemplateCallable().futureCall(request);
- * // Do something
- * InspectTemplate response = future.get();
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
* }
*
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param inspectTemplate Required. The InspectTemplate to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable
- createInspectTemplateCallable() {
- return stub.createInspectTemplateCallable();
+ public final InspectTemplate createInspectTemplate(
+ ProjectName parent, InspectTemplate inspectTemplate) {
+ CreateInspectTemplateRequest request =
+ CreateInspectTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setInspectTemplate(inspectTemplate)
+ .build();
+ return createInspectTemplate(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
- * more.
+ * Creates an InspectTemplate for re-using frequently used configuration for inspecting content,
+ * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * InspectTemplateName name = OrganizationInspectTemplateName.of("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
- * UpdateInspectTemplateRequest request = UpdateInspectTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * InspectTemplate response = dlpServiceClient.updateInspectTemplate(request);
+ * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param inspectTemplate Required. The InspectTemplate to create.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final InspectTemplate updateInspectTemplate(UpdateInspectTemplateRequest request) {
- return updateInspectTemplateCallable().call(request);
+ public final InspectTemplate createInspectTemplate(
+ OrganizationName parent, InspectTemplate inspectTemplate) {
+ CreateInspectTemplateRequest request =
+ CreateInspectTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setInspectTemplate(inspectTemplate)
+ .build();
+ return createInspectTemplate(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
- * more.
+ * Creates an InspectTemplate for re-using frequently used configuration for inspecting content,
+ * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * InspectTemplateName name = OrganizationInspectTemplateName.of("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
- * UpdateInspectTemplateRequest request = UpdateInspectTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<InspectTemplate> future = dlpServiceClient.updateInspectTemplateCallable().futureCall(request);
- * // Do something
- * InspectTemplate response = future.get();
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate);
* }
*
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param inspectTemplate Required. The InspectTemplate to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable
- updateInspectTemplateCallable() {
- return stub.updateInspectTemplateCallable();
+ public final InspectTemplate createInspectTemplate(
+ LocationName parent, InspectTemplate inspectTemplate) {
+ CreateInspectTemplateRequest request =
+ CreateInspectTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setInspectTemplate(inspectTemplate)
+ .build();
+ return createInspectTemplate(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
- * more.
+ * Creates an InspectTemplate for re-using frequently used configuration for inspecting content,
+ * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * GetInspectTemplateRequest request = GetInspectTemplateRequest.newBuilder().build();
- * InspectTemplate response = dlpServiceClient.getInspectTemplate(request);
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * InspectTemplate response = dlpServiceClient.createInspectTemplate(parent.toString(), inspectTemplate);
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param inspectTemplate Required. The InspectTemplate to create.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final InspectTemplate getInspectTemplate(GetInspectTemplateRequest request) {
- return getInspectTemplateCallable().call(request);
+ public final InspectTemplate createInspectTemplate(
+ String parent, InspectTemplate inspectTemplate) {
+ CreateInspectTemplateRequest request =
+ CreateInspectTemplateRequest.newBuilder()
+ .setParent(parent)
+ .setInspectTemplate(inspectTemplate)
+ .build();
+ return createInspectTemplate(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
- * more.
+ * Creates an InspectTemplate for re-using frequently used configuration for inspecting content,
+ * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * GetInspectTemplateRequest request = GetInspectTemplateRequest.newBuilder().build();
- * ApiFuture<InspectTemplate> future = dlpServiceClient.getInspectTemplateCallable().futureCall(request);
- * // Do something
- * InspectTemplate response = future.get();
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * String locationId = "";
+ * InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate, locationId);
* }
*
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param inspectTemplate Required. The InspectTemplate to create.
+ * @param locationId The geographic location to store the inspection template. Reserved for future
+ * extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable
- getInspectTemplateCallable() {
- return stub.getInspectTemplateCallable();
+ public final InspectTemplate createInspectTemplate(
+ OrganizationLocationName parent, InspectTemplate inspectTemplate, String locationId) {
+ CreateInspectTemplateRequest request =
+ CreateInspectTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setInspectTemplate(inspectTemplate)
+ .setLocationId(locationId)
+ .build();
+ return createInspectTemplate(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ * Creates an InspectTemplate for re-using frequently used configuration for inspecting content,
+ * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * ListInspectTemplatesRequest request = ListInspectTemplatesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * for (InspectTemplate element : dlpServiceClient.listInspectTemplates(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * String locationId = "";
+ * InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate, locationId);
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param inspectTemplate Required. The InspectTemplate to create.
+ * @param locationId The geographic location to store the inspection template. Reserved for future
+ * extensions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListInspectTemplatesPagedResponse listInspectTemplates(
- ListInspectTemplatesRequest request) {
- return listInspectTemplatesPagedCallable().call(request);
+ public final InspectTemplate createInspectTemplate(
+ ProjectName parent, InspectTemplate inspectTemplate, String locationId) {
+ CreateInspectTemplateRequest request =
+ CreateInspectTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setInspectTemplate(inspectTemplate)
+ .setLocationId(locationId)
+ .build();
+ return createInspectTemplate(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ * Creates an InspectTemplate for re-using frequently used configuration for inspecting content,
+ * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * ListInspectTemplatesRequest request = ListInspectTemplatesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListInspectTemplatesPagedResponse> future = dlpServiceClient.listInspectTemplatesPagedCallable().futureCall(request);
- * // Do something
- * for (InspectTemplate element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * String locationId = "";
+ * InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate, locationId);
* }
*
- */
- public final UnaryCallable
- listInspectTemplatesPagedCallable() {
- return stub.listInspectTemplatesPagedCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
- *
- * Sample code:
*
- *
- * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * ListInspectTemplatesRequest request = ListInspectTemplatesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * while (true) {
- * ListInspectTemplatesResponse response = dlpServiceClient.listInspectTemplatesCallable().call(request);
- * for (InspectTemplate element : response.getInspectTemplatesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param inspectTemplate Required. The InspectTemplate to create.
+ * @param locationId The geographic location to store the inspection template. Reserved for future
+ * extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable
- listInspectTemplatesCallable() {
- return stub.listInspectTemplatesCallable();
+ public final InspectTemplate createInspectTemplate(
+ OrganizationName parent, InspectTemplate inspectTemplate, String locationId) {
+ CreateInspectTemplateRequest request =
+ CreateInspectTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setInspectTemplate(inspectTemplate)
+ .setLocationId(locationId)
+ .build();
+ return createInspectTemplate(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
- * more.
+ * Creates an InspectTemplate for re-using frequently used configuration for inspecting content,
+ * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * InspectTemplateName name = OrganizationInspectTemplateName.of("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
- * DeleteInspectTemplateRequest request = DeleteInspectTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * dlpServiceClient.deleteInspectTemplate(request);
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * String locationId = "";
+ * InspectTemplate response = dlpServiceClient.createInspectTemplate(parent, inspectTemplate, locationId);
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param inspectTemplate Required. The InspectTemplate to create.
+ * @param locationId The geographic location to store the inspection template. Reserved for future
+ * extensions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteInspectTemplate(DeleteInspectTemplateRequest request) {
- deleteInspectTemplateCallable().call(request);
+ public final InspectTemplate createInspectTemplate(
+ LocationName parent, InspectTemplate inspectTemplate, String locationId) {
+ CreateInspectTemplateRequest request =
+ CreateInspectTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setInspectTemplate(inspectTemplate)
+ .setLocationId(locationId)
+ .build();
+ return createInspectTemplate(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
- * more.
+ * Creates an InspectTemplate for re-using frequently used configuration for inspecting content,
+ * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * InspectTemplateName name = OrganizationInspectTemplateName.of("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
- * DeleteInspectTemplateRequest request = DeleteInspectTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = dlpServiceClient.deleteInspectTemplateCallable().futureCall(request);
- * // Do something
- * future.get();
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * String locationId = "";
+ * InspectTemplate response = dlpServiceClient.createInspectTemplate(parent.toString(), inspectTemplate, locationId);
* }
*
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param inspectTemplate Required. The InspectTemplate to create.
+ * @param locationId The geographic location to store the inspection template. Reserved for future
+ * extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable deleteInspectTemplateCallable() {
- return stub.deleteInspectTemplateCallable();
+ public final InspectTemplate createInspectTemplate(
+ String parent, InspectTemplate inspectTemplate, String locationId) {
+ CreateInspectTemplateRequest request =
+ CreateInspectTemplateRequest.newBuilder()
+ .setParent(parent)
+ .setInspectTemplate(inspectTemplate)
+ .setLocationId(locationId)
+ .build();
+ return createInspectTemplate(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
- * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
- * learn more.
+ * Creates an InspectTemplate for re-using frequently used configuration for inspecting content,
+ * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * CreateDeidentifyTemplateRequest request = CreateDeidentifyTemplateRequest.newBuilder()
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * CreateInspectTemplateRequest request = CreateInspectTemplateRequest.newBuilder()
* .setParent(parent.toString())
+ * .setInspectTemplate(inspectTemplate)
* .build();
- * DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(request);
+ * InspectTemplate response = dlpServiceClient.createInspectTemplate(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final DeidentifyTemplate createDeidentifyTemplate(
- CreateDeidentifyTemplateRequest request) {
- return createDeidentifyTemplateCallable().call(request);
+ public final InspectTemplate createInspectTemplate(CreateInspectTemplateRequest request) {
+ return createInspectTemplateCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
- * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
- * learn more.
+ * Creates an InspectTemplate for re-using frequently used configuration for inspecting content,
+ * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * CreateDeidentifyTemplateRequest request = CreateDeidentifyTemplateRequest.newBuilder()
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * CreateInspectTemplateRequest request = CreateInspectTemplateRequest.newBuilder()
* .setParent(parent.toString())
+ * .setInspectTemplate(inspectTemplate)
* .build();
- * ApiFuture<DeidentifyTemplate> future = dlpServiceClient.createDeidentifyTemplateCallable().futureCall(request);
+ * ApiFuture<InspectTemplate> future = dlpServiceClient.createInspectTemplateCallable().futureCall(request);
* // Do something
- * DeidentifyTemplate response = future.get();
+ * InspectTemplate response = future.get();
* }
*
*/
- public final UnaryCallable
- createDeidentifyTemplateCallable() {
- return stub.createDeidentifyTemplateCallable();
+ public final UnaryCallable
+ createInspectTemplateCallable() {
+ return stub.createInspectTemplateCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid
- * to learn more.
+ * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
+ * more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DeidentifyTemplateName name = OrganizationDeidentifyTemplateName.of("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
- * UpdateDeidentifyTemplateRequest request = UpdateDeidentifyTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * DeidentifyTemplate response = dlpServiceClient.updateDeidentifyTemplate(request);
+ * InspectTemplateName name = InspectTemplateName.ofOrganizationInspectTemplateName("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * InspectTemplate response = dlpServiceClient.updateInspectTemplate(name, inspectTemplate, updateMask);
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param name Required. Resource name of organization and inspectTemplate to be updated, for
+ * example `organizations/433245324/inspectTemplates/432452342` or
+ * projects/project-id/inspectTemplates/432452342.
+ * @param inspectTemplate New InspectTemplate value.
+ * @param updateMask Mask to control which fields get updated.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final DeidentifyTemplate updateDeidentifyTemplate(
- UpdateDeidentifyTemplateRequest request) {
- return updateDeidentifyTemplateCallable().call(request);
+ public final InspectTemplate updateInspectTemplate(
+ InspectTemplateName name, InspectTemplate inspectTemplate, FieldMask updateMask) {
+ UpdateInspectTemplateRequest request =
+ UpdateInspectTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setInspectTemplate(inspectTemplate)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateInspectTemplate(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid
- * to learn more.
+ * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
+ * more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DeidentifyTemplateName name = OrganizationDeidentifyTemplateName.of("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
- * UpdateDeidentifyTemplateRequest request = UpdateDeidentifyTemplateRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<DeidentifyTemplate> future = dlpServiceClient.updateDeidentifyTemplateCallable().futureCall(request);
- * // Do something
- * DeidentifyTemplate response = future.get();
+ * InspectTemplateName name = InspectTemplateName.ofOrganizationInspectTemplateName("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+ * InspectTemplate inspectTemplate = InspectTemplate.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * InspectTemplate response = dlpServiceClient.updateInspectTemplate(name.toString(), inspectTemplate, updateMask);
* }
*
+ *
+ * @param name Required. Resource name of organization and inspectTemplate to be updated, for
+ * example `organizations/433245324/inspectTemplates/432452342` or
+ * projects/project-id/inspectTemplates/432452342.
+ * @param inspectTemplate New InspectTemplate value.
+ * @param updateMask Mask to control which fields get updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable
- updateDeidentifyTemplateCallable() {
- return stub.updateDeidentifyTemplateCallable();
+ public final InspectTemplate updateInspectTemplate(
+ String name, InspectTemplate inspectTemplate, FieldMask updateMask) {
+ UpdateInspectTemplateRequest request =
+ UpdateInspectTemplateRequest.newBuilder()
+ .setName(name)
+ .setInspectTemplate(inspectTemplate)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateInspectTemplate(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
- * learn more.
+ * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
+ * more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DeidentifyTemplateName name = OrganizationDeidentifyTemplateName.of("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
- * GetDeidentifyTemplateRequest request = GetDeidentifyTemplateRequest.newBuilder()
+ * InspectTemplateName name = InspectTemplateName.ofOrganizationInspectTemplateName("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+ * UpdateInspectTemplateRequest request = UpdateInspectTemplateRequest.newBuilder()
* .setName(name.toString())
* .build();
- * DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(request);
+ * InspectTemplate response = dlpServiceClient.updateInspectTemplate(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final DeidentifyTemplate getDeidentifyTemplate(GetDeidentifyTemplateRequest request) {
- return getDeidentifyTemplateCallable().call(request);
+ public final InspectTemplate updateInspectTemplate(UpdateInspectTemplateRequest request) {
+ return updateInspectTemplateCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
- * learn more.
+ * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
+ * more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DeidentifyTemplateName name = OrganizationDeidentifyTemplateName.of("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
- * GetDeidentifyTemplateRequest request = GetDeidentifyTemplateRequest.newBuilder()
+ * InspectTemplateName name = InspectTemplateName.ofOrganizationInspectTemplateName("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+ * UpdateInspectTemplateRequest request = UpdateInspectTemplateRequest.newBuilder()
* .setName(name.toString())
* .build();
- * ApiFuture<DeidentifyTemplate> future = dlpServiceClient.getDeidentifyTemplateCallable().futureCall(request);
+ * ApiFuture<InspectTemplate> future = dlpServiceClient.updateInspectTemplateCallable().futureCall(request);
* // Do something
- * DeidentifyTemplate response = future.get();
+ * InspectTemplate response = future.get();
* }
*
*/
- public final UnaryCallable
- getDeidentifyTemplateCallable() {
- return stub.getDeidentifyTemplateCallable();
+ public final UnaryCallable
+ updateInspectTemplateCallable() {
+ return stub.updateInspectTemplateCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
- * learn more.
+ * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * InspectTemplateName name = InspectTemplateName.ofOrganizationInspectTemplateName("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+ * InspectTemplate response = dlpServiceClient.getInspectTemplate(name);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the organization and inspectTemplate to be read, for
+ * example `organizations/433245324/inspectTemplates/432452342` or
+ * projects/project-id/inspectTemplates/432452342.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final InspectTemplate getInspectTemplate(InspectTemplateName name) {
+ GetInspectTemplateRequest request =
+ GetInspectTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getInspectTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * InspectTemplateName name = InspectTemplateName.ofOrganizationInspectTemplateName("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+ * InspectTemplate response = dlpServiceClient.getInspectTemplate(name.toString());
+ * }
+ *
+ *
+ * @param name Required. Resource name of the organization and inspectTemplate to be read, for
+ * example `organizations/433245324/inspectTemplates/432452342` or
+ * projects/project-id/inspectTemplates/432452342.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final InspectTemplate getInspectTemplate(String name) {
+ GetInspectTemplateRequest request =
+ GetInspectTemplateRequest.newBuilder().setName(name).build();
+ return getInspectTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * InspectTemplateName name = InspectTemplateName.ofOrganizationInspectTemplateName("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+ * GetInspectTemplateRequest request = GetInspectTemplateRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * InspectTemplate response = dlpServiceClient.getInspectTemplate(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final InspectTemplate getInspectTemplate(GetInspectTemplateRequest request) {
+ return getInspectTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * InspectTemplateName name = InspectTemplateName.ofOrganizationInspectTemplateName("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+ * GetInspectTemplateRequest request = GetInspectTemplateRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<InspectTemplate> future = dlpServiceClient.getInspectTemplateCallable().futureCall(request);
+ * // Do something
+ * InspectTemplate response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ getInspectTemplateCallable() {
+ return stub.getInspectTemplateCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListInspectTemplatesPagedResponse listInspectTemplates(
+ OrganizationLocationName parent) {
+ ListInspectTemplatesRequest request =
+ ListInspectTemplatesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listInspectTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListInspectTemplatesPagedResponse listInspectTemplates(ProjectName parent) {
+ ListInspectTemplatesRequest request =
+ ListInspectTemplatesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listInspectTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ * for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListInspectTemplatesPagedResponse listInspectTemplates(OrganizationName parent) {
+ ListInspectTemplatesRequest request =
+ ListInspectTemplatesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listInspectTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListInspectTemplatesPagedResponse listInspectTemplates(LocationName parent) {
+ ListInspectTemplatesRequest request =
+ ListInspectTemplatesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listInspectTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * for (InspectTemplate element : dlpServiceClient.listInspectTemplates(parent.toString()).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListInspectTemplatesPagedResponse listInspectTemplates(String parent) {
+ ListInspectTemplatesRequest request =
+ ListInspectTemplatesRequest.newBuilder().setParent(parent).build();
+ return listInspectTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * ListInspectTemplatesRequest request = ListInspectTemplatesRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * for (InspectTemplate element : dlpServiceClient.listInspectTemplates(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListInspectTemplatesPagedResponse listInspectTemplates(
+ ListInspectTemplatesRequest request) {
+ return listInspectTemplatesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * ListInspectTemplatesRequest request = ListInspectTemplatesRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * ApiFuture<ListInspectTemplatesPagedResponse> future = dlpServiceClient.listInspectTemplatesPagedCallable().futureCall(request);
+ * // Do something
+ * for (InspectTemplate element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ listInspectTemplatesPagedCallable() {
+ return stub.listInspectTemplatesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * ListInspectTemplatesRequest request = ListInspectTemplatesRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * while (true) {
+ * ListInspectTemplatesResponse response = dlpServiceClient.listInspectTemplatesCallable().call(request);
+ * for (InspectTemplate element : response.getInspectTemplatesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ listInspectTemplatesCallable() {
+ return stub.listInspectTemplatesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * InspectTemplateName name = InspectTemplateName.ofOrganizationInspectTemplateName("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+ * dlpServiceClient.deleteInspectTemplate(name);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the organization and inspectTemplate to be deleted, for
+ * example `organizations/433245324/inspectTemplates/432452342` or
+ * projects/project-id/inspectTemplates/432452342.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteInspectTemplate(InspectTemplateName name) {
+ DeleteInspectTemplateRequest request =
+ DeleteInspectTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteInspectTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * InspectTemplateName name = InspectTemplateName.ofOrganizationInspectTemplateName("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+ * dlpServiceClient.deleteInspectTemplate(name.toString());
+ * }
+ *
+ *
+ * @param name Required. Resource name of the organization and inspectTemplate to be deleted, for
+ * example `organizations/433245324/inspectTemplates/432452342` or
+ * projects/project-id/inspectTemplates/432452342.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteInspectTemplate(String name) {
+ DeleteInspectTemplateRequest request =
+ DeleteInspectTemplateRequest.newBuilder().setName(name).build();
+ deleteInspectTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * InspectTemplateName name = InspectTemplateName.ofOrganizationInspectTemplateName("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+ * DeleteInspectTemplateRequest request = DeleteInspectTemplateRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * dlpServiceClient.deleteInspectTemplate(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteInspectTemplate(DeleteInspectTemplateRequest request) {
+ deleteInspectTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * InspectTemplateName name = InspectTemplateName.ofOrganizationInspectTemplateName("[ORGANIZATION]", "[INSPECT_TEMPLATE]");
+ * DeleteInspectTemplateRequest request = DeleteInspectTemplateRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Void> future = dlpServiceClient.deleteInspectTemplateCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallable deleteInspectTemplateCallable() {
+ return stub.deleteInspectTemplateCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
+ * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate createDeidentifyTemplate(
+ OrganizationLocationName parent, DeidentifyTemplate deidentifyTemplate) {
+ CreateDeidentifyTemplateRequest request =
+ CreateDeidentifyTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setDeidentifyTemplate(deidentifyTemplate)
+ .build();
+ return createDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
+ * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate createDeidentifyTemplate(
+ ProjectName parent, DeidentifyTemplate deidentifyTemplate) {
+ CreateDeidentifyTemplateRequest request =
+ CreateDeidentifyTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setDeidentifyTemplate(deidentifyTemplate)
+ .build();
+ return createDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
+ * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate createDeidentifyTemplate(
+ OrganizationName parent, DeidentifyTemplate deidentifyTemplate) {
+ CreateDeidentifyTemplateRequest request =
+ CreateDeidentifyTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setDeidentifyTemplate(deidentifyTemplate)
+ .build();
+ return createDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
+ * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate createDeidentifyTemplate(
+ LocationName parent, DeidentifyTemplate deidentifyTemplate) {
+ CreateDeidentifyTemplateRequest request =
+ CreateDeidentifyTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setDeidentifyTemplate(deidentifyTemplate)
+ .build();
+ return createDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
+ * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(parent.toString(), deidentifyTemplate);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate createDeidentifyTemplate(
+ String parent, DeidentifyTemplate deidentifyTemplate) {
+ CreateDeidentifyTemplateRequest request =
+ CreateDeidentifyTemplateRequest.newBuilder()
+ .setParent(parent)
+ .setDeidentifyTemplate(deidentifyTemplate)
+ .build();
+ return createDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
+ * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * String locationId = "";
+ * DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate, locationId);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
+ * @param locationId The geographic location to store the deidentification template. Reserved for
+ * future extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate createDeidentifyTemplate(
+ OrganizationLocationName parent, DeidentifyTemplate deidentifyTemplate, String locationId) {
+ CreateDeidentifyTemplateRequest request =
+ CreateDeidentifyTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setDeidentifyTemplate(deidentifyTemplate)
+ .setLocationId(locationId)
+ .build();
+ return createDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
+ * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * String locationId = "";
+ * DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate, locationId);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
+ * @param locationId The geographic location to store the deidentification template. Reserved for
+ * future extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate createDeidentifyTemplate(
+ ProjectName parent, DeidentifyTemplate deidentifyTemplate, String locationId) {
+ CreateDeidentifyTemplateRequest request =
+ CreateDeidentifyTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setDeidentifyTemplate(deidentifyTemplate)
+ .setLocationId(locationId)
+ .build();
+ return createDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
+ * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * String locationId = "";
+ * DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate, locationId);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
+ * @param locationId The geographic location to store the deidentification template. Reserved for
+ * future extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate createDeidentifyTemplate(
+ OrganizationName parent, DeidentifyTemplate deidentifyTemplate, String locationId) {
+ CreateDeidentifyTemplateRequest request =
+ CreateDeidentifyTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setDeidentifyTemplate(deidentifyTemplate)
+ .setLocationId(locationId)
+ .build();
+ return createDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
+ * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * String locationId = "";
+ * DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(parent, deidentifyTemplate, locationId);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
+ * @param locationId The geographic location to store the deidentification template. Reserved for
+ * future extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate createDeidentifyTemplate(
+ LocationName parent, DeidentifyTemplate deidentifyTemplate, String locationId) {
+ CreateDeidentifyTemplateRequest request =
+ CreateDeidentifyTemplateRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setDeidentifyTemplate(deidentifyTemplate)
+ .setLocationId(locationId)
+ .build();
+ return createDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
+ * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * String locationId = "";
+ * DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(parent.toString(), deidentifyTemplate, locationId);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param deidentifyTemplate Required. The DeidentifyTemplate to create.
+ * @param locationId The geographic location to store the deidentification template. Reserved for
+ * future extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate createDeidentifyTemplate(
+ String parent, DeidentifyTemplate deidentifyTemplate, String locationId) {
+ CreateDeidentifyTemplateRequest request =
+ CreateDeidentifyTemplateRequest.newBuilder()
+ .setParent(parent)
+ .setDeidentifyTemplate(deidentifyTemplate)
+ .setLocationId(locationId)
+ .build();
+ return createDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
+ * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * CreateDeidentifyTemplateRequest request = CreateDeidentifyTemplateRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setDeidentifyTemplate(deidentifyTemplate)
+ * .build();
+ * DeidentifyTemplate response = dlpServiceClient.createDeidentifyTemplate(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate createDeidentifyTemplate(
+ CreateDeidentifyTemplateRequest request) {
+ return createDeidentifyTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying
+ * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * CreateDeidentifyTemplateRequest request = CreateDeidentifyTemplateRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setDeidentifyTemplate(deidentifyTemplate)
+ * .build();
+ * ApiFuture<DeidentifyTemplate> future = dlpServiceClient.createDeidentifyTemplateCallable().futureCall(request);
+ * // Do something
+ * DeidentifyTemplate response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ createDeidentifyTemplateCallable() {
+ return stub.createDeidentifyTemplateCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid
+ * to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DeidentifyTemplateName name = DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * DeidentifyTemplate response = dlpServiceClient.updateDeidentifyTemplate(name, deidentifyTemplate, updateMask);
+ * }
+ *
+ *
+ * @param name Required. Resource name of organization and deidentify template to be updated, for
+ * example `organizations/433245324/deidentifyTemplates/432452342` or
+ * projects/project-id/deidentifyTemplates/432452342.
+ * @param deidentifyTemplate New DeidentifyTemplate value.
+ * @param updateMask Mask to control which fields get updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate updateDeidentifyTemplate(
+ DeidentifyTemplateName name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask) {
+ UpdateDeidentifyTemplateRequest request =
+ UpdateDeidentifyTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setDeidentifyTemplate(deidentifyTemplate)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid
+ * to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DeidentifyTemplateName name = DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+ * DeidentifyTemplate deidentifyTemplate = DeidentifyTemplate.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * DeidentifyTemplate response = dlpServiceClient.updateDeidentifyTemplate(name.toString(), deidentifyTemplate, updateMask);
+ * }
+ *
+ *
+ * @param name Required. Resource name of organization and deidentify template to be updated, for
+ * example `organizations/433245324/deidentifyTemplates/432452342` or
+ * projects/project-id/deidentifyTemplates/432452342.
+ * @param deidentifyTemplate New DeidentifyTemplate value.
+ * @param updateMask Mask to control which fields get updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate updateDeidentifyTemplate(
+ String name, DeidentifyTemplate deidentifyTemplate, FieldMask updateMask) {
+ UpdateDeidentifyTemplateRequest request =
+ UpdateDeidentifyTemplateRequest.newBuilder()
+ .setName(name)
+ .setDeidentifyTemplate(deidentifyTemplate)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid
+ * to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DeidentifyTemplateName name = DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+ * UpdateDeidentifyTemplateRequest request = UpdateDeidentifyTemplateRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * DeidentifyTemplate response = dlpServiceClient.updateDeidentifyTemplate(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate updateDeidentifyTemplate(
+ UpdateDeidentifyTemplateRequest request) {
+ return updateDeidentifyTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid
+ * to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DeidentifyTemplateName name = DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+ * UpdateDeidentifyTemplateRequest request = UpdateDeidentifyTemplateRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<DeidentifyTemplate> future = dlpServiceClient.updateDeidentifyTemplateCallable().futureCall(request);
+ * // Do something
+ * DeidentifyTemplate response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ updateDeidentifyTemplateCallable() {
+ return stub.updateDeidentifyTemplateCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DeidentifyTemplateName name = DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+ * DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(name);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the organization and deidentify template to be read, for
+ * example `organizations/433245324/deidentifyTemplates/432452342` or
+ * projects/project-id/deidentifyTemplates/432452342.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate getDeidentifyTemplate(DeidentifyTemplateName name) {
+ GetDeidentifyTemplateRequest request =
+ GetDeidentifyTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DeidentifyTemplateName name = DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+ * DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(name.toString());
+ * }
+ *
+ *
+ * @param name Required. Resource name of the organization and deidentify template to be read, for
+ * example `organizations/433245324/deidentifyTemplates/432452342` or
+ * projects/project-id/deidentifyTemplates/432452342.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate getDeidentifyTemplate(String name) {
+ GetDeidentifyTemplateRequest request =
+ GetDeidentifyTemplateRequest.newBuilder().setName(name).build();
+ return getDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DeidentifyTemplateName name = DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+ * GetDeidentifyTemplateRequest request = GetDeidentifyTemplateRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * DeidentifyTemplate response = dlpServiceClient.getDeidentifyTemplate(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeidentifyTemplate getDeidentifyTemplate(GetDeidentifyTemplateRequest request) {
+ return getDeidentifyTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DeidentifyTemplateName name = DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+ * GetDeidentifyTemplateRequest request = GetDeidentifyTemplateRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<DeidentifyTemplate> future = dlpServiceClient.getDeidentifyTemplateCallable().futureCall(request);
+ * // Do something
+ * DeidentifyTemplate response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ getDeidentifyTemplateCallable() {
+ return stub.getDeidentifyTemplateCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * for (DeidentifyTemplate element : dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(
+ OrganizationLocationName parent) {
+ ListDeidentifyTemplatesRequest request =
+ ListDeidentifyTemplatesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDeidentifyTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (DeidentifyTemplate element : dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(ProjectName parent) {
+ ListDeidentifyTemplatesRequest request =
+ ListDeidentifyTemplatesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDeidentifyTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ * for (DeidentifyTemplate element : dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(
+ OrganizationName parent) {
+ ListDeidentifyTemplatesRequest request =
+ ListDeidentifyTemplatesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDeidentifyTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (DeidentifyTemplate element : dlpServiceClient.listDeidentifyTemplates(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(LocationName parent) {
+ ListDeidentifyTemplatesRequest request =
+ ListDeidentifyTemplatesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDeidentifyTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * for (DeidentifyTemplate element : dlpServiceClient.listDeidentifyTemplates(parent.toString()).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(String parent) {
+ ListDeidentifyTemplatesRequest request =
+ ListDeidentifyTemplatesRequest.newBuilder().setParent(parent).build();
+ return listDeidentifyTemplates(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * ListDeidentifyTemplatesRequest request = ListDeidentifyTemplatesRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * for (DeidentifyTemplate element : dlpServiceClient.listDeidentifyTemplates(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(
+ ListDeidentifyTemplatesRequest request) {
+ return listDeidentifyTemplatesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * ListDeidentifyTemplatesRequest request = ListDeidentifyTemplatesRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * ApiFuture<ListDeidentifyTemplatesPagedResponse> future = dlpServiceClient.listDeidentifyTemplatesPagedCallable().futureCall(request);
+ * // Do something
+ * for (DeidentifyTemplate element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ listDeidentifyTemplatesPagedCallable() {
+ return stub.listDeidentifyTemplatesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * ListDeidentifyTemplatesRequest request = ListDeidentifyTemplatesRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * while (true) {
+ * ListDeidentifyTemplatesResponse response = dlpServiceClient.listDeidentifyTemplatesCallable().call(request);
+ * for (DeidentifyTemplate element : response.getDeidentifyTemplatesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ listDeidentifyTemplatesCallable() {
+ return stub.listDeidentifyTemplatesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DeidentifyTemplateName name = DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+ * dlpServiceClient.deleteDeidentifyTemplate(name);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the organization and deidentify template to be deleted,
+ * for example `organizations/433245324/deidentifyTemplates/432452342` or
+ * projects/project-id/deidentifyTemplates/432452342.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteDeidentifyTemplate(DeidentifyTemplateName name) {
+ DeleteDeidentifyTemplateRequest request =
+ DeleteDeidentifyTemplateRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DeidentifyTemplateName name = DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+ * dlpServiceClient.deleteDeidentifyTemplate(name.toString());
+ * }
+ *
+ *
+ * @param name Required. Resource name of the organization and deidentify template to be deleted,
+ * for example `organizations/433245324/deidentifyTemplates/432452342` or
+ * projects/project-id/deidentifyTemplates/432452342.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteDeidentifyTemplate(String name) {
+ DeleteDeidentifyTemplateRequest request =
+ DeleteDeidentifyTemplateRequest.newBuilder().setName(name).build();
+ deleteDeidentifyTemplate(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DeidentifyTemplateName name = DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+ * DeleteDeidentifyTemplateRequest request = DeleteDeidentifyTemplateRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * dlpServiceClient.deleteDeidentifyTemplate(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest request) {
+ deleteDeidentifyTemplateCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DeidentifyTemplateName name = DeidentifyTemplateName.ofOrganizationDeidentifyTemplateName("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
+ * DeleteDeidentifyTemplateRequest request = DeleteDeidentifyTemplateRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Void> future = dlpServiceClient.deleteDeidentifyTemplateCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ deleteDeidentifyTemplateCallable() {
+ return stub.deleteDeidentifyTemplateCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
+ * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+ * JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @param jobTrigger Required. The JobTrigger to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobTrigger createJobTrigger(ProjectName parent, JobTrigger jobTrigger) {
+ CreateJobTriggerRequest request =
+ CreateJobTriggerRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setJobTrigger(jobTrigger)
+ .build();
+ return createJobTrigger(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
+ * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+ * JobTrigger response = dlpServiceClient.createJobTrigger(parent.toString(), jobTrigger);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @param jobTrigger Required. The JobTrigger to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobTrigger createJobTrigger(String parent, JobTrigger jobTrigger) {
+ CreateJobTriggerRequest request =
+ CreateJobTriggerRequest.newBuilder().setParent(parent).setJobTrigger(jobTrigger).build();
+ return createJobTrigger(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
+ * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+ * String locationId = "";
+ * JobTrigger response = dlpServiceClient.createJobTrigger(parent, jobTrigger, locationId);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @param jobTrigger Required. The JobTrigger to create.
+ * @param locationId The geographic location to store the job trigger. Reserved for future
+ * extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobTrigger createJobTrigger(
+ ProjectName parent, JobTrigger jobTrigger, String locationId) {
+ CreateJobTriggerRequest request =
+ CreateJobTriggerRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setJobTrigger(jobTrigger)
+ .setLocationId(locationId)
+ .build();
+ return createJobTrigger(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
+ * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+ * String locationId = "";
+ * JobTrigger response = dlpServiceClient.createJobTrigger(parent.toString(), jobTrigger, locationId);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @param jobTrigger Required. The JobTrigger to create.
+ * @param locationId The geographic location to store the job trigger. Reserved for future
+ * extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobTrigger createJobTrigger(
+ String parent, JobTrigger jobTrigger, String locationId) {
+ CreateJobTriggerRequest request =
+ CreateJobTriggerRequest.newBuilder()
+ .setParent(parent)
+ .setJobTrigger(jobTrigger)
+ .setLocationId(locationId)
+ .build();
+ return createJobTrigger(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
+ * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+ * CreateJobTriggerRequest request = CreateJobTriggerRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setJobTrigger(jobTrigger)
+ * .build();
+ * JobTrigger response = dlpServiceClient.createJobTrigger(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobTrigger createJobTrigger(CreateJobTriggerRequest request) {
+ return createJobTriggerCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
+ * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+ * CreateJobTriggerRequest request = CreateJobTriggerRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setJobTrigger(jobTrigger)
+ * .build();
+ * ApiFuture<JobTrigger> future = dlpServiceClient.createJobTriggerCallable().futureCall(request);
+ * // Do something
+ * JobTrigger response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable createJobTriggerCallable() {
+ return stub.createJobTriggerCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * JobTrigger response = dlpServiceClient.updateJobTrigger(name, jobTrigger, updateMask);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the project and the triggeredJob, for example
+ * `projects/dlp-test-project/jobTriggers/53234423`.
+ * @param jobTrigger New JobTrigger value.
+ * @param updateMask Mask to control which fields get updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobTrigger updateJobTrigger(
+ JobTriggerName name, JobTrigger jobTrigger, FieldMask updateMask) {
+ UpdateJobTriggerRequest request =
+ UpdateJobTriggerRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setJobTrigger(jobTrigger)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateJobTrigger(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * JobTrigger jobTrigger = JobTrigger.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * JobTrigger response = dlpServiceClient.updateJobTrigger(name.toString(), jobTrigger, updateMask);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the project and the triggeredJob, for example
+ * `projects/dlp-test-project/jobTriggers/53234423`.
+ * @param jobTrigger New JobTrigger value.
+ * @param updateMask Mask to control which fields get updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobTrigger updateJobTrigger(
+ String name, JobTrigger jobTrigger, FieldMask updateMask) {
+ UpdateJobTriggerRequest request =
+ UpdateJobTriggerRequest.newBuilder()
+ .setName(name)
+ .setJobTrigger(jobTrigger)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateJobTrigger(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * UpdateJobTriggerRequest request = UpdateJobTriggerRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * JobTrigger response = dlpServiceClient.updateJobTrigger(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobTrigger updateJobTrigger(UpdateJobTriggerRequest request) {
+ return updateJobTriggerCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * UpdateJobTriggerRequest request = UpdateJobTriggerRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<JobTrigger> future = dlpServiceClient.updateJobTriggerCallable().futureCall(request);
+ * // Do something
+ * JobTrigger response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable updateJobTriggerCallable() {
+ return stub.updateJobTriggerCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Inspect hybrid content and store findings to a trigger. The inspection will be processed
+ * asynchronously. To review the findings monitor the jobs within the trigger. Early access
+ * feature is in a pre-release state and might change or have limited support. For more
+ * information, see https://cloud.google.com/products#product-launch-stages.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(name);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the trigger to execute a hybrid inspect on, for example
+ * `projects/dlp-test-project/jobTriggers/53234423`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final HybridInspectResponse hybridInspectJobTrigger(JobTriggerName name) {
+ HybridInspectJobTriggerRequest request =
+ HybridInspectJobTriggerRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return hybridInspectJobTrigger(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Inspect hybrid content and store findings to a trigger. The inspection will be processed
+ * asynchronously. To review the findings monitor the jobs within the trigger. Early access
+ * feature is in a pre-release state and might change or have limited support. For more
+ * information, see https://cloud.google.com/products#product-launch-stages.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(name.toString());
+ * }
+ *
+ *
+ * @param name Required. Resource name of the trigger to execute a hybrid inspect on, for example
+ * `projects/dlp-test-project/jobTriggers/53234423`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final HybridInspectResponse hybridInspectJobTrigger(String name) {
+ HybridInspectJobTriggerRequest request =
+ HybridInspectJobTriggerRequest.newBuilder().setName(name).build();
+ return hybridInspectJobTrigger(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Inspect hybrid content and store findings to a trigger. The inspection will be processed
+ * asynchronously. To review the findings monitor the jobs within the trigger. Early access
+ * feature is in a pre-release state and might change or have limited support. For more
+ * information, see https://cloud.google.com/products#product-launch-stages.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * HybridInspectJobTriggerRequest request = HybridInspectJobTriggerRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final HybridInspectResponse hybridInspectJobTrigger(
+ HybridInspectJobTriggerRequest request) {
+ return hybridInspectJobTriggerCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Inspect hybrid content and store findings to a trigger. The inspection will be processed
+ * asynchronously. To review the findings monitor the jobs within the trigger. Early access
+ * feature is in a pre-release state and might change or have limited support. For more
+ * information, see https://cloud.google.com/products#product-launch-stages.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * HybridInspectJobTriggerRequest request = HybridInspectJobTriggerRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<HybridInspectResponse> future = dlpServiceClient.hybridInspectJobTriggerCallable().futureCall(request);
+ * // Do something
+ * HybridInspectResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable
+ hybridInspectJobTriggerCallable() {
+ return stub.hybridInspectJobTriggerCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * JobTrigger response = dlpServiceClient.getJobTrigger(name);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the project and the triggeredJob, for example
+ * `projects/dlp-test-project/jobTriggers/53234423`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobTrigger getJobTrigger(JobTriggerName name) {
+ GetJobTriggerRequest request =
+ GetJobTriggerRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getJobTrigger(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * JobTrigger response = dlpServiceClient.getJobTrigger(name.toString());
+ * }
+ *
+ *
+ * @param name Required. Resource name of the project and the triggeredJob, for example
+ * `projects/dlp-test-project/jobTriggers/53234423`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobTrigger getJobTrigger(String name) {
+ GetJobTriggerRequest request = GetJobTriggerRequest.newBuilder().setName(name).build();
+ return getJobTrigger(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * GetJobTriggerRequest request = GetJobTriggerRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * JobTrigger response = dlpServiceClient.getJobTrigger(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobTrigger getJobTrigger(GetJobTriggerRequest request) {
+ return getJobTriggerCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * GetJobTriggerRequest request = GetJobTriggerRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<JobTrigger> future = dlpServiceClient.getJobTriggerCallable().futureCall(request);
+ * // Do something
+ * JobTrigger response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable getJobTriggerCallable() {
+ return stub.getJobTriggerCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (JobTrigger element : dlpServiceClient.listJobTriggers(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example `projects/my-project-id`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListJobTriggersPagedResponse listJobTriggers(ProjectName parent) {
+ ListJobTriggersRequest request =
+ ListJobTriggersRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listJobTriggers(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (JobTrigger element : dlpServiceClient.listJobTriggers(parent.toString()).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example `projects/my-project-id`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListJobTriggersPagedResponse listJobTriggers(String parent) {
+ ListJobTriggersRequest request = ListJobTriggersRequest.newBuilder().setParent(parent).build();
+ return listJobTriggers(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * ListJobTriggersRequest request = ListJobTriggersRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * for (JobTrigger element : dlpServiceClient.listJobTriggers(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListJobTriggersPagedResponse listJobTriggers(ListJobTriggersRequest request) {
+ return listJobTriggersPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * ListJobTriggersRequest request = ListJobTriggersRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * ApiFuture<ListJobTriggersPagedResponse> future = dlpServiceClient.listJobTriggersPagedCallable().futureCall(request);
+ * // Do something
+ * for (JobTrigger element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ listJobTriggersPagedCallable() {
+ return stub.listJobTriggersPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * ListJobTriggersRequest request = ListJobTriggersRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * while (true) {
+ * ListJobTriggersResponse response = dlpServiceClient.listJobTriggersCallable().call(request);
+ * for (JobTrigger element : response.getJobTriggersList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ listJobTriggersCallable() {
+ return stub.listJobTriggersCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * dlpServiceClient.deleteJobTrigger(name);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the project and the triggeredJob, for example
+ * `projects/dlp-test-project/jobTriggers/53234423`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteJobTrigger(JobTriggerName name) {
+ DeleteJobTriggerRequest request =
+ DeleteJobTriggerRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteJobTrigger(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * dlpServiceClient.deleteJobTrigger(name.toString());
+ * }
+ *
+ *
+ * @param name Required. Resource name of the project and the triggeredJob, for example
+ * `projects/dlp-test-project/jobTriggers/53234423`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteJobTrigger(String name) {
+ DeleteJobTriggerRequest request = DeleteJobTriggerRequest.newBuilder().setName(name).build();
+ deleteJobTrigger(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * DeleteJobTriggerRequest request = DeleteJobTriggerRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * dlpServiceClient.deleteJobTrigger(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteJobTrigger(DeleteJobTriggerRequest request) {
+ deleteJobTriggerCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
+ * more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * JobTriggerName name = JobTriggerName.ofProjectJobTriggerName("[PROJECT]", "[JOB_TRIGGER]");
+ * DeleteJobTriggerRequest request = DeleteJobTriggerRequest.newBuilder()
+ * .setName(name.toString())
+ * .build();
+ * ApiFuture<Void> future = dlpServiceClient.deleteJobTriggerCallable().futureCall(request);
+ * // Do something
+ * future.get();
+ * }
+ *
+ */
+ public final UnaryCallable deleteJobTriggerCallable() {
+ return stub.deleteJobTriggerCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new job to inspect storage or calculate risk metrics. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
+ * automatically choose what detectors to run. By default this may be all types, but may change
+ * over time as detectors are updated.
+ *
+ *
Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
+ * DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @param inspectJob Set to control what and how to inspect.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DlpJob createDlpJob(ProjectName parent, InspectJobConfig inspectJob) {
+ CreateDlpJobRequest request =
+ CreateDlpJobRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setInspectJob(inspectJob)
+ .build();
+ return createDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new job to inspect storage or calculate risk metrics. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
+ * automatically choose what detectors to run. By default this may be all types, but may change
+ * over time as detectors are updated.
+ *
+ *
Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
+ * DlpJob response = dlpServiceClient.createDlpJob(parent.toString(), inspectJob);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @param inspectJob Set to control what and how to inspect.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DlpJob createDlpJob(String parent, InspectJobConfig inspectJob) {
+ CreateDlpJobRequest request =
+ CreateDlpJobRequest.newBuilder().setParent(parent).setInspectJob(inspectJob).build();
+ return createDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new job to inspect storage or calculate risk metrics. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
+ * automatically choose what detectors to run. By default this may be all types, but may change
+ * over time as detectors are updated.
+ *
+ *
Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
+ * String locationId = "";
+ * DlpJob response = dlpServiceClient.createDlpJob(parent, inspectJob, locationId);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @param inspectJob Set to control what and how to inspect.
+ * @param locationId The geographic location to store and process the job. Reserved for future
+ * extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DlpJob createDlpJob(
+ ProjectName parent, InspectJobConfig inspectJob, String locationId) {
+ CreateDlpJobRequest request =
+ CreateDlpJobRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setInspectJob(inspectJob)
+ .setLocationId(locationId)
+ .build();
+ return createDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new job to inspect storage or calculate risk metrics. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
+ * automatically choose what detectors to run. By default this may be all types, but may change
+ * over time as detectors are updated.
+ *
+ *
Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * InspectJobConfig inspectJob = InspectJobConfig.newBuilder().build();
+ * String locationId = "";
+ * DlpJob response = dlpServiceClient.createDlpJob(parent.toString(), inspectJob, locationId);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @param inspectJob Set to control what and how to inspect.
+ * @param locationId The geographic location to store and process the job. Reserved for future
+ * extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DlpJob createDlpJob(String parent, InspectJobConfig inspectJob, String locationId) {
+ CreateDlpJobRequest request =
+ CreateDlpJobRequest.newBuilder()
+ .setParent(parent)
+ .setInspectJob(inspectJob)
+ .setLocationId(locationId)
+ .build();
+ return createDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new job to inspect storage or calculate risk metrics. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
+ * automatically choose what detectors to run. By default this may be all types, but may change
+ * over time as detectors are updated.
+ *
+ *
Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
+ * DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @param riskJob Set to choose what metric to calculate.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DlpJob createDlpJob(ProjectName parent, RiskAnalysisJobConfig riskJob) {
+ CreateDlpJobRequest request =
+ CreateDlpJobRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setRiskJob(riskJob)
+ .build();
+ return createDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new job to inspect storage or calculate risk metrics. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
+ * automatically choose what detectors to run. By default this may be all types, but may change
+ * over time as detectors are updated.
+ *
+ *
Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
+ * DlpJob response = dlpServiceClient.createDlpJob(parent.toString(), riskJob);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @param riskJob Set to choose what metric to calculate.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DlpJob createDlpJob(String parent, RiskAnalysisJobConfig riskJob) {
+ CreateDlpJobRequest request =
+ CreateDlpJobRequest.newBuilder().setParent(parent).setRiskJob(riskJob).build();
+ return createDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new job to inspect storage or calculate risk metrics. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
+ * automatically choose what detectors to run. By default this may be all types, but may change
+ * over time as detectors are updated.
+ *
+ *
Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
+ * String locationId = "";
+ * DlpJob response = dlpServiceClient.createDlpJob(parent, riskJob, locationId);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @param riskJob Set to choose what metric to calculate.
+ * @param locationId The geographic location to store and process the job. Reserved for future
+ * extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DlpJob createDlpJob(
+ ProjectName parent, RiskAnalysisJobConfig riskJob, String locationId) {
+ CreateDlpJobRequest request =
+ CreateDlpJobRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setRiskJob(riskJob)
+ .setLocationId(locationId)
+ .build();
+ return createDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new job to inspect storage or calculate risk metrics. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
+ * automatically choose what detectors to run. By default this may be all types, but may change
+ * over time as detectors are updated.
+ *
+ *
Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * RiskAnalysisJobConfig riskJob = RiskAnalysisJobConfig.newBuilder().build();
+ * String locationId = "";
+ * DlpJob response = dlpServiceClient.createDlpJob(parent.toString(), riskJob, locationId);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @param riskJob Set to choose what metric to calculate.
+ * @param locationId The geographic location to store and process the job. Reserved for future
+ * extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DlpJob createDlpJob(
+ String parent, RiskAnalysisJobConfig riskJob, String locationId) {
+ CreateDlpJobRequest request =
+ CreateDlpJobRequest.newBuilder()
+ .setParent(parent)
+ .setRiskJob(riskJob)
+ .setLocationId(locationId)
+ .build();
+ return createDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new job to inspect storage or calculate risk metrics. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
+ * automatically choose what detectors to run. By default this may be all types, but may change
+ * over time as detectors are updated.
+ *
+ *
Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * CreateDlpJobRequest request = CreateDlpJobRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * DlpJob response = dlpServiceClient.createDlpJob(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DlpJob createDlpJob(CreateDlpJobRequest request) {
+ return createDlpJobCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a new job to inspect storage or calculate risk metrics. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
+ * automatically choose what detectors to run. By default this may be all types, but may change
+ * over time as detectors are updated.
+ *
+ *
Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * CreateDlpJobRequest request = CreateDlpJobRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * ApiFuture<DlpJob> future = dlpServiceClient.createDlpJobCallable().futureCall(request);
+ * // Do something
+ * DlpJob response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable createDlpJobCallable() {
+ return stub.createDlpJobCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists DlpJobs that match the specified filter in the request. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (DlpJob element : dlpServiceClient.listDlpJobs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDlpJobsPagedResponse listDlpJobs(ProjectName parent) {
+ ListDlpJobsRequest request =
+ ListDlpJobsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDlpJobs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists DlpJobs that match the specified filter in the request. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (DlpJob element : dlpServiceClient.listDlpJobs(parent.toString()).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDlpJobsPagedResponse listDlpJobs(String parent) {
+ ListDlpJobsRequest request = ListDlpJobsRequest.newBuilder().setParent(parent).build();
+ return listDlpJobs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Lists DlpJobs that match the specified filter in the request. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * ListDeidentifyTemplatesRequest request = ListDeidentifyTemplatesRequest.newBuilder()
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * ListDlpJobsRequest request = ListDlpJobsRequest.newBuilder()
* .setParent(parent.toString())
* .build();
- * for (DeidentifyTemplate element : dlpServiceClient.listDeidentifyTemplates(request).iterateAll()) {
+ * for (DlpJob element : dlpServiceClient.listDlpJobs(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
@@ -916,53 +3440,54 @@ public final DeidentifyTemplate getDeidentifyTemplate(GetDeidentifyTemplateReque
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(
- ListDeidentifyTemplatesRequest request) {
- return listDeidentifyTemplatesPagedCallable().call(request);
+ public final ListDlpJobsPagedResponse listDlpJobs(ListDlpJobsRequest request) {
+ return listDlpJobsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
- * learn more.
+ * Lists DlpJobs that match the specified filter in the request. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * ListDeidentifyTemplatesRequest request = ListDeidentifyTemplatesRequest.newBuilder()
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * ListDlpJobsRequest request = ListDlpJobsRequest.newBuilder()
* .setParent(parent.toString())
* .build();
- * ApiFuture<ListDeidentifyTemplatesPagedResponse> future = dlpServiceClient.listDeidentifyTemplatesPagedCallable().futureCall(request);
+ * ApiFuture<ListDlpJobsPagedResponse> future = dlpServiceClient.listDlpJobsPagedCallable().futureCall(request);
* // Do something
- * for (DeidentifyTemplate element : future.get().iterateAll()) {
+ * for (DlpJob element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
*
*/
- public final UnaryCallable
- listDeidentifyTemplatesPagedCallable() {
- return stub.listDeidentifyTemplatesPagedCallable();
+ public final UnaryCallable
+ listDlpJobsPagedCallable() {
+ return stub.listDlpJobsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to
- * learn more.
+ * Lists DlpJobs that match the specified filter in the request. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * ListDeidentifyTemplatesRequest request = ListDeidentifyTemplatesRequest.newBuilder()
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * ListDlpJobsRequest request = ListDlpJobsRequest.newBuilder()
* .setParent(parent.toString())
* .build();
* while (true) {
- * ListDeidentifyTemplatesResponse response = dlpServiceClient.listDeidentifyTemplatesCallable().call(request);
- * for (DeidentifyTemplate element : response.getDeidentifyTemplatesList()) {
+ * ListDlpJobsResponse response = dlpServiceClient.listDlpJobsCallable().call(request);
+ * for (DlpJob element : response.getJobsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
@@ -975,119 +3500,210 @@ public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates(
* }
*
*/
- public final UnaryCallable
- listDeidentifyTemplatesCallable() {
- return stub.listDeidentifyTemplatesCallable();
+ public final UnaryCallable listDlpJobsCallable() {
+ return stub.listDlpJobsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
- * learn more.
+ * Gets the latest state of a long-running DlpJob. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DeidentifyTemplateName name = OrganizationDeidentifyTemplateName.of("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
- * DeleteDeidentifyTemplateRequest request = DeleteDeidentifyTemplateRequest.newBuilder()
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * DlpJob response = dlpServiceClient.getDlpJob(name);
+ * }
+ *
+ *
+ * @param name Required. The name of the DlpJob resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DlpJob getDlpJob(DlpJobName name) {
+ GetDlpJobRequest request =
+ GetDlpJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets the latest state of a long-running DlpJob. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * DlpJob response = dlpServiceClient.getDlpJob(name.toString());
+ * }
+ *
+ *
+ * @param name Required. The name of the DlpJob resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DlpJob getDlpJob(String name) {
+ GetDlpJobRequest request = GetDlpJobRequest.newBuilder().setName(name).build();
+ return getDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets the latest state of a long-running DlpJob. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * GetDlpJobRequest request = GetDlpJobRequest.newBuilder()
* .setName(name.toString())
* .build();
- * dlpServiceClient.deleteDeidentifyTemplate(request);
+ * DlpJob response = dlpServiceClient.getDlpJob(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest request) {
- deleteDeidentifyTemplateCallable().call(request);
+ public final DlpJob getDlpJob(GetDlpJobRequest request) {
+ return getDlpJobCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to
- * learn more.
+ * Gets the latest state of a long-running DlpJob. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DeidentifyTemplateName name = OrganizationDeidentifyTemplateName.of("[ORGANIZATION]", "[DEIDENTIFY_TEMPLATE]");
- * DeleteDeidentifyTemplateRequest request = DeleteDeidentifyTemplateRequest.newBuilder()
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * GetDlpJobRequest request = GetDlpJobRequest.newBuilder()
* .setName(name.toString())
* .build();
- * ApiFuture<Void> future = dlpServiceClient.deleteDeidentifyTemplateCallable().futureCall(request);
+ * ApiFuture<DlpJob> future = dlpServiceClient.getDlpJobCallable().futureCall(request);
* // Do something
- * future.get();
+ * DlpJob response = future.get();
* }
*
*/
- public final UnaryCallable
- deleteDeidentifyTemplateCallable() {
- return stub.deleteDeidentifyTemplateCallable();
+ public final UnaryCallable getDlpJobCallable() {
+ return stub.getDlpJobCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a new job to inspect storage or calculate risk metrics. See
+ * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in
+ * the DlpJob result. The job will be cancelled if possible. See
* https://cloud.google.com/dlp/docs/inspecting-storage and
* https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
*
- * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
- * automatically choose what detectors to run. By default this may be all types, but may change
- * over time as detectors are updated.
+ *
Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * dlpServiceClient.deleteDlpJob(name);
+ * }
+ *
+ *
+ * @param name Required. The name of the DlpJob resource to be deleted.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteDlpJob(DlpJobName name) {
+ DeleteDlpJobRequest request =
+ DeleteDlpJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in
+ * the DlpJob result. The job will be cancelled if possible. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * CreateDlpJobRequest request = CreateDlpJobRequest.newBuilder()
- * .setParent(parent.toString())
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * dlpServiceClient.deleteDlpJob(name.toString());
+ * }
+ *
+ *
+ * @param name Required. The name of the DlpJob resource to be deleted.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteDlpJob(String name) {
+ DeleteDlpJobRequest request = DeleteDlpJobRequest.newBuilder().setName(name).build();
+ deleteDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in
+ * the DlpJob result. The job will be cancelled if possible. See
+ * https://cloud.google.com/dlp/docs/inspecting-storage and
+ * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * DeleteDlpJobRequest request = DeleteDlpJobRequest.newBuilder()
+ * .setName(name.toString())
* .build();
- * DlpJob response = dlpServiceClient.createDlpJob(request);
+ * dlpServiceClient.deleteDlpJob(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final DlpJob createDlpJob(CreateDlpJobRequest request) {
- return createDlpJobCallable().call(request);
+ public final void deleteDlpJob(DeleteDlpJobRequest request) {
+ deleteDlpJobCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a new job to inspect storage or calculate risk metrics. See
+ * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in
+ * the DlpJob result. The job will be cancelled if possible. See
* https://cloud.google.com/dlp/docs/inspecting-storage and
* https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
*
- * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will
- * automatically choose what detectors to run. By default this may be all types, but may change
- * over time as detectors are updated.
- *
*
Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * CreateDlpJobRequest request = CreateDlpJobRequest.newBuilder()
- * .setParent(parent.toString())
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * DeleteDlpJobRequest request = DeleteDlpJobRequest.newBuilder()
+ * .setName(name.toString())
* .build();
- * ApiFuture<DlpJob> future = dlpServiceClient.createDlpJobCallable().futureCall(request);
+ * ApiFuture<Void> future = dlpServiceClient.deleteDlpJobCallable().futureCall(request);
* // Do something
- * DlpJob response = future.get();
+ * future.get();
* }
*
*/
- public final UnaryCallable createDlpJobCallable() {
- return stub.createDlpJobCallable();
+ public final UnaryCallable deleteDlpJobCallable() {
+ return stub.deleteDlpJobCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists DlpJobs that match the specified filter in the request. See
+ * Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to
+ * cancel the DlpJob, but success is not guaranteed. See
* https://cloud.google.com/dlp/docs/inspecting-storage and
* https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
*
@@ -1095,26 +3711,25 @@ public final UnaryCallable createDlpJobCallable() {
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * ListDlpJobsRequest request = ListDlpJobsRequest.newBuilder()
- * .setParent(parent.toString())
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * CancelDlpJobRequest request = CancelDlpJobRequest.newBuilder()
+ * .setName(name.toString())
* .build();
- * for (DlpJob element : dlpServiceClient.listDlpJobs(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * dlpServiceClient.cancelDlpJob(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListDlpJobsPagedResponse listDlpJobs(ListDlpJobsRequest request) {
- return listDlpJobsPagedCallable().call(request);
+ public final void cancelDlpJob(CancelDlpJobRequest request) {
+ cancelDlpJobCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists DlpJobs that match the specified filter in the request. See
+ * Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to
+ * cancel the DlpJob, but success is not guaranteed. See
* https://cloud.google.com/dlp/docs/inspecting-storage and
* https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
*
@@ -1122,907 +3737,1087 @@ public final ListDlpJobsPagedResponse listDlpJobs(ListDlpJobsRequest request) {
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * ListDlpJobsRequest request = ListDlpJobsRequest.newBuilder()
- * .setParent(parent.toString())
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * CancelDlpJobRequest request = CancelDlpJobRequest.newBuilder()
+ * .setName(name.toString())
* .build();
- * ApiFuture<ListDlpJobsPagedResponse> future = dlpServiceClient.listDlpJobsPagedCallable().futureCall(request);
+ * ApiFuture<Void> future = dlpServiceClient.cancelDlpJobCallable().futureCall(request);
* // Do something
- * for (DlpJob element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
+ * future.get();
* }
*
*/
- public final UnaryCallable
- listDlpJobsPagedCallable() {
- return stub.listDlpJobsPagedCallable();
+ public final UnaryCallable cancelDlpJobCallable() {
+ return stub.cancelDlpJobCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists DlpJobs that match the specified filter in the request. See
- * https://cloud.google.com/dlp/docs/inspecting-storage and
- * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ * Creates a pre-built stored infoType to be used for inspection. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
+ * }
+ *
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param config Required. Configuration of the storedInfoType to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final StoredInfoType createStoredInfoType(
+ OrganizationLocationName parent, StoredInfoTypeConfig config) {
+ CreateStoredInfoTypeRequest request =
+ CreateStoredInfoTypeRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setConfig(config)
+ .build();
+ return createStoredInfoType(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates a pre-built stored infoType to be used for inspection. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
- * ListDlpJobsRequest request = ListDlpJobsRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * while (true) {
- * ListDlpJobsResponse response = dlpServiceClient.listDlpJobsCallable().call(request);
- * for (DlpJob element : response.getJobsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
* }
*
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param config Required. Configuration of the storedInfoType to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable listDlpJobsCallable() {
- return stub.listDlpJobsCallable();
+ public final StoredInfoType createStoredInfoType(
+ ProjectName parent, StoredInfoTypeConfig config) {
+ CreateStoredInfoTypeRequest request =
+ CreateStoredInfoTypeRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setConfig(config)
+ .build();
+ return createStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets the latest state of a long-running DlpJob. See
- * https://cloud.google.com/dlp/docs/inspecting-storage and
- * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ * Creates a pre-built stored infoType to be used for inspection. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DlpJobName name = DlpJobName.of("[PROJECT]", "[DLP_JOB]");
- * GetDlpJobRequest request = GetDlpJobRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * DlpJob response = dlpServiceClient.getDlpJob(request);
+ * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param config Required. Configuration of the storedInfoType to create.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final DlpJob getDlpJob(GetDlpJobRequest request) {
- return getDlpJobCallable().call(request);
+ public final StoredInfoType createStoredInfoType(
+ OrganizationName parent, StoredInfoTypeConfig config) {
+ CreateStoredInfoTypeRequest request =
+ CreateStoredInfoTypeRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setConfig(config)
+ .build();
+ return createStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets the latest state of a long-running DlpJob. See
- * https://cloud.google.com/dlp/docs/inspecting-storage and
- * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ * Creates a pre-built stored infoType to be used for inspection. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DlpJobName name = DlpJobName.of("[PROJECT]", "[DLP_JOB]");
- * GetDlpJobRequest request = GetDlpJobRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<DlpJob> future = dlpServiceClient.getDlpJobCallable().futureCall(request);
- * // Do something
- * DlpJob response = future.get();
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config);
* }
*
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param config Required. Configuration of the storedInfoType to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable getDlpJobCallable() {
- return stub.getDlpJobCallable();
+ public final StoredInfoType createStoredInfoType(
+ LocationName parent, StoredInfoTypeConfig config) {
+ CreateStoredInfoTypeRequest request =
+ CreateStoredInfoTypeRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setConfig(config)
+ .build();
+ return createStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in
- * the DlpJob result. The job will be cancelled if possible. See
- * https://cloud.google.com/dlp/docs/inspecting-storage and
- * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ * Creates a pre-built stored infoType to be used for inspection. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DlpJobName name = DlpJobName.of("[PROJECT]", "[DLP_JOB]");
- * DeleteDlpJobRequest request = DeleteDlpJobRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * dlpServiceClient.deleteDlpJob(request);
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * StoredInfoType response = dlpServiceClient.createStoredInfoType(parent.toString(), config);
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param config Required. Configuration of the storedInfoType to create.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteDlpJob(DeleteDlpJobRequest request) {
- deleteDlpJobCallable().call(request);
+ public final StoredInfoType createStoredInfoType(String parent, StoredInfoTypeConfig config) {
+ CreateStoredInfoTypeRequest request =
+ CreateStoredInfoTypeRequest.newBuilder().setParent(parent).setConfig(config).build();
+ return createStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in
- * the DlpJob result. The job will be cancelled if possible. See
- * https://cloud.google.com/dlp/docs/inspecting-storage and
- * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ * Creates a pre-built stored infoType to be used for inspection. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DlpJobName name = DlpJobName.of("[PROJECT]", "[DLP_JOB]");
- * DeleteDlpJobRequest request = DeleteDlpJobRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = dlpServiceClient.deleteDlpJobCallable().futureCall(request);
- * // Do something
- * future.get();
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * String locationId = "";
+ * StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config, locationId);
* }
*
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param config Required. Configuration of the storedInfoType to create.
+ * @param locationId The geographic location to store the stored infoType. Reserved for future
+ * extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable deleteDlpJobCallable() {
- return stub.deleteDlpJobCallable();
+ public final StoredInfoType createStoredInfoType(
+ OrganizationLocationName parent, StoredInfoTypeConfig config, String locationId) {
+ CreateStoredInfoTypeRequest request =
+ CreateStoredInfoTypeRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setConfig(config)
+ .setLocationId(locationId)
+ .build();
+ return createStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to
- * cancel the DlpJob, but success is not guaranteed. See
- * https://cloud.google.com/dlp/docs/inspecting-storage and
- * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ * Creates a pre-built stored infoType to be used for inspection. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DlpJobName name = DlpJobName.of("[PROJECT]", "[DLP_JOB]");
- * CancelDlpJobRequest request = CancelDlpJobRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * dlpServiceClient.cancelDlpJob(request);
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * String locationId = "";
+ * StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config, locationId);
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param config Required. Configuration of the storedInfoType to create.
+ * @param locationId The geographic location to store the stored infoType. Reserved for future
+ * extensions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void cancelDlpJob(CancelDlpJobRequest request) {
- cancelDlpJobCallable().call(request);
+ public final StoredInfoType createStoredInfoType(
+ ProjectName parent, StoredInfoTypeConfig config, String locationId) {
+ CreateStoredInfoTypeRequest request =
+ CreateStoredInfoTypeRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setConfig(config)
+ .setLocationId(locationId)
+ .build();
+ return createStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to
- * cancel the DlpJob, but success is not guaranteed. See
- * https://cloud.google.com/dlp/docs/inspecting-storage and
- * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+ * Creates a pre-built stored infoType to be used for inspection. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DlpJobName name = DlpJobName.of("[PROJECT]", "[DLP_JOB]");
- * CancelDlpJobRequest request = CancelDlpJobRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = dlpServiceClient.cancelDlpJobCallable().futureCall(request);
- * // Do something
- * future.get();
+ * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * String locationId = "";
+ * StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config, locationId);
* }
*
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param config Required. Configuration of the storedInfoType to create.
+ * @param locationId The geographic location to store the stored infoType. Reserved for future
+ * extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable cancelDlpJobCallable() {
- return stub.cancelDlpJobCallable();
+ public final StoredInfoType createStoredInfoType(
+ OrganizationName parent, StoredInfoTypeConfig config, String locationId) {
+ CreateStoredInfoTypeRequest request =
+ CreateStoredInfoTypeRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setConfig(config)
+ .setLocationId(locationId)
+ .build();
+ return createStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled
- * actions that have not yet run. Early access feature is in a pre-release state and might change
- * or have limited support. For more information, see
- * https://cloud.google.com/products#product-launch-stages.
+ * Creates a pre-built stored infoType to be used for inspection. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DlpJobName name = DlpJobName.of("[PROJECT]", "[DLP_JOB]");
- * FinishDlpJobRequest request = FinishDlpJobRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * dlpServiceClient.finishDlpJob(request);
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * String locationId = "";
+ * StoredInfoType response = dlpServiceClient.createStoredInfoType(parent, config, locationId);
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param config Required. Configuration of the storedInfoType to create.
+ * @param locationId The geographic location to store the stored infoType. Reserved for future
+ * extensions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void finishDlpJob(FinishDlpJobRequest request) {
- finishDlpJobCallable().call(request);
+ public final StoredInfoType createStoredInfoType(
+ LocationName parent, StoredInfoTypeConfig config, String locationId) {
+ CreateStoredInfoTypeRequest request =
+ CreateStoredInfoTypeRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setConfig(config)
+ .setLocationId(locationId)
+ .build();
+ return createStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled
- * actions that have not yet run. Early access feature is in a pre-release state and might change
- * or have limited support. For more information, see
- * https://cloud.google.com/products#product-launch-stages.
+ * Creates a pre-built stored infoType to be used for inspection. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * DlpJobName name = DlpJobName.of("[PROJECT]", "[DLP_JOB]");
- * FinishDlpJobRequest request = FinishDlpJobRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Void> future = dlpServiceClient.finishDlpJobCallable().futureCall(request);
- * // Do something
- * future.get();
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * String locationId = "";
+ * StoredInfoType response = dlpServiceClient.createStoredInfoType(parent.toString(), config, locationId);
* }
*
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @param config Required. Configuration of the storedInfoType to create.
+ * @param locationId The geographic location to store the stored infoType. Reserved for future
+ * extensions.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable finishDlpJobCallable() {
- return stub.finishDlpJobCallable();
+ public final StoredInfoType createStoredInfoType(
+ String parent, StoredInfoTypeConfig config, String locationId) {
+ CreateStoredInfoTypeRequest request =
+ CreateStoredInfoTypeRequest.newBuilder()
+ .setParent(parent)
+ .setConfig(config)
+ .setLocationId(locationId)
+ .build();
+ return createStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Inspect hybrid content and store findings to a job. To review the findings inspect the job.
- * Inspection will occur asynchronously. Early access feature is in a pre-release state and might
- * change or have limited support. For more information, see
- * https://cloud.google.com/products#product-launch-stages.
+ * Creates a pre-built stored infoType to be used for inspection. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * String name = "";
- * HybridInspectDlpJobRequest request = HybridInspectDlpJobRequest.newBuilder()
- * .setName(name)
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * CreateStoredInfoTypeRequest request = CreateStoredInfoTypeRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setConfig(config)
* .build();
- * HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(request);
+ * StoredInfoType response = dlpServiceClient.createStoredInfoType(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final HybridInspectResponse hybridInspectDlpJob(HybridInspectDlpJobRequest request) {
- return hybridInspectDlpJobCallable().call(request);
+ public final StoredInfoType createStoredInfoType(CreateStoredInfoTypeRequest request) {
+ return createStoredInfoTypeCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Inspect hybrid content and store findings to a job. To review the findings inspect the job.
- * Inspection will occur asynchronously. Early access feature is in a pre-release state and might
- * change or have limited support. For more information, see
- * https://cloud.google.com/products#product-launch-stages.
+ * Creates a pre-built stored infoType to be used for inspection. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * String name = "";
- * HybridInspectDlpJobRequest request = HybridInspectDlpJobRequest.newBuilder()
- * .setName(name)
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * CreateStoredInfoTypeRequest request = CreateStoredInfoTypeRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .setConfig(config)
* .build();
- * ApiFuture<HybridInspectResponse> future = dlpServiceClient.hybridInspectDlpJobCallable().futureCall(request);
+ * ApiFuture<StoredInfoType> future = dlpServiceClient.createStoredInfoTypeCallable().futureCall(request);
* // Do something
- * HybridInspectResponse response = future.get();
+ * StoredInfoType response = future.get();
* }
*
*/
- public final UnaryCallable
- hybridInspectDlpJobCallable() {
- return stub.hybridInspectDlpJobCallable();
+ public final UnaryCallable
+ createStoredInfoTypeCallable() {
+ return stub.createStoredInfoTypeCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ * Updates the stored infoType by creating a new version. The existing version will continue to be
+ * used until the new version is ready. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * ListJobTriggersRequest request = ListJobTriggersRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * for (JobTrigger element : dlpServiceClient.listJobTriggers(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * StoredInfoTypeName name = StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * StoredInfoType response = dlpServiceClient.updateStoredInfoType(name, config, updateMask);
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param name Required. Resource name of organization and storedInfoType to be updated, for
+ * example `organizations/433245324/storedInfoTypes/432452342` or
+ * projects/project-id/storedInfoTypes/432452342.
+ * @param config Updated configuration for the storedInfoType. If not provided, a new version of
+ * the storedInfoType will be created with the existing configuration.
+ * @param updateMask Mask to control which fields get updated.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListJobTriggersPagedResponse listJobTriggers(ListJobTriggersRequest request) {
- return listJobTriggersPagedCallable().call(request);
+ public final StoredInfoType updateStoredInfoType(
+ StoredInfoTypeName name, StoredInfoTypeConfig config, FieldMask updateMask) {
+ UpdateStoredInfoTypeRequest request =
+ UpdateStoredInfoTypeRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setConfig(config)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ * Updates the stored infoType by creating a new version. The existing version will continue to be
+ * used until the new version is ready. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * ListJobTriggersRequest request = ListJobTriggersRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * ApiFuture<ListJobTriggersPagedResponse> future = dlpServiceClient.listJobTriggersPagedCallable().futureCall(request);
- * // Do something
- * for (JobTrigger element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
+ * StoredInfoTypeName name = StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]");
+ * StoredInfoTypeConfig config = StoredInfoTypeConfig.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * StoredInfoType response = dlpServiceClient.updateStoredInfoType(name.toString(), config, updateMask);
* }
*
+ *
+ * @param name Required. Resource name of organization and storedInfoType to be updated, for
+ * example `organizations/433245324/storedInfoTypes/432452342` or
+ * projects/project-id/storedInfoTypes/432452342.
+ * @param config Updated configuration for the storedInfoType. If not provided, a new version of
+ * the storedInfoType will be created with the existing configuration.
+ * @param updateMask Mask to control which fields get updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable
- listJobTriggersPagedCallable() {
- return stub.listJobTriggersPagedCallable();
+ public final StoredInfoType updateStoredInfoType(
+ String name, StoredInfoTypeConfig config, FieldMask updateMask) {
+ UpdateStoredInfoTypeRequest request =
+ UpdateStoredInfoTypeRequest.newBuilder()
+ .setName(name)
+ .setConfig(config)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ * Updates the stored infoType by creating a new version. The existing version will continue to be
+ * used until the new version is ready. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * ListJobTriggersRequest request = ListJobTriggersRequest.newBuilder()
- * .setParent(parent.toString())
+ * StoredInfoTypeName name = StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]");
+ * UpdateStoredInfoTypeRequest request = UpdateStoredInfoTypeRequest.newBuilder()
+ * .setName(name.toString())
* .build();
- * while (true) {
- * ListJobTriggersResponse response = dlpServiceClient.listJobTriggersCallable().call(request);
- * for (JobTrigger element : response.getJobTriggersList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
+ * StoredInfoType response = dlpServiceClient.updateStoredInfoType(request);
* }
*
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable
- listJobTriggersCallable() {
- return stub.listJobTriggersCallable();
+ public final StoredInfoType updateStoredInfoType(UpdateStoredInfoTypeRequest request) {
+ return updateStoredInfoTypeCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ * Updates the stored infoType by creating a new version. The existing version will continue to be
+ * used until the new version is ready. See
+ * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectJobTriggerName name = ProjectJobTriggerName.of("[PROJECT]", "[JOB_TRIGGER]");
- * GetJobTriggerRequest request = GetJobTriggerRequest.newBuilder()
+ * StoredInfoTypeName name = StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]");
+ * UpdateStoredInfoTypeRequest request = UpdateStoredInfoTypeRequest.newBuilder()
* .setName(name.toString())
* .build();
- * JobTrigger response = dlpServiceClient.getJobTrigger(request);
+ * ApiFuture<StoredInfoType> future = dlpServiceClient.updateStoredInfoTypeCallable().futureCall(request);
+ * // Do something
+ * StoredInfoType response = future.get();
* }
*
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final JobTrigger getJobTrigger(GetJobTriggerRequest request) {
- return getJobTriggerCallable().call(request);
+ public final UnaryCallable
+ updateStoredInfoTypeCallable() {
+ return stub.updateStoredInfoTypeCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectJobTriggerName name = ProjectJobTriggerName.of("[PROJECT]", "[JOB_TRIGGER]");
- * GetJobTriggerRequest request = GetJobTriggerRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<JobTrigger> future = dlpServiceClient.getJobTriggerCallable().futureCall(request);
- * // Do something
- * JobTrigger response = future.get();
+ * StoredInfoTypeName name = StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]");
+ * StoredInfoType response = dlpServiceClient.getStoredInfoType(name);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the organization and storedInfoType to be read, for
+ * example `organizations/433245324/storedInfoTypes/432452342` or
+ * projects/project-id/storedInfoTypes/432452342.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final StoredInfoType getStoredInfoType(StoredInfoTypeName name) {
+ GetStoredInfoTypeRequest request =
+ GetStoredInfoTypeRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getStoredInfoType(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * StoredInfoTypeName name = StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]");
+ * StoredInfoType response = dlpServiceClient.getStoredInfoType(name.toString());
* }
*
+ *
+ * @param name Required. Resource name of the organization and storedInfoType to be read, for
+ * example `organizations/433245324/storedInfoTypes/432452342` or
+ * projects/project-id/storedInfoTypes/432452342.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable getJobTriggerCallable() {
- return stub.getJobTriggerCallable();
+ public final StoredInfoType getStoredInfoType(String name) {
+ GetStoredInfoTypeRequest request = GetStoredInfoTypeRequest.newBuilder().setName(name).build();
+ return getStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
- * more.
+ * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectJobTriggerName name = ProjectJobTriggerName.of("[PROJECT]", "[JOB_TRIGGER]");
- * DeleteJobTriggerRequest request = DeleteJobTriggerRequest.newBuilder()
+ * StoredInfoTypeName name = StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]");
+ * GetStoredInfoTypeRequest request = GetStoredInfoTypeRequest.newBuilder()
* .setName(name.toString())
* .build();
- * dlpServiceClient.deleteJobTrigger(request);
+ * StoredInfoType response = dlpServiceClient.getStoredInfoType(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteJobTrigger(DeleteJobTriggerRequest request) {
- deleteJobTriggerCallable().call(request);
+ public final StoredInfoType getStoredInfoType(GetStoredInfoTypeRequest request) {
+ return getStoredInfoTypeCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
- * more.
+ * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectJobTriggerName name = ProjectJobTriggerName.of("[PROJECT]", "[JOB_TRIGGER]");
- * DeleteJobTriggerRequest request = DeleteJobTriggerRequest.newBuilder()
+ * StoredInfoTypeName name = StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]");
+ * GetStoredInfoTypeRequest request = GetStoredInfoTypeRequest.newBuilder()
* .setName(name.toString())
* .build();
- * ApiFuture<Void> future = dlpServiceClient.deleteJobTriggerCallable().futureCall(request);
+ * ApiFuture<StoredInfoType> future = dlpServiceClient.getStoredInfoTypeCallable().futureCall(request);
* // Do something
- * future.get();
+ * StoredInfoType response = future.get();
* }
*
*/
- public final UnaryCallable deleteJobTriggerCallable() {
- return stub.deleteJobTriggerCallable();
+ public final UnaryCallable getStoredInfoTypeCallable() {
+ return stub.getStoredInfoTypeCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Inspect hybrid content and store findings to a trigger. The inspection will be processed
- * asynchronously. To review the findings monitor the jobs within the trigger. Early access
- * feature is in a pre-release state and might change or have limited support. For more
- * information, see https://cloud.google.com/products#product-launch-stages.
+ * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * String name = "";
- * HybridInspectJobTriggerRequest request = HybridInspectJobTriggerRequest.newBuilder()
- * .setName(name)
- * .build();
- * HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(request);
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final HybridInspectResponse hybridInspectJobTrigger(
- HybridInspectJobTriggerRequest request) {
- return hybridInspectJobTriggerCallable().call(request);
+ public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(
+ OrganizationLocationName parent) {
+ ListStoredInfoTypesRequest request =
+ ListStoredInfoTypesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listStoredInfoTypes(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Inspect hybrid content and store findings to a trigger. The inspection will be processed
- * asynchronously. To review the findings monitor the jobs within the trigger. Early access
- * feature is in a pre-release state and might change or have limited support. For more
- * information, see https://cloud.google.com/products#product-launch-stages.
+ * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * String name = "";
- * HybridInspectJobTriggerRequest request = HybridInspectJobTriggerRequest.newBuilder()
- * .setName(name)
- * .build();
- * ApiFuture<HybridInspectResponse> future = dlpServiceClient.hybridInspectJobTriggerCallable().futureCall(request);
- * // Do something
- * HybridInspectResponse response = future.get();
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
*
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable
- hybridInspectJobTriggerCallable() {
- return stub.hybridInspectJobTriggerCallable();
+ public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(ProjectName parent) {
+ ListStoredInfoTypesRequest request =
+ ListStoredInfoTypesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listStoredInfoTypes(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
- * more.
+ * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectJobTriggerName name = ProjectJobTriggerName.of("[PROJECT]", "[JOB_TRIGGER]");
- * UpdateJobTriggerRequest request = UpdateJobTriggerRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * JobTrigger response = dlpServiceClient.updateJobTrigger(request);
+ * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
+ * for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final JobTrigger updateJobTrigger(UpdateJobTriggerRequest request) {
- return updateJobTriggerCallable().call(request);
+ public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(OrganizationName parent) {
+ ListStoredInfoTypesRequest request =
+ ListStoredInfoTypesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listStoredInfoTypes(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
- * more.
+ * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectJobTriggerName name = ProjectJobTriggerName.of("[PROJECT]", "[JOB_TRIGGER]");
- * UpdateJobTriggerRequest request = UpdateJobTriggerRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<JobTrigger> future = dlpServiceClient.updateJobTriggerCallable().futureCall(request);
- * // Do something
- * JobTrigger response = future.get();
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
*
+ *
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable updateJobTriggerCallable() {
- return stub.updateJobTriggerCallable();
+ public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(LocationName parent) {
+ ListStoredInfoTypesRequest request =
+ ListStoredInfoTypesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listStoredInfoTypes(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
- * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * CreateJobTriggerRequest request = CreateJobTriggerRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * JobTrigger response = dlpServiceClient.createJobTrigger(request);
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(parent.toString()).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent resource name, for example projects/my-project-id or
+ * organizations/my-org-id.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final JobTrigger createJobTrigger(CreateJobTriggerRequest request) {
- return createJobTriggerCallable().call(request);
+ public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(String parent) {
+ ListStoredInfoTypesRequest request =
+ ListStoredInfoTypesRequest.newBuilder().setParent(parent).build();
+ return listStoredInfoTypes(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on
- * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
+ * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * CreateJobTriggerRequest request = CreateJobTriggerRequest.newBuilder()
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * ListStoredInfoTypesRequest request = ListStoredInfoTypesRequest.newBuilder()
* .setParent(parent.toString())
* .build();
- * ApiFuture<JobTrigger> future = dlpServiceClient.createJobTriggerCallable().futureCall(request);
- * // Do something
- * JobTrigger response = future.get();
+ * for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
*
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable createJobTriggerCallable() {
- return stub.createJobTriggerCallable();
+ public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(
+ ListStoredInfoTypesRequest request) {
+ return listStoredInfoTypesPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a pre-built stored infoType to be used for inspection. See
- * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
+ * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * CreateStoredInfoTypeRequest request = CreateStoredInfoTypeRequest.newBuilder()
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * ListStoredInfoTypesRequest request = ListStoredInfoTypesRequest.newBuilder()
* .setParent(parent.toString())
* .build();
- * StoredInfoType response = dlpServiceClient.createStoredInfoType(request);
+ * ApiFuture<ListStoredInfoTypesPagedResponse> future = dlpServiceClient.listStoredInfoTypesPagedCallable().futureCall(request);
+ * // Do something
+ * for (StoredInfoType element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
*
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final StoredInfoType createStoredInfoType(CreateStoredInfoTypeRequest request) {
- return createStoredInfoTypeCallable().call(request);
+ public final UnaryCallable
+ listStoredInfoTypesPagedCallable() {
+ return stub.listStoredInfoTypesPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a pre-built stored infoType to be used for inspection. See
- * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
+ * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * CreateStoredInfoTypeRequest request = CreateStoredInfoTypeRequest.newBuilder()
+ * OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
+ * ListStoredInfoTypesRequest request = ListStoredInfoTypesRequest.newBuilder()
* .setParent(parent.toString())
* .build();
- * ApiFuture<StoredInfoType> future = dlpServiceClient.createStoredInfoTypeCallable().futureCall(request);
- * // Do something
- * StoredInfoType response = future.get();
+ * while (true) {
+ * ListStoredInfoTypesResponse response = dlpServiceClient.listStoredInfoTypesCallable().call(request);
+ * for (StoredInfoType element : response.getStoredInfoTypesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
* }
*
*/
- public final UnaryCallable
- createStoredInfoTypeCallable() {
- return stub.createStoredInfoTypeCallable();
+ public final UnaryCallable
+ listStoredInfoTypesCallable() {
+ return stub.listStoredInfoTypesCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates the stored infoType by creating a new version. The existing version will continue to be
- * used until the new version is ready. See
- * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
+ * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * StoredInfoTypeName name = OrganizationStoredInfoTypeName.of("[ORGANIZATION]", "[STORED_INFO_TYPE]");
- * UpdateStoredInfoTypeRequest request = UpdateStoredInfoTypeRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * StoredInfoType response = dlpServiceClient.updateStoredInfoType(request);
+ * StoredInfoTypeName name = StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]");
+ * dlpServiceClient.deleteStoredInfoType(name);
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param name Required. Resource name of the organization and storedInfoType to be deleted, for
+ * example `organizations/433245324/storedInfoTypes/432452342` or
+ * projects/project-id/storedInfoTypes/432452342.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final StoredInfoType updateStoredInfoType(UpdateStoredInfoTypeRequest request) {
- return updateStoredInfoTypeCallable().call(request);
+ public final void deleteStoredInfoType(StoredInfoTypeName name) {
+ DeleteStoredInfoTypeRequest request =
+ DeleteStoredInfoTypeRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates the stored infoType by creating a new version. The existing version will continue to be
- * used until the new version is ready. See
- * https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.
+ * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * StoredInfoTypeName name = OrganizationStoredInfoTypeName.of("[ORGANIZATION]", "[STORED_INFO_TYPE]");
- * UpdateStoredInfoTypeRequest request = UpdateStoredInfoTypeRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<StoredInfoType> future = dlpServiceClient.updateStoredInfoTypeCallable().futureCall(request);
- * // Do something
- * StoredInfoType response = future.get();
+ * StoredInfoTypeName name = StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]");
+ * dlpServiceClient.deleteStoredInfoType(name.toString());
* }
*
+ *
+ * @param name Required. Resource name of the organization and storedInfoType to be deleted, for
+ * example `organizations/433245324/storedInfoTypes/432452342` or
+ * projects/project-id/storedInfoTypes/432452342.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable
- updateStoredInfoTypeCallable() {
- return stub.updateStoredInfoTypeCallable();
+ public final void deleteStoredInfoType(String name) {
+ DeleteStoredInfoTypeRequest request =
+ DeleteStoredInfoTypeRequest.newBuilder().setName(name).build();
+ deleteStoredInfoType(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
* learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * StoredInfoTypeName name = OrganizationStoredInfoTypeName.of("[ORGANIZATION]", "[STORED_INFO_TYPE]");
- * GetStoredInfoTypeRequest request = GetStoredInfoTypeRequest.newBuilder()
+ * StoredInfoTypeName name = StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]");
+ * DeleteStoredInfoTypeRequest request = DeleteStoredInfoTypeRequest.newBuilder()
* .setName(name.toString())
* .build();
- * StoredInfoType response = dlpServiceClient.getStoredInfoType(request);
+ * dlpServiceClient.deleteStoredInfoType(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final StoredInfoType getStoredInfoType(GetStoredInfoTypeRequest request) {
- return getStoredInfoTypeCallable().call(request);
+ public final void deleteStoredInfoType(DeleteStoredInfoTypeRequest request) {
+ deleteStoredInfoTypeCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
+ * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
* learn more.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * StoredInfoTypeName name = OrganizationStoredInfoTypeName.of("[ORGANIZATION]", "[STORED_INFO_TYPE]");
- * GetStoredInfoTypeRequest request = GetStoredInfoTypeRequest.newBuilder()
+ * StoredInfoTypeName name = StoredInfoTypeName.ofOrganizationStoredInfoTypeName("[ORGANIZATION]", "[STORED_INFO_TYPE]");
+ * DeleteStoredInfoTypeRequest request = DeleteStoredInfoTypeRequest.newBuilder()
* .setName(name.toString())
* .build();
- * ApiFuture<StoredInfoType> future = dlpServiceClient.getStoredInfoTypeCallable().futureCall(request);
+ * ApiFuture<Void> future = dlpServiceClient.deleteStoredInfoTypeCallable().futureCall(request);
* // Do something
- * StoredInfoType response = future.get();
+ * future.get();
* }
*
*/
- public final UnaryCallable getStoredInfoTypeCallable() {
- return stub.getStoredInfoTypeCallable();
+ public final UnaryCallable deleteStoredInfoTypeCallable() {
+ return stub.deleteStoredInfoTypeCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
- * learn more.
+ * Inspect hybrid content and store findings to a job. To review the findings inspect the job.
+ * Inspection will occur asynchronously. Early access feature is in a pre-release state and might
+ * change or have limited support. For more information, see
+ * https://cloud.google.com/products#product-launch-stages.
+ *
+ * Sample code:
+ *
+ *
+ * try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(name);
+ * }
+ *
+ *
+ * @param name Required. Resource name of the job to execute a hybrid inspect on, for example
+ * `projects/dlp-test-project/dlpJob/53234423`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final HybridInspectResponse hybridInspectDlpJob(DlpJobName name) {
+ HybridInspectDlpJobRequest request =
+ HybridInspectDlpJobRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return hybridInspectDlpJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Inspect hybrid content and store findings to a job. To review the findings inspect the job.
+ * Inspection will occur asynchronously. Early access feature is in a pre-release state and might
+ * change or have limited support. For more information, see
+ * https://cloud.google.com/products#product-launch-stages.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * ListStoredInfoTypesRequest request = ListStoredInfoTypesRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * for (StoredInfoType element : dlpServiceClient.listStoredInfoTypes(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(name.toString());
* }
*
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param name Required. Resource name of the job to execute a hybrid inspect on, for example
+ * `projects/dlp-test-project/dlpJob/53234423`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListStoredInfoTypesPagedResponse listStoredInfoTypes(
- ListStoredInfoTypesRequest request) {
- return listStoredInfoTypesPagedCallable().call(request);
+ public final HybridInspectResponse hybridInspectDlpJob(String name) {
+ HybridInspectDlpJobRequest request =
+ HybridInspectDlpJobRequest.newBuilder().setName(name).build();
+ return hybridInspectDlpJob(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
- * learn more.
+ * Inspect hybrid content and store findings to a job. To review the findings inspect the job.
+ * Inspection will occur asynchronously. Early access feature is in a pre-release state and might
+ * change or have limited support. For more information, see
+ * https://cloud.google.com/products#product-launch-stages.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * ListStoredInfoTypesRequest request = ListStoredInfoTypesRequest.newBuilder()
- * .setParent(parent.toString())
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * HybridInspectDlpJobRequest request = HybridInspectDlpJobRequest.newBuilder()
+ * .setName(name.toString())
* .build();
- * ApiFuture<ListStoredInfoTypesPagedResponse> future = dlpServiceClient.listStoredInfoTypesPagedCallable().futureCall(request);
- * // Do something
- * for (StoredInfoType element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
+ * HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(request);
* }
*
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable
- listStoredInfoTypesPagedCallable() {
- return stub.listStoredInfoTypesPagedCallable();
+ public final HybridInspectResponse hybridInspectDlpJob(HybridInspectDlpJobRequest request) {
+ return hybridInspectDlpJobCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
- * learn more.
+ * Inspect hybrid content and store findings to a job. To review the findings inspect the job.
+ * Inspection will occur asynchronously. Early access feature is in a pre-release state and might
+ * change or have limited support. For more information, see
+ * https://cloud.google.com/products#product-launch-stages.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
- * ListStoredInfoTypesRequest request = ListStoredInfoTypesRequest.newBuilder()
- * .setParent(parent.toString())
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * HybridInspectDlpJobRequest request = HybridInspectDlpJobRequest.newBuilder()
+ * .setName(name.toString())
* .build();
- * while (true) {
- * ListStoredInfoTypesResponse response = dlpServiceClient.listStoredInfoTypesCallable().call(request);
- * for (StoredInfoType element : response.getStoredInfoTypesList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
+ * ApiFuture<HybridInspectResponse> future = dlpServiceClient.hybridInspectDlpJobCallable().futureCall(request);
+ * // Do something
+ * HybridInspectResponse response = future.get();
* }
*
*/
- public final UnaryCallable
- listStoredInfoTypesCallable() {
- return stub.listStoredInfoTypesCallable();
+ public final UnaryCallable
+ hybridInspectDlpJobCallable() {
+ return stub.hybridInspectDlpJobCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
- * learn more.
+ * Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled
+ * actions that have not yet run. Early access feature is in a pre-release state and might change
+ * or have limited support. For more information, see
+ * https://cloud.google.com/products#product-launch-stages.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * StoredInfoTypeName name = OrganizationStoredInfoTypeName.of("[ORGANIZATION]", "[STORED_INFO_TYPE]");
- * DeleteStoredInfoTypeRequest request = DeleteStoredInfoTypeRequest.newBuilder()
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * FinishDlpJobRequest request = FinishDlpJobRequest.newBuilder()
* .setName(name.toString())
* .build();
- * dlpServiceClient.deleteStoredInfoType(request);
+ * dlpServiceClient.finishDlpJob(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final void deleteStoredInfoType(DeleteStoredInfoTypeRequest request) {
- deleteStoredInfoTypeCallable().call(request);
+ public final void finishDlpJob(FinishDlpJobRequest request) {
+ finishDlpJobCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
- * learn more.
+ * Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled
+ * actions that have not yet run. Early access feature is in a pre-release state and might change
+ * or have limited support. For more information, see
+ * https://cloud.google.com/products#product-launch-stages.
*
* Sample code:
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * StoredInfoTypeName name = OrganizationStoredInfoTypeName.of("[ORGANIZATION]", "[STORED_INFO_TYPE]");
- * DeleteStoredInfoTypeRequest request = DeleteStoredInfoTypeRequest.newBuilder()
+ * DlpJobName name = DlpJobName.ofProjectDlpJobName("[PROJECT]", "[DLP_JOB]");
+ * FinishDlpJobRequest request = FinishDlpJobRequest.newBuilder()
* .setName(name.toString())
* .build();
- * ApiFuture<Void> future = dlpServiceClient.deleteStoredInfoTypeCallable().futureCall(request);
+ * ApiFuture<Void> future = dlpServiceClient.finishDlpJobCallable().futureCall(request);
* // Do something
* future.get();
* }
*
*/
- public final UnaryCallable deleteStoredInfoTypeCallable() {
- return stub.deleteStoredInfoTypeCallable();
+ public final UnaryCallable finishDlpJobCallable() {
+ return stub.finishDlpJobCallable();
}
@Override
@@ -2237,86 +5032,6 @@ protected ListDeidentifyTemplatesFixedSizeCollection createCollection(
}
}
- public static class ListDlpJobsPagedResponse
- extends AbstractPagedListResponse<
- ListDlpJobsRequest,
- ListDlpJobsResponse,
- DlpJob,
- ListDlpJobsPage,
- ListDlpJobsFixedSizeCollection> {
-
- public static ApiFuture createAsync(
- PageContext context,
- ApiFuture futureResponse) {
- ApiFuture futurePage =
- ListDlpJobsPage.createEmptyPage().createPageAsync(context, futureResponse);
- return ApiFutures.transform(
- futurePage,
- new ApiFunction() {
- @Override
- public ListDlpJobsPagedResponse apply(ListDlpJobsPage input) {
- return new ListDlpJobsPagedResponse(input);
- }
- },
- MoreExecutors.directExecutor());
- }
-
- private ListDlpJobsPagedResponse(ListDlpJobsPage page) {
- super(page, ListDlpJobsFixedSizeCollection.createEmptyCollection());
- }
- }
-
- public static class ListDlpJobsPage
- extends AbstractPage {
-
- private ListDlpJobsPage(
- PageContext context,
- ListDlpJobsResponse response) {
- super(context, response);
- }
-
- private static ListDlpJobsPage createEmptyPage() {
- return new ListDlpJobsPage(null, null);
- }
-
- @Override
- protected ListDlpJobsPage createPage(
- PageContext context,
- ListDlpJobsResponse response) {
- return new ListDlpJobsPage(context, response);
- }
-
- @Override
- public ApiFuture createPageAsync(
- PageContext context,
- ApiFuture futureResponse) {
- return super.createPageAsync(context, futureResponse);
- }
- }
-
- public static class ListDlpJobsFixedSizeCollection
- extends AbstractFixedSizeCollection<
- ListDlpJobsRequest,
- ListDlpJobsResponse,
- DlpJob,
- ListDlpJobsPage,
- ListDlpJobsFixedSizeCollection> {
-
- private ListDlpJobsFixedSizeCollection(List pages, int collectionSize) {
- super(pages, collectionSize);
- }
-
- private static ListDlpJobsFixedSizeCollection createEmptyCollection() {
- return new ListDlpJobsFixedSizeCollection(null, 0);
- }
-
- @Override
- protected ListDlpJobsFixedSizeCollection createCollection(
- List pages, int collectionSize) {
- return new ListDlpJobsFixedSizeCollection(pages, collectionSize);
- }
- }
-
public static class ListJobTriggersPagedResponse
extends AbstractPagedListResponse<
ListJobTriggersRequest,
@@ -2399,6 +5114,86 @@ protected ListJobTriggersFixedSizeCollection createCollection(
}
}
+ public static class ListDlpJobsPagedResponse
+ extends AbstractPagedListResponse<
+ ListDlpJobsRequest,
+ ListDlpJobsResponse,
+ DlpJob,
+ ListDlpJobsPage,
+ ListDlpJobsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListDlpJobsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ new ApiFunction() {
+ @Override
+ public ListDlpJobsPagedResponse apply(ListDlpJobsPage input) {
+ return new ListDlpJobsPagedResponse(input);
+ }
+ },
+ MoreExecutors.directExecutor());
+ }
+
+ private ListDlpJobsPagedResponse(ListDlpJobsPage page) {
+ super(page, ListDlpJobsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListDlpJobsPage
+ extends AbstractPage {
+
+ private ListDlpJobsPage(
+ PageContext context,
+ ListDlpJobsResponse response) {
+ super(context, response);
+ }
+
+ private static ListDlpJobsPage createEmptyPage() {
+ return new ListDlpJobsPage(null, null);
+ }
+
+ @Override
+ protected ListDlpJobsPage createPage(
+ PageContext context,
+ ListDlpJobsResponse response) {
+ return new ListDlpJobsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListDlpJobsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListDlpJobsRequest,
+ ListDlpJobsResponse,
+ DlpJob,
+ ListDlpJobsPage,
+ ListDlpJobsFixedSizeCollection> {
+
+ private ListDlpJobsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListDlpJobsFixedSizeCollection createEmptyCollection() {
+ return new ListDlpJobsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListDlpJobsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListDlpJobsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
public static class ListStoredInfoTypesPagedResponse
extends AbstractPagedListResponse<
ListStoredInfoTypesRequest,
diff --git a/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceSettings.java b/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceSettings.java
index 03cd1cec..87c9bd0a 100644
--- a/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceSettings.java
+++ b/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceSettings.java
@@ -102,16 +102,16 @@
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of inspectContent to 30 seconds:
+ *
For example, to set the total timeout of listInfoTypes to 30 seconds:
*
*
*
* DlpServiceSettings.Builder dlpServiceSettingsBuilder =
* DlpServiceSettings.newBuilder();
* dlpServiceSettingsBuilder
- * .inspectContentSettings()
+ * .listInfoTypesSettings()
* .setRetrySettings(
- * dlpServiceSettingsBuilder.inspectContentSettings().getRetrySettings().toBuilder()
+ * dlpServiceSettingsBuilder.listInfoTypesSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* DlpServiceSettings dlpServiceSettings = dlpServiceSettingsBuilder.build();
@@ -213,41 +213,25 @@ public UnaryCallSettings deleteInspectTempl
return ((DlpServiceStubSettings) getStubSettings()).deleteDeidentifyTemplateSettings();
}
- /** Returns the object with the settings used for calls to createDlpJob. */
- public UnaryCallSettings createDlpJobSettings() {
- return ((DlpServiceStubSettings) getStubSettings()).createDlpJobSettings();
- }
-
- /** Returns the object with the settings used for calls to listDlpJobs. */
- public PagedCallSettings
- listDlpJobsSettings() {
- return ((DlpServiceStubSettings) getStubSettings()).listDlpJobsSettings();
- }
-
- /** Returns the object with the settings used for calls to getDlpJob. */
- public UnaryCallSettings getDlpJobSettings() {
- return ((DlpServiceStubSettings) getStubSettings()).getDlpJobSettings();
- }
-
- /** Returns the object with the settings used for calls to deleteDlpJob. */
- public UnaryCallSettings deleteDlpJobSettings() {
- return ((DlpServiceStubSettings) getStubSettings()).deleteDlpJobSettings();
+ /** Returns the object with the settings used for calls to createJobTrigger. */
+ public UnaryCallSettings createJobTriggerSettings() {
+ return ((DlpServiceStubSettings) getStubSettings()).createJobTriggerSettings();
}
- /** Returns the object with the settings used for calls to cancelDlpJob. */
- public UnaryCallSettings cancelDlpJobSettings() {
- return ((DlpServiceStubSettings) getStubSettings()).cancelDlpJobSettings();
+ /** Returns the object with the settings used for calls to updateJobTrigger. */
+ public UnaryCallSettings updateJobTriggerSettings() {
+ return ((DlpServiceStubSettings) getStubSettings()).updateJobTriggerSettings();
}
- /** Returns the object with the settings used for calls to finishDlpJob. */
- public UnaryCallSettings finishDlpJobSettings() {
- return ((DlpServiceStubSettings) getStubSettings()).finishDlpJobSettings();
+ /** Returns the object with the settings used for calls to hybridInspectJobTrigger. */
+ public UnaryCallSettings
+ hybridInspectJobTriggerSettings() {
+ return ((DlpServiceStubSettings) getStubSettings()).hybridInspectJobTriggerSettings();
}
- /** Returns the object with the settings used for calls to hybridInspectDlpJob. */
- public UnaryCallSettings
- hybridInspectDlpJobSettings() {
- return ((DlpServiceStubSettings) getStubSettings()).hybridInspectDlpJobSettings();
+ /** Returns the object with the settings used for calls to getJobTrigger. */
+ public UnaryCallSettings getJobTriggerSettings() {
+ return ((DlpServiceStubSettings) getStubSettings()).getJobTriggerSettings();
}
/** Returns the object with the settings used for calls to listJobTriggers. */
@@ -257,30 +241,35 @@ public UnaryCallSettings finishDlpJobSettings() {
return ((DlpServiceStubSettings) getStubSettings()).listJobTriggersSettings();
}
- /** Returns the object with the settings used for calls to getJobTrigger. */
- public UnaryCallSettings getJobTriggerSettings() {
- return ((DlpServiceStubSettings) getStubSettings()).getJobTriggerSettings();
- }
-
/** Returns the object with the settings used for calls to deleteJobTrigger. */
public UnaryCallSettings deleteJobTriggerSettings() {
return ((DlpServiceStubSettings) getStubSettings()).deleteJobTriggerSettings();
}
- /** Returns the object with the settings used for calls to hybridInspectJobTrigger. */
- public UnaryCallSettings
- hybridInspectJobTriggerSettings() {
- return ((DlpServiceStubSettings) getStubSettings()).hybridInspectJobTriggerSettings();
+ /** Returns the object with the settings used for calls to createDlpJob. */
+ public UnaryCallSettings createDlpJobSettings() {
+ return ((DlpServiceStubSettings) getStubSettings()).createDlpJobSettings();
}
- /** Returns the object with the settings used for calls to updateJobTrigger. */
- public UnaryCallSettings updateJobTriggerSettings() {
- return ((DlpServiceStubSettings) getStubSettings()).updateJobTriggerSettings();
+ /** Returns the object with the settings used for calls to listDlpJobs. */
+ public PagedCallSettings
+ listDlpJobsSettings() {
+ return ((DlpServiceStubSettings) getStubSettings()).listDlpJobsSettings();
}
- /** Returns the object with the settings used for calls to createJobTrigger. */
- public UnaryCallSettings createJobTriggerSettings() {
- return ((DlpServiceStubSettings) getStubSettings()).createJobTriggerSettings();
+ /** Returns the object with the settings used for calls to getDlpJob. */
+ public UnaryCallSettings getDlpJobSettings() {
+ return ((DlpServiceStubSettings) getStubSettings()).getDlpJobSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteDlpJob. */
+ public UnaryCallSettings deleteDlpJobSettings() {
+ return ((DlpServiceStubSettings) getStubSettings()).deleteDlpJobSettings();
+ }
+
+ /** Returns the object with the settings used for calls to cancelDlpJob. */
+ public UnaryCallSettings cancelDlpJobSettings() {
+ return ((DlpServiceStubSettings) getStubSettings()).cancelDlpJobSettings();
}
/** Returns the object with the settings used for calls to createStoredInfoType. */
@@ -312,6 +301,17 @@ public UnaryCallSettings deleteStoredInfoTyp
return ((DlpServiceStubSettings) getStubSettings()).deleteStoredInfoTypeSettings();
}
+ /** Returns the object with the settings used for calls to hybridInspectDlpJob. */
+ public UnaryCallSettings
+ hybridInspectDlpJobSettings() {
+ return ((DlpServiceStubSettings) getStubSettings()).hybridInspectDlpJobSettings();
+ }
+
+ /** Returns the object with the settings used for calls to finishDlpJob. */
+ public UnaryCallSettings finishDlpJobSettings() {
+ return ((DlpServiceStubSettings) getStubSettings()).finishDlpJobSettings();
+ }
+
public static final DlpServiceSettings create(DlpServiceStubSettings stub) throws IOException {
return new DlpServiceSettings.Builder(stub.toBuilder()).build();
}
@@ -504,6 +504,41 @@ public Builder applyToAllUnaryMethods(
return getStubSettingsBuilder().deleteDeidentifyTemplateSettings();
}
+ /** Returns the builder for the settings used for calls to createJobTrigger. */
+ public UnaryCallSettings.Builder
+ createJobTriggerSettings() {
+ return getStubSettingsBuilder().createJobTriggerSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateJobTrigger. */
+ public UnaryCallSettings.Builder
+ updateJobTriggerSettings() {
+ return getStubSettingsBuilder().updateJobTriggerSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to hybridInspectJobTrigger. */
+ public UnaryCallSettings.Builder
+ hybridInspectJobTriggerSettings() {
+ return getStubSettingsBuilder().hybridInspectJobTriggerSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getJobTrigger. */
+ public UnaryCallSettings.Builder getJobTriggerSettings() {
+ return getStubSettingsBuilder().getJobTriggerSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listJobTriggers. */
+ public PagedCallSettings.Builder<
+ ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse>
+ listJobTriggersSettings() {
+ return getStubSettingsBuilder().listJobTriggersSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteJobTrigger. */
+ public UnaryCallSettings.Builder deleteJobTriggerSettings() {
+ return getStubSettingsBuilder().deleteJobTriggerSettings();
+ }
+
/** Returns the builder for the settings used for calls to createDlpJob. */
public UnaryCallSettings.Builder createDlpJobSettings() {
return getStubSettingsBuilder().createDlpJobSettings();
@@ -531,52 +566,6 @@ public UnaryCallSettings.Builder cancelDlpJobSetting
return getStubSettingsBuilder().cancelDlpJobSettings();
}
- /** Returns the builder for the settings used for calls to finishDlpJob. */
- public UnaryCallSettings.Builder finishDlpJobSettings() {
- return getStubSettingsBuilder().finishDlpJobSettings();
- }
-
- /** Returns the builder for the settings used for calls to hybridInspectDlpJob. */
- public UnaryCallSettings.Builder
- hybridInspectDlpJobSettings() {
- return getStubSettingsBuilder().hybridInspectDlpJobSettings();
- }
-
- /** Returns the builder for the settings used for calls to listJobTriggers. */
- public PagedCallSettings.Builder<
- ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse>
- listJobTriggersSettings() {
- return getStubSettingsBuilder().listJobTriggersSettings();
- }
-
- /** Returns the builder for the settings used for calls to getJobTrigger. */
- public UnaryCallSettings.Builder getJobTriggerSettings() {
- return getStubSettingsBuilder().getJobTriggerSettings();
- }
-
- /** Returns the builder for the settings used for calls to deleteJobTrigger. */
- public UnaryCallSettings.Builder deleteJobTriggerSettings() {
- return getStubSettingsBuilder().deleteJobTriggerSettings();
- }
-
- /** Returns the builder for the settings used for calls to hybridInspectJobTrigger. */
- public UnaryCallSettings.Builder
- hybridInspectJobTriggerSettings() {
- return getStubSettingsBuilder().hybridInspectJobTriggerSettings();
- }
-
- /** Returns the builder for the settings used for calls to updateJobTrigger. */
- public UnaryCallSettings.Builder
- updateJobTriggerSettings() {
- return getStubSettingsBuilder().updateJobTriggerSettings();
- }
-
- /** Returns the builder for the settings used for calls to createJobTrigger. */
- public UnaryCallSettings.Builder
- createJobTriggerSettings() {
- return getStubSettingsBuilder().createJobTriggerSettings();
- }
-
/** Returns the builder for the settings used for calls to createStoredInfoType. */
public UnaryCallSettings.Builder
createStoredInfoTypeSettings() {
@@ -610,6 +599,17 @@ public UnaryCallSettings.Builder deleteJobTrigge
return getStubSettingsBuilder().deleteStoredInfoTypeSettings();
}
+ /** Returns the builder for the settings used for calls to hybridInspectDlpJob. */
+ public UnaryCallSettings.Builder
+ hybridInspectDlpJobSettings() {
+ return getStubSettingsBuilder().hybridInspectDlpJobSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to finishDlpJob. */
+ public UnaryCallSettings.Builder finishDlpJobSettings() {
+ return getStubSettingsBuilder().finishDlpJobSettings();
+ }
+
@Override
public DlpServiceSettings build() throws IOException {
return new DlpServiceSettings(this);
diff --git a/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java b/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java
index 3772b991..acfea191 100644
--- a/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java
+++ b/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java
@@ -34,11 +34,8 @@
*
*
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
- * ProjectName parent = ProjectName.of("[PROJECT]");
- * InspectContentRequest request = InspectContentRequest.newBuilder()
- * .setParent(parent.toString())
- * .build();
- * InspectContentResponse response = dlpServiceClient.inspectContent(request);
+ * String locationId = "";
+ * ListInfoTypesResponse response = dlpServiceClient.listInfoTypes(locationId);
* }
*
*
diff --git a/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStub.java b/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStub.java
index 5726a54c..1c964edf 100644
--- a/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStub.java
+++ b/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStub.java
@@ -166,37 +166,21 @@ public UnaryCallable deleteDeidentifyTem
throw new UnsupportedOperationException("Not implemented: deleteDeidentifyTemplateCallable()");
}
- public UnaryCallable createDlpJobCallable() {
- throw new UnsupportedOperationException("Not implemented: createDlpJobCallable()");
- }
-
- public UnaryCallable listDlpJobsPagedCallable() {
- throw new UnsupportedOperationException("Not implemented: listDlpJobsPagedCallable()");
- }
-
- public UnaryCallable listDlpJobsCallable() {
- throw new UnsupportedOperationException("Not implemented: listDlpJobsCallable()");
- }
-
- public UnaryCallable getDlpJobCallable() {
- throw new UnsupportedOperationException("Not implemented: getDlpJobCallable()");
- }
-
- public UnaryCallable deleteDlpJobCallable() {
- throw new UnsupportedOperationException("Not implemented: deleteDlpJobCallable()");
+ public UnaryCallable createJobTriggerCallable() {
+ throw new UnsupportedOperationException("Not implemented: createJobTriggerCallable()");
}
- public UnaryCallable cancelDlpJobCallable() {
- throw new UnsupportedOperationException("Not implemented: cancelDlpJobCallable()");
+ public UnaryCallable updateJobTriggerCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateJobTriggerCallable()");
}
- public UnaryCallable finishDlpJobCallable() {
- throw new UnsupportedOperationException("Not implemented: finishDlpJobCallable()");
+ public UnaryCallable
+ hybridInspectJobTriggerCallable() {
+ throw new UnsupportedOperationException("Not implemented: hybridInspectJobTriggerCallable()");
}
- public UnaryCallable
- hybridInspectDlpJobCallable() {
- throw new UnsupportedOperationException("Not implemented: hybridInspectDlpJobCallable()");
+ public UnaryCallable getJobTriggerCallable() {
+ throw new UnsupportedOperationException("Not implemented: getJobTriggerCallable()");
}
public UnaryCallable
@@ -208,25 +192,32 @@ public UnaryCallable listJobTri
throw new UnsupportedOperationException("Not implemented: listJobTriggersCallable()");
}
- public UnaryCallable getJobTriggerCallable() {
- throw new UnsupportedOperationException("Not implemented: getJobTriggerCallable()");
- }
-
public UnaryCallable deleteJobTriggerCallable() {
throw new UnsupportedOperationException("Not implemented: deleteJobTriggerCallable()");
}
- public UnaryCallable
- hybridInspectJobTriggerCallable() {
- throw new UnsupportedOperationException("Not implemented: hybridInspectJobTriggerCallable()");
+ public UnaryCallable createDlpJobCallable() {
+ throw new UnsupportedOperationException("Not implemented: createDlpJobCallable()");
}
- public UnaryCallable updateJobTriggerCallable() {
- throw new UnsupportedOperationException("Not implemented: updateJobTriggerCallable()");
+ public UnaryCallable listDlpJobsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listDlpJobsPagedCallable()");
}
- public UnaryCallable createJobTriggerCallable() {
- throw new UnsupportedOperationException("Not implemented: createJobTriggerCallable()");
+ public UnaryCallable listDlpJobsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listDlpJobsCallable()");
+ }
+
+ public UnaryCallable getDlpJobCallable() {
+ throw new UnsupportedOperationException("Not implemented: getDlpJobCallable()");
+ }
+
+ public UnaryCallable deleteDlpJobCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteDlpJobCallable()");
+ }
+
+ public UnaryCallable cancelDlpJobCallable() {
+ throw new UnsupportedOperationException("Not implemented: cancelDlpJobCallable()");
}
public UnaryCallable createStoredInfoTypeCallable() {
@@ -255,6 +246,15 @@ public UnaryCallable deleteStoredInfoTypeCal
throw new UnsupportedOperationException("Not implemented: deleteStoredInfoTypeCallable()");
}
+ public UnaryCallable
+ hybridInspectDlpJobCallable() {
+ throw new UnsupportedOperationException("Not implemented: hybridInspectDlpJobCallable()");
+ }
+
+ public UnaryCallable finishDlpJobCallable() {
+ throw new UnsupportedOperationException("Not implemented: finishDlpJobCallable()");
+ }
+
@Override
public abstract void close();
}
diff --git a/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java b/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java
index 2176d619..c1a21fc7 100644
--- a/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java
+++ b/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/stub/DlpServiceStubSettings.java
@@ -117,16 +117,16 @@
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of inspectContent to 30 seconds:
+ *
For example, to set the total timeout of listInfoTypes to 30 seconds:
*
*
*
* DlpServiceStubSettings.Builder dlpServiceSettingsBuilder =
* DlpServiceStubSettings.newBuilder();
* dlpServiceSettingsBuilder
- * .inspectContentSettings()
+ * .listInfoTypesSettings()
* .setRetrySettings(
- * dlpServiceSettingsBuilder.inspectContentSettings().getRetrySettings().toBuilder()
+ * dlpServiceSettingsBuilder.listInfoTypesSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* DlpServiceStubSettings dlpServiceSettings = dlpServiceSettingsBuilder.build();
@@ -175,24 +175,21 @@ public class DlpServiceStubSettings extends StubSettings
listDeidentifyTemplatesSettings;
private final UnaryCallSettings
deleteDeidentifyTemplateSettings;
+ private final UnaryCallSettings createJobTriggerSettings;
+ private final UnaryCallSettings updateJobTriggerSettings;
+ private final UnaryCallSettings
+ hybridInspectJobTriggerSettings;
+ private final UnaryCallSettings getJobTriggerSettings;
+ private final PagedCallSettings<
+ ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse>
+ listJobTriggersSettings;
+ private final UnaryCallSettings deleteJobTriggerSettings;
private final UnaryCallSettings createDlpJobSettings;
private final PagedCallSettings
listDlpJobsSettings;
private final UnaryCallSettings getDlpJobSettings;
private final UnaryCallSettings deleteDlpJobSettings;
private final UnaryCallSettings cancelDlpJobSettings;
- private final UnaryCallSettings finishDlpJobSettings;
- private final UnaryCallSettings
- hybridInspectDlpJobSettings;
- private final PagedCallSettings<
- ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse>
- listJobTriggersSettings;
- private final UnaryCallSettings getJobTriggerSettings;
- private final UnaryCallSettings deleteJobTriggerSettings;
- private final UnaryCallSettings
- hybridInspectJobTriggerSettings;
- private final UnaryCallSettings updateJobTriggerSettings;
- private final UnaryCallSettings createJobTriggerSettings;
private final UnaryCallSettings
createStoredInfoTypeSettings;
private final UnaryCallSettings
@@ -203,6 +200,9 @@ public class DlpServiceStubSettings extends StubSettings
ListStoredInfoTypesRequest, ListStoredInfoTypesResponse, ListStoredInfoTypesPagedResponse>
listStoredInfoTypesSettings;
private final UnaryCallSettings deleteStoredInfoTypeSettings;
+ private final UnaryCallSettings
+ hybridInspectDlpJobSettings;
+ private final UnaryCallSettings finishDlpJobSettings;
/** Returns the object with the settings used for calls to inspectContent. */
public UnaryCallSettings inspectContentSettings() {
@@ -296,41 +296,25 @@ public UnaryCallSettings deleteInspectTempl
return deleteDeidentifyTemplateSettings;
}
- /** Returns the object with the settings used for calls to createDlpJob. */
- public UnaryCallSettings createDlpJobSettings() {
- return createDlpJobSettings;
- }
-
- /** Returns the object with the settings used for calls to listDlpJobs. */
- public PagedCallSettings
- listDlpJobsSettings() {
- return listDlpJobsSettings;
- }
-
- /** Returns the object with the settings used for calls to getDlpJob. */
- public UnaryCallSettings getDlpJobSettings() {
- return getDlpJobSettings;
- }
-
- /** Returns the object with the settings used for calls to deleteDlpJob. */
- public UnaryCallSettings deleteDlpJobSettings() {
- return deleteDlpJobSettings;
+ /** Returns the object with the settings used for calls to createJobTrigger. */
+ public UnaryCallSettings createJobTriggerSettings() {
+ return createJobTriggerSettings;
}
- /** Returns the object with the settings used for calls to cancelDlpJob. */
- public UnaryCallSettings cancelDlpJobSettings() {
- return cancelDlpJobSettings;
+ /** Returns the object with the settings used for calls to updateJobTrigger. */
+ public UnaryCallSettings updateJobTriggerSettings() {
+ return updateJobTriggerSettings;
}
- /** Returns the object with the settings used for calls to finishDlpJob. */
- public UnaryCallSettings finishDlpJobSettings() {
- return finishDlpJobSettings;
+ /** Returns the object with the settings used for calls to hybridInspectJobTrigger. */
+ public UnaryCallSettings
+ hybridInspectJobTriggerSettings() {
+ return hybridInspectJobTriggerSettings;
}
- /** Returns the object with the settings used for calls to hybridInspectDlpJob. */
- public UnaryCallSettings
- hybridInspectDlpJobSettings() {
- return hybridInspectDlpJobSettings;
+ /** Returns the object with the settings used for calls to getJobTrigger. */
+ public UnaryCallSettings getJobTriggerSettings() {
+ return getJobTriggerSettings;
}
/** Returns the object with the settings used for calls to listJobTriggers. */
@@ -340,30 +324,35 @@ public UnaryCallSettings finishDlpJobSettings() {
return listJobTriggersSettings;
}
- /** Returns the object with the settings used for calls to getJobTrigger. */
- public UnaryCallSettings getJobTriggerSettings() {
- return getJobTriggerSettings;
- }
-
/** Returns the object with the settings used for calls to deleteJobTrigger. */
public UnaryCallSettings deleteJobTriggerSettings() {
return deleteJobTriggerSettings;
}
- /** Returns the object with the settings used for calls to hybridInspectJobTrigger. */
- public UnaryCallSettings
- hybridInspectJobTriggerSettings() {
- return hybridInspectJobTriggerSettings;
+ /** Returns the object with the settings used for calls to createDlpJob. */
+ public UnaryCallSettings createDlpJobSettings() {
+ return createDlpJobSettings;
}
- /** Returns the object with the settings used for calls to updateJobTrigger. */
- public UnaryCallSettings updateJobTriggerSettings() {
- return updateJobTriggerSettings;
+ /** Returns the object with the settings used for calls to listDlpJobs. */
+ public PagedCallSettings
+ listDlpJobsSettings() {
+ return listDlpJobsSettings;
}
- /** Returns the object with the settings used for calls to createJobTrigger. */
- public UnaryCallSettings createJobTriggerSettings() {
- return createJobTriggerSettings;
+ /** Returns the object with the settings used for calls to getDlpJob. */
+ public UnaryCallSettings getDlpJobSettings() {
+ return getDlpJobSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteDlpJob. */
+ public UnaryCallSettings deleteDlpJobSettings() {
+ return deleteDlpJobSettings;
+ }
+
+ /** Returns the object with the settings used for calls to cancelDlpJob. */
+ public UnaryCallSettings cancelDlpJobSettings() {
+ return cancelDlpJobSettings;
}
/** Returns the object with the settings used for calls to createStoredInfoType. */
@@ -395,6 +384,17 @@ public UnaryCallSettings deleteStoredInfoTyp
return deleteStoredInfoTypeSettings;
}
+ /** Returns the object with the settings used for calls to hybridInspectDlpJob. */
+ public UnaryCallSettings
+ hybridInspectDlpJobSettings() {
+ return hybridInspectDlpJobSettings;
+ }
+
+ /** Returns the object with the settings used for calls to finishDlpJob. */
+ public UnaryCallSettings finishDlpJobSettings() {
+ return finishDlpJobSettings;
+ }
+
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public DlpServiceStub createStub() throws IOException {
if (getTransportChannelProvider()
@@ -479,24 +479,24 @@ protected DlpServiceStubSettings(Builder settingsBuilder) throws IOException {
getDeidentifyTemplateSettings = settingsBuilder.getDeidentifyTemplateSettings().build();
listDeidentifyTemplatesSettings = settingsBuilder.listDeidentifyTemplatesSettings().build();
deleteDeidentifyTemplateSettings = settingsBuilder.deleteDeidentifyTemplateSettings().build();
+ createJobTriggerSettings = settingsBuilder.createJobTriggerSettings().build();
+ updateJobTriggerSettings = settingsBuilder.updateJobTriggerSettings().build();
+ hybridInspectJobTriggerSettings = settingsBuilder.hybridInspectJobTriggerSettings().build();
+ getJobTriggerSettings = settingsBuilder.getJobTriggerSettings().build();
+ listJobTriggersSettings = settingsBuilder.listJobTriggersSettings().build();
+ deleteJobTriggerSettings = settingsBuilder.deleteJobTriggerSettings().build();
createDlpJobSettings = settingsBuilder.createDlpJobSettings().build();
listDlpJobsSettings = settingsBuilder.listDlpJobsSettings().build();
getDlpJobSettings = settingsBuilder.getDlpJobSettings().build();
deleteDlpJobSettings = settingsBuilder.deleteDlpJobSettings().build();
cancelDlpJobSettings = settingsBuilder.cancelDlpJobSettings().build();
- finishDlpJobSettings = settingsBuilder.finishDlpJobSettings().build();
- hybridInspectDlpJobSettings = settingsBuilder.hybridInspectDlpJobSettings().build();
- listJobTriggersSettings = settingsBuilder.listJobTriggersSettings().build();
- getJobTriggerSettings = settingsBuilder.getJobTriggerSettings().build();
- deleteJobTriggerSettings = settingsBuilder.deleteJobTriggerSettings().build();
- hybridInspectJobTriggerSettings = settingsBuilder.hybridInspectJobTriggerSettings().build();
- updateJobTriggerSettings = settingsBuilder.updateJobTriggerSettings().build();
- createJobTriggerSettings = settingsBuilder.createJobTriggerSettings().build();
createStoredInfoTypeSettings = settingsBuilder.createStoredInfoTypeSettings().build();
updateStoredInfoTypeSettings = settingsBuilder.updateStoredInfoTypeSettings().build();
getStoredInfoTypeSettings = settingsBuilder.getStoredInfoTypeSettings().build();
listStoredInfoTypesSettings = settingsBuilder.listStoredInfoTypesSettings().build();
deleteStoredInfoTypeSettings = settingsBuilder.deleteStoredInfoTypeSettings().build();
+ hybridInspectDlpJobSettings = settingsBuilder.hybridInspectDlpJobSettings().build();
+ finishDlpJobSettings = settingsBuilder.finishDlpJobSettings().build();
}
private static final PagedListDescriptor<
@@ -585,78 +585,78 @@ public Iterable extractResources(
}
};
- private static final PagedListDescriptor
- LIST_DLP_JOBS_PAGE_STR_DESC =
- new PagedListDescriptor() {
+ private static final PagedListDescriptor<
+ ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger>
+ LIST_JOB_TRIGGERS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
- public ListDlpJobsRequest injectToken(ListDlpJobsRequest payload, String token) {
- return ListDlpJobsRequest.newBuilder(payload).setPageToken(token).build();
+ public ListJobTriggersRequest injectToken(
+ ListJobTriggersRequest payload, String token) {
+ return ListJobTriggersRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
- public ListDlpJobsRequest injectPageSize(ListDlpJobsRequest payload, int pageSize) {
- return ListDlpJobsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ public ListJobTriggersRequest injectPageSize(
+ ListJobTriggersRequest payload, int pageSize) {
+ return ListJobTriggersRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
- public Integer extractPageSize(ListDlpJobsRequest payload) {
+ public Integer extractPageSize(ListJobTriggersRequest payload) {
return payload.getPageSize();
}
@Override
- public String extractNextToken(ListDlpJobsResponse payload) {
+ public String extractNextToken(ListJobTriggersResponse payload) {
return payload.getNextPageToken();
}
@Override
- public Iterable extractResources(ListDlpJobsResponse payload) {
- return payload.getJobsList() != null
- ? payload.getJobsList()
- : ImmutableList.of();
+ public Iterable extractResources(ListJobTriggersResponse payload) {
+ return payload.getJobTriggersList() != null
+ ? payload.getJobTriggersList()
+ : ImmutableList.of();
}
};
- private static final PagedListDescriptor<
- ListJobTriggersRequest, ListJobTriggersResponse, JobTrigger>
- LIST_JOB_TRIGGERS_PAGE_STR_DESC =
- new PagedListDescriptor() {
+ private static final PagedListDescriptor
+ LIST_DLP_JOBS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
@Override
public String emptyToken() {
return "";
}
@Override
- public ListJobTriggersRequest injectToken(
- ListJobTriggersRequest payload, String token) {
- return ListJobTriggersRequest.newBuilder(payload).setPageToken(token).build();
+ public ListDlpJobsRequest injectToken(ListDlpJobsRequest payload, String token) {
+ return ListDlpJobsRequest.newBuilder(payload).setPageToken(token).build();
}
@Override
- public ListJobTriggersRequest injectPageSize(
- ListJobTriggersRequest payload, int pageSize) {
- return ListJobTriggersRequest.newBuilder(payload).setPageSize(pageSize).build();
+ public ListDlpJobsRequest injectPageSize(ListDlpJobsRequest payload, int pageSize) {
+ return ListDlpJobsRequest.newBuilder(payload).setPageSize(pageSize).build();
}
@Override
- public Integer extractPageSize(ListJobTriggersRequest payload) {
+ public Integer extractPageSize(ListDlpJobsRequest payload) {
return payload.getPageSize();
}
@Override
- public String extractNextToken(ListJobTriggersResponse payload) {
+ public String extractNextToken(ListDlpJobsResponse payload) {
return payload.getNextPageToken();
}
@Override
- public Iterable extractResources(ListJobTriggersResponse payload) {
- return payload.getJobTriggersList() != null
- ? payload.getJobTriggersList()
- : ImmutableList.of();
+ public Iterable extractResources(ListDlpJobsResponse payload) {
+ return payload.getJobsList() != null
+ ? payload.getJobsList()
+ : ImmutableList.of();
}
};
@@ -751,23 +751,6 @@ public ApiFuture getFuturePagedResponse(
}
};
- private static final PagedListResponseFactory<
- ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse>
- LIST_DLP_JOBS_PAGE_STR_FACT =
- new PagedListResponseFactory<
- ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse>() {
- @Override
- public ApiFuture getFuturePagedResponse(
- UnaryCallable callable,
- ListDlpJobsRequest request,
- ApiCallContext context,
- ApiFuture futureResponse) {
- PageContext pageContext =
- PageContext.create(callable, LIST_DLP_JOBS_PAGE_STR_DESC, request, context);
- return ListDlpJobsPagedResponse.createAsync(pageContext, futureResponse);
- }
- };
-
private static final PagedListResponseFactory<
ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse>
LIST_JOB_TRIGGERS_PAGE_STR_FACT =
@@ -785,6 +768,23 @@ public ApiFuture getFuturePagedResponse(
}
};
+ private static final PagedListResponseFactory<
+ ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse>
+ LIST_DLP_JOBS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListDlpJobsRequest, ListDlpJobsResponse, ListDlpJobsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable