Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

feat(v2): add HybridInspect RPCs, add missing fields to Finding #97

Merged
merged 1 commit into from Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -43,11 +43,15 @@
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.FinishDlpJobRequest;
import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest;
import com.google.privacy.dlp.v2.GetDlpJobRequest;
import com.google.privacy.dlp.v2.GetInspectTemplateRequest;
import com.google.privacy.dlp.v2.GetJobTriggerRequest;
import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest;
import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest;
import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest;
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.InspectTemplate;
Expand Down Expand Up @@ -1319,6 +1323,109 @@ public final UnaryCallable<CancelDlpJobRequest, Empty> cancelDlpJobCallable() {
return stub.cancelDlpJobCallable();
}

// 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.
*
* <p>Sample code:
*
* <pre><code>
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* DlpJobName name = DlpJobName.of("[PROJECT]", "[DLP_JOB]");
* FinishDlpJobRequest request = FinishDlpJobRequest.newBuilder()
* .setName(name.toString())
* .build();
* dlpServiceClient.finishDlpJob(request);
* }
* </code></pre>
*
* @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 finishDlpJob(FinishDlpJobRequest request) {
finishDlpJobCallable().call(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.
*
* <p>Sample code:
*
* <pre><code>
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* DlpJobName name = DlpJobName.of("[PROJECT]", "[DLP_JOB]");
* FinishDlpJobRequest request = FinishDlpJobRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;Void&gt; future = dlpServiceClient.finishDlpJobCallable().futureCall(request);
* // Do something
* future.get();
* }
* </code></pre>
*/
public final UnaryCallable<FinishDlpJobRequest, Empty> finishDlpJobCallable() {
return stub.finishDlpJobCallable();
}

// 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.
*
* <p>Sample code:
*
* <pre><code>
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* String name = "";
* HybridInspectDlpJobRequest request = HybridInspectDlpJobRequest.newBuilder()
* .setName(name)
* .build();
* HybridInspectResponse response = dlpServiceClient.hybridInspectDlpJob(request);
* }
* </code></pre>
*
* @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);
}

// 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.
*
* <p>Sample code:
*
* <pre><code>
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* String name = "";
* HybridInspectDlpJobRequest request = HybridInspectDlpJobRequest.newBuilder()
* .setName(name)
* .build();
* ApiFuture&lt;HybridInspectResponse&gt; future = dlpServiceClient.hybridInspectDlpJobCallable().futureCall(request);
* // Do something
* HybridInspectResponse response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<HybridInspectDlpJobRequest, HybridInspectResponse>
hybridInspectDlpJobCallable() {
return stub.hybridInspectDlpJobCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
Expand Down Expand Up @@ -1493,6 +1600,59 @@ public final UnaryCallable<DeleteJobTriggerRequest, Empty> deleteJobTriggerCalla
return stub.deleteJobTriggerCallable();
}

// 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.
*
* <p>Sample code:
*
* <pre><code>
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* String name = "";
* HybridInspectJobTriggerRequest request = HybridInspectJobTriggerRequest.newBuilder()
* .setName(name)
* .build();
* HybridInspectResponse response = dlpServiceClient.hybridInspectJobTrigger(request);
* }
* </code></pre>
*
* @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.
*
* <p>Sample code:
*
* <pre><code>
* try (DlpServiceClient dlpServiceClient = DlpServiceClient.create()) {
* String name = "";
* HybridInspectJobTriggerRequest request = HybridInspectJobTriggerRequest.newBuilder()
* .setName(name)
* .build();
* ApiFuture&lt;HybridInspectResponse&gt; future = dlpServiceClient.hybridInspectJobTriggerCallable().futureCall(request);
* // Do something
* HybridInspectResponse response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<HybridInspectJobTriggerRequest, HybridInspectResponse>
hybridInspectJobTriggerCallable() {
return stub.hybridInspectJobTriggerCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn
Expand Down
Expand Up @@ -48,11 +48,15 @@
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.FinishDlpJobRequest;
import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest;
import com.google.privacy.dlp.v2.GetDlpJobRequest;
import com.google.privacy.dlp.v2.GetInspectTemplateRequest;
import com.google.privacy.dlp.v2.GetJobTriggerRequest;
import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest;
import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest;
import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest;
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.InspectTemplate;
Expand Down Expand Up @@ -235,6 +239,17 @@ public UnaryCallSettings<CancelDlpJobRequest, Empty> cancelDlpJobSettings() {
return ((DlpServiceStubSettings) getStubSettings()).cancelDlpJobSettings();
}

/** Returns the object with the settings used for calls to finishDlpJob. */
public UnaryCallSettings<FinishDlpJobRequest, Empty> finishDlpJobSettings() {
return ((DlpServiceStubSettings) getStubSettings()).finishDlpJobSettings();
}

/** Returns the object with the settings used for calls to hybridInspectDlpJob. */
public UnaryCallSettings<HybridInspectDlpJobRequest, HybridInspectResponse>
hybridInspectDlpJobSettings() {
return ((DlpServiceStubSettings) getStubSettings()).hybridInspectDlpJobSettings();
}

/** Returns the object with the settings used for calls to listJobTriggers. */
public PagedCallSettings<
ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse>
Expand All @@ -252,6 +267,12 @@ public UnaryCallSettings<DeleteJobTriggerRequest, Empty> deleteJobTriggerSetting
return ((DlpServiceStubSettings) getStubSettings()).deleteJobTriggerSettings();
}

/** Returns the object with the settings used for calls to hybridInspectJobTrigger. */
public UnaryCallSettings<HybridInspectJobTriggerRequest, HybridInspectResponse>
hybridInspectJobTriggerSettings() {
return ((DlpServiceStubSettings) getStubSettings()).hybridInspectJobTriggerSettings();
}

/** Returns the object with the settings used for calls to updateJobTrigger. */
public UnaryCallSettings<UpdateJobTriggerRequest, JobTrigger> updateJobTriggerSettings() {
return ((DlpServiceStubSettings) getStubSettings()).updateJobTriggerSettings();
Expand Down Expand Up @@ -510,6 +531,17 @@ public UnaryCallSettings.Builder<CancelDlpJobRequest, Empty> cancelDlpJobSetting
return getStubSettingsBuilder().cancelDlpJobSettings();
}

/** Returns the builder for the settings used for calls to finishDlpJob. */
public UnaryCallSettings.Builder<FinishDlpJobRequest, Empty> finishDlpJobSettings() {
return getStubSettingsBuilder().finishDlpJobSettings();
}

/** Returns the builder for the settings used for calls to hybridInspectDlpJob. */
public UnaryCallSettings.Builder<HybridInspectDlpJobRequest, HybridInspectResponse>
hybridInspectDlpJobSettings() {
return getStubSettingsBuilder().hybridInspectDlpJobSettings();
}

/** Returns the builder for the settings used for calls to listJobTriggers. */
public PagedCallSettings.Builder<
ListJobTriggersRequest, ListJobTriggersResponse, ListJobTriggersPagedResponse>
Expand All @@ -527,6 +559,12 @@ public UnaryCallSettings.Builder<DeleteJobTriggerRequest, Empty> deleteJobTrigge
return getStubSettingsBuilder().deleteJobTriggerSettings();
}

/** Returns the builder for the settings used for calls to hybridInspectJobTrigger. */
public UnaryCallSettings.Builder<HybridInspectJobTriggerRequest, HybridInspectResponse>
hybridInspectJobTriggerSettings() {
return getStubSettingsBuilder().hybridInspectJobTriggerSettings();
}

/** Returns the builder for the settings used for calls to updateJobTrigger. */
public UnaryCallSettings.Builder<UpdateJobTriggerRequest, JobTrigger>
updateJobTriggerSettings() {
Expand Down
Expand Up @@ -39,11 +39,15 @@
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.FinishDlpJobRequest;
import com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest;
import com.google.privacy.dlp.v2.GetDlpJobRequest;
import com.google.privacy.dlp.v2.GetInspectTemplateRequest;
import com.google.privacy.dlp.v2.GetJobTriggerRequest;
import com.google.privacy.dlp.v2.GetStoredInfoTypeRequest;
import com.google.privacy.dlp.v2.HybridInspectDlpJobRequest;
import com.google.privacy.dlp.v2.HybridInspectJobTriggerRequest;
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.InspectTemplate;
Expand Down Expand Up @@ -186,6 +190,15 @@ public UnaryCallable<CancelDlpJobRequest, Empty> cancelDlpJobCallable() {
throw new UnsupportedOperationException("Not implemented: cancelDlpJobCallable()");
}

public UnaryCallable<FinishDlpJobRequest, Empty> finishDlpJobCallable() {
throw new UnsupportedOperationException("Not implemented: finishDlpJobCallable()");
}

public UnaryCallable<HybridInspectDlpJobRequest, HybridInspectResponse>
hybridInspectDlpJobCallable() {
throw new UnsupportedOperationException("Not implemented: hybridInspectDlpJobCallable()");
}

public UnaryCallable<ListJobTriggersRequest, ListJobTriggersPagedResponse>
listJobTriggersPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listJobTriggersPagedCallable()");
Expand All @@ -203,6 +216,11 @@ public UnaryCallable<DeleteJobTriggerRequest, Empty> deleteJobTriggerCallable()
throw new UnsupportedOperationException("Not implemented: deleteJobTriggerCallable()");
}

public UnaryCallable<HybridInspectJobTriggerRequest, HybridInspectResponse>
hybridInspectJobTriggerCallable() {
throw new UnsupportedOperationException("Not implemented: hybridInspectJobTriggerCallable()");
}

public UnaryCallable<UpdateJobTriggerRequest, JobTrigger> updateJobTriggerCallable() {
throw new UnsupportedOperationException("Not implemented: updateJobTriggerCallable()");
}
Expand Down