diff --git a/clients/google-api-services-dlp/v2/2.0.0/README.md b/clients/google-api-services-dlp/v2/2.0.0/README.md index ad09300f40c..93232254470 100644 --- a/clients/google-api-services-dlp/v2/2.0.0/README.md +++ b/clients/google-api-services-dlp/v2/2.0.0/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-dlp - v2-rev20260530-2.0.0 + v2-rev20260606-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-dlp:v2-rev20260530-2.0.0' + implementation 'com.google.apis:google-api-services-dlp:v2-rev20260606-2.0.0' } ``` diff --git a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/DLP.java b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/DLP.java index 9e41d865192..1df80e7e76c 100644 --- a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/DLP.java +++ b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/DLP.java @@ -18476,6 +18476,786 @@ public Reidentify set(String parameterName, Object value) { } } + } + /** + * An accessor for creating requests from the ContentPolicies collection. + * + *

The typical use is:

+ *
+       *   {@code DLP dlp = new DLP(...);}
+       *   {@code DLP.ContentPolicies.List request = dlp.contentPolicies().list(parameters ...)}
+       * 
+ * + * @return the resource collection + */ + public ContentPolicies contentPolicies() { + return new ContentPolicies(); + } + + /** + * The "contentPolicies" collection of methods. + */ + public class ContentPolicies { + + /** + * Create a ContentPolicy. + * + * Create a request for the method "contentPolicies.create". + * + * This request holds the parameters needed by the dlp server. After setting any optional + * parameters, call the {@link Create#execute()} method to invoke the remote operation. + * + * @param parent Required. Parent resource name. The format of this value varies depending on the scope of the + * request (project or organization): + Projects scope: + * `projects/{project_id}/locations/{location_id}` + Organizations scope: + * `organizations/{org_id}/locations/{location_id}` + * @param content the {@link com.google.api.services.dlp.v2.model.GooglePrivacyDlpV2CreateContentPolicyRequest} + * @return the request + */ + public Create create(java.lang.String parent, com.google.api.services.dlp.v2.model.GooglePrivacyDlpV2CreateContentPolicyRequest content) throws java.io.IOException { + Create result = new Create(parent, content); + initialize(result); + return result; + } + + public class Create extends DLPRequest { + + private static final String REST_PATH = "v2/{+parent}/contentPolicies"; + + private final java.util.regex.Pattern PARENT_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); + + /** + * Create a ContentPolicy. + * + * Create a request for the method "contentPolicies.create". + * + * This request holds the parameters needed by the the dlp server. After setting any optional + * parameters, call the {@link Create#execute()} method to invoke the remote operation.

{@link + * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param parent Required. Parent resource name. The format of this value varies depending on the scope of the + * request (project or organization): + Projects scope: + * `projects/{project_id}/locations/{location_id}` + Organizations scope: + * `organizations/{org_id}/locations/{location_id}` + * @param content the {@link com.google.api.services.dlp.v2.model.GooglePrivacyDlpV2CreateContentPolicyRequest} + * @since 1.13 + */ + protected Create(java.lang.String parent, com.google.api.services.dlp.v2.model.GooglePrivacyDlpV2CreateContentPolicyRequest content) { + super(DLP.this, "POST", REST_PATH, content, com.google.api.services.dlp.v2.model.GooglePrivacyDlpV2ContentPolicy.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+$"); + } + } + + @Override + public Create set$Xgafv(java.lang.String $Xgafv) { + return (Create) super.set$Xgafv($Xgafv); + } + + @Override + public Create setAccessToken(java.lang.String accessToken) { + return (Create) super.setAccessToken(accessToken); + } + + @Override + public Create setAlt(java.lang.String alt) { + return (Create) super.setAlt(alt); + } + + @Override + public Create setCallback(java.lang.String callback) { + return (Create) super.setCallback(callback); + } + + @Override + public Create setFields(java.lang.String fields) { + return (Create) super.setFields(fields); + } + + @Override + public Create setKey(java.lang.String key) { + return (Create) super.setKey(key); + } + + @Override + public Create setOauthToken(java.lang.String oauthToken) { + return (Create) super.setOauthToken(oauthToken); + } + + @Override + public Create setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Create) super.setPrettyPrint(prettyPrint); + } + + @Override + public Create setQuotaUser(java.lang.String quotaUser) { + return (Create) super.setQuotaUser(quotaUser); + } + + @Override + public Create setUploadType(java.lang.String uploadType) { + return (Create) super.setUploadType(uploadType); + } + + @Override + public Create setUploadProtocol(java.lang.String uploadProtocol) { + return (Create) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. Parent resource name. The format of this value varies depending on the scope + * of the request (project or organization): + Projects scope: + * `projects/{project_id}/locations/{location_id}` + Organizations scope: + * `organizations/{org_id}/locations/{location_id}` + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. Parent resource name. The format of this value varies depending on the scope of the + request (project or organization): + Projects scope: + `projects/{project_id}/locations/{location_id}` + Organizations scope: + `organizations/{org_id}/locations/{location_id}` + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. Parent resource name. The format of this value varies depending on the scope + * of the request (project or organization): + Projects scope: + * `projects/{project_id}/locations/{location_id}` + Organizations scope: + * `organizations/{org_id}/locations/{location_id}` + */ + public Create setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+$"); + } + this.parent = parent; + return this; + } + + @Override + public Create set(String parameterName, Object value) { + return (Create) super.set(parameterName, value); + } + } + /** + * Delete a ContentPolicy. + * + * Create a request for the method "contentPolicies.delete". + * + * This request holds the parameters needed by the dlp server. After setting any optional + * parameters, call the {@link Delete#execute()} method to invoke the remote operation. + * + * @param name Required. Resource name of the ContentPolicy to be deleted, in the format: + * `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + * @return the request + */ + public Delete delete(java.lang.String name) throws java.io.IOException { + Delete result = new Delete(name); + initialize(result); + return result; + } + + public class Delete extends DLPRequest { + + private static final String REST_PATH = "v2/{+name}"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/contentPolicies/[^/]+$"); + + /** + * Delete a ContentPolicy. + * + * Create a request for the method "contentPolicies.delete". + * + * This request holds the parameters needed by the the dlp server. After setting any optional + * parameters, call the {@link Delete#execute()} method to invoke the remote operation.

{@link + * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Required. Resource name of the ContentPolicy to be deleted, in the format: + * `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + * @since 1.13 + */ + protected Delete(java.lang.String name) { + super(DLP.this, "DELETE", REST_PATH, null, com.google.api.services.dlp.v2.model.GoogleProtobufEmpty.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/contentPolicies/[^/]+$"); + } + } + + @Override + public Delete set$Xgafv(java.lang.String $Xgafv) { + return (Delete) super.set$Xgafv($Xgafv); + } + + @Override + public Delete setAccessToken(java.lang.String accessToken) { + return (Delete) super.setAccessToken(accessToken); + } + + @Override + public Delete setAlt(java.lang.String alt) { + return (Delete) super.setAlt(alt); + } + + @Override + public Delete setCallback(java.lang.String callback) { + return (Delete) super.setCallback(callback); + } + + @Override + public Delete setFields(java.lang.String fields) { + return (Delete) super.setFields(fields); + } + + @Override + public Delete setKey(java.lang.String key) { + return (Delete) super.setKey(key); + } + + @Override + public Delete setOauthToken(java.lang.String oauthToken) { + return (Delete) super.setOauthToken(oauthToken); + } + + @Override + public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Delete) super.setPrettyPrint(prettyPrint); + } + + @Override + public Delete setQuotaUser(java.lang.String quotaUser) { + return (Delete) super.setQuotaUser(quotaUser); + } + + @Override + public Delete setUploadType(java.lang.String uploadType) { + return (Delete) super.setUploadType(uploadType); + } + + @Override + public Delete setUploadProtocol(java.lang.String uploadProtocol) { + return (Delete) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. Resource name of the ContentPolicy to be deleted, in the format: + * `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. Resource name of the ContentPolicy to be deleted, in the format: + `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. Resource name of the ContentPolicy to be deleted, in the format: + * `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + */ + public Delete setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/contentPolicies/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Delete set(String parameterName, Object value) { + return (Delete) super.set(parameterName, value); + } + } + /** + * Get a ContentPolicy. + * + * Create a request for the method "contentPolicies.get". + * + * This request holds the parameters needed by the dlp server. After setting any optional + * parameters, call the {@link Get#execute()} method to invoke the remote operation. + * + * @param name Required. Resource name in the format: + * `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + * @return the request + */ + public Get get(java.lang.String name) throws java.io.IOException { + Get result = new Get(name); + initialize(result); + return result; + } + + public class Get extends DLPRequest { + + private static final String REST_PATH = "v2/{+name}"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/contentPolicies/[^/]+$"); + + /** + * Get a ContentPolicy. + * + * Create a request for the method "contentPolicies.get". + * + * This request holds the parameters needed by the the dlp server. After setting any optional + * parameters, call the {@link Get#execute()} method to invoke the remote operation.

{@link + * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be + * called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Required. Resource name in the format: + * `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + * @since 1.13 + */ + protected Get(java.lang.String name) { + super(DLP.this, "GET", REST_PATH, null, com.google.api.services.dlp.v2.model.GooglePrivacyDlpV2ContentPolicy.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/contentPolicies/[^/]+$"); + } + } + + @Override + public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { + return super.executeUsingHead(); + } + + @Override + public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { + return super.buildHttpRequestUsingHead(); + } + + @Override + public Get set$Xgafv(java.lang.String $Xgafv) { + return (Get) super.set$Xgafv($Xgafv); + } + + @Override + public Get setAccessToken(java.lang.String accessToken) { + return (Get) super.setAccessToken(accessToken); + } + + @Override + public Get setAlt(java.lang.String alt) { + return (Get) super.setAlt(alt); + } + + @Override + public Get setCallback(java.lang.String callback) { + return (Get) super.setCallback(callback); + } + + @Override + public Get setFields(java.lang.String fields) { + return (Get) super.setFields(fields); + } + + @Override + public Get setKey(java.lang.String key) { + return (Get) super.setKey(key); + } + + @Override + public Get setOauthToken(java.lang.String oauthToken) { + return (Get) super.setOauthToken(oauthToken); + } + + @Override + public Get setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Get) super.setPrettyPrint(prettyPrint); + } + + @Override + public Get setQuotaUser(java.lang.String quotaUser) { + return (Get) super.setQuotaUser(quotaUser); + } + + @Override + public Get setUploadType(java.lang.String uploadType) { + return (Get) super.setUploadType(uploadType); + } + + @Override + public Get setUploadProtocol(java.lang.String uploadProtocol) { + return (Get) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. Resource name in the format: + * `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. Resource name in the format: + `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. Resource name in the format: + * `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + */ + public Get setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/contentPolicies/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Get set(String parameterName, Object value) { + return (Get) super.set(parameterName, value); + } + } + /** + * Lists ContentPolicies in a parent. + * + * Create a request for the method "contentPolicies.list". + * + * This request holds the parameters needed by the dlp server. After setting any optional + * parameters, call the {@link List#execute()} method to invoke the remote operation. + * + * @param parent Required. Resource name of the organization or project, for example, + * `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`. + * @return the request + */ + public List list(java.lang.String parent) throws java.io.IOException { + List result = new List(parent); + initialize(result); + return result; + } + + public class List extends DLPRequest { + + private static final String REST_PATH = "v2/{+parent}/contentPolicies"; + + private final java.util.regex.Pattern PARENT_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$"); + + /** + * Lists ContentPolicies in a parent. + * + * Create a request for the method "contentPolicies.list". + * + * This request holds the parameters needed by the the dlp server. After setting any optional + * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link + * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be + * called to initialize this instance immediately after invoking the constructor.

+ * + * @param parent Required. Resource name of the organization or project, for example, + * `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`. + * @since 1.13 + */ + protected List(java.lang.String parent) { + super(DLP.this, "GET", REST_PATH, null, com.google.api.services.dlp.v2.model.GooglePrivacyDlpV2ListContentPoliciesResponse.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+$"); + } + } + + @Override + public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { + return super.executeUsingHead(); + } + + @Override + public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { + return super.buildHttpRequestUsingHead(); + } + + @Override + public List set$Xgafv(java.lang.String $Xgafv) { + return (List) super.set$Xgafv($Xgafv); + } + + @Override + public List setAccessToken(java.lang.String accessToken) { + return (List) super.setAccessToken(accessToken); + } + + @Override + public List setAlt(java.lang.String alt) { + return (List) super.setAlt(alt); + } + + @Override + public List setCallback(java.lang.String callback) { + return (List) super.setCallback(callback); + } + + @Override + public List setFields(java.lang.String fields) { + return (List) super.setFields(fields); + } + + @Override + public List setKey(java.lang.String key) { + return (List) super.setKey(key); + } + + @Override + public List setOauthToken(java.lang.String oauthToken) { + return (List) super.setOauthToken(oauthToken); + } + + @Override + public List setPrettyPrint(java.lang.Boolean prettyPrint) { + return (List) super.setPrettyPrint(prettyPrint); + } + + @Override + public List setQuotaUser(java.lang.String quotaUser) { + return (List) super.setQuotaUser(quotaUser); + } + + @Override + public List setUploadType(java.lang.String uploadType) { + return (List) super.setUploadType(uploadType); + } + + @Override + public List setUploadProtocol(java.lang.String uploadProtocol) { + return (List) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. Resource name of the organization or project, for example, + * `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`. + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. Resource name of the organization or project, for example, + `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`. + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. Resource name of the organization or project, for example, + * `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`. + */ + public List setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+$"); + } + this.parent = parent; + return this; + } + + /** Optional. Number of results per page, max 1000. */ + @com.google.api.client.util.Key + private java.lang.Integer pageSize; + + /** Optional. Number of results per page, max 1000. + */ + public java.lang.Integer getPageSize() { + return pageSize; + } + + /** Optional. Number of results per page, max 1000. */ + public List setPageSize(java.lang.Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Optional. Page token from a previous page to return the next set of results. If set, + * all other request fields must match the original request. + */ + @com.google.api.client.util.Key + private java.lang.String pageToken; + + /** Optional. Page token from a previous page to return the next set of results. If set, all other + request fields must match the original request. + */ + public java.lang.String getPageToken() { + return pageToken; + } + + /** + * Optional. Page token from a previous page to return the next set of results. If set, + * all other request fields must match the original request. + */ + public List setPageToken(java.lang.String pageToken) { + this.pageToken = pageToken; + return this; + } + + @Override + public List set(String parameterName, Object value) { + return (List) super.set(parameterName, value); + } + } + /** + * Update a ContentPolicy. + * + * Create a request for the method "contentPolicies.patch". + * + * This request holds the parameters needed by the dlp server. After setting any optional + * parameters, call the {@link Patch#execute()} method to invoke the remote operation. + * + * @param name Required. Resource name in the format: + * `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + * @param content the {@link com.google.api.services.dlp.v2.model.GooglePrivacyDlpV2UpdateContentPolicyRequest} + * @return the request + */ + public Patch patch(java.lang.String name, com.google.api.services.dlp.v2.model.GooglePrivacyDlpV2UpdateContentPolicyRequest content) throws java.io.IOException { + Patch result = new Patch(name, content); + initialize(result); + return result; + } + + public class Patch extends DLPRequest { + + private static final String REST_PATH = "v2/{+name}"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/contentPolicies/[^/]+$"); + + /** + * Update a ContentPolicy. + * + * Create a request for the method "contentPolicies.patch". + * + * This request holds the parameters needed by the the dlp server. After setting any optional + * parameters, call the {@link Patch#execute()} method to invoke the remote operation.

{@link + * Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Required. Resource name in the format: + * `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + * @param content the {@link com.google.api.services.dlp.v2.model.GooglePrivacyDlpV2UpdateContentPolicyRequest} + * @since 1.13 + */ + protected Patch(java.lang.String name, com.google.api.services.dlp.v2.model.GooglePrivacyDlpV2UpdateContentPolicyRequest content) { + super(DLP.this, "PATCH", REST_PATH, content, com.google.api.services.dlp.v2.model.GooglePrivacyDlpV2ContentPolicy.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/contentPolicies/[^/]+$"); + } + } + + @Override + public Patch set$Xgafv(java.lang.String $Xgafv) { + return (Patch) super.set$Xgafv($Xgafv); + } + + @Override + public Patch setAccessToken(java.lang.String accessToken) { + return (Patch) super.setAccessToken(accessToken); + } + + @Override + public Patch setAlt(java.lang.String alt) { + return (Patch) super.setAlt(alt); + } + + @Override + public Patch setCallback(java.lang.String callback) { + return (Patch) super.setCallback(callback); + } + + @Override + public Patch setFields(java.lang.String fields) { + return (Patch) super.setFields(fields); + } + + @Override + public Patch setKey(java.lang.String key) { + return (Patch) super.setKey(key); + } + + @Override + public Patch setOauthToken(java.lang.String oauthToken) { + return (Patch) super.setOauthToken(oauthToken); + } + + @Override + public Patch setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Patch) super.setPrettyPrint(prettyPrint); + } + + @Override + public Patch setQuotaUser(java.lang.String quotaUser) { + return (Patch) super.setQuotaUser(quotaUser); + } + + @Override + public Patch setUploadType(java.lang.String uploadType) { + return (Patch) super.setUploadType(uploadType); + } + + @Override + public Patch setUploadProtocol(java.lang.String uploadProtocol) { + return (Patch) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. Resource name in the format: + * `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. Resource name in the format: + `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. Resource name in the format: + * `projects/{project}/locations/{location}/contentPolicies/{content_policy}`. + */ + public Patch setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/contentPolicies/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Patch set(String parameterName, Object value) { + return (Patch) super.set(parameterName, value); + } + } + } /** * An accessor for creating requests from the DeidentifyTemplates collection. diff --git a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2ContentPolicy.java b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2ContentPolicy.java new file mode 100644 index 00000000000..086f6713622 --- /dev/null +++ b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2ContentPolicy.java @@ -0,0 +1,370 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.dlp.v2.model; + +/** + * A policy to apply to content based on its inspection findings. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Sensitive Data Protection (DLP). For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GooglePrivacyDlpV2ContentPolicy extends com.google.api.client.json.GenericJson { + + /** + * Output only. The creation timestamp of a contentPolicy; output-only field. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private String createTime; + + /** + * Action to take if the content is scanned and no rules match. Defaults to returning an ALLOW + * verdict if not set. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GooglePrivacyDlpV2PolicyAction defaultAction; + + /** + * Optional. Display name (max 63 chars) + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String displayName; + + /** + * Output only. A stream of errors encountered when the policy was applied. Output only field. + * Will return the last 100 errors. Whenever the policy is modified this list will be cleared. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List errors; + + /** + * Optional. Action to take if the content is a supported file type and size but fails to be + * scanned, for example because the file is encrypted or corrupted. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GooglePrivacyDlpV2PolicyAction failedToScanSupportedFileType; + + /** + * Optional. Action to take if the content is a supported file type but is too large to be + * scanned. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GooglePrivacyDlpV2PolicyAction inputTooLarge; + + /** + * Optional. InspectConfig to use to produce findings. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GooglePrivacyDlpV2InspectConfig inspectConfig; + + /** + * Optional. InspectTemplate to use to produce findings. Deprecated: use inspect_config instead. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GooglePrivacyDlpV2InspectTemplate inspectTemplate; + + /** + * Optional. Log the actions taken by the content policy to external systems. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List loggingConfigs; + + /** + * Output only. Resource name of the policy. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** + * Required. Policies to apply, based on the findings returned by inspection. The first rule to + * match applies. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List rules; + + /** + * Optional. Action to take if the content is an unsupported file type. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GooglePrivacyDlpV2PolicyAction unsupportedFileType; + + /** + * Output only. The last update timestamp of a contentPolicy; output-only field. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private String updateTime; + + /** + * Output only. The creation timestamp of a contentPolicy; output-only field. + * @return value or {@code null} for none + */ + public String getCreateTime() { + return createTime; + } + + /** + * Output only. The creation timestamp of a contentPolicy; output-only field. + * @param createTime createTime or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setCreateTime(String createTime) { + this.createTime = createTime; + return this; + } + + /** + * Action to take if the content is scanned and no rules match. Defaults to returning an ALLOW + * verdict if not set. + * @return value or {@code null} for none + */ + public GooglePrivacyDlpV2PolicyAction getDefaultAction() { + return defaultAction; + } + + /** + * Action to take if the content is scanned and no rules match. Defaults to returning an ALLOW + * verdict if not set. + * @param defaultAction defaultAction or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setDefaultAction(GooglePrivacyDlpV2PolicyAction defaultAction) { + this.defaultAction = defaultAction; + return this; + } + + /** + * Optional. Display name (max 63 chars) + * @return value or {@code null} for none + */ + public java.lang.String getDisplayName() { + return displayName; + } + + /** + * Optional. Display name (max 63 chars) + * @param displayName displayName or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setDisplayName(java.lang.String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Output only. A stream of errors encountered when the policy was applied. Output only field. + * Will return the last 100 errors. Whenever the policy is modified this list will be cleared. + * @return value or {@code null} for none + */ + public java.util.List getErrors() { + return errors; + } + + /** + * Output only. A stream of errors encountered when the policy was applied. Output only field. + * Will return the last 100 errors. Whenever the policy is modified this list will be cleared. + * @param errors errors or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setErrors(java.util.List errors) { + this.errors = errors; + return this; + } + + /** + * Optional. Action to take if the content is a supported file type and size but fails to be + * scanned, for example because the file is encrypted or corrupted. + * @return value or {@code null} for none + */ + public GooglePrivacyDlpV2PolicyAction getFailedToScanSupportedFileType() { + return failedToScanSupportedFileType; + } + + /** + * Optional. Action to take if the content is a supported file type and size but fails to be + * scanned, for example because the file is encrypted or corrupted. + * @param failedToScanSupportedFileType failedToScanSupportedFileType or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setFailedToScanSupportedFileType(GooglePrivacyDlpV2PolicyAction failedToScanSupportedFileType) { + this.failedToScanSupportedFileType = failedToScanSupportedFileType; + return this; + } + + /** + * Optional. Action to take if the content is a supported file type but is too large to be + * scanned. + * @return value or {@code null} for none + */ + public GooglePrivacyDlpV2PolicyAction getInputTooLarge() { + return inputTooLarge; + } + + /** + * Optional. Action to take if the content is a supported file type but is too large to be + * scanned. + * @param inputTooLarge inputTooLarge or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setInputTooLarge(GooglePrivacyDlpV2PolicyAction inputTooLarge) { + this.inputTooLarge = inputTooLarge; + return this; + } + + /** + * Optional. InspectConfig to use to produce findings. + * @return value or {@code null} for none + */ + public GooglePrivacyDlpV2InspectConfig getInspectConfig() { + return inspectConfig; + } + + /** + * Optional. InspectConfig to use to produce findings. + * @param inspectConfig inspectConfig or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setInspectConfig(GooglePrivacyDlpV2InspectConfig inspectConfig) { + this.inspectConfig = inspectConfig; + return this; + } + + /** + * Optional. InspectTemplate to use to produce findings. Deprecated: use inspect_config instead. + * @return value or {@code null} for none + */ + public GooglePrivacyDlpV2InspectTemplate getInspectTemplate() { + return inspectTemplate; + } + + /** + * Optional. InspectTemplate to use to produce findings. Deprecated: use inspect_config instead. + * @param inspectTemplate inspectTemplate or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setInspectTemplate(GooglePrivacyDlpV2InspectTemplate inspectTemplate) { + this.inspectTemplate = inspectTemplate; + return this; + } + + /** + * Optional. Log the actions taken by the content policy to external systems. + * @return value or {@code null} for none + */ + public java.util.List getLoggingConfigs() { + return loggingConfigs; + } + + /** + * Optional. Log the actions taken by the content policy to external systems. + * @param loggingConfigs loggingConfigs or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setLoggingConfigs(java.util.List loggingConfigs) { + this.loggingConfigs = loggingConfigs; + return this; + } + + /** + * Output only. Resource name of the policy. + * @return value or {@code null} for none + */ + public java.lang.String getName() { + return name; + } + + /** + * Output only. Resource name of the policy. + * @param name name or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setName(java.lang.String name) { + this.name = name; + return this; + } + + /** + * Required. Policies to apply, based on the findings returned by inspection. The first rule to + * match applies. + * @return value or {@code null} for none + */ + public java.util.List getRules() { + return rules; + } + + /** + * Required. Policies to apply, based on the findings returned by inspection. The first rule to + * match applies. + * @param rules rules or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setRules(java.util.List rules) { + this.rules = rules; + return this; + } + + /** + * Optional. Action to take if the content is an unsupported file type. + * @return value or {@code null} for none + */ + public GooglePrivacyDlpV2PolicyAction getUnsupportedFileType() { + return unsupportedFileType; + } + + /** + * Optional. Action to take if the content is an unsupported file type. + * @param unsupportedFileType unsupportedFileType or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setUnsupportedFileType(GooglePrivacyDlpV2PolicyAction unsupportedFileType) { + this.unsupportedFileType = unsupportedFileType; + return this; + } + + /** + * Output only. The last update timestamp of a contentPolicy; output-only field. + * @return value or {@code null} for none + */ + public String getUpdateTime() { + return updateTime; + } + + /** + * Output only. The last update timestamp of a contentPolicy; output-only field. + * @param updateTime updateTime or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy setUpdateTime(String updateTime) { + this.updateTime = updateTime; + return this; + } + + @Override + public GooglePrivacyDlpV2ContentPolicy set(String fieldName, Object value) { + return (GooglePrivacyDlpV2ContentPolicy) super.set(fieldName, value); + } + + @Override + public GooglePrivacyDlpV2ContentPolicy clone() { + return (GooglePrivacyDlpV2ContentPolicy) super.clone(); + } + +} diff --git a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2CreateContentPolicyRequest.java b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2CreateContentPolicyRequest.java new file mode 100644 index 00000000000..fc524499e93 --- /dev/null +++ b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2CreateContentPolicyRequest.java @@ -0,0 +1,97 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.dlp.v2.model; + +/** + * Request message for CreateContentPolicy. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Sensitive Data Protection (DLP). For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GooglePrivacyDlpV2CreateContentPolicyRequest extends com.google.api.client.json.GenericJson { + + /** + * Required. The content_policy resource. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GooglePrivacyDlpV2ContentPolicy contentPolicy; + + /** + * Optional. The content policy ID can contain uppercase and lowercase letters, numbers, and + * hyphens; that is, it must match the regular expression: `[a-zA-Z\d-_]+`. The maximum length is + * 100 characters. If empty, the system will generate a random id. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String contentPolicyId; + + /** + * Required. The content_policy resource. + * @return value or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy getContentPolicy() { + return contentPolicy; + } + + /** + * Required. The content_policy resource. + * @param contentPolicy contentPolicy or {@code null} for none + */ + public GooglePrivacyDlpV2CreateContentPolicyRequest setContentPolicy(GooglePrivacyDlpV2ContentPolicy contentPolicy) { + this.contentPolicy = contentPolicy; + return this; + } + + /** + * Optional. The content policy ID can contain uppercase and lowercase letters, numbers, and + * hyphens; that is, it must match the regular expression: `[a-zA-Z\d-_]+`. The maximum length is + * 100 characters. If empty, the system will generate a random id. + * @return value or {@code null} for none + */ + public java.lang.String getContentPolicyId() { + return contentPolicyId; + } + + /** + * Optional. The content policy ID can contain uppercase and lowercase letters, numbers, and + * hyphens; that is, it must match the regular expression: `[a-zA-Z\d-_]+`. The maximum length is + * 100 characters. If empty, the system will generate a random id. + * @param contentPolicyId contentPolicyId or {@code null} for none + */ + public GooglePrivacyDlpV2CreateContentPolicyRequest setContentPolicyId(java.lang.String contentPolicyId) { + this.contentPolicyId = contentPolicyId; + return this; + } + + @Override + public GooglePrivacyDlpV2CreateContentPolicyRequest set(String fieldName, Object value) { + return (GooglePrivacyDlpV2CreateContentPolicyRequest) super.set(fieldName, value); + } + + @Override + public GooglePrivacyDlpV2CreateContentPolicyRequest clone() { + return (GooglePrivacyDlpV2CreateContentPolicyRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2InfoTypeCondition.java b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2InfoTypeCondition.java new file mode 100644 index 00000000000..bb9cb817f74 --- /dev/null +++ b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2InfoTypeCondition.java @@ -0,0 +1,91 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.dlp.v2.model; + +/** + * A info type based condition. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Sensitive Data Protection (DLP). For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GooglePrivacyDlpV2InfoTypeCondition extends com.google.api.client.json.GenericJson { + + /** + * match any info types. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GoogleProtobufEmpty anyInfoType; + + /** + * match any of these info types. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GooglePrivacyDlpV2InfoTypes infoTypes; + + /** + * match any info types. + * @return value or {@code null} for none + */ + public GoogleProtobufEmpty getAnyInfoType() { + return anyInfoType; + } + + /** + * match any info types. + * @param anyInfoType anyInfoType or {@code null} for none + */ + public GooglePrivacyDlpV2InfoTypeCondition setAnyInfoType(GoogleProtobufEmpty anyInfoType) { + this.anyInfoType = anyInfoType; + return this; + } + + /** + * match any of these info types. + * @return value or {@code null} for none + */ + public GooglePrivacyDlpV2InfoTypes getInfoTypes() { + return infoTypes; + } + + /** + * match any of these info types. + * @param infoTypes infoTypes or {@code null} for none + */ + public GooglePrivacyDlpV2InfoTypeCondition setInfoTypes(GooglePrivacyDlpV2InfoTypes infoTypes) { + this.infoTypes = infoTypes; + return this; + } + + @Override + public GooglePrivacyDlpV2InfoTypeCondition set(String fieldName, Object value) { + return (GooglePrivacyDlpV2InfoTypeCondition) super.set(fieldName, value); + } + + @Override + public GooglePrivacyDlpV2InfoTypeCondition clone() { + return (GooglePrivacyDlpV2InfoTypeCondition) super.clone(); + } + +} diff --git a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2InfoTypes.java b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2InfoTypes.java new file mode 100644 index 00000000000..11a71e04ba5 --- /dev/null +++ b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2InfoTypes.java @@ -0,0 +1,67 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.dlp.v2.model; + +/** + * Info types to match. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Sensitive Data Protection (DLP). For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GooglePrivacyDlpV2InfoTypes extends com.google.api.client.json.GenericJson { + + /** + * Required. A list of info types to match. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List infoTypeNames; + + /** + * Required. A list of info types to match. + * @return value or {@code null} for none + */ + public java.util.List getInfoTypeNames() { + return infoTypeNames; + } + + /** + * Required. A list of info types to match. + * @param infoTypeNames infoTypeNames or {@code null} for none + */ + public GooglePrivacyDlpV2InfoTypes setInfoTypeNames(java.util.List infoTypeNames) { + this.infoTypeNames = infoTypeNames; + return this; + } + + @Override + public GooglePrivacyDlpV2InfoTypes set(String fieldName, Object value) { + return (GooglePrivacyDlpV2InfoTypes) super.set(fieldName, value); + } + + @Override + public GooglePrivacyDlpV2InfoTypes clone() { + return (GooglePrivacyDlpV2InfoTypes) super.clone(); + } + +} diff --git a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2ListContentPoliciesResponse.java b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2ListContentPoliciesResponse.java new file mode 100644 index 00000000000..75a485458ef --- /dev/null +++ b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2ListContentPoliciesResponse.java @@ -0,0 +1,97 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.dlp.v2.model; + +/** + * Response message for ListContentPolicies. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Sensitive Data Protection (DLP). For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GooglePrivacyDlpV2ListContentPoliciesResponse extends com.google.api.client.json.GenericJson { + + /** + * List of content policies. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List contentPolicies; + + static { + // hack to force ProGuard to consider GooglePrivacyDlpV2ContentPolicy used, since otherwise it would be stripped out + // see https://github.com/google/google-api-java-client/issues/543 + com.google.api.client.util.Data.nullOf(GooglePrivacyDlpV2ContentPolicy.class); + } + + /** + * Token to retrieve the next page of results. An empty value means there are no more results. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String nextPageToken; + + /** + * List of content policies. + * @return value or {@code null} for none + */ + public java.util.List getContentPolicies() { + return contentPolicies; + } + + /** + * List of content policies. + * @param contentPolicies contentPolicies or {@code null} for none + */ + public GooglePrivacyDlpV2ListContentPoliciesResponse setContentPolicies(java.util.List contentPolicies) { + this.contentPolicies = contentPolicies; + return this; + } + + /** + * Token to retrieve the next page of results. An empty value means there are no more results. + * @return value or {@code null} for none + */ + public java.lang.String getNextPageToken() { + return nextPageToken; + } + + /** + * Token to retrieve the next page of results. An empty value means there are no more results. + * @param nextPageToken nextPageToken or {@code null} for none + */ + public GooglePrivacyDlpV2ListContentPoliciesResponse setNextPageToken(java.lang.String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + @Override + public GooglePrivacyDlpV2ListContentPoliciesResponse set(String fieldName, Object value) { + return (GooglePrivacyDlpV2ListContentPoliciesResponse) super.set(fieldName, value); + } + + @Override + public GooglePrivacyDlpV2ListContentPoliciesResponse clone() { + return (GooglePrivacyDlpV2ListContentPoliciesResponse) super.clone(); + } + +} diff --git a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2LogToBigQuery.java b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2LogToBigQuery.java new file mode 100644 index 00000000000..5645b80435e --- /dev/null +++ b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2LogToBigQuery.java @@ -0,0 +1,115 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.dlp.v2.model; + +/** + * Configuration for logging content policy actions to BigQuery. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Sensitive Data Protection (DLP). For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GooglePrivacyDlpV2LogToBigQuery extends com.google.api.client.json.GenericJson { + + /** + * Required. The ID of the dataset containing the BigQuery table to write to. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String datasetId; + + /** + * Required. The ID of the project containing the BigQuery table to write to. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String projectId; + + /** + * Required. The ID of the BigQuery table to write to. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String tableId; + + /** + * Required. The ID of the dataset containing the BigQuery table to write to. + * @return value or {@code null} for none + */ + public java.lang.String getDatasetId() { + return datasetId; + } + + /** + * Required. The ID of the dataset containing the BigQuery table to write to. + * @param datasetId datasetId or {@code null} for none + */ + public GooglePrivacyDlpV2LogToBigQuery setDatasetId(java.lang.String datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Required. The ID of the project containing the BigQuery table to write to. + * @return value or {@code null} for none + */ + public java.lang.String getProjectId() { + return projectId; + } + + /** + * Required. The ID of the project containing the BigQuery table to write to. + * @param projectId projectId or {@code null} for none + */ + public GooglePrivacyDlpV2LogToBigQuery setProjectId(java.lang.String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Required. The ID of the BigQuery table to write to. + * @return value or {@code null} for none + */ + public java.lang.String getTableId() { + return tableId; + } + + /** + * Required. The ID of the BigQuery table to write to. + * @param tableId tableId or {@code null} for none + */ + public GooglePrivacyDlpV2LogToBigQuery setTableId(java.lang.String tableId) { + this.tableId = tableId; + return this; + } + + @Override + public GooglePrivacyDlpV2LogToBigQuery set(String fieldName, Object value) { + return (GooglePrivacyDlpV2LogToBigQuery) super.set(fieldName, value); + } + + @Override + public GooglePrivacyDlpV2LogToBigQuery clone() { + return (GooglePrivacyDlpV2LogToBigQuery) super.clone(); + } + +} diff --git a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2LoggingConfig.java b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2LoggingConfig.java new file mode 100644 index 00000000000..5605a694af6 --- /dev/null +++ b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2LoggingConfig.java @@ -0,0 +1,67 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.dlp.v2.model; + +/** + * A single logging configuration. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Sensitive Data Protection (DLP). For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GooglePrivacyDlpV2LoggingConfig extends com.google.api.client.json.GenericJson { + + /** + * Optional. Log the actions taken to a BigQuery table. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GooglePrivacyDlpV2LogToBigQuery logToBigQuery; + + /** + * Optional. Log the actions taken to a BigQuery table. + * @return value or {@code null} for none + */ + public GooglePrivacyDlpV2LogToBigQuery getLogToBigQuery() { + return logToBigQuery; + } + + /** + * Optional. Log the actions taken to a BigQuery table. + * @param logToBigQuery logToBigQuery or {@code null} for none + */ + public GooglePrivacyDlpV2LoggingConfig setLogToBigQuery(GooglePrivacyDlpV2LogToBigQuery logToBigQuery) { + this.logToBigQuery = logToBigQuery; + return this; + } + + @Override + public GooglePrivacyDlpV2LoggingConfig set(String fieldName, Object value) { + return (GooglePrivacyDlpV2LoggingConfig) super.set(fieldName, value); + } + + @Override + public GooglePrivacyDlpV2LoggingConfig clone() { + return (GooglePrivacyDlpV2LoggingConfig) super.clone(); + } + +} diff --git a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2PolicyAction.java b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2PolicyAction.java new file mode 100644 index 00000000000..8531b305e41 --- /dev/null +++ b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2PolicyAction.java @@ -0,0 +1,67 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.dlp.v2.model; + +/** + * A possible action to take when applying a content policy. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Sensitive Data Protection (DLP). For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GooglePrivacyDlpV2PolicyAction extends com.google.api.client.json.GenericJson { + + /** + * Optional. If set, the verdict will be returned to the user. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String returnVerdict; + + /** + * Optional. If set, the verdict will be returned to the user. + * @return value or {@code null} for none + */ + public java.lang.String getReturnVerdict() { + return returnVerdict; + } + + /** + * Optional. If set, the verdict will be returned to the user. + * @param returnVerdict returnVerdict or {@code null} for none + */ + public GooglePrivacyDlpV2PolicyAction setReturnVerdict(java.lang.String returnVerdict) { + this.returnVerdict = returnVerdict; + return this; + } + + @Override + public GooglePrivacyDlpV2PolicyAction set(String fieldName, Object value) { + return (GooglePrivacyDlpV2PolicyAction) super.set(fieldName, value); + } + + @Override + public GooglePrivacyDlpV2PolicyAction clone() { + return (GooglePrivacyDlpV2PolicyAction) super.clone(); + } + +} diff --git a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2PolicyCondition.java b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2PolicyCondition.java new file mode 100644 index 00000000000..de7db034c48 --- /dev/null +++ b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2PolicyCondition.java @@ -0,0 +1,67 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.dlp.v2.model; + +/** + * A condition that must match for this rule to apply. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Sensitive Data Protection (DLP). For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GooglePrivacyDlpV2PolicyCondition extends com.google.api.client.json.GenericJson { + + /** + * A condition based on info types. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GooglePrivacyDlpV2InfoTypeCondition infoTypeCondition; + + /** + * A condition based on info types. + * @return value or {@code null} for none + */ + public GooglePrivacyDlpV2InfoTypeCondition getInfoTypeCondition() { + return infoTypeCondition; + } + + /** + * A condition based on info types. + * @param infoTypeCondition infoTypeCondition or {@code null} for none + */ + public GooglePrivacyDlpV2PolicyCondition setInfoTypeCondition(GooglePrivacyDlpV2InfoTypeCondition infoTypeCondition) { + this.infoTypeCondition = infoTypeCondition; + return this; + } + + @Override + public GooglePrivacyDlpV2PolicyCondition set(String fieldName, Object value) { + return (GooglePrivacyDlpV2PolicyCondition) super.set(fieldName, value); + } + + @Override + public GooglePrivacyDlpV2PolicyCondition clone() { + return (GooglePrivacyDlpV2PolicyCondition) super.clone(); + } + +} diff --git a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2PolicyRule.java b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2PolicyRule.java new file mode 100644 index 00000000000..433f16aa2af --- /dev/null +++ b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2PolicyRule.java @@ -0,0 +1,124 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.dlp.v2.model; + +/** + * A single policy rule. The first rule to match from the list above controls the result. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Sensitive Data Protection (DLP). For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GooglePrivacyDlpV2PolicyRule extends com.google.api.client.json.GenericJson { + + /** + * Required. Action to take if this rule applies. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GooglePrivacyDlpV2PolicyAction action; + + /** + * Optional. Conditions that must match for this rule to apply. All conditions must match (`AND`). + * For `OR` conditions, use multiple rules. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List conditions; + + static { + // hack to force ProGuard to consider GooglePrivacyDlpV2PolicyCondition used, since otherwise it would be stripped out + // see https://github.com/google/google-api-java-client/issues/543 + com.google.api.client.util.Data.nullOf(GooglePrivacyDlpV2PolicyCondition.class); + } + + /** + * If set, the verdict will be returned to the user. Deprecated: Use `action` instead. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String returnVerdict; + + /** + * Required. Action to take if this rule applies. + * @return value or {@code null} for none + */ + public GooglePrivacyDlpV2PolicyAction getAction() { + return action; + } + + /** + * Required. Action to take if this rule applies. + * @param action action or {@code null} for none + */ + public GooglePrivacyDlpV2PolicyRule setAction(GooglePrivacyDlpV2PolicyAction action) { + this.action = action; + return this; + } + + /** + * Optional. Conditions that must match for this rule to apply. All conditions must match (`AND`). + * For `OR` conditions, use multiple rules. + * @return value or {@code null} for none + */ + public java.util.List getConditions() { + return conditions; + } + + /** + * Optional. Conditions that must match for this rule to apply. All conditions must match (`AND`). + * For `OR` conditions, use multiple rules. + * @param conditions conditions or {@code null} for none + */ + public GooglePrivacyDlpV2PolicyRule setConditions(java.util.List conditions) { + this.conditions = conditions; + return this; + } + + /** + * If set, the verdict will be returned to the user. Deprecated: Use `action` instead. + * @return value or {@code null} for none + */ + public java.lang.String getReturnVerdict() { + return returnVerdict; + } + + /** + * If set, the verdict will be returned to the user. Deprecated: Use `action` instead. + * @param returnVerdict returnVerdict or {@code null} for none + */ + public GooglePrivacyDlpV2PolicyRule setReturnVerdict(java.lang.String returnVerdict) { + this.returnVerdict = returnVerdict; + return this; + } + + @Override + public GooglePrivacyDlpV2PolicyRule set(String fieldName, Object value) { + return (GooglePrivacyDlpV2PolicyRule) super.set(fieldName, value); + } + + @Override + public GooglePrivacyDlpV2PolicyRule clone() { + return (GooglePrivacyDlpV2PolicyRule) super.clone(); + } + +} diff --git a/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2UpdateContentPolicyRequest.java b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2UpdateContentPolicyRequest.java new file mode 100644 index 00000000000..a65e2aae15e --- /dev/null +++ b/clients/google-api-services-dlp/v2/2.0.0/com/google/api/services/dlp/v2/model/GooglePrivacyDlpV2UpdateContentPolicyRequest.java @@ -0,0 +1,91 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.dlp.v2.model; + +/** + * Request message for UpdateContentPolicy. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Sensitive Data Protection (DLP). For a detailed + * explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GooglePrivacyDlpV2UpdateContentPolicyRequest extends com.google.api.client.json.GenericJson { + + /** + * Required. The content_policy with new values for the relevant fields. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GooglePrivacyDlpV2ContentPolicy contentPolicy; + + /** + * Optional. Mask to control which fields get updated. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private String updateMask; + + /** + * Required. The content_policy with new values for the relevant fields. + * @return value or {@code null} for none + */ + public GooglePrivacyDlpV2ContentPolicy getContentPolicy() { + return contentPolicy; + } + + /** + * Required. The content_policy with new values for the relevant fields. + * @param contentPolicy contentPolicy or {@code null} for none + */ + public GooglePrivacyDlpV2UpdateContentPolicyRequest setContentPolicy(GooglePrivacyDlpV2ContentPolicy contentPolicy) { + this.contentPolicy = contentPolicy; + return this; + } + + /** + * Optional. Mask to control which fields get updated. + * @return value or {@code null} for none + */ + public String getUpdateMask() { + return updateMask; + } + + /** + * Optional. Mask to control which fields get updated. + * @param updateMask updateMask or {@code null} for none + */ + public GooglePrivacyDlpV2UpdateContentPolicyRequest setUpdateMask(String updateMask) { + this.updateMask = updateMask; + return this; + } + + @Override + public GooglePrivacyDlpV2UpdateContentPolicyRequest set(String fieldName, Object value) { + return (GooglePrivacyDlpV2UpdateContentPolicyRequest) super.set(fieldName, value); + } + + @Override + public GooglePrivacyDlpV2UpdateContentPolicyRequest clone() { + return (GooglePrivacyDlpV2UpdateContentPolicyRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-dlp/v2/2.0.0/pom.xml b/clients/google-api-services-dlp/v2/2.0.0/pom.xml index 94a3d7d0759..98bbec74a08 100644 --- a/clients/google-api-services-dlp/v2/2.0.0/pom.xml +++ b/clients/google-api-services-dlp/v2/2.0.0/pom.xml @@ -8,8 +8,8 @@ com.google.apis google-api-services-dlp - v2-rev20260530-2.0.0 - Sensitive Data Protection (DLP) v2-rev20260530-2.0.0 + v2-rev20260606-2.0.0 + Sensitive Data Protection (DLP) v2-rev20260606-2.0.0 jar 2011 diff --git a/clients/google-api-services-dlp/v2/README.md b/clients/google-api-services-dlp/v2/README.md index ad09300f40c..93232254470 100644 --- a/clients/google-api-services-dlp/v2/README.md +++ b/clients/google-api-services-dlp/v2/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-dlp - v2-rev20260530-2.0.0 + v2-rev20260606-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-dlp:v2-rev20260530-2.0.0' + implementation 'com.google.apis:google-api-services-dlp:v2-rev20260606-2.0.0' } ```