diff --git a/appengine/v1/appengine-api.json b/appengine/v1/appengine-api.json index a29ed7f9adf..9cc272c0540 100644 --- a/appengine/v1/appengine-api.json +++ b/appengine/v1/appengine-api.json @@ -1610,7 +1610,7 @@ } } }, - "revision": "20231004", + "revision": "20231016", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -3747,6 +3747,7 @@ "properties": { "apiConfig": { "$ref": "ApiConfigHandler", + "deprecated": true, "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/endpoints).Only returned in GET requests if view=FULL is set." }, "appEngineApis": { diff --git a/appengine/v1beta/appengine-api.json b/appengine/v1beta/appengine-api.json index aeb053596d5..7efc4fecd6a 100644 --- a/appengine/v1beta/appengine-api.json +++ b/appengine/v1beta/appengine-api.json @@ -1859,7 +1859,7 @@ } } }, - "revision": "20231004", + "revision": "20231016", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { @@ -4151,6 +4151,7 @@ "properties": { "apiConfig": { "$ref": "ApiConfigHandler", + "deprecated": true, "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/endpoints).Only returned in GET requests if view=FULL is set." }, "appEngineApis": { diff --git a/cloudkms/v1/cloudkms-api.json b/cloudkms/v1/cloudkms-api.json index 9810e080b14..73735d18328 100644 --- a/cloudkms/v1/cloudkms-api.json +++ b/cloudkms/v1/cloudkms-api.json @@ -18,6 +18,13 @@ "description": "Manages keys and performs cryptographic operations in a central cloud service, for direct use by other cloud resources and applications. ", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/kms/", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://cloudkms.me-central2.rep.googleapis.com/", + "location": "me-central2" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -1821,7 +1828,7 @@ } } }, - "revision": "20230808", + "revision": "20231012", "rootUrl": "https://cloudkms.googleapis.com/", "schemas": { "AsymmetricDecryptRequest": { diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index d908dae077a..dcb3d8b7ca9 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -14608,7 +14608,7 @@ ] }, "getDiagnostics": { - "description": "Returns the interconnectDiagnostics for the specified Interconnect.", + "description": "Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.", "flatPath": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics", "httpMethod": "GET", "id": "compute.interconnects.getDiagnostics", @@ -40049,7 +40049,7 @@ } } }, - "revision": "20231003", + "revision": "20231011", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -45529,6 +45529,20 @@ "description": "A set of Confidential Instance options.", "id": "ConfidentialInstanceConfig", "properties": { + "confidentialInstanceType": { + "description": "Defines the type of technology used by the confidential instance.", + "enum": [ + "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED", + "SEV", + "SEV_SNP" + ], + "enumDescriptions": [ + "No type specified. Do not use this value.", + "AMD Secure Encrypted Virtualization.", + "AMD Secure Encrypted Virtualization - Secure Nested Paging." + ], + "type": "string" + }, "enableConfidentialCompute": { "description": "Defines whether the instance should have confidential compute enabled.", "type": "boolean" @@ -54295,6 +54309,11 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "resizeBy": { + "description": "The number of instances to be created by this resize request. The group's target size will be increased by this number.", + "format": "int32", + "type": "integer" + }, "selfLink": { "description": "[Output Only] The URL for this resize request. The server defines this URL.", "type": "string" diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index 2319e42e59f..d507d5986c7 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -9311,12 +9311,23 @@ func (s *Condition) MarshalJSON() ([]byte, error) { // ConfidentialInstanceConfig: A set of Confidential Instance options. type ConfidentialInstanceConfig struct { + // ConfidentialInstanceType: Defines the type of technology used by the + // confidential instance. + // + // Possible values: + // "CONFIDENTIAL_INSTANCE_TYPE_UNSPECIFIED" - No type specified. Do + // not use this value. + // "SEV" - AMD Secure Encrypted Virtualization. + // "SEV_SNP" - AMD Secure Encrypted Virtualization - Secure Nested + // Paging. + ConfidentialInstanceType string `json:"confidentialInstanceType,omitempty"` + // EnableConfidentialCompute: Defines whether the instance should have // confidential compute enabled. EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"` // ForceSendFields is a list of field names (e.g. - // "EnableConfidentialCompute") to unconditionally include in API + // "ConfidentialInstanceType") to unconditionally include in API // requests. By default, fields with empty or default values are omitted // from API requests. However, any non-pointer, non-interface field // appearing in ForceSendFields will be sent to the server regardless of @@ -9324,13 +9335,13 @@ type ConfidentialInstanceConfig struct { // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "EnableConfidentialCompute") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "ConfidentialInstanceType") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -21989,6 +22000,10 @@ type InstanceGroupManagerResizeRequest struct { // characters long, and comply with RFC1035. Name string `json:"name,omitempty"` + // ResizeBy: The number of instances to be created by this resize + // request. The group's target size will be increased by this number. + ResizeBy int64 `json:"resizeBy,omitempty"` + // SelfLink: [Output Only] The URL for this resize request. The server // defines this URL. SelfLink string `json:"selfLink,omitempty"` @@ -128843,7 +128858,11 @@ type InterconnectsGetDiagnosticsCall struct { } // GetDiagnostics: Returns the interconnectDiagnostics for the specified -// Interconnect. +// Interconnect. In the event of a global outage, do not use this API to +// make decisions about where to redirect your network traffic. Unlike a +// VLAN attachment, which is regional, a Cloud Interconnect connection +// is a global resource. A global outage can prevent this API from +// functioning properly. // // - interconnect: Name of the interconnect resource to query. // - project: Project ID for this request. @@ -128955,7 +128974,7 @@ func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*Int } return ret, nil // { - // "description": "Returns the interconnectDiagnostics for the specified Interconnect.", + // "description": "Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.", // "flatPath": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics", // "httpMethod": "GET", // "id": "compute.interconnects.getDiagnostics", diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index d95fd9874be..198e2145190 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -1184,6 +1184,47 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "flatPath": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", + "httpMethod": "GET", + "id": "compute.backendBuckets.getIamPolicy", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { "description": "Creates a BackendBucket resource in the specified project using the data included in the request.", "flatPath": "projects/{project}/global/backendBuckets", @@ -1356,6 +1397,81 @@ "https://www.googleapis.com/auth/compute" ] }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "flatPath": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", + "httpMethod": "POST", + "id": "compute.backendBuckets.setIamPolicy", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", + "request": { + "$ref": "GlobalSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "flatPath": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", + "httpMethod": "POST", + "id": "compute.backendBuckets.testIamPermissions", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "update": { "description": "Updates the specified BackendBucket resource with the data included in the request.", "flatPath": "projects/{project}/global/backendBuckets/{backendBucket}", @@ -2010,6 +2126,44 @@ "https://www.googleapis.com/auth/compute" ] }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "flatPath": "projects/{project}/global/backendServices/{resource}/testIamPermissions", + "httpMethod": "POST", + "id": "compute.backendServices.testIamPermissions", + "parameterOrder": [ + "project", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/backendServices/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "update": { "description": "Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.", "flatPath": "projects/{project}/global/backendServices/{backendService}", @@ -12292,7 +12446,7 @@ ] }, "getDiagnostics": { - "description": "Returns the interconnectDiagnostics for the specified Interconnect.", + "description": "Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.", "flatPath": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics", "httpMethod": "GET", "id": "compute.interconnects.getDiagnostics", @@ -19192,6 +19346,52 @@ "https://www.googleapis.com/auth/compute" ] }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "flatPath": "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions", + "httpMethod": "POST", + "id": "compute.regionBackendServices.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "update": { "description": "Updates the specified regional BackendService resource with the data included in the request. For more information, see Backend services overview .", "flatPath": "projects/{project}/regions/{region}/backendServices/{backendService}", @@ -34830,7 +35030,7 @@ } } }, - "revision": "20231003", + "revision": "20231011", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index cb3c038b027..bcdeaf221b9 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -66925,6 +66925,180 @@ func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket } +// method id "compute.backendBuckets.getIamPolicy": + +type BackendBucketsGetIamPolicyCall struct { + s *Service + project string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +func (r *BackendBucketsService) GetIamPolicy(project string, resource string) *BackendBucketsGetIamPolicyCall { + c := &BackendBucketsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *BackendBucketsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *BackendBucketsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendBucketsGetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *BackendBucketsGetIamPolicyCall) IfNoneMatch(entityTag string) *BackendBucketsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BackendBucketsGetIamPolicyCall) Context(ctx context.Context) *BackendBucketsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BackendBucketsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BackendBucketsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.backendBuckets.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BackendBucketsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "flatPath": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", + // "httpMethod": "GET", + // "id": "compute.backendBuckets.getIamPolicy", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "optionsRequestedPolicyVersion": { + // "description": "Requested IAM Policy version.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/backendBuckets/{resource}/getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.backendBuckets.insert": type BackendBucketsInsertCall struct { @@ -67725,6 +67899,319 @@ func (c *BackendBucketsSetEdgeSecurityPolicyCall) Do(opts ...googleapi.CallOptio } +// method id "compute.backendBuckets.setIamPolicy": + +type BackendBucketsSetIamPolicyCall struct { + s *Service + project string + resource string + globalsetpolicyrequest *GlobalSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +func (r *BackendBucketsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *BackendBucketsSetIamPolicyCall { + c := &BackendBucketsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.globalsetpolicyrequest = globalsetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendBucketsSetIamPolicyCall) Fields(s ...googleapi.Field) *BackendBucketsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BackendBucketsSetIamPolicyCall) Context(ctx context.Context) *BackendBucketsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BackendBucketsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BackendBucketsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.backendBuckets.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *BackendBucketsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "flatPath": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", + // "httpMethod": "POST", + // "id": "compute.backendBuckets.setIamPolicy", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/backendBuckets/{resource}/setIamPolicy", + // "request": { + // "$ref": "GlobalSetPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.backendBuckets.testIamPermissions": + +type BackendBucketsTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +func (r *BackendBucketsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendBucketsTestIamPermissionsCall { + c := &BackendBucketsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendBucketsTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendBucketsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BackendBucketsTestIamPermissionsCall) Context(ctx context.Context) *BackendBucketsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BackendBucketsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BackendBucketsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendBuckets/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.backendBuckets.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *BackendBucketsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.backendBuckets.testIamPermissions", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/backendBuckets/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.backendBuckets.update": type BackendBucketsUpdateCall struct { @@ -70640,6 +71127,163 @@ func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) } +// method id "compute.backendServices.testIamPermissions": + +type BackendServicesTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall { + c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendServicesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *BackendServicesTestIamPermissionsCall) Context(ctx context.Context) *BackendServicesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *BackendServicesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.backendServices.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/global/backendServices/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.backendServices.testIamPermissions", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/global/backendServices/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.backendServices.update": type BackendServicesUpdateCall struct { @@ -114111,7 +114755,11 @@ type InterconnectsGetDiagnosticsCall struct { } // GetDiagnostics: Returns the interconnectDiagnostics for the specified -// Interconnect. +// Interconnect. In the event of a global outage, do not use this API to +// make decisions about where to redirect your network traffic. Unlike a +// VLAN attachment, which is regional, a Cloud Interconnect connection +// is a global resource. A global outage can prevent this API from +// functioning properly. // // - interconnect: Name of the interconnect resource to query. // - project: Project ID for this request. @@ -114223,7 +114871,7 @@ func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*Int } return ret, nil // { - // "description": "Returns the interconnectDiagnostics for the specified Interconnect.", + // "description": "Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.", // "flatPath": "projects/{project}/global/interconnects/{interconnect}/getDiagnostics", // "httpMethod": "GET", // "id": "compute.interconnects.getDiagnostics", @@ -143439,6 +144087,175 @@ func (c *RegionBackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOp } +// method id "compute.regionBackendServices.testIamPermissions": + +type RegionBackendServicesTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { + c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "flatPath": "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions", + // "httpMethod": "POST", + // "id": "compute.regionBackendServices.testIamPermissions", + // "parameterOrder": [ + // "project", + // "region", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name or id of the resource for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.regionBackendServices.update": type RegionBackendServicesUpdateCall struct { diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 86fa8f51e03..0ccc7ad48ca 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -6488,7 +6488,7 @@ } } }, - "revision": "20231011", + "revision": "20231017", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -6523,6 +6523,10 @@ }, "type": "array" }, + "businessIdentity": { + "$ref": "AccountBusinessIdentity", + "description": "The business identity attributes can be used to self-declare attributes that let customers know more about your business." + }, "businessInformation": { "$ref": "AccountBusinessInformation", "description": "The business information of the account." @@ -6646,6 +6650,37 @@ }, "type": "object" }, + "AccountBusinessIdentity": { + "description": "The [business identity attributes](https://support.google.com/merchants/answer/10342414) can be used to self-declare attributes that let customers know more about your business. NEXT ID: 7.", + "id": "AccountBusinessIdentity", + "properties": { + "blackOwned": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as being black-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." + }, + "includeForPromotions": { + "description": "Required. By setting this field, your business may be included in promotions for all the selected attributes. If you clear this option, it won't affect your identification with any of the attributes. For this field to be set, the merchant must self identify with at least one of the `AccountIdentityType`. If none are included, the request will be considered invalid.", + "type": "boolean" + }, + "latinoOwned": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as being latino-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." + }, + "smallBusiness": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as a small business. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." + }, + "veteranOwned": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as being veteran-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." + }, + "womenOwned": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as being women-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." + } + }, + "type": "object" + }, "AccountBusinessInformation": { "id": "AccountBusinessInformation", "properties": { @@ -6770,6 +6805,12 @@ }, "type": "object" }, + "AccountIdentityType": { + "description": "The account identity type used to specify attributes.", + "id": "AccountIdentityType", + "properties": {}, + "type": "object" + }, "AccountImageImprovements": { "description": "This improvement will attempt to automatically correct submitted images if they don't meet the [image requirements](https://support.google.com/merchants/answer/6324350), for example, removing overlays. If successful, the image will be replaced and approved. This improvement is only applied to images of disapproved offers. For more information see: [Automatic image improvements](https://support.google.com/merchants/answer/9242973)", "id": "AccountImageImprovements", @@ -10672,7 +10713,7 @@ "id": "LocalInventory", "properties": { "availability": { - "description": "Availability of the product. For accepted attribute values, see the local product inventory feed specification.", + "description": "The availability of the product. For accepted attribute values, see the local product inventory feed specification.", "type": "string" }, "customAttributes": { @@ -10683,7 +10724,7 @@ "type": "array" }, "instoreProductLocation": { - "description": "In-store product location.", + "description": "The in-store product location.", "type": "string" }, "kind": { @@ -10691,32 +10732,32 @@ "type": "string" }, "pickupMethod": { - "description": "Supported pickup method for this offer. Unless the value is \"not supported\", this field must be submitted together with `pickupSla`. For accepted attribute values, see the local product inventory feed specification.", + "description": "The supported pickup method for this offer. Unless the value is \"not supported\", this field must be submitted together with `pickupSla`. For accepted attribute values, see the local product inventory feed specification.", "type": "string" }, "pickupSla": { - "description": "Expected date that an order will be ready for pickup relative to the order date. Must be submitted together with `pickupMethod`. For accepted attribute values, see the local product inventory feed specification.", + "description": "The expected date that an order will be ready for pickup relative to the order date. Must be submitted together with `pickupMethod`. For accepted attribute values, see the local product inventory feed specification.", "type": "string" }, "price": { "$ref": "Price", - "description": "Price of the product." + "description": "The price of the product." }, "quantity": { - "description": "Quantity of the product. Must be nonnegative.", + "description": "The quantity of the product. Must be nonnegative.", "format": "uint32", "type": "integer" }, "salePrice": { "$ref": "Price", - "description": "Sale price of the product. Mandatory if `sale_price_effective_date` is defined." + "description": "The sale price of the product. Mandatory if `sale_price_effective_date` is defined." }, "salePriceEffectiveDate": { "description": "A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates may be specified as 'null' if undecided.", "type": "string" }, "storeCode": { - "description": "Required. Store code of this local inventory resource.", + "description": "Required. The store code of this local inventory resource.", "type": "string" } }, diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 93560219727..4f6aaa11642 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -714,6 +714,11 @@ type Account struct { // to the account by CSS Center. AutomaticLabelIds googleapi.Uint64s `json:"automaticLabelIds,omitempty"` + // BusinessIdentity: The business identity attributes can be used to + // self-declare attributes that let customers know more about your + // business. + BusinessIdentity *AccountBusinessIdentity `json:"businessIdentity,omitempty"` + // BusinessInformation: The business information of the account. BusinessInformation *AccountBusinessInformation `json:"businessInformation,omitempty"` @@ -933,6 +938,72 @@ func (s *AccountAutomaticImprovements) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AccountBusinessIdentity: The business identity attributes +// (https://support.google.com/merchants/answer/10342414) can be used to +// self-declare attributes that let customers know more about your +// business. NEXT ID: 7. +type AccountBusinessIdentity struct { + // BlackOwned: Specifies whether the business identifies itself as being + // black-owned. This optional field is only available for merchants with + // a business country set to "US". This field is not allowed for + // marketplaces or marketplace sellers. + BlackOwned *AccountIdentityType `json:"blackOwned,omitempty"` + + // IncludeForPromotions: Required. By setting this field, your business + // may be included in promotions for all the selected attributes. If you + // clear this option, it won't affect your identification with any of + // the attributes. For this field to be set, the merchant must self + // identify with at least one of the `AccountIdentityType`. If none are + // included, the request will be considered invalid. + IncludeForPromotions bool `json:"includeForPromotions,omitempty"` + + // LatinoOwned: Specifies whether the business identifies itself as + // being latino-owned. This optional field is only available for + // merchants with a business country set to "US". This field is not + // allowed for marketplaces or marketplace sellers. + LatinoOwned *AccountIdentityType `json:"latinoOwned,omitempty"` + + // SmallBusiness: Specifies whether the business identifies itself as a + // small business. This optional field is only available for merchants + // with a business country set to "US". This field is not allowed for + // marketplaces or marketplace sellers. + SmallBusiness *AccountIdentityType `json:"smallBusiness,omitempty"` + + // VeteranOwned: Specifies whether the business identifies itself as + // being veteran-owned. This optional field is only available for + // merchants with a business country set to "US". This field is not + // allowed for marketplaces or marketplace sellers. + VeteranOwned *AccountIdentityType `json:"veteranOwned,omitempty"` + + // WomenOwned: Specifies whether the business identifies itself as being + // women-owned. This optional field is only available for merchants with + // a business country set to "US". This field is not allowed for + // marketplaces or marketplace sellers. + WomenOwned *AccountIdentityType `json:"womenOwned,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BlackOwned") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BlackOwned") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AccountBusinessIdentity) MarshalJSON() ([]byte, error) { + type NoMethod AccountBusinessIdentity + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type AccountBusinessInformation struct { // Address: The address of the business. Use `\n` to add a second // address line. @@ -1170,6 +1241,11 @@ func (s *AccountIdentifier) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AccountIdentityType: The account identity type used to specify +// attributes. +type AccountIdentityType struct { +} + // AccountImageImprovements: This improvement will attempt to // automatically correct submitted images if they don't meet the image // requirements (https://support.google.com/merchants/answer/6324350), @@ -7851,7 +7927,7 @@ func (s *ListReturnPolicyOnlineResponse) MarshalJSON() ([]byte, error) { // LocalInventory: Local inventory resource. For accepted attribute // values, see the local product inventory feed specification. type LocalInventory struct { - // Availability: Availability of the product. For accepted attribute + // Availability: The availability of the product. For accepted attribute // values, see the local product inventory feed specification. Availability string `json:"availability,omitempty"` @@ -7861,32 +7937,32 @@ type LocalInventory struct { // "regular" }`. CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` - // InstoreProductLocation: In-store product location. + // InstoreProductLocation: The in-store product location. InstoreProductLocation string `json:"instoreProductLocation,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "content#localInventory" Kind string `json:"kind,omitempty"` - // PickupMethod: Supported pickup method for this offer. Unless the + // PickupMethod: The supported pickup method for this offer. Unless the // value is "not supported", this field must be submitted together with // `pickupSla`. For accepted attribute values, see the local product // inventory feed specification. PickupMethod string `json:"pickupMethod,omitempty"` - // PickupSla: Expected date that an order will be ready for pickup + // PickupSla: The expected date that an order will be ready for pickup // relative to the order date. Must be submitted together with // `pickupMethod`. For accepted attribute values, see the local product // inventory feed specification. PickupSla string `json:"pickupSla,omitempty"` - // Price: Price of the product. + // Price: The price of the product. Price *Price `json:"price,omitempty"` - // Quantity: Quantity of the product. Must be nonnegative. + // Quantity: The quantity of the product. Must be nonnegative. Quantity int64 `json:"quantity,omitempty"` - // SalePrice: Sale price of the product. Mandatory if + // SalePrice: The sale price of the product. Mandatory if // `sale_price_effective_date` is defined. SalePrice *Price `json:"salePrice,omitempty"` @@ -7895,7 +7971,7 @@ type LocalInventory struct { // specified as 'null' if undecided. SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` - // StoreCode: Required. Store code of this local inventory resource. + // StoreCode: Required. The store code of this local inventory resource. StoreCode string `json:"storeCode,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index f870e4c2710..e0edcf4c658 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -665,6 +665,157 @@ } } }, + "discoveryConfigs": { + "methods": { + "create": { + "description": "Creates a config for Discovery to scan and profile storage.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs", + "httpMethod": "POST", + "id": "dlp.organizations.locations.discoveryConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent resource name. The format of this value is as follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/discoveryConfigs", + "request": { + "$ref": "GooglePrivacyDlpV2CreateDiscoveryConfigRequest" + }, + "response": { + "$ref": "GooglePrivacyDlpV2DiscoveryConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Discovery configuration.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", + "httpMethod": "DELETE", + "id": "dlp.organizations.locations.discoveryConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the project and the config, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Discovery configuration.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", + "httpMethod": "GET", + "id": "dlp.organizations.locations.discoveryConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the project and the configuration, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GooglePrivacyDlpV2DiscoveryConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Discovery configurations.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs", + "httpMethod": "GET", + "id": "dlp.organizations.locations.discoveryConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "orderBy": { + "description": "Comma separated list of config fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. - `name`: corresponds to the DiscoveryConfig's name. - `status`: corresponds to DiscoveryConfig's status.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Size of the page, can be limited by a server.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token to continue retrieval. Comes from previous call to ListDiscoveryConfigs. `order_by` field must not change for subsequent calls.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name. The format of this value is as follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/discoveryConfigs", + "response": { + "$ref": "GooglePrivacyDlpV2ListDiscoveryConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Discovery configuration.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", + "httpMethod": "PATCH", + "id": "dlp.organizations.locations.discoveryConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the project and the configuration, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GooglePrivacyDlpV2UpdateDiscoveryConfigRequest" + }, + "response": { + "$ref": "GooglePrivacyDlpV2DiscoveryConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "dlpJobs": { "methods": { "list": { @@ -2443,6 +2594,157 @@ } } }, + "discoveryConfigs": { + "methods": { + "create": { + "description": "Creates a config for Discovery to scan and profile storage.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs", + "httpMethod": "POST", + "id": "dlp.projects.locations.discoveryConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Parent resource name. The format of this value is as follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/discoveryConfigs", + "request": { + "$ref": "GooglePrivacyDlpV2CreateDiscoveryConfigRequest" + }, + "response": { + "$ref": "GooglePrivacyDlpV2DiscoveryConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Discovery configuration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", + "httpMethod": "DELETE", + "id": "dlp.projects.locations.discoveryConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the project and the config, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Discovery configuration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", + "httpMethod": "GET", + "id": "dlp.projects.locations.discoveryConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the project and the configuration, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GooglePrivacyDlpV2DiscoveryConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Discovery configurations.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs", + "httpMethod": "GET", + "id": "dlp.projects.locations.discoveryConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "orderBy": { + "description": "Comma separated list of config fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. - `name`: corresponds to the DiscoveryConfig's name. - `status`: corresponds to DiscoveryConfig's status.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Size of the page, can be limited by a server.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token to continue retrieval. Comes from previous call to ListDiscoveryConfigs. `order_by` field must not change for subsequent calls.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource name. The format of this value is as follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/discoveryConfigs", + "response": { + "$ref": "GooglePrivacyDlpV2ListDiscoveryConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Discovery configuration.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", + "httpMethod": "PATCH", + "id": "dlp.projects.locations.discoveryConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the project and the configuration, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GooglePrivacyDlpV2UpdateDiscoveryConfigRequest" + }, + "response": { + "$ref": "GooglePrivacyDlpV2DiscoveryConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "dlpJobs": { "methods": { "cancel": { @@ -3412,7 +3714,7 @@ } } }, - "revision": "20231008", + "revision": "20231015", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -3473,6 +3775,12 @@ "properties": {}, "type": "object" }, + "GooglePrivacyDlpV2AllOtherBigQueryTables": { + "description": "Catch-all for all other tables not specified by other filters. Should always be last, except for single-table configurations, which will only have a TableReference target.", + "id": "GooglePrivacyDlpV2AllOtherBigQueryTables", + "properties": {}, + "type": "object" + }, "GooglePrivacyDlpV2AllText": { "description": "Apply to all text.", "id": "GooglePrivacyDlpV2AllText", @@ -3544,6 +3852,29 @@ }, "type": "object" }, + "GooglePrivacyDlpV2BigQueryDiscoveryTarget": { + "description": "Target used to match against for Discovery with BigQuery tables", + "id": "GooglePrivacyDlpV2BigQueryDiscoveryTarget", + "properties": { + "cadence": { + "$ref": "GooglePrivacyDlpV2DiscoveryGenerationCadence", + "description": "How often and when to update profiles. New tables that match both the filter and conditions are scanned as quickly as possible depending on system capacity." + }, + "conditions": { + "$ref": "GooglePrivacyDlpV2DiscoveryBigQueryConditions", + "description": "In addition to matching the filter, these conditions must be true before a profile is generated." + }, + "disabled": { + "$ref": "GooglePrivacyDlpV2Disabled", + "description": "Tables that match this filter will not have profiles created." + }, + "filter": { + "$ref": "GooglePrivacyDlpV2DiscoveryBigQueryFilter", + "description": "Required. The tables the Discovery cadence applies to. The first target with a matching filter will be the one to apply to a table." + } + }, + "type": "object" + }, "GooglePrivacyDlpV2BigQueryField": { "description": "Message defining a field of a BigQuery table.", "id": "GooglePrivacyDlpV2BigQueryField", @@ -3630,6 +3961,39 @@ }, "type": "object" }, + "GooglePrivacyDlpV2BigQueryRegex": { + "description": "A pattern to match against one or more tables, datasets, or projects that contain BigQuery tables. At least one pattern must be specified. Regular expressions use RE2 [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found under the google/re2 repository on GitHub.", + "id": "GooglePrivacyDlpV2BigQueryRegex", + "properties": { + "datasetIdRegex": { + "description": "If unset, this property matches all datasets.", + "type": "string" + }, + "projectIdRegex": { + "description": "For organizations, if unset, will match all projects. Has no effect for data profile configurations created within a project.", + "type": "string" + }, + "tableIdRegex": { + "description": "If unset, this property matches all tables.", + "type": "string" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2BigQueryRegexes": { + "description": "A collection of regular expressions to determine what tables to match against.", + "id": "GooglePrivacyDlpV2BigQueryRegexes", + "properties": { + "patterns": { + "description": "A single BigQuery regular expression pattern to match against one or more tables, datasets, or projects that contain BigQuery tables.", + "items": { + "$ref": "GooglePrivacyDlpV2BigQueryRegex" + }, + "type": "array" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2BigQueryTable": { "description": "Message defining the location of a BigQuery table. A table is uniquely identified by its project_id, dataset_id, and table_name. Within a query a table is often referenced with a string in the format of: `:.` or `..`.", "id": "GooglePrivacyDlpV2BigQueryTable", @@ -3649,6 +4013,41 @@ }, "type": "object" }, + "GooglePrivacyDlpV2BigQueryTableCollection": { + "description": "Specifies a collection of BigQuery tables. Used for Discovery.", + "id": "GooglePrivacyDlpV2BigQueryTableCollection", + "properties": { + "includeRegexes": { + "$ref": "GooglePrivacyDlpV2BigQueryRegexes", + "description": "A collection of regular expressions to match a BigQuery table against." + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2BigQueryTableTypes": { + "description": "The types of bigquery tables supported by Cloud DLP.", + "id": "GooglePrivacyDlpV2BigQueryTableTypes", + "properties": { + "types": { + "description": "A set of bigquery table types.", + "items": { + "enum": [ + "BIG_QUERY_TABLE_TYPE_UNSPECIFIED", + "BIG_QUERY_TABLE_TYPE_TABLE", + "BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE" + ], + "enumDescriptions": [ + "Unused.", + "A normal BigQuery table.", + "A table that references data stored in Cloud Storage." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2BoundingBox": { "description": "Bounding box encompassing detected text within an image.", "id": "GooglePrivacyDlpV2BoundingBox", @@ -4353,6 +4752,21 @@ }, "type": "object" }, + "GooglePrivacyDlpV2CreateDiscoveryConfigRequest": { + "description": "Request message for CreateDiscoveryConfig.", + "id": "GooglePrivacyDlpV2CreateDiscoveryConfigRequest", + "properties": { + "configId": { + "description": "The config 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. Can be empty to allow the system to generate one.", + "type": "string" + }, + "discoveryConfig": { + "$ref": "GooglePrivacyDlpV2DiscoveryConfig", + "description": "Required. The DiscoveryConfig to create." + } + }, + "type": "object" + }, "GooglePrivacyDlpV2CreateDlpJobRequest": { "description": "Request message for CreateDlpJobRequest. Used to initiate long running jobs such as calculating risk metrics or inspecting Google Cloud Storage.", "id": "GooglePrivacyDlpV2CreateDlpJobRequest", @@ -5158,6 +5572,262 @@ }, "type": "object" }, + "GooglePrivacyDlpV2Disabled": { + "description": "Do nothing.", + "id": "GooglePrivacyDlpV2Disabled", + "properties": {}, + "type": "object" + }, + "GooglePrivacyDlpV2DiscoveryBigQueryConditions": { + "description": "Requirements that must be true before a table is scanned in Discovery for the first time. There is an AND relationship between the top-level attributes.", + "id": "GooglePrivacyDlpV2DiscoveryBigQueryConditions", + "properties": { + "createdAfter": { + "description": "BigQuery table must have been created after this date. Used to avoid backfilling.", + "format": "google-datetime", + "type": "string" + }, + "orConditions": { + "$ref": "GooglePrivacyDlpV2OrConditions", + "description": "At least one of the conditions must be true for a table to be scanned." + }, + "typeCollection": { + "description": "Restrict Discovery to categories of table types.", + "enum": [ + "BIG_QUERY_COLLECTION_UNSPECIFIED", + "BIG_QUERY_COLLECTION_ALL_TYPES", + "BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES" + ], + "enumDescriptions": [ + "Unused.", + "Automatically generate profiles for all tables, even if the table type is not yet fully supported for analysis. These unsupported profiles will be generated with errors to indicate their partial support. When support is added, they will automatically be profiled during the next scheduled run.", + "Only those types fully supported will be profiled. Will expand automatically as new support is added. Unsupported table types will not have a profile generated." + ], + "type": "string" + }, + "types": { + "$ref": "GooglePrivacyDlpV2BigQueryTableTypes", + "description": "Restrict Discovery to specific table types." + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2DiscoveryBigQueryFilter": { + "description": "Determines what tables will have profiles generated within an organization or project. Includes the ability to filter by regular expression patterns on project ID, dataset ID, and table ID. Also lets you set minimum conditions that must be met before Cloud DLP scans a table (like a minimum row count or a minimum table age).", + "id": "GooglePrivacyDlpV2DiscoveryBigQueryFilter", + "properties": { + "otherTables": { + "$ref": "GooglePrivacyDlpV2AllOtherBigQueryTables", + "description": "Catch-all. This should always be the last filter in the list because anything above it will apply first. Should only appear once in a configuration. If none is specified, a default one will be added automatically." + }, + "tables": { + "$ref": "GooglePrivacyDlpV2BigQueryTableCollection", + "description": "A specific set of tables for this filter to apply to. A table collection must be specified in only one filter per config. If a table id or dataset is empty, Cloud DLP assumes all tables in that collection must be profiled. Must specify a project ID." + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2DiscoveryConfig": { + "description": "Configuration for Discovery to scan resources for profile generation. Only one Discovery configuration may exist per organization, folder, or project. The generated data profiles are retained according to the [data retention policy] (https://cloud.google.com/dlp/docs/data-profiles#retention).", + "id": "GooglePrivacyDlpV2DiscoveryConfig", + "properties": { + "actions": { + "description": "Actions to execute at the completion of scanning.", + "items": { + "$ref": "GooglePrivacyDlpV2DataProfileAction" + }, + "type": "array" + }, + "createTime": { + "description": "Output only. The creation timestamp of a DiscoveryConfig.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Display name (max 100 chars)", + "type": "string" + }, + "errors": { + "description": "Output only. A stream of errors encountered when the config was activated. Repeated errors may result in the config automatically being paused. Output only field. Will return the last 100 errors. Whenever the config is modified this list will be cleared.", + "items": { + "$ref": "GooglePrivacyDlpV2Error" + }, + "readOnly": true, + "type": "array" + }, + "inspectTemplates": { + "description": "Detection logic for profile generation. Not all template features are used by Discovery. FindingLimits, include_quote and exclude_info_types have no impact on Discovery. Multiple templates may be provided if there is data in multiple regions. At most one template must be specified per-region (including \"global\"). Each region is scanned using the applicable template. If no region-specific template is specified, but a \"global\" template is specified, it will be copied to that region and used instead. If no global or region-specific template is provided for a region with data, that region's data will not be scanned. For more information, see https://cloud.google.com/dlp/docs/data-profiles#data_residency.", + "items": { + "type": "string" + }, + "type": "array" + }, + "lastRunTime": { + "description": "Output only. The timestamp of the last time this config was executed.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Unique resource name for the DiscoveryConfig, assigned by the service when the DiscoveryConfig is created, for example `projects/dlp-test-project/locations/global/discoveryConfigs/53234423`.", + "type": "string" + }, + "orgConfig": { + "$ref": "GooglePrivacyDlpV2OrgConfig", + "description": "Only set when the parent is an org." + }, + "status": { + "description": "Required. A status for this configuration.", + "enum": [ + "STATUS_UNSPECIFIED", + "RUNNING", + "PAUSED" + ], + "enumDescriptions": [ + "Unused", + "The Discovery config is currently active.", + "The Discovery config is paused temporarily." + ], + "type": "string" + }, + "targets": { + "description": "Target to match against for determining what to scan and how frequently.", + "items": { + "$ref": "GooglePrivacyDlpV2DiscoveryTarget" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. The last update timestamp of a DiscoveryConfig.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2DiscoveryGenerationCadence": { + "description": "What must take place for a profile to be updated and how frequently it should occur. New tables are scanned as quickly as possible depending on system capacity.", + "id": "GooglePrivacyDlpV2DiscoveryGenerationCadence", + "properties": { + "schemaModifiedCadence": { + "$ref": "GooglePrivacyDlpV2DiscoverySchemaModifiedCadence", + "description": "Governs when to update data profiles when a schema is modified." + }, + "tableModifiedCadence": { + "$ref": "GooglePrivacyDlpV2DiscoveryTableModifiedCadence", + "description": "Governs when to update data profiles when a table is modified." + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2DiscoverySchemaModifiedCadence": { + "description": "The cadence at which to update data profiles when a schema is modified.", + "id": "GooglePrivacyDlpV2DiscoverySchemaModifiedCadence", + "properties": { + "frequency": { + "description": "How frequently profiles may be updated when schemas are modified. Defaults to monthly.", + "enum": [ + "UPDATE_FREQUENCY_UNSPECIFIED", + "UPDATE_FREQUENCY_NEVER", + "UPDATE_FREQUENCY_DAILY", + "UPDATE_FREQUENCY_MONTHLY" + ], + "enumDescriptions": [ + "Unspecified.", + "After the data profile is created, it will never be updated.", + "The data profile can be updated up to once every 24 hours.", + "The data profile can be updated up to once every 30 days. Default." + ], + "type": "string" + }, + "types": { + "description": "The type of events to consider when deciding if the table's schema has been modified and should have the profile updated. Defaults to NEW_COLUMNS.", + "items": { + "enum": [ + "SCHEMA_MODIFICATION_UNSPECIFIED", + "SCHEMA_NEW_COLUMNS", + "SCHEMA_REMOVED_COLUMNS" + ], + "enumDescriptions": [ + "Unused", + "Profiles should be regenerated when new columns are added to the table. Default.", + "Profiles should be regenerated when columns are removed from the table." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2DiscoveryStartingLocation": { + "description": "The location to begin a Discovery scan. Denotes an organization ID or folder ID within an organization.", + "id": "GooglePrivacyDlpV2DiscoveryStartingLocation", + "properties": { + "folderId": { + "description": "The ID of the Folder within an organization to scan.", + "format": "int64", + "type": "string" + }, + "organizationId": { + "description": "The ID of an organization to scan.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2DiscoveryTableModifiedCadence": { + "description": "The cadence at which to update data profiles when a table is modified.", + "id": "GooglePrivacyDlpV2DiscoveryTableModifiedCadence", + "properties": { + "frequency": { + "description": "How frequently data profiles can be updated when tables are modified. Defaults to never.", + "enum": [ + "UPDATE_FREQUENCY_UNSPECIFIED", + "UPDATE_FREQUENCY_NEVER", + "UPDATE_FREQUENCY_DAILY", + "UPDATE_FREQUENCY_MONTHLY" + ], + "enumDescriptions": [ + "Unspecified.", + "After the data profile is created, it will never be updated.", + "The data profile can be updated up to once every 24 hours.", + "The data profile can be updated up to once every 30 days. Default." + ], + "type": "string" + }, + "types": { + "description": "The type of events to consider when deciding if the table has been modified and should have the profile updated. Defaults to MODIFIED_TIMESTAMP.", + "items": { + "enum": [ + "TABLE_MODIFICATION_UNSPECIFIED", + "TABLE_MODIFIED_TIMESTAMP" + ], + "enumDescriptions": [ + "Unused.", + "A table will be considered modified when the last_modified_time from BigQuery has been updated." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2DiscoveryTarget": { + "description": "Target used to match against for Discovery.", + "id": "GooglePrivacyDlpV2DiscoveryTarget", + "properties": { + "bigQueryTarget": { + "$ref": "GooglePrivacyDlpV2BigQueryDiscoveryTarget", + "description": "BigQuery target for Discovery. The first target to match a table will be the one applied." + } + }, + "type": "object" + }, "GooglePrivacyDlpV2DlpJob": { "description": "Combines all of the information about a DLP job.", "id": "GooglePrivacyDlpV2DlpJob", @@ -6852,6 +7522,24 @@ }, "type": "object" }, + "GooglePrivacyDlpV2ListDiscoveryConfigsResponse": { + "description": "Response message for ListDiscoveryConfigs.", + "id": "GooglePrivacyDlpV2ListDiscoveryConfigsResponse", + "properties": { + "discoveryConfigs": { + "description": "List of configs, up to page_size in ListDiscoveryConfigsRequest.", + "items": { + "$ref": "GooglePrivacyDlpV2DiscoveryConfig" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If the next page is available then the next page token to be used in following ListDiscoveryConfigs request.", + "type": "string" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2ListDlpJobsResponse": { "description": "The response message for listing DLP jobs.", "id": "GooglePrivacyDlpV2ListDlpJobsResponse", @@ -7026,6 +7714,38 @@ }, "type": "object" }, + "GooglePrivacyDlpV2OrConditions": { + "description": "There is an OR relationship between these attributes. They are used to determine if a table should be scanned or not in Discovery.", + "id": "GooglePrivacyDlpV2OrConditions", + "properties": { + "minAge": { + "description": "Minimum age a table must have before Cloud DLP can profile it. Value must be 1 hour or greater.", + "format": "google-duration", + "type": "string" + }, + "minRowCount": { + "description": "Minimum number of rows that should be present before Cloud DLP profiles a table", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2OrgConfig": { + "description": "Project and scan location information. Only set when the parent is an org.", + "id": "GooglePrivacyDlpV2OrgConfig", + "properties": { + "location": { + "$ref": "GooglePrivacyDlpV2DiscoveryStartingLocation", + "description": "The data to scan: folder, org, or project" + }, + "projectId": { + "description": "The project that will run the scan. The DLP service account that exists within this project must have access to all resources that are profiled, and the Cloud DLP API must be enabled.", + "type": "string" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2OtherInfoTypeSummary": { "description": "Infotype details for other infoTypes found within a column.", "id": "GooglePrivacyDlpV2OtherInfoTypeSummary", @@ -8691,6 +9411,22 @@ }, "type": "object" }, + "GooglePrivacyDlpV2UpdateDiscoveryConfigRequest": { + "description": "Request message for UpdateDiscoveryConfig.", + "id": "GooglePrivacyDlpV2UpdateDiscoveryConfigRequest", + "properties": { + "discoveryConfig": { + "$ref": "GooglePrivacyDlpV2DiscoveryConfig", + "description": "New DiscoveryConfig value." + }, + "updateMask": { + "description": "Mask to control which fields get updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2UpdateInspectTemplateRequest": { "description": "Request message for UpdateInspectTemplate.", "id": "GooglePrivacyDlpV2UpdateInspectTemplateRequest", diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 03c53b16cc2..84bfc0a8ff5 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -234,6 +234,7 @@ type OrganizationsInspectTemplatesService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} rs.DeidentifyTemplates = NewOrganizationsLocationsDeidentifyTemplatesService(s) + rs.DiscoveryConfigs = NewOrganizationsLocationsDiscoveryConfigsService(s) rs.DlpJobs = NewOrganizationsLocationsDlpJobsService(s) rs.InspectTemplates = NewOrganizationsLocationsInspectTemplatesService(s) rs.JobTriggers = NewOrganizationsLocationsJobTriggersService(s) @@ -246,6 +247,8 @@ type OrganizationsLocationsService struct { DeidentifyTemplates *OrganizationsLocationsDeidentifyTemplatesService + DiscoveryConfigs *OrganizationsLocationsDiscoveryConfigsService + DlpJobs *OrganizationsLocationsDlpJobsService InspectTemplates *OrganizationsLocationsInspectTemplatesService @@ -264,6 +267,15 @@ type OrganizationsLocationsDeidentifyTemplatesService struct { s *Service } +func NewOrganizationsLocationsDiscoveryConfigsService(s *Service) *OrganizationsLocationsDiscoveryConfigsService { + rs := &OrganizationsLocationsDiscoveryConfigsService{s: s} + return rs +} + +type OrganizationsLocationsDiscoveryConfigsService struct { + s *Service +} + func NewOrganizationsLocationsDlpJobsService(s *Service) *OrganizationsLocationsDlpJobsService { rs := &OrganizationsLocationsDlpJobsService{s: s} return rs @@ -400,6 +412,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Content = NewProjectsLocationsContentService(s) rs.DeidentifyTemplates = NewProjectsLocationsDeidentifyTemplatesService(s) + rs.DiscoveryConfigs = NewProjectsLocationsDiscoveryConfigsService(s) rs.DlpJobs = NewProjectsLocationsDlpJobsService(s) rs.Image = NewProjectsLocationsImageService(s) rs.InspectTemplates = NewProjectsLocationsInspectTemplatesService(s) @@ -415,6 +428,8 @@ type ProjectsLocationsService struct { DeidentifyTemplates *ProjectsLocationsDeidentifyTemplatesService + DiscoveryConfigs *ProjectsLocationsDiscoveryConfigsService + DlpJobs *ProjectsLocationsDlpJobsService Image *ProjectsLocationsImageService @@ -444,6 +459,15 @@ type ProjectsLocationsDeidentifyTemplatesService struct { s *Service } +func NewProjectsLocationsDiscoveryConfigsService(s *Service) *ProjectsLocationsDiscoveryConfigsService { + rs := &ProjectsLocationsDiscoveryConfigsService{s: s} + return rs +} + +type ProjectsLocationsDiscoveryConfigsService struct { + s *Service +} + func NewProjectsLocationsDlpJobsService(s *Service) *ProjectsLocationsDlpJobsService { rs := &ProjectsLocationsDlpJobsService{s: s} return rs @@ -588,6 +612,13 @@ type GooglePrivacyDlpV2ActivateJobTriggerRequest struct { type GooglePrivacyDlpV2AllInfoTypes struct { } +// GooglePrivacyDlpV2AllOtherBigQueryTables: Catch-all for all other +// tables not specified by other filters. Should always be last, except +// for single-table configurations, which will only have a +// TableReference target. +type GooglePrivacyDlpV2AllOtherBigQueryTables struct { +} + // GooglePrivacyDlpV2AllText: Apply to all text. type GooglePrivacyDlpV2AllText struct { } @@ -689,6 +720,50 @@ func (s *GooglePrivacyDlpV2AuxiliaryTable) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2BigQueryDiscoveryTarget: Target used to match +// against for Discovery with BigQuery tables +type GooglePrivacyDlpV2BigQueryDiscoveryTarget struct { + // Cadence: How often and when to update profiles. New tables that match + // both the filter and conditions are scanned as quickly as possible + // depending on system capacity. + Cadence *GooglePrivacyDlpV2DiscoveryGenerationCadence `json:"cadence,omitempty"` + + // Conditions: In addition to matching the filter, these conditions must + // be true before a profile is generated. + Conditions *GooglePrivacyDlpV2DiscoveryBigQueryConditions `json:"conditions,omitempty"` + + // Disabled: Tables that match this filter will not have profiles + // created. + Disabled *GooglePrivacyDlpV2Disabled `json:"disabled,omitempty"` + + // Filter: Required. The tables the Discovery cadence applies to. The + // first target with a matching filter will be the one to apply to a + // table. + Filter *GooglePrivacyDlpV2DiscoveryBigQueryFilter `json:"filter,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cadence") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Cadence") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2BigQueryDiscoveryTarget) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2BigQueryDiscoveryTarget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2BigQueryField: Message defining a field of a // BigQuery table. type GooglePrivacyDlpV2BigQueryField struct { @@ -830,6 +905,78 @@ func (s *GooglePrivacyDlpV2BigQueryOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2BigQueryRegex: A pattern to match against one or +// more tables, datasets, or projects that contain BigQuery tables. At +// least one pattern must be specified. Regular expressions use RE2 +// syntax (https://github.com/google/re2/wiki/Syntax); a guide can be +// found under the google/re2 repository on GitHub. +type GooglePrivacyDlpV2BigQueryRegex struct { + // DatasetIdRegex: If unset, this property matches all datasets. + DatasetIdRegex string `json:"datasetIdRegex,omitempty"` + + // ProjectIdRegex: For organizations, if unset, will match all projects. + // Has no effect for data profile configurations created within a + // project. + ProjectIdRegex string `json:"projectIdRegex,omitempty"` + + // TableIdRegex: If unset, this property matches all tables. + TableIdRegex string `json:"tableIdRegex,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatasetIdRegex") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatasetIdRegex") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2BigQueryRegex) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2BigQueryRegex + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2BigQueryRegexes: A collection of regular +// expressions to determine what tables to match against. +type GooglePrivacyDlpV2BigQueryRegexes struct { + // Patterns: A single BigQuery regular expression pattern to match + // against one or more tables, datasets, or projects that contain + // BigQuery tables. + Patterns []*GooglePrivacyDlpV2BigQueryRegex `json:"patterns,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Patterns") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Patterns") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2BigQueryRegexes) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2BigQueryRegexes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2BigQueryTable: Message defining the location of a // BigQuery table. A table is uniquely identified by its project_id, // dataset_id, and table_name. Within a query a table is often @@ -869,6 +1016,72 @@ func (s *GooglePrivacyDlpV2BigQueryTable) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2BigQueryTableCollection: Specifies a collection of +// BigQuery tables. Used for Discovery. +type GooglePrivacyDlpV2BigQueryTableCollection struct { + // IncludeRegexes: A collection of regular expressions to match a + // BigQuery table against. + IncludeRegexes *GooglePrivacyDlpV2BigQueryRegexes `json:"includeRegexes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IncludeRegexes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IncludeRegexes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2BigQueryTableCollection) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2BigQueryTableCollection + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2BigQueryTableTypes: The types of bigquery tables +// supported by Cloud DLP. +type GooglePrivacyDlpV2BigQueryTableTypes struct { + // Types: A set of bigquery table types. + // + // Possible values: + // "BIG_QUERY_TABLE_TYPE_UNSPECIFIED" - Unused. + // "BIG_QUERY_TABLE_TYPE_TABLE" - A normal BigQuery table. + // "BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE" - A table that references + // data stored in Cloud Storage. + Types []string `json:"types,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Types") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Types") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2BigQueryTableTypes) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2BigQueryTableTypes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2BoundingBox: Bounding box encompassing detected // text within an image. type GooglePrivacyDlpV2BoundingBox struct { @@ -1995,6 +2208,41 @@ func (s *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2CreateDiscoveryConfigRequest: Request message for +// CreateDiscoveryConfig. +type GooglePrivacyDlpV2CreateDiscoveryConfigRequest struct { + // ConfigId: The config 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. Can be empty + // to allow the system to generate one. + ConfigId string `json:"configId,omitempty"` + + // DiscoveryConfig: Required. The DiscoveryConfig to create. + DiscoveryConfig *GooglePrivacyDlpV2DiscoveryConfig `json:"discoveryConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConfigId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConfigId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2CreateDiscoveryConfigRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2CreateDiscoveryConfigRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2CreateDlpJobRequest: Request message for // CreateDlpJobRequest. Used to initiate long running jobs such as // calculating risk metrics or inspecting Google Cloud Storage. @@ -3616,70 +3864,41 @@ func (s *GooglePrivacyDlpV2Dictionary) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2DlpJob: Combines all of the information about a DLP -// job. -type GooglePrivacyDlpV2DlpJob struct { - // ActionDetails: Events that should occur after the job has completed. - ActionDetails []*GooglePrivacyDlpV2ActionDetails `json:"actionDetails,omitempty"` - - // CreateTime: Time when the job was created. - CreateTime string `json:"createTime,omitempty"` - - // EndTime: Time when the job finished. - EndTime string `json:"endTime,omitempty"` - - // Errors: A stream of errors encountered running the job. - Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` - - // InspectDetails: Results from inspecting a data source. - InspectDetails *GooglePrivacyDlpV2InspectDataSourceDetails `json:"inspectDetails,omitempty"` - - // JobTriggerName: If created by a job trigger, the resource name of the - // trigger that instantiated the job. - JobTriggerName string `json:"jobTriggerName,omitempty"` - - // LastModified: Time when the job was last modified by the system. - LastModified string `json:"lastModified,omitempty"` - - // Name: The server-assigned name. - Name string `json:"name,omitempty"` - - // RiskDetails: Results from analyzing risk of a data source. - RiskDetails *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails `json:"riskDetails,omitempty"` +// GooglePrivacyDlpV2Disabled: Do nothing. +type GooglePrivacyDlpV2Disabled struct { +} - // StartTime: Time when the job started. - StartTime string `json:"startTime,omitempty"` +// GooglePrivacyDlpV2DiscoveryBigQueryConditions: Requirements that must +// be true before a table is scanned in Discovery for the first time. +// There is an AND relationship between the top-level attributes. +type GooglePrivacyDlpV2DiscoveryBigQueryConditions struct { + // CreatedAfter: BigQuery table must have been created after this date. + // Used to avoid backfilling. + CreatedAfter string `json:"createdAfter,omitempty"` - // State: State of a job. - // - // Possible values: - // "JOB_STATE_UNSPECIFIED" - Unused. - // "PENDING" - The job has not yet started. - // "RUNNING" - The job is currently running. Once a job has finished - // it will transition to FAILED or DONE. - // "DONE" - The job is no longer running. - // "CANCELED" - The job was canceled before it could be completed. - // "FAILED" - The job had an error and did not complete. - // "ACTIVE" - The job is currently accepting findings via - // hybridInspect. A hybrid job in ACTIVE state may continue to have - // findings added to it through the calling of hybridInspect. After the - // job has finished no more calls to hybridInspect may be made. ACTIVE - // jobs can transition to DONE. - State string `json:"state,omitempty"` + // OrConditions: At least one of the conditions must be true for a table + // to be scanned. + OrConditions *GooglePrivacyDlpV2OrConditions `json:"orConditions,omitempty"` - // Type: The type of job. + // TypeCollection: Restrict Discovery to categories of table types. // // Possible values: - // "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. - // "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. - // "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. - Type string `json:"type,omitempty"` + // "BIG_QUERY_COLLECTION_UNSPECIFIED" - Unused. + // "BIG_QUERY_COLLECTION_ALL_TYPES" - Automatically generate profiles + // for all tables, even if the table type is not yet fully supported for + // analysis. These unsupported profiles will be generated with errors to + // indicate their partial support. When support is added, they will + // automatically be profiled during the next scheduled run. + // "BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES" - Only those types + // fully supported will be profiled. Will expand automatically as new + // support is added. Unsupported table types will not have a profile + // generated. + TypeCollection string `json:"typeCollection,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Types: Restrict Discovery to specific table types. + Types *GooglePrivacyDlpV2BigQueryTableTypes `json:"types,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActionDetails") to + // ForceSendFields is a list of field names (e.g. "CreatedAfter") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3687,7 +3906,7 @@ type GooglePrivacyDlpV2DlpJob struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActionDetails") to include + // NullFields is a list of field names (e.g. "CreatedAfter") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -3696,20 +3915,32 @@ type GooglePrivacyDlpV2DlpJob struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2DlpJob) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2DlpJob +func (s *GooglePrivacyDlpV2DiscoveryBigQueryConditions) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DiscoveryBigQueryConditions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2DocumentLocation: Location of a finding within a -// document. -type GooglePrivacyDlpV2DocumentLocation struct { - // FileOffset: Offset of the line, from the beginning of the file, where - // the finding is located. - FileOffset int64 `json:"fileOffset,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "FileOffset") to +// GooglePrivacyDlpV2DiscoveryBigQueryFilter: Determines what tables +// will have profiles generated within an organization or project. +// Includes the ability to filter by regular expression patterns on +// project ID, dataset ID, and table ID. Also lets you set minimum +// conditions that must be met before Cloud DLP scans a table (like a +// minimum row count or a minimum table age). +type GooglePrivacyDlpV2DiscoveryBigQueryFilter struct { + // OtherTables: Catch-all. This should always be the last filter in the + // list because anything above it will apply first. Should only appear + // once in a configuration. If none is specified, a default one will be + // added automatically. + OtherTables *GooglePrivacyDlpV2AllOtherBigQueryTables `json:"otherTables,omitempty"` + + // Tables: A specific set of tables for this filter to apply to. A table + // collection must be specified in only one filter per config. If a + // table id or dataset is empty, Cloud DLP assumes all tables in that + // collection must be profiled. Must specify a project ID. + Tables *GooglePrivacyDlpV2BigQueryTableCollection `json:"tables,omitempty"` + + // ForceSendFields is a list of field names (e.g. "OtherTables") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3717,67 +3948,89 @@ type GooglePrivacyDlpV2DocumentLocation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FileOffset") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "OtherTables") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2DocumentLocation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2DocumentLocation +func (s *GooglePrivacyDlpV2DiscoveryBigQueryFilter) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DiscoveryBigQueryFilter raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2EntityId: An entity in a dataset is a field or set -// of fields that correspond to a single person. For example, in medical -// records the `EntityId` might be a patient identifier, or for -// financial records it might be an account identifier. This message is -// used when generalizations or analysis must take into account that -// multiple rows correspond to the same entity. -type GooglePrivacyDlpV2EntityId struct { - // Field: Composite key indicating which field contains the entity - // identifier. - Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` +// GooglePrivacyDlpV2DiscoveryConfig: Configuration for Discovery to +// scan resources for profile generation. Only one Discovery +// configuration may exist per organization, folder, or project. The +// generated data profiles are retained according to the [data retention +// policy] (https://cloud.google.com/dlp/docs/data-profiles#retention). +type GooglePrivacyDlpV2DiscoveryConfig struct { + // Actions: Actions to execute at the completion of scanning. + Actions []*GooglePrivacyDlpV2DataProfileAction `json:"actions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Field") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // CreateTime: Output only. The creation timestamp of a DiscoveryConfig. + CreateTime string `json:"createTime,omitempty"` - // NullFields is a list of field names (e.g. "Field") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // DisplayName: Display name (max 100 chars) + DisplayName string `json:"displayName,omitempty"` -func (s *GooglePrivacyDlpV2EntityId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2EntityId - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Errors: Output only. A stream of errors encountered when the config + // was activated. Repeated errors may result in the config automatically + // being paused. Output only field. Will return the last 100 errors. + // Whenever the config is modified this list will be cleared. + Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` -// GooglePrivacyDlpV2Error: Details information about an error -// encountered during job execution or the results of an unsuccessful -// activation of the JobTrigger. -type GooglePrivacyDlpV2Error struct { - // Details: Detailed error codes and messages. - Details *GoogleRpcStatus `json:"details,omitempty"` + // InspectTemplates: Detection logic for profile generation. Not all + // template features are used by Discovery. FindingLimits, include_quote + // and exclude_info_types have no impact on Discovery. Multiple + // templates may be provided if there is data in multiple regions. At + // most one template must be specified per-region (including "global"). + // Each region is scanned using the applicable template. If no + // region-specific template is specified, but a "global" template is + // specified, it will be copied to that region and used instead. If no + // global or region-specific template is provided for a region with + // data, that region's data will not be scanned. For more information, + // see https://cloud.google.com/dlp/docs/data-profiles#data_residency. + InspectTemplates []string `json:"inspectTemplates,omitempty"` - // Timestamps: The times the error occurred. List includes the oldest - // timestamp and the last 9 timestamps. - Timestamps []string `json:"timestamps,omitempty"` + // LastRunTime: Output only. The timestamp of the last time this config + // was executed. + LastRunTime string `json:"lastRunTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Details") to + // Name: Unique resource name for the DiscoveryConfig, assigned by the + // service when the DiscoveryConfig is created, for example + // `projects/dlp-test-project/locations/global/discoveryConfigs/53234423` + // . + Name string `json:"name,omitempty"` + + // OrgConfig: Only set when the parent is an org. + OrgConfig *GooglePrivacyDlpV2OrgConfig `json:"orgConfig,omitempty"` + + // Status: Required. A status for this configuration. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unused + // "RUNNING" - The Discovery config is currently active. + // "PAUSED" - The Discovery config is paused temporarily. + Status string `json:"status,omitempty"` + + // Targets: Target to match against for determining what to scan and how + // frequently. + Targets []*GooglePrivacyDlpV2DiscoveryTarget `json:"targets,omitempty"` + + // UpdateTime: Output only. The last update timestamp of a + // DiscoveryConfig. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Actions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3785,7 +4038,7 @@ type GooglePrivacyDlpV2Error struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Details") to include in + // NullFields is a list of field names (e.g. "Actions") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3794,63 +4047,79 @@ type GooglePrivacyDlpV2Error struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Error) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Error +func (s *GooglePrivacyDlpV2DiscoveryConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DiscoveryConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ExcludeByHotword: The rule to exclude findings -// based on a hotword. For record inspection of tables, column names are -// considered hotwords. An example of this is to exclude a finding if it -// belongs to a BigQuery column that matches a specific pattern. -type GooglePrivacyDlpV2ExcludeByHotword struct { - // HotwordRegex: Regular expression pattern defining what qualifies as a - // hotword. - HotwordRegex *GooglePrivacyDlpV2Regex `json:"hotwordRegex,omitempty"` +// GooglePrivacyDlpV2DiscoveryGenerationCadence: What must take place +// for a profile to be updated and how frequently it should occur. New +// tables are scanned as quickly as possible depending on system +// capacity. +type GooglePrivacyDlpV2DiscoveryGenerationCadence struct { + // SchemaModifiedCadence: Governs when to update data profiles when a + // schema is modified. + SchemaModifiedCadence *GooglePrivacyDlpV2DiscoverySchemaModifiedCadence `json:"schemaModifiedCadence,omitempty"` - // Proximity: Range of characters within which the entire hotword must - // reside. The total length of the window cannot exceed 1000 characters. - // The windowBefore property in proximity should be set to 1 if the - // hotword needs to be included in a column header. - Proximity *GooglePrivacyDlpV2Proximity `json:"proximity,omitempty"` + // TableModifiedCadence: Governs when to update data profiles when a + // table is modified. + TableModifiedCadence *GooglePrivacyDlpV2DiscoveryTableModifiedCadence `json:"tableModifiedCadence,omitempty"` - // ForceSendFields is a list of field names (e.g. "HotwordRegex") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "SchemaModifiedCadence") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HotwordRegex") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "SchemaModifiedCadence") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ExcludeByHotword) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ExcludeByHotword +func (s *GooglePrivacyDlpV2DiscoveryGenerationCadence) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DiscoveryGenerationCadence raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ExcludeInfoTypes: List of excluded infoTypes. -type GooglePrivacyDlpV2ExcludeInfoTypes struct { - // InfoTypes: InfoType list in ExclusionRule rule drops a finding when - // it overlaps or contained within with a finding of an infoType from - // this list. For example, for `InspectionRuleSet.info_types` containing - // "PHONE_NUMBER" and `exclusion_rule` containing - // `exclude_info_types.info_types` with "EMAIL_ADDRESS" the phone number - // findings are dropped if they overlap with EMAIL_ADDRESS finding. That - // leads to "555-222-2222@example.org" to generate only a single - // finding, namely email address. - InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InfoTypes") to +// GooglePrivacyDlpV2DiscoverySchemaModifiedCadence: The cadence at +// which to update data profiles when a schema is modified. +type GooglePrivacyDlpV2DiscoverySchemaModifiedCadence struct { + // Frequency: How frequently profiles may be updated when schemas are + // modified. Defaults to monthly. + // + // Possible values: + // "UPDATE_FREQUENCY_UNSPECIFIED" - Unspecified. + // "UPDATE_FREQUENCY_NEVER" - After the data profile is created, it + // will never be updated. + // "UPDATE_FREQUENCY_DAILY" - The data profile can be updated up to + // once every 24 hours. + // "UPDATE_FREQUENCY_MONTHLY" - The data profile can be updated up to + // once every 30 days. Default. + Frequency string `json:"frequency,omitempty"` + + // Types: The type of events to consider when deciding if the table's + // schema has been modified and should have the profile updated. + // Defaults to NEW_COLUMNS. + // + // Possible values: + // "SCHEMA_MODIFICATION_UNSPECIFIED" - Unused + // "SCHEMA_NEW_COLUMNS" - Profiles should be regenerated when new + // columns are added to the table. Default. + // "SCHEMA_REMOVED_COLUMNS" - Profiles should be regenerated when + // columns are removed from the table. + Types []string `json:"types,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Frequency") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3858,7 +4127,7 @@ type GooglePrivacyDlpV2ExcludeInfoTypes struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InfoTypes") to include in + // NullFields is a list of field names (e.g. "Frequency") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3867,51 +4136,23 @@ type GooglePrivacyDlpV2ExcludeInfoTypes struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ExcludeInfoTypes) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ExcludeInfoTypes +func (s *GooglePrivacyDlpV2DiscoverySchemaModifiedCadence) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DiscoverySchemaModifiedCadence raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ExclusionRule: The rule that specifies conditions -// when findings of infoTypes specified in `InspectionRuleSet` are -// removed from results. -type GooglePrivacyDlpV2ExclusionRule struct { - // Dictionary: Dictionary which defines the rule. - Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` - - // ExcludeByHotword: Drop if the hotword rule is contained in the - // proximate context. For tabular data, the context includes the column - // name. - ExcludeByHotword *GooglePrivacyDlpV2ExcludeByHotword `json:"excludeByHotword,omitempty"` - - // ExcludeInfoTypes: Set of infoTypes for which findings would affect - // this rule. - ExcludeInfoTypes *GooglePrivacyDlpV2ExcludeInfoTypes `json:"excludeInfoTypes,omitempty"` - - // MatchingType: How the rule is applied, see MatchingType documentation - // for details. - // - // Possible values: - // "MATCHING_TYPE_UNSPECIFIED" - Invalid. - // "MATCHING_TYPE_FULL_MATCH" - Full match. - Dictionary: join of - // Dictionary results matched complete finding quote - Regex: all regex - // matches fill a finding quote start to end - Exclude info type: - // completely inside affecting info types findings - // "MATCHING_TYPE_PARTIAL_MATCH" - Partial match. - Dictionary: at - // least one of the tokens in the finding matches - Regex: substring of - // the finding matches - Exclude info type: intersects with affecting - // info types findings - // "MATCHING_TYPE_INVERSE_MATCH" - Inverse match. - Dictionary: no - // tokens in the finding match the dictionary - Regex: finding doesn't - // match the regex - Exclude info type: no intersection with affecting - // info types findings - MatchingType string `json:"matchingType,omitempty"` +// GooglePrivacyDlpV2DiscoveryStartingLocation: The location to begin a +// Discovery scan. Denotes an organization ID or folder ID within an +// organization. +type GooglePrivacyDlpV2DiscoveryStartingLocation struct { + // FolderId: The ID of the Folder within an organization to scan. + FolderId int64 `json:"folderId,omitempty,string"` - // Regex: Regular expression which defines the rule. - Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` + // OrganizationId: The ID of an organization to scan. + OrganizationId int64 `json:"organizationId,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Dictionary") to + // ForceSendFields is a list of field names (e.g. "FolderId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3919,7 +4160,7 @@ type GooglePrivacyDlpV2ExclusionRule struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Dictionary") to include in + // NullFields is a list of field names (e.g. "FolderId") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3928,58 +4169,39 @@ type GooglePrivacyDlpV2ExclusionRule struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ExclusionRule) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ExclusionRule - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2Export: If set, the detailed data profiles will be -// persisted to the location of your choice whenever updated. -type GooglePrivacyDlpV2Export struct { - // ProfileTable: Store all table and column profiles in an existing - // table or a new table in an existing dataset. Each re-generation will - // result in a new row in BigQuery. - ProfileTable *GooglePrivacyDlpV2BigQueryTable `json:"profileTable,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ProfileTable") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ProfileTable") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GooglePrivacyDlpV2Export) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Export +func (s *GooglePrivacyDlpV2DiscoveryStartingLocation) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DiscoveryStartingLocation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Expressions: An expression, consisting of an -// operator and conditions. -type GooglePrivacyDlpV2Expressions struct { - // Conditions: Conditions to apply to the expression. - Conditions *GooglePrivacyDlpV2Conditions `json:"conditions,omitempty"` - - // LogicalOperator: The operator to apply to the result of conditions. - // Default and currently only supported value is `AND`. +// GooglePrivacyDlpV2DiscoveryTableModifiedCadence: The cadence at which +// to update data profiles when a table is modified. +type GooglePrivacyDlpV2DiscoveryTableModifiedCadence struct { + // Frequency: How frequently data profiles can be updated when tables + // are modified. Defaults to never. // // Possible values: - // "LOGICAL_OPERATOR_UNSPECIFIED" - Unused - // "AND" - Conditional AND - LogicalOperator string `json:"logicalOperator,omitempty"` + // "UPDATE_FREQUENCY_UNSPECIFIED" - Unspecified. + // "UPDATE_FREQUENCY_NEVER" - After the data profile is created, it + // will never be updated. + // "UPDATE_FREQUENCY_DAILY" - The data profile can be updated up to + // once every 24 hours. + // "UPDATE_FREQUENCY_MONTHLY" - The data profile can be updated up to + // once every 30 days. Default. + Frequency string `json:"frequency,omitempty"` + + // Types: The type of events to consider when deciding if the table has + // been modified and should have the profile updated. Defaults to + // MODIFIED_TIMESTAMP. + // + // Possible values: + // "TABLE_MODIFICATION_UNSPECIFIED" - Unused. + // "TABLE_MODIFIED_TIMESTAMP" - A table will be considered modified + // when the last_modified_time from BigQuery has been updated. + Types []string `json:"types,omitempty"` - // ForceSendFields is a list of field names (e.g. "Conditions") to + // ForceSendFields is a list of field names (e.g. "Frequency") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3987,7 +4209,7 @@ type GooglePrivacyDlpV2Expressions struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Conditions") to include in + // NullFields is a list of field names (e.g. "Frequency") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3996,19 +4218,20 @@ type GooglePrivacyDlpV2Expressions struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Expressions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Expressions +func (s *GooglePrivacyDlpV2DiscoveryTableModifiedCadence) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DiscoveryTableModifiedCadence raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2FieldId: General identifier of a data field in a -// storage service. -type GooglePrivacyDlpV2FieldId struct { - // Name: Name describing the field. - Name string `json:"name,omitempty"` +// GooglePrivacyDlpV2DiscoveryTarget: Target used to match against for +// Discovery. +type GooglePrivacyDlpV2DiscoveryTarget struct { + // BigQueryTarget: BigQuery target for Discovery. The first target to + // match a table will be the one applied. + BigQueryTarget *GooglePrivacyDlpV2BigQueryDiscoveryTarget `json:"bigQueryTarget,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // ForceSendFields is a list of field names (e.g. "BigQueryTarget") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4016,49 +4239,86 @@ type GooglePrivacyDlpV2FieldId struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BigQueryTarget") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2FieldId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2FieldId +func (s *GooglePrivacyDlpV2DiscoveryTarget) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DiscoveryTarget raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2FieldTransformation: The transformation to apply to -// the field. -type GooglePrivacyDlpV2FieldTransformation struct { - // Condition: Only apply the transformation if the condition evaluates - // to true for the given `RecordCondition`. The conditions are allowed - // to reference fields that are not used in the actual transformation. - // Example Use Cases: - Apply a different bucket transformation to an - // age column if the zip code column for the same record is within a - // specific range. - Redact a field if the date of birth field is - // greater than 85. - Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"` +// GooglePrivacyDlpV2DlpJob: Combines all of the information about a DLP +// job. +type GooglePrivacyDlpV2DlpJob struct { + // ActionDetails: Events that should occur after the job has completed. + ActionDetails []*GooglePrivacyDlpV2ActionDetails `json:"actionDetails,omitempty"` - // Fields: Required. Input field(s) to apply the transformation to. When - // you have columns that reference their position within a list, omit - // the index from the FieldId. FieldId name matching ignores the index. - // For example, instead of "contact.nums[0].type", use - // "contact.nums.type". - Fields []*GooglePrivacyDlpV2FieldId `json:"fields,omitempty"` + // CreateTime: Time when the job was created. + CreateTime string `json:"createTime,omitempty"` - // InfoTypeTransformations: Treat the contents of the field as free - // text, and selectively transform content that matches an `InfoType`. - InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` + // EndTime: Time when the job finished. + EndTime string `json:"endTime,omitempty"` - // PrimitiveTransformation: Apply the transformation to the entire - // field. - PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` + // Errors: A stream of errors encountered running the job. + Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to + // InspectDetails: Results from inspecting a data source. + InspectDetails *GooglePrivacyDlpV2InspectDataSourceDetails `json:"inspectDetails,omitempty"` + + // JobTriggerName: If created by a job trigger, the resource name of the + // trigger that instantiated the job. + JobTriggerName string `json:"jobTriggerName,omitempty"` + + // LastModified: Time when the job was last modified by the system. + LastModified string `json:"lastModified,omitempty"` + + // Name: The server-assigned name. + Name string `json:"name,omitempty"` + + // RiskDetails: Results from analyzing risk of a data source. + RiskDetails *GooglePrivacyDlpV2AnalyzeDataSourceRiskDetails `json:"riskDetails,omitempty"` + + // StartTime: Time when the job started. + StartTime string `json:"startTime,omitempty"` + + // State: State of a job. + // + // Possible values: + // "JOB_STATE_UNSPECIFIED" - Unused. + // "PENDING" - The job has not yet started. + // "RUNNING" - The job is currently running. Once a job has finished + // it will transition to FAILED or DONE. + // "DONE" - The job is no longer running. + // "CANCELED" - The job was canceled before it could be completed. + // "FAILED" - The job had an error and did not complete. + // "ACTIVE" - The job is currently accepting findings via + // hybridInspect. A hybrid job in ACTIVE state may continue to have + // findings added to it through the calling of hybridInspect. After the + // job has finished no more calls to hybridInspect may be made. ACTIVE + // jobs can transition to DONE. + State string `json:"state,omitempty"` + + // Type: The type of job. + // + // Possible values: + // "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. + // "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. + // "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. + Type string `json:"type,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ActionDetails") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4066,38 +4326,29 @@ type GooglePrivacyDlpV2FieldTransformation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ActionDetails") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2FieldTransformation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2FieldTransformation +func (s *GooglePrivacyDlpV2DlpJob) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DlpJob raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2FileSet: Set of files to scan. -type GooglePrivacyDlpV2FileSet struct { - // RegexFileSet: The regex-filtered set of files to scan. Exactly one of - // `url` or `regex_file_set` must be set. - RegexFileSet *GooglePrivacyDlpV2CloudStorageRegexFileSet `json:"regexFileSet,omitempty"` - - // Url: The Cloud Storage url of the file(s) to scan, in the format - // `gs:///`. Trailing wildcard in the path is allowed. If the url ends - // in a trailing slash, the bucket or directory represented by the url - // will be scanned non-recursively (content in sub-directories will not - // be scanned). This means that `gs://mybucket/` is equivalent to - // `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to - // `gs://mybucket/directory/*`. Exactly one of `url` or `regex_file_set` - // must be set. - Url string `json:"url,omitempty"` +// GooglePrivacyDlpV2DocumentLocation: Location of a finding within a +// document. +type GooglePrivacyDlpV2DocumentLocation struct { + // FileOffset: Offset of the line, from the beginning of the file, where + // the finding is located. + FileOffset int64 `json:"fileOffset,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "RegexFileSet") to + // ForceSendFields is a list of field names (e.g. "FileOffset") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4105,89 +4356,33 @@ type GooglePrivacyDlpV2FileSet struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RegexFileSet") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "FileOffset") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2FileSet) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2FileSet +func (s *GooglePrivacyDlpV2DocumentLocation) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2DocumentLocation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Finding: Represents a piece of potentially -// sensitive content. -type GooglePrivacyDlpV2Finding struct { - // CreateTime: Timestamp when finding was detected. - CreateTime string `json:"createTime,omitempty"` - - // FindingId: The unique finding id. - FindingId string `json:"findingId,omitempty"` - - // InfoType: The type of content that might have been found. Provided if - // `excluded_types` is false. - InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` - - // JobCreateTime: Time the job started that produced this finding. - JobCreateTime string `json:"jobCreateTime,omitempty"` - - // JobName: The job that stored the finding. - JobName string `json:"jobName,omitempty"` - - // Labels: The labels associated with this `Finding`. Label keys must be - // between 1 and 63 characters long and must conform to the following - // regular expression: `a-z ([-a-z0-9]*[a-z0-9])?`. Label values must be - // between 0 and 63 characters long and must conform to the regular - // expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels - // can be associated with a given finding. Examples: * "environment" : - // "production" * "pipeline" : "etl" - Labels map[string]string `json:"labels,omitempty"` - - // Likelihood: Confidence of how likely it is that the `info_type` is - // correct. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. - // "VERY_UNLIKELY" - Highest chance of a false positive. - // "UNLIKELY" - High chance of a false positive. - // "POSSIBLE" - Some matching signals. The default value. - // "LIKELY" - Low chance of a false positive. - // "VERY_LIKELY" - Confidence level is high. Lowest chance of a false - // positive. - Likelihood string `json:"likelihood,omitempty"` - - // Location: Where the content was found. - Location *GooglePrivacyDlpV2Location `json:"location,omitempty"` - - // Name: Resource name in format - // projects/{project}/locations/{location}/findings/{finding} Populated - // only when viewing persisted findings. - Name string `json:"name,omitempty"` - - // Quote: The content that was found. Even if the content is not - // textual, it may be converted to a textual representation here. - // Provided if `include_quote` is true and the finding is less than or - // equal to 4096 bytes long. If the finding exceeds 4096 bytes in - // length, the quote may be omitted. - Quote string `json:"quote,omitempty"` - - // QuoteInfo: Contains data parsed from quotes. Only populated if - // include_quote was set to true and a supported infoType was requested. - // Currently supported infoTypes: DATE, DATE_OF_BIRTH and TIME. - QuoteInfo *GooglePrivacyDlpV2QuoteInfo `json:"quoteInfo,omitempty"` - - // ResourceName: The job that stored the finding. - ResourceName string `json:"resourceName,omitempty"` - - // TriggerName: Job trigger name, if applicable, for this finding. - TriggerName string `json:"triggerName,omitempty"` +// GooglePrivacyDlpV2EntityId: An entity in a dataset is a field or set +// of fields that correspond to a single person. For example, in medical +// records the `EntityId` might be a patient identifier, or for +// financial records it might be an account identifier. This message is +// used when generalizations or analysis must take into account that +// multiple rows correspond to the same entity. +type GooglePrivacyDlpV2EntityId struct { + // Field: Composite key indicating which field contains the entity + // identifier. + Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Field") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4195,8 +4390,8 @@ type GooglePrivacyDlpV2Finding struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Field") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -4204,163 +4399,59 @@ type GooglePrivacyDlpV2Finding struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Finding) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Finding +func (s *GooglePrivacyDlpV2EntityId) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2EntityId raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2FindingLimits: Configuration to control the number -// of findings returned for inspection. This is not used for -// de-identification or data profiling. When redacting sensitive data -// from images, finding limits don't apply. They can cause unexpected or -// inconsistent results, where only some data is redacted. Don't include -// finding limits in RedactImage requests. Otherwise, Cloud DLP returns -// an error. -type GooglePrivacyDlpV2FindingLimits struct { - // MaxFindingsPerInfoType: Configuration of findings limit given for - // specified infoTypes. - MaxFindingsPerInfoType []*GooglePrivacyDlpV2InfoTypeLimit `json:"maxFindingsPerInfoType,omitempty"` - - // MaxFindingsPerItem: Max number of findings that are returned for each - // item scanned. When set within an InspectContentRequest, this field is - // ignored. This value isn't a hard limit. If the number of findings for - // an item reaches this limit, the inspection of that item ends - // gradually, not abruptly. Therefore, the actual number of findings - // that Cloud DLP returns for the item can be multiple times higher than - // this value. - MaxFindingsPerItem int64 `json:"maxFindingsPerItem,omitempty"` +// GooglePrivacyDlpV2Error: Details information about an error +// encountered during job execution or the results of an unsuccessful +// activation of the JobTrigger. +type GooglePrivacyDlpV2Error struct { + // Details: Detailed error codes and messages. + Details *GoogleRpcStatus `json:"details,omitempty"` - // MaxFindingsPerRequest: Max number of findings that are returned per - // request or job. If you set this field in an InspectContentRequest, - // the resulting maximum value is the value that you set or 3,000, - // whichever is lower. This value isn't a hard limit. If an inspection - // reaches this limit, the inspection ends gradually, not abruptly. - // Therefore, the actual number of findings that Cloud DLP returns can - // be multiple times higher than this value. - MaxFindingsPerRequest int64 `json:"maxFindingsPerRequest,omitempty"` + // Timestamps: The times the error occurred. List includes the oldest + // timestamp and the last 9 timestamps. + Timestamps []string `json:"timestamps,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "MaxFindingsPerInfoType") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "Details") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxFindingsPerInfoType") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Details") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2FindingLimits) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2FindingLimits +func (s *GooglePrivacyDlpV2Error) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Error raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2FinishDlpJobRequest: The request message for -// finishing a DLP hybrid job. -type GooglePrivacyDlpV2FinishDlpJobRequest struct { -} - -// GooglePrivacyDlpV2FixedSizeBucketingConfig: Buckets values based on -// fixed size ranges. The Bucketing transformation can provide all of -// this functionality, but requires more configuration. This message is -// provided as a convenience to the user for simple bucketing -// strategies. The transformed value will be a hyphenated string of -// {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and -// upper_bound = 20, all values that are within this bucket will be -// replaced with "10-20". This can be used on data of type: double, -// long. If the bound Value type differs from the type of data being -// transformed, we will first attempt converting the type of the data to -// be transformed to match the type of the bound before comparing. See -// https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. -type GooglePrivacyDlpV2FixedSizeBucketingConfig struct { - // BucketSize: Required. Size of each bucket (except for minimum and - // maximum buckets). So if `lower_bound` = 10, `upper_bound` = 89, and - // `bucket_size` = 10, then the following buckets would be used: -10, - // 10-20, 20-30, 30-40, 40-50, 50-60, 60-70, 70-80, 80-89, 89+. - // Precision up to 2 decimals works. - BucketSize float64 `json:"bucketSize,omitempty"` - - // LowerBound: Required. Lower bound value of buckets. All values less - // than `lower_bound` are grouped together into a single bucket; for - // example if `lower_bound` = 10, then all values less than 10 are - // replaced with the value "-10". - LowerBound *GooglePrivacyDlpV2Value `json:"lowerBound,omitempty"` - - // UpperBound: Required. Upper bound value of buckets. All values - // greater than upper_bound are grouped together into a single bucket; - // for example if `upper_bound` = 89, then all values greater than 89 - // are replaced with the value "89+". - UpperBound *GooglePrivacyDlpV2Value `json:"upperBound,omitempty"` - - // ForceSendFields is a list of field names (e.g. "BucketSize") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "BucketSize") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) UnmarshalJSON(data []byte) error { - type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig - var s1 struct { - BucketSize gensupport.JSONFloat64 `json:"bucketSize"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.BucketSize = float64(s1.BucketSize) - return nil -} - -// GooglePrivacyDlpV2HotwordRule: The rule that adjusts the likelihood -// of findings within a certain proximity of hotwords. -type GooglePrivacyDlpV2HotwordRule struct { +// GooglePrivacyDlpV2ExcludeByHotword: The rule to exclude findings +// based on a hotword. For record inspection of tables, column names are +// considered hotwords. An example of this is to exclude a finding if it +// belongs to a BigQuery column that matches a specific pattern. +type GooglePrivacyDlpV2ExcludeByHotword struct { // HotwordRegex: Regular expression pattern defining what qualifies as a // hotword. HotwordRegex *GooglePrivacyDlpV2Regex `json:"hotwordRegex,omitempty"` - // LikelihoodAdjustment: Likelihood adjustment to apply to all matching - // findings. - LikelihoodAdjustment *GooglePrivacyDlpV2LikelihoodAdjustment `json:"likelihoodAdjustment,omitempty"` - // Proximity: Range of characters within which the entire hotword must // reside. The total length of the window cannot exceed 1000 characters. - // The finding itself will be included in the window, so that hotwords - // can be used to match substrings of the finding itself. Suppose you - // want Cloud DLP to promote the likelihood of the phone number regex - // "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the area code - // of a company's office. In this case, use the hotword regex "\(xxx\)", - // where "xxx" is the area code in question. For tabular data, if you - // want to modify the likelihood of an entire column of findngs, see - // [Hotword example: Set the match likelihood of a table column] - // (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values). + // The windowBefore property in proximity should be set to 1 if the + // hotword needs to be included in a column header. Proximity *GooglePrivacyDlpV2Proximity `json:"proximity,omitempty"` // ForceSendFields is a list of field names (e.g. "HotwordRegex") to @@ -4380,23 +4471,25 @@ type GooglePrivacyDlpV2HotwordRule struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2HotwordRule) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2HotwordRule +func (s *GooglePrivacyDlpV2ExcludeByHotword) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ExcludeByHotword raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2HybridContentItem: An individual hybrid item to -// inspect. Will be stored temporarily during processing. -type GooglePrivacyDlpV2HybridContentItem struct { - // FindingDetails: Supplementary information that will be added to each - // finding. - FindingDetails *GooglePrivacyDlpV2HybridFindingDetails `json:"findingDetails,omitempty"` - - // Item: The item to inspect. - Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` +// GooglePrivacyDlpV2ExcludeInfoTypes: List of excluded infoTypes. +type GooglePrivacyDlpV2ExcludeInfoTypes struct { + // InfoTypes: InfoType list in ExclusionRule rule drops a finding when + // it overlaps or contained within with a finding of an infoType from + // this list. For example, for `InspectionRuleSet.info_types` containing + // "PHONE_NUMBER" and `exclusion_rule` containing + // `exclude_info_types.info_types` with "EMAIL_ADDRESS" the phone number + // findings are dropped if they overlap with EMAIL_ADDRESS finding. That + // leads to "555-222-2222@example.org" to generate only a single + // finding, namely email address. + InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` - // ForceSendFields is a list of field names (e.g. "FindingDetails") to + // ForceSendFields is a list of field names (e.g. "InfoTypes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4404,61 +4497,60 @@ type GooglePrivacyDlpV2HybridContentItem struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FindingDetails") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "InfoTypes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2HybridContentItem) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2HybridContentItem +func (s *GooglePrivacyDlpV2ExcludeInfoTypes) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ExcludeInfoTypes raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2HybridFindingDetails: Populate to associate -// additional data with each finding. -type GooglePrivacyDlpV2HybridFindingDetails struct { - // ContainerDetails: Details about the container where the content being - // inspected is from. - ContainerDetails *GooglePrivacyDlpV2Container `json:"containerDetails,omitempty"` +// GooglePrivacyDlpV2ExclusionRule: The rule that specifies conditions +// when findings of infoTypes specified in `InspectionRuleSet` are +// removed from results. +type GooglePrivacyDlpV2ExclusionRule struct { + // Dictionary: Dictionary which defines the rule. + Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` - // FileOffset: Offset in bytes of the line, from the beginning of the - // file, where the finding is located. Populate if the item being - // scanned is only part of a bigger item, such as a shard of a file and - // you want to track the absolute position of the finding. - FileOffset int64 `json:"fileOffset,omitempty,string"` + // ExcludeByHotword: Drop if the hotword rule is contained in the + // proximate context. For tabular data, the context includes the column + // name. + ExcludeByHotword *GooglePrivacyDlpV2ExcludeByHotword `json:"excludeByHotword,omitempty"` - // Labels: Labels to represent user provided metadata about the data - // being inspected. If configured by the job, some key values may be - // required. The labels associated with `Finding`'s produced by hybrid - // inspection. Label keys must be between 1 and 63 characters long and - // must conform to the following regular expression: `a-z - // ([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 - // characters long and must conform to the regular expression - // `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be - // associated with a given finding. Examples: * "environment" : - // "production" * "pipeline" : "etl" - Labels map[string]string `json:"labels,omitempty"` + // ExcludeInfoTypes: Set of infoTypes for which findings would affect + // this rule. + ExcludeInfoTypes *GooglePrivacyDlpV2ExcludeInfoTypes `json:"excludeInfoTypes,omitempty"` - // RowOffset: Offset of the row for tables. Populate if the row(s) being - // scanned are part of a bigger dataset and you want to keep track of - // their absolute position. - RowOffset int64 `json:"rowOffset,omitempty,string"` + // MatchingType: How the rule is applied, see MatchingType documentation + // for details. + // + // Possible values: + // "MATCHING_TYPE_UNSPECIFIED" - Invalid. + // "MATCHING_TYPE_FULL_MATCH" - Full match. - Dictionary: join of + // Dictionary results matched complete finding quote - Regex: all regex + // matches fill a finding quote start to end - Exclude info type: + // completely inside affecting info types findings + // "MATCHING_TYPE_PARTIAL_MATCH" - Partial match. - Dictionary: at + // least one of the tokens in the finding matches - Regex: substring of + // the finding matches - Exclude info type: intersects with affecting + // info types findings + // "MATCHING_TYPE_INVERSE_MATCH" - Inverse match. - Dictionary: no + // tokens in the finding match the dictionary - Regex: finding doesn't + // match the regex - Exclude info type: no intersection with affecting + // info types findings + MatchingType string `json:"matchingType,omitempty"` - // TableOptions: If the container is a table, additional information to - // make findings meaningful such as the columns that are primary keys. - // If not known ahead of time, can also be set within each inspect - // hybrid call and the two will be merged. Note that identifying_fields - // will only be stored to BigQuery, and only if the BigQuery action has - // been included. - TableOptions *GooglePrivacyDlpV2TableOptions `json:"tableOptions,omitempty"` + // Regex: Regular expression which defines the rule. + Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContainerDetails") to + // ForceSendFields is a list of field names (e.g. "Dictionary") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4466,29 +4558,30 @@ type GooglePrivacyDlpV2HybridFindingDetails struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContainerDetails") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Dictionary") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2HybridFindingDetails) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2HybridFindingDetails +func (s *GooglePrivacyDlpV2ExclusionRule) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ExclusionRule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2HybridInspectDlpJobRequest: Request to search for -// potentially sensitive info in a custom location. -type GooglePrivacyDlpV2HybridInspectDlpJobRequest struct { - // HybridItem: The item to inspect. - HybridItem *GooglePrivacyDlpV2HybridContentItem `json:"hybridItem,omitempty"` +// GooglePrivacyDlpV2Export: If set, the detailed data profiles will be +// persisted to the location of your choice whenever updated. +type GooglePrivacyDlpV2Export struct { + // ProfileTable: Store all table and column profiles in an existing + // table or a new table in an existing dataset. Each re-generation will + // result in a new row in BigQuery. + ProfileTable *GooglePrivacyDlpV2BigQueryTable `json:"profileTable,omitempty"` - // ForceSendFields is a list of field names (e.g. "HybridItem") to + // ForceSendFields is a list of field names (e.g. "ProfileTable") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4496,28 +4589,36 @@ type GooglePrivacyDlpV2HybridInspectDlpJobRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HybridItem") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ProfileTable") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2HybridInspectDlpJobRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2HybridInspectDlpJobRequest +func (s *GooglePrivacyDlpV2Export) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Export raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2HybridInspectJobTriggerRequest: Request to search -// for potentially sensitive info in a custom location. -type GooglePrivacyDlpV2HybridInspectJobTriggerRequest struct { - // HybridItem: The item to inspect. - HybridItem *GooglePrivacyDlpV2HybridContentItem `json:"hybridItem,omitempty"` +// GooglePrivacyDlpV2Expressions: An expression, consisting of an +// operator and conditions. +type GooglePrivacyDlpV2Expressions struct { + // Conditions: Conditions to apply to the expression. + Conditions *GooglePrivacyDlpV2Conditions `json:"conditions,omitempty"` - // ForceSendFields is a list of field names (e.g. "HybridItem") to + // LogicalOperator: The operator to apply to the result of conditions. + // Default and currently only supported value is `AND`. + // + // Possible values: + // "LOGICAL_OPERATOR_UNSPECIFIED" - Unused + // "AND" - Conditional AND + LogicalOperator string `json:"logicalOperator,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Conditions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4525,7 +4626,7 @@ type GooglePrivacyDlpV2HybridInspectJobTriggerRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HybridItem") to include in + // NullFields is a list of field names (e.g. "Conditions") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -4534,40 +4635,19 @@ type GooglePrivacyDlpV2HybridInspectJobTriggerRequest struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2HybridInspectJobTriggerRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2HybridInspectJobTriggerRequest +func (s *GooglePrivacyDlpV2Expressions) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Expressions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2HybridInspectResponse: Quota exceeded errors will -// be thrown once quota has been met. -type GooglePrivacyDlpV2HybridInspectResponse struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - -// GooglePrivacyDlpV2HybridInspectStatistics: Statistics related to -// processing hybrid inspect requests. -type GooglePrivacyDlpV2HybridInspectStatistics struct { - // AbortedCount: The number of hybrid inspection requests aborted - // because the job ran out of quota or was ended before they could be - // processed. - AbortedCount int64 `json:"abortedCount,omitempty,string"` - - // PendingCount: The number of hybrid requests currently being - // processed. Only populated when called via method `getDlpJob`. A burst - // of traffic may cause hybrid inspect requests to be enqueued. - // Processing will take place as quickly as possible, but resource - // limitations may impact how long a request is enqueued for. - PendingCount int64 `json:"pendingCount,omitempty,string"` - - // ProcessedCount: The number of hybrid inspection requests processed - // within this job. - ProcessedCount int64 `json:"processedCount,omitempty,string"` +// GooglePrivacyDlpV2FieldId: General identifier of a data field in a +// storage service. +type GooglePrivacyDlpV2FieldId struct { + // Name: Name describing the field. + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "AbortedCount") to + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4575,51 +4655,49 @@ type GooglePrivacyDlpV2HybridInspectStatistics struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AbortedCount") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2HybridInspectStatistics) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2HybridInspectStatistics +func (s *GooglePrivacyDlpV2FieldId) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2FieldId raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2HybridOptions: Configuration to control jobs where -// the content being inspected is outside of Google Cloud Platform. -type GooglePrivacyDlpV2HybridOptions struct { - // Description: A short description of where the data is coming from. - // Will be stored once in the job. 256 max length. - Description string `json:"description,omitempty"` +// GooglePrivacyDlpV2FieldTransformation: The transformation to apply to +// the field. +type GooglePrivacyDlpV2FieldTransformation struct { + // Condition: Only apply the transformation if the condition evaluates + // to true for the given `RecordCondition`. The conditions are allowed + // to reference fields that are not used in the actual transformation. + // Example Use Cases: - Apply a different bucket transformation to an + // age column if the zip code column for the same record is within a + // specific range. - Redact a field if the date of birth field is + // greater than 85. + Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"` - // Labels: To organize findings, these labels will be added to each - // finding. Label keys must be between 1 and 63 characters long and must - // conform to the following regular expression: `a-z - // ([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 - // characters long and must conform to the regular expression - // `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be - // associated with a given finding. Examples: * "environment" : - // "production" * "pipeline" : "etl" - Labels map[string]string `json:"labels,omitempty"` + // Fields: Required. Input field(s) to apply the transformation to. When + // you have columns that reference their position within a list, omit + // the index from the FieldId. FieldId name matching ignores the index. + // For example, instead of "contact.nums[0].type", use + // "contact.nums.type". + Fields []*GooglePrivacyDlpV2FieldId `json:"fields,omitempty"` - // RequiredFindingLabelKeys: These are labels that each inspection - // request must include within their 'finding_labels' map. Request may - // contain others, but any missing one of these will be rejected. Label - // keys must be between 1 and 63 characters long and must conform to the - // following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. No more - // than 10 keys can be required. - RequiredFindingLabelKeys []string `json:"requiredFindingLabelKeys,omitempty"` + // InfoTypeTransformations: Treat the contents of the field as free + // text, and selectively transform content that matches an `InfoType`. + InfoTypeTransformations *GooglePrivacyDlpV2InfoTypeTransformations `json:"infoTypeTransformations,omitempty"` - // TableOptions: If the container is a table, additional information to - // make findings meaningful such as the columns that are primary keys. - TableOptions *GooglePrivacyDlpV2TableOptions `json:"tableOptions,omitempty"` + // PrimitiveTransformation: Apply the transformation to the entire + // field. + PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "Condition") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4627,29 +4705,38 @@ type GooglePrivacyDlpV2HybridOptions struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2HybridOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2HybridOptions +func (s *GooglePrivacyDlpV2FieldTransformation) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2FieldTransformation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ImageLocation: Location of the finding within an -// image. -type GooglePrivacyDlpV2ImageLocation struct { - // BoundingBoxes: Bounding boxes locating the pixels within the image - // containing the finding. - BoundingBoxes []*GooglePrivacyDlpV2BoundingBox `json:"boundingBoxes,omitempty"` +// GooglePrivacyDlpV2FileSet: Set of files to scan. +type GooglePrivacyDlpV2FileSet struct { + // RegexFileSet: The regex-filtered set of files to scan. Exactly one of + // `url` or `regex_file_set` must be set. + RegexFileSet *GooglePrivacyDlpV2CloudStorageRegexFileSet `json:"regexFileSet,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoundingBoxes") to + // Url: The Cloud Storage url of the file(s) to scan, in the format + // `gs:///`. Trailing wildcard in the path is allowed. If the url ends + // in a trailing slash, the bucket or directory represented by the url + // will be scanned non-recursively (content in sub-directories will not + // be scanned). This means that `gs://mybucket/` is equivalent to + // `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to + // `gs://mybucket/directory/*`. Exactly one of `url` or `regex_file_set` + // must be set. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RegexFileSet") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4657,7 +4744,7 @@ type GooglePrivacyDlpV2ImageLocation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoundingBoxes") to include + // NullFields is a list of field names (e.g. "RegexFileSet") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -4666,31 +4753,80 @@ type GooglePrivacyDlpV2ImageLocation struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ImageLocation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ImageLocation +func (s *GooglePrivacyDlpV2FileSet) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2FileSet raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ImageRedactionConfig: Configuration for determining -// how redaction of images should occur. -type GooglePrivacyDlpV2ImageRedactionConfig struct { - // InfoType: Only one per info_type should be provided per request. If - // not specified, and redact_all_text is false, the DLP API will redact - // all text that it matches against all info_types that are found, but - // not specified in another ImageRedactionConfig. +// GooglePrivacyDlpV2Finding: Represents a piece of potentially +// sensitive content. +type GooglePrivacyDlpV2Finding struct { + // CreateTime: Timestamp when finding was detected. + CreateTime string `json:"createTime,omitempty"` + + // FindingId: The unique finding id. + FindingId string `json:"findingId,omitempty"` + + // InfoType: The type of content that might have been found. Provided if + // `excluded_types` is false. InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` - // RedactAllText: If true, all text found in the image, regardless - // whether it matches an info_type, is redacted. Only one should be - // provided. - RedactAllText bool `json:"redactAllText,omitempty"` + // JobCreateTime: Time the job started that produced this finding. + JobCreateTime string `json:"jobCreateTime,omitempty"` - // RedactionColor: The color to use when redacting content from an - // image. If not specified, the default is black. - RedactionColor *GooglePrivacyDlpV2Color `json:"redactionColor,omitempty"` + // JobName: The job that stored the finding. + JobName string `json:"jobName,omitempty"` - // ForceSendFields is a list of field names (e.g. "InfoType") to + // Labels: The labels associated with this `Finding`. Label keys must be + // between 1 and 63 characters long and must conform to the following + // regular expression: `a-z ([-a-z0-9]*[a-z0-9])?`. Label values must be + // between 0 and 63 characters long and must conform to the regular + // expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels + // can be associated with a given finding. Examples: * "environment" : + // "production" * "pipeline" : "etl" + Labels map[string]string `json:"labels,omitempty"` + + // Likelihood: Confidence of how likely it is that the `info_type` is + // correct. + // + // Possible values: + // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. + // "VERY_UNLIKELY" - Highest chance of a false positive. + // "UNLIKELY" - High chance of a false positive. + // "POSSIBLE" - Some matching signals. The default value. + // "LIKELY" - Low chance of a false positive. + // "VERY_LIKELY" - Confidence level is high. Lowest chance of a false + // positive. + Likelihood string `json:"likelihood,omitempty"` + + // Location: Where the content was found. + Location *GooglePrivacyDlpV2Location `json:"location,omitempty"` + + // Name: Resource name in format + // projects/{project}/locations/{location}/findings/{finding} Populated + // only when viewing persisted findings. + Name string `json:"name,omitempty"` + + // Quote: The content that was found. Even if the content is not + // textual, it may be converted to a textual representation here. + // Provided if `include_quote` is true and the finding is less than or + // equal to 4096 bytes long. If the finding exceeds 4096 bytes in + // length, the quote may be omitted. + Quote string `json:"quote,omitempty"` + + // QuoteInfo: Contains data parsed from quotes. Only populated if + // include_quote was set to true and a supported infoType was requested. + // Currently supported infoTypes: DATE, DATE_OF_BIRTH and TIME. + QuoteInfo *GooglePrivacyDlpV2QuoteInfo `json:"quoteInfo,omitempty"` + + // ResourceName: The job that stored the finding. + ResourceName string `json:"resourceName,omitempty"` + + // TriggerName: Job trigger name, if applicable, for this finding. + TriggerName string `json:"triggerName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4698,7 +4834,7 @@ type GooglePrivacyDlpV2ImageRedactionConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InfoType") to include in + // NullFields is a list of field names (e.g. "CreateTime") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -4707,33 +4843,105 @@ type GooglePrivacyDlpV2ImageRedactionConfig struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ImageRedactionConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ImageRedactionConfig +func (s *GooglePrivacyDlpV2Finding) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Finding raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ImageTransformation: Configuration for determining -// how redaction of images should occur. -type GooglePrivacyDlpV2ImageTransformation struct { - // AllInfoTypes: Apply transformation to all findings not specified in - // other ImageTransformation's selected_info_types. Only one instance is - // allowed within the ImageTransformations message. - AllInfoTypes *GooglePrivacyDlpV2AllInfoTypes `json:"allInfoTypes,omitempty"` +// GooglePrivacyDlpV2FindingLimits: Configuration to control the number +// of findings returned for inspection. This is not used for +// de-identification or data profiling. When redacting sensitive data +// from images, finding limits don't apply. They can cause unexpected or +// inconsistent results, where only some data is redacted. Don't include +// finding limits in RedactImage requests. Otherwise, Cloud DLP returns +// an error. +type GooglePrivacyDlpV2FindingLimits struct { + // MaxFindingsPerInfoType: Configuration of findings limit given for + // specified infoTypes. + MaxFindingsPerInfoType []*GooglePrivacyDlpV2InfoTypeLimit `json:"maxFindingsPerInfoType,omitempty"` - // AllText: Apply transformation to all text that doesn't match an - // infoType. Only one instance is allowed within the - // ImageTransformations message. - AllText *GooglePrivacyDlpV2AllText `json:"allText,omitempty"` + // MaxFindingsPerItem: Max number of findings that are returned for each + // item scanned. When set within an InspectContentRequest, this field is + // ignored. This value isn't a hard limit. If the number of findings for + // an item reaches this limit, the inspection of that item ends + // gradually, not abruptly. Therefore, the actual number of findings + // that Cloud DLP returns for the item can be multiple times higher than + // this value. + MaxFindingsPerItem int64 `json:"maxFindingsPerItem,omitempty"` - // RedactionColor: The color to use when redacting content from an - // image. If not specified, the default is black. - RedactionColor *GooglePrivacyDlpV2Color `json:"redactionColor,omitempty"` + // MaxFindingsPerRequest: Max number of findings that are returned per + // request or job. If you set this field in an InspectContentRequest, + // the resulting maximum value is the value that you set or 3,000, + // whichever is lower. This value isn't a hard limit. If an inspection + // reaches this limit, the inspection ends gradually, not abruptly. + // Therefore, the actual number of findings that Cloud DLP returns can + // be multiple times higher than this value. + MaxFindingsPerRequest int64 `json:"maxFindingsPerRequest,omitempty"` - // SelectedInfoTypes: Apply transformation to the selected info_types. - SelectedInfoTypes *GooglePrivacyDlpV2SelectedInfoTypes `json:"selectedInfoTypes,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "MaxFindingsPerInfoType") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "AllInfoTypes") to + // NullFields is a list of field names (e.g. "MaxFindingsPerInfoType") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2FindingLimits) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2FindingLimits + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2FinishDlpJobRequest: The request message for +// finishing a DLP hybrid job. +type GooglePrivacyDlpV2FinishDlpJobRequest struct { +} + +// GooglePrivacyDlpV2FixedSizeBucketingConfig: Buckets values based on +// fixed size ranges. The Bucketing transformation can provide all of +// this functionality, but requires more configuration. This message is +// provided as a convenience to the user for simple bucketing +// strategies. The transformed value will be a hyphenated string of +// {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and +// upper_bound = 20, all values that are within this bucket will be +// replaced with "10-20". This can be used on data of type: double, +// long. If the bound Value type differs from the type of data being +// transformed, we will first attempt converting the type of the data to +// be transformed to match the type of the bound before comparing. See +// https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. +type GooglePrivacyDlpV2FixedSizeBucketingConfig struct { + // BucketSize: Required. Size of each bucket (except for minimum and + // maximum buckets). So if `lower_bound` = 10, `upper_bound` = 89, and + // `bucket_size` = 10, then the following buckets would be used: -10, + // 10-20, 20-30, 30-40, 40-50, 50-60, 60-70, 70-80, 80-89, 89+. + // Precision up to 2 decimals works. + BucketSize float64 `json:"bucketSize,omitempty"` + + // LowerBound: Required. Lower bound value of buckets. All values less + // than `lower_bound` are grouped together into a single bucket; for + // example if `lower_bound` = 10, then all values less than 10 are + // replaced with the value "-10". + LowerBound *GooglePrivacyDlpV2Value `json:"lowerBound,omitempty"` + + // UpperBound: Required. Upper bound value of buckets. All values + // greater than upper_bound are grouped together into a single bucket; + // for example if `upper_bound` = 89, then all values greater than 89 + // are replaced with the value "89+". + UpperBound *GooglePrivacyDlpV2Value `json:"upperBound,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BucketSize") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4741,7 +4949,68 @@ type GooglePrivacyDlpV2ImageTransformation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllInfoTypes") to include + // NullFields is a list of field names (e.g. "BucketSize") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GooglePrivacyDlpV2FixedSizeBucketingConfig) UnmarshalJSON(data []byte) error { + type NoMethod GooglePrivacyDlpV2FixedSizeBucketingConfig + var s1 struct { + BucketSize gensupport.JSONFloat64 `json:"bucketSize"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.BucketSize = float64(s1.BucketSize) + return nil +} + +// GooglePrivacyDlpV2HotwordRule: The rule that adjusts the likelihood +// of findings within a certain proximity of hotwords. +type GooglePrivacyDlpV2HotwordRule struct { + // HotwordRegex: Regular expression pattern defining what qualifies as a + // hotword. + HotwordRegex *GooglePrivacyDlpV2Regex `json:"hotwordRegex,omitempty"` + + // LikelihoodAdjustment: Likelihood adjustment to apply to all matching + // findings. + LikelihoodAdjustment *GooglePrivacyDlpV2LikelihoodAdjustment `json:"likelihoodAdjustment,omitempty"` + + // Proximity: Range of characters within which the entire hotword must + // reside. The total length of the window cannot exceed 1000 characters. + // The finding itself will be included in the window, so that hotwords + // can be used to match substrings of the finding itself. Suppose you + // want Cloud DLP to promote the likelihood of the phone number regex + // "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the area code + // of a company's office. In this case, use the hotword regex "\(xxx\)", + // where "xxx" is the area code in question. For tabular data, if you + // want to modify the likelihood of an entire column of findngs, see + // [Hotword example: Set the match likelihood of a table column] + // (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values). + Proximity *GooglePrivacyDlpV2Proximity `json:"proximity,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HotwordRegex") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HotwordRegex") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -4750,18 +5019,23 @@ type GooglePrivacyDlpV2ImageTransformation struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ImageTransformation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ImageTransformation +func (s *GooglePrivacyDlpV2HotwordRule) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2HotwordRule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ImageTransformations: A type of transformation that -// is applied over images. -type GooglePrivacyDlpV2ImageTransformations struct { - Transforms []*GooglePrivacyDlpV2ImageTransformation `json:"transforms,omitempty"` +// GooglePrivacyDlpV2HybridContentItem: An individual hybrid item to +// inspect. Will be stored temporarily during processing. +type GooglePrivacyDlpV2HybridContentItem struct { + // FindingDetails: Supplementary information that will be added to each + // finding. + FindingDetails *GooglePrivacyDlpV2HybridFindingDetails `json:"findingDetails,omitempty"` - // ForceSendFields is a list of field names (e.g. "Transforms") to + // Item: The item to inspect. + Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FindingDetails") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4769,38 +5043,61 @@ type GooglePrivacyDlpV2ImageTransformations struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Transforms") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "FindingDetails") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ImageTransformations) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ImageTransformations +func (s *GooglePrivacyDlpV2HybridContentItem) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2HybridContentItem raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InfoType: Type of information detected by the API. -type GooglePrivacyDlpV2InfoType struct { - // Name: Name of the information type. Either a name of your choosing - // when creating a CustomInfoType, or one of the names listed at - // https://cloud.google.com/dlp/docs/infotypes-reference when specifying - // a built-in type. When sending Cloud DLP results to Data Catalog, - // infoType names should conform to the pattern `[A-Za-z0-9$_-]{1,64}`. - Name string `json:"name,omitempty"` +// GooglePrivacyDlpV2HybridFindingDetails: Populate to associate +// additional data with each finding. +type GooglePrivacyDlpV2HybridFindingDetails struct { + // ContainerDetails: Details about the container where the content being + // inspected is from. + ContainerDetails *GooglePrivacyDlpV2Container `json:"containerDetails,omitempty"` - // SensitivityScore: Optional custom sensitivity for this InfoType. This - // only applies to data profiling. - SensitivityScore *GooglePrivacyDlpV2SensitivityScore `json:"sensitivityScore,omitempty"` + // FileOffset: Offset in bytes of the line, from the beginning of the + // file, where the finding is located. Populate if the item being + // scanned is only part of a bigger item, such as a shard of a file and + // you want to track the absolute position of the finding. + FileOffset int64 `json:"fileOffset,omitempty,string"` - // Version: Optional version name for this InfoType. - Version string `json:"version,omitempty"` + // Labels: Labels to represent user provided metadata about the data + // being inspected. If configured by the job, some key values may be + // required. The labels associated with `Finding`'s produced by hybrid + // inspection. Label keys must be between 1 and 63 characters long and + // must conform to the following regular expression: `a-z + // ([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 + // characters long and must conform to the regular expression + // `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be + // associated with a given finding. Examples: * "environment" : + // "production" * "pipeline" : "etl" + Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // RowOffset: Offset of the row for tables. Populate if the row(s) being + // scanned are part of a bigger dataset and you want to keep track of + // their absolute position. + RowOffset int64 `json:"rowOffset,omitempty,string"` + + // TableOptions: If the container is a table, additional information to + // make findings meaningful such as the columns that are primary keys. + // If not known ahead of time, can also be set within each inspect + // hybrid call and the two will be merged. Note that identifying_fields + // will only be stored to BigQuery, and only if the BigQuery action has + // been included. + TableOptions *GooglePrivacyDlpV2TableOptions `json:"tableOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContainerDetails") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4808,112 +5105,29 @@ type GooglePrivacyDlpV2InfoType struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ContainerDetails") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InfoType) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InfoType +func (s *GooglePrivacyDlpV2HybridFindingDetails) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2HybridFindingDetails raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InfoTypeCategory: Classification of infoTypes to -// organize them according to geographic location, industry, and data -// type. -type GooglePrivacyDlpV2InfoTypeCategory struct { - // IndustryCategory: The group of relevant businesses where this - // infoType is commonly used - // - // Possible values: - // "INDUSTRY_UNSPECIFIED" - Unused industry - // "FINANCE" - The infoType is typically used in the finance industry. - // "HEALTH" - The infoType is typically used in the health industry. - // "TELECOMMUNICATIONS" - The infoType is typically used in the - // telecommunications industry. - IndustryCategory string `json:"industryCategory,omitempty"` - - // LocationCategory: The region or country that issued the ID or - // document represented by the infoType. - // - // Possible values: - // "LOCATION_UNSPECIFIED" - Unused location - // "GLOBAL" - The infoType is not issued by or tied to a specific - // region, but is used almost everywhere. - // "ARGENTINA" - The infoType is typically used in Argentina. - // "AUSTRALIA" - The infoType is typically used in Australia. - // "BELGIUM" - The infoType is typically used in Belgium. - // "BRAZIL" - The infoType is typically used in Brazil. - // "CANADA" - The infoType is typically used in Canada. - // "CHILE" - The infoType is typically used in Chile. - // "CHINA" - The infoType is typically used in China. - // "COLOMBIA" - The infoType is typically used in Colombia. - // "CROATIA" - The infoType is typically used in Croatia. - // "DENMARK" - The infoType is typically used in Denmark. - // "FRANCE" - The infoType is typically used in France. - // "FINLAND" - The infoType is typically used in Finland. - // "GERMANY" - The infoType is typically used in Germany. - // "HONG_KONG" - The infoType is typically used in Hong Kong. - // "INDIA" - The infoType is typically used in India. - // "INDONESIA" - The infoType is typically used in Indonesia. - // "IRELAND" - The infoType is typically used in Ireland. - // "ISRAEL" - The infoType is typically used in Israel. - // "ITALY" - The infoType is typically used in Italy. - // "JAPAN" - The infoType is typically used in Japan. - // "KOREA" - The infoType is typically used in Korea. - // "MEXICO" - The infoType is typically used in Mexico. - // "THE_NETHERLANDS" - The infoType is typically used in the - // Netherlands. - // "NEW_ZEALAND" - The infoType is typically used in New Zealand. - // "NORWAY" - The infoType is typically used in Norway. - // "PARAGUAY" - The infoType is typically used in Paraguay. - // "PERU" - The infoType is typically used in Peru. - // "POLAND" - The infoType is typically used in Poland. - // "PORTUGAL" - The infoType is typically used in Portugal. - // "SINGAPORE" - The infoType is typically used in Singapore. - // "SOUTH_AFRICA" - The infoType is typically used in South Africa. - // "SPAIN" - The infoType is typically used in Spain. - // "SWEDEN" - The infoType is typically used in Sweden. - // "SWITZERLAND" - The infoType is typically used in Switzerland. - // "TAIWAN" - The infoType is typically used in Taiwan. - // "THAILAND" - The infoType is typically used in Thailand. - // "TURKEY" - The infoType is typically used in Turkey. - // "UNITED_KINGDOM" - The infoType is typically used in the United - // Kingdom. - // "UNITED_STATES" - The infoType is typically used in the United - // States. - // "URUGUAY" - The infoType is typically used in Uruguay. - // "VENEZUELA" - The infoType is typically used in Venezuela. - // "INTERNAL" - The infoType is typically used in Google internally. - LocationCategory string `json:"locationCategory,omitempty"` - - // TypeCategory: The class of identifiers where this infoType belongs - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unused type - // "PII" - Personally identifiable information, for example, a name or - // phone number - // "SPII" - Personally identifiable information that is especially - // sensitive, for example, a passport number. - // "DEMOGRAPHIC" - Attributes that can partially identify someone, - // especially in combination with other attributes, like age, height, - // and gender. - // "CREDENTIAL" - Confidential or secret information, for example, a - // password. - // "GOVERNMENT_ID" - An identification document issued by a - // government. - // "DOCUMENT" - A document, for example, a resume or source code. - // "CONTEXTUAL_INFORMATION" - Information that is not sensitive on its - // own, but provides details about the circumstances surrounding an - // entity or an event. - TypeCategory string `json:"typeCategory,omitempty"` +// GooglePrivacyDlpV2HybridInspectDlpJobRequest: Request to search for +// potentially sensitive info in a custom location. +type GooglePrivacyDlpV2HybridInspectDlpJobRequest struct { + // HybridItem: The item to inspect. + HybridItem *GooglePrivacyDlpV2HybridContentItem `json:"hybridItem,omitempty"` - // ForceSendFields is a list of field names (e.g. "IndustryCategory") to + // ForceSendFields is a list of field names (e.g. "HybridItem") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4921,52 +5135,28 @@ type GooglePrivacyDlpV2InfoTypeCategory struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IndustryCategory") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "HybridItem") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InfoTypeCategory) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InfoTypeCategory +func (s *GooglePrivacyDlpV2HybridInspectDlpJobRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2HybridInspectDlpJobRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InfoTypeDescription: InfoType description. -type GooglePrivacyDlpV2InfoTypeDescription struct { - // Categories: The category of the infoType. - Categories []*GooglePrivacyDlpV2InfoTypeCategory `json:"categories,omitempty"` - - // Description: Description of the infotype. Translated when language is - // provided in the request. - Description string `json:"description,omitempty"` - - // DisplayName: Human readable form of the infoType name. - DisplayName string `json:"displayName,omitempty"` - - // Name: Internal name of the infoType. - Name string `json:"name,omitempty"` - - // SensitivityScore: The default sensitivity of the infoType. - SensitivityScore *GooglePrivacyDlpV2SensitivityScore `json:"sensitivityScore,omitempty"` - - // SupportedBy: Which parts of the API supports this InfoType. - // - // Possible values: - // "ENUM_TYPE_UNSPECIFIED" - Unused. - // "INSPECT" - Supported by the inspect operations. - // "RISK_ANALYSIS" - Supported by the risk analysis operations. - SupportedBy []string `json:"supportedBy,omitempty"` - - // Versions: A list of available versions for the infotype. - Versions []*GooglePrivacyDlpV2VersionDescription `json:"versions,omitempty"` +// GooglePrivacyDlpV2HybridInspectJobTriggerRequest: Request to search +// for potentially sensitive info in a custom location. +type GooglePrivacyDlpV2HybridInspectJobTriggerRequest struct { + // HybridItem: The item to inspect. + HybridItem *GooglePrivacyDlpV2HybridContentItem `json:"hybridItem,omitempty"` - // ForceSendFields is a list of field names (e.g. "Categories") to + // ForceSendFields is a list of field names (e.g. "HybridItem") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4974,7 +5164,7 @@ type GooglePrivacyDlpV2InfoTypeDescription struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Categories") to include in + // NullFields is a list of field names (e.g. "HybridItem") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -4983,38 +5173,40 @@ type GooglePrivacyDlpV2InfoTypeDescription struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InfoTypeDescription) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InfoTypeDescription +func (s *GooglePrivacyDlpV2HybridInspectJobTriggerRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2HybridInspectJobTriggerRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InfoTypeLikelihood: Configuration for setting a -// minimum likelihood per infotype. Used to customize the minimum -// likelihood level for specific infotypes in the request. For example, -// use this if you want to lower the precision for PERSON_NAME without -// lowering the precision for the other infotypes in the request. -type GooglePrivacyDlpV2InfoTypeLikelihood struct { - // InfoType: Type of information the likelihood threshold applies to. - // Only one likelihood per info_type should be provided. If - // InfoTypeLikelihood does not have an info_type, the configuration - // fails. - InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` +// GooglePrivacyDlpV2HybridInspectResponse: Quota exceeded errors will +// be thrown once quota has been met. +type GooglePrivacyDlpV2HybridInspectResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} - // MinLikelihood: Only returns findings equal to or above this - // threshold. This field is required or else the configuration fails. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. - // "VERY_UNLIKELY" - Highest chance of a false positive. - // "UNLIKELY" - High chance of a false positive. - // "POSSIBLE" - Some matching signals. The default value. - // "LIKELY" - Low chance of a false positive. - // "VERY_LIKELY" - Confidence level is high. Lowest chance of a false - // positive. - MinLikelihood string `json:"minLikelihood,omitempty"` +// GooglePrivacyDlpV2HybridInspectStatistics: Statistics related to +// processing hybrid inspect requests. +type GooglePrivacyDlpV2HybridInspectStatistics struct { + // AbortedCount: The number of hybrid inspection requests aborted + // because the job ran out of quota or was ended before they could be + // processed. + AbortedCount int64 `json:"abortedCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "InfoType") to + // PendingCount: The number of hybrid requests currently being + // processed. Only populated when called via method `getDlpJob`. A burst + // of traffic may cause hybrid inspect requests to be enqueued. + // Processing will take place as quickly as possible, but resource + // limitations may impact how long a request is enqueued for. + PendingCount int64 `json:"pendingCount,omitempty,string"` + + // ProcessedCount: The number of hybrid inspection requests processed + // within this job. + ProcessedCount int64 `json:"processedCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "AbortedCount") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5022,34 +5214,51 @@ type GooglePrivacyDlpV2InfoTypeLikelihood struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InfoType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AbortedCount") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InfoTypeLikelihood) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InfoTypeLikelihood +func (s *GooglePrivacyDlpV2HybridInspectStatistics) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2HybridInspectStatistics raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InfoTypeLimit: Max findings configuration per -// infoType, per content item or long running DlpJob. -type GooglePrivacyDlpV2InfoTypeLimit struct { - // InfoType: Type of information the findings limit applies to. Only one - // limit per info_type should be provided. If InfoTypeLimit does not - // have an info_type, the DLP API applies the limit against all - // info_types that are found but not specified in another InfoTypeLimit. - InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` +// GooglePrivacyDlpV2HybridOptions: Configuration to control jobs where +// the content being inspected is outside of Google Cloud Platform. +type GooglePrivacyDlpV2HybridOptions struct { + // Description: A short description of where the data is coming from. + // Will be stored once in the job. 256 max length. + Description string `json:"description,omitempty"` - // MaxFindings: Max findings limit for the given infoType. - MaxFindings int64 `json:"maxFindings,omitempty"` + // Labels: To organize findings, these labels will be added to each + // finding. Label keys must be between 1 and 63 characters long and must + // conform to the following regular expression: `a-z + // ([-a-z0-9]*[a-z0-9])?`. Label values must be between 0 and 63 + // characters long and must conform to the regular expression + // `([a-z]([-a-z0-9]*[a-z0-9])?)?`. No more than 10 labels can be + // associated with a given finding. Examples: * "environment" : + // "production" * "pipeline" : "etl" + Labels map[string]string `json:"labels,omitempty"` - // ForceSendFields is a list of field names (e.g. "InfoType") to + // RequiredFindingLabelKeys: These are labels that each inspection + // request must include within their 'finding_labels' map. Request may + // contain others, but any missing one of these will be rejected. Label + // keys must be between 1 and 63 characters long and must conform to the + // following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. No more + // than 10 keys can be required. + RequiredFindingLabelKeys []string `json:"requiredFindingLabelKeys,omitempty"` + + // TableOptions: If the container is a table, additional information to + // make findings meaningful such as the columns that are primary keys. + TableOptions *GooglePrivacyDlpV2TableOptions `json:"tableOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5057,31 +5266,70 @@ type GooglePrivacyDlpV2InfoTypeLimit struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InfoType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InfoTypeLimit) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InfoTypeLimit +func (s *GooglePrivacyDlpV2HybridOptions) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2HybridOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InfoTypeStats: Statistics regarding a specific -// InfoType. -type GooglePrivacyDlpV2InfoTypeStats struct { - // Count: Number of findings for this infoType. - Count int64 `json:"count,omitempty,string"` +// GooglePrivacyDlpV2ImageLocation: Location of the finding within an +// image. +type GooglePrivacyDlpV2ImageLocation struct { + // BoundingBoxes: Bounding boxes locating the pixels within the image + // containing the finding. + BoundingBoxes []*GooglePrivacyDlpV2BoundingBox `json:"boundingBoxes,omitempty"` - // InfoType: The type of finding this stat is for. + // ForceSendFields is a list of field names (e.g. "BoundingBoxes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BoundingBoxes") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2ImageLocation) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ImageLocation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2ImageRedactionConfig: Configuration for determining +// how redaction of images should occur. +type GooglePrivacyDlpV2ImageRedactionConfig struct { + // InfoType: Only one per info_type should be provided per request. If + // not specified, and redact_all_text is false, the DLP API will redact + // all text that it matches against all info_types that are found, but + // not specified in another ImageRedactionConfig. InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to + // RedactAllText: If true, all text found in the image, regardless + // whether it matches an info_type, is redacted. Only one should be + // provided. + RedactAllText bool `json:"redactAllText,omitempty"` + + // RedactionColor: The color to use when redacting content from an + // image. If not specified, the default is black. + RedactionColor *GooglePrivacyDlpV2Color `json:"redactionColor,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InfoType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5089,8 +5337,8 @@ type GooglePrivacyDlpV2InfoTypeStats struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "InfoType") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -5098,58 +5346,61 @@ type GooglePrivacyDlpV2InfoTypeStats struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InfoTypeStats) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InfoTypeStats +func (s *GooglePrivacyDlpV2ImageRedactionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ImageRedactionConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InfoTypeSummary: The infoType details for this -// column. -type GooglePrivacyDlpV2InfoTypeSummary struct { - // EstimatedPrevalence: Not populated for predicted infotypes. - EstimatedPrevalence int64 `json:"estimatedPrevalence,omitempty"` +// GooglePrivacyDlpV2ImageTransformation: Configuration for determining +// how redaction of images should occur. +type GooglePrivacyDlpV2ImageTransformation struct { + // AllInfoTypes: Apply transformation to all findings not specified in + // other ImageTransformation's selected_info_types. Only one instance is + // allowed within the ImageTransformations message. + AllInfoTypes *GooglePrivacyDlpV2AllInfoTypes `json:"allInfoTypes,omitempty"` - // InfoType: The infoType. - InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` + // AllText: Apply transformation to all text that doesn't match an + // infoType. Only one instance is allowed within the + // ImageTransformations message. + AllText *GooglePrivacyDlpV2AllText `json:"allText,omitempty"` - // ForceSendFields is a list of field names (e.g. "EstimatedPrevalence") - // to unconditionally include in API requests. By default, fields with + // RedactionColor: The color to use when redacting content from an + // image. If not specified, the default is black. + RedactionColor *GooglePrivacyDlpV2Color `json:"redactionColor,omitempty"` + + // SelectedInfoTypes: Apply transformation to the selected info_types. + SelectedInfoTypes *GooglePrivacyDlpV2SelectedInfoTypes `json:"selectedInfoTypes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllInfoTypes") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EstimatedPrevalence") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "AllInfoTypes") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InfoTypeSummary) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InfoTypeSummary +func (s *GooglePrivacyDlpV2ImageTransformation) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ImageTransformation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InfoTypeTransformation: A transformation to apply -// to text that is identified as a specific info_type. -type GooglePrivacyDlpV2InfoTypeTransformation struct { - // InfoTypes: InfoTypes to apply the transformation to. An empty list - // will cause this transformation to apply to all findings that - // correspond to infoTypes that were requested in `InspectConfig`. - InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` - - // PrimitiveTransformation: Required. Primitive transformation to apply - // to the infoType. - PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` +// GooglePrivacyDlpV2ImageTransformations: A type of transformation that +// is applied over images. +type GooglePrivacyDlpV2ImageTransformations struct { + Transforms []*GooglePrivacyDlpV2ImageTransformation `json:"transforms,omitempty"` - // ForceSendFields is a list of field names (e.g. "InfoTypes") to + // ForceSendFields is a list of field names (e.g. "Transforms") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5157,7 +5408,7 @@ type GooglePrivacyDlpV2InfoTypeTransformation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InfoTypes") to include in + // NullFields is a list of field names (e.g. "Transforms") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5166,23 +5417,29 @@ type GooglePrivacyDlpV2InfoTypeTransformation struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InfoTypeTransformation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InfoTypeTransformation +func (s *GooglePrivacyDlpV2ImageTransformations) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ImageTransformations raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InfoTypeTransformations: A type of transformation -// that will scan unstructured text and apply various -// `PrimitiveTransformation`s to each finding, where the transformation -// is applied to only values that were identified as a specific -// info_type. -type GooglePrivacyDlpV2InfoTypeTransformations struct { - // Transformations: Required. Transformation for each infoType. Cannot - // specify more than one for a given infoType. - Transformations []*GooglePrivacyDlpV2InfoTypeTransformation `json:"transformations,omitempty"` +// GooglePrivacyDlpV2InfoType: Type of information detected by the API. +type GooglePrivacyDlpV2InfoType struct { + // Name: Name of the information type. Either a name of your choosing + // when creating a CustomInfoType, or one of the names listed at + // https://cloud.google.com/dlp/docs/infotypes-reference when specifying + // a built-in type. When sending Cloud DLP results to Data Catalog, + // infoType names should conform to the pattern `[A-Za-z0-9$_-]{1,64}`. + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Transformations") to + // SensitivityScore: Optional custom sensitivity for this InfoType. This + // only applies to data profiling. + SensitivityScore *GooglePrivacyDlpV2SensitivityScore `json:"sensitivityScore,omitempty"` + + // Version: Optional version name for this InfoType. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5190,102 +5447,112 @@ type GooglePrivacyDlpV2InfoTypeTransformations struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Transformations") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InfoTypeTransformations) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InfoTypeTransformations +func (s *GooglePrivacyDlpV2InfoType) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InfoType raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InspectConfig: Configuration description of the -// scanning process. When used with redactContent only info_types and -// min_likelihood are currently used. -type GooglePrivacyDlpV2InspectConfig struct { - // ContentOptions: Deprecated and unused. +// GooglePrivacyDlpV2InfoTypeCategory: Classification of infoTypes to +// organize them according to geographic location, industry, and data +// type. +type GooglePrivacyDlpV2InfoTypeCategory struct { + // IndustryCategory: The group of relevant businesses where this + // infoType is commonly used // // Possible values: - // "CONTENT_UNSPECIFIED" - Includes entire content of a file or a data - // stream. - // "CONTENT_TEXT" - Text content within the data, excluding any - // metadata. - // "CONTENT_IMAGE" - Images found in the data. - ContentOptions []string `json:"contentOptions,omitempty"` - - // CustomInfoTypes: CustomInfoTypes provided by the user. See - // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn - // more. - CustomInfoTypes []*GooglePrivacyDlpV2CustomInfoType `json:"customInfoTypes,omitempty"` - - // ExcludeInfoTypes: When true, excludes type information of the - // findings. This is not used for data profiling. - ExcludeInfoTypes bool `json:"excludeInfoTypes,omitempty"` - - // IncludeQuote: When true, a contextual quote from the data that - // triggered a finding is included in the response; see Finding.quote. - // This is not used for data profiling. - IncludeQuote bool `json:"includeQuote,omitempty"` - - // InfoTypes: Restricts what info_types to look for. The values must - // correspond to InfoType values returned by ListInfoTypes or listed at - // https://cloud.google.com/dlp/docs/infotypes-reference. When no - // InfoTypes or CustomInfoTypes are specified in a request, the system - // may automatically choose what detectors to run. By default this may - // be all types, but may change over time as detectors are updated. If - // you need precise control and predictability as to what detectors are - // run you should specify specific InfoTypes listed in the reference, - // otherwise a default list will be used, which may change over time. - InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` - - // Limits: Configuration to control the number of findings returned. - // This is not used for data profiling. When redacting sensitive data - // from images, finding limits don't apply. They can cause unexpected or - // inconsistent results, where only some data is redacted. Don't include - // finding limits in RedactImage requests. Otherwise, Cloud DLP returns - // an error. When set within an InspectJobConfig, the specified maximum - // values aren't hard limits. If an inspection job reaches these limits, - // the job ends gradually, not abruptly. Therefore, the actual number of - // findings that Cloud DLP returns can be multiple times higher than - // these maximum values. - Limits *GooglePrivacyDlpV2FindingLimits `json:"limits,omitempty"` + // "INDUSTRY_UNSPECIFIED" - Unused industry + // "FINANCE" - The infoType is typically used in the finance industry. + // "HEALTH" - The infoType is typically used in the health industry. + // "TELECOMMUNICATIONS" - The infoType is typically used in the + // telecommunications industry. + IndustryCategory string `json:"industryCategory,omitempty"` - // MinLikelihood: Only returns findings equal to or above this - // threshold. The default is POSSIBLE. In general, the highest - // likelihood setting yields the fewest findings in results and the - // lowest chance of a false positive. For more information, see Match - // likelihood (https://cloud.google.com/dlp/docs/likelihood). + // LocationCategory: The region or country that issued the ID or + // document represented by the infoType. // // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. - // "VERY_UNLIKELY" - Highest chance of a false positive. - // "UNLIKELY" - High chance of a false positive. - // "POSSIBLE" - Some matching signals. The default value. - // "LIKELY" - Low chance of a false positive. - // "VERY_LIKELY" - Confidence level is high. Lowest chance of a false - // positive. - MinLikelihood string `json:"minLikelihood,omitempty"` - - // MinLikelihoodPerInfoType: Minimum likelihood per infotype. For each - // infotype, a user can specify a minimum likelihood. The system only - // returns a finding if its likelihood is above this threshold. If this - // field is not set, the system uses the InspectConfig min_likelihood. - MinLikelihoodPerInfoType []*GooglePrivacyDlpV2InfoTypeLikelihood `json:"minLikelihoodPerInfoType,omitempty"` + // "LOCATION_UNSPECIFIED" - Unused location + // "GLOBAL" - The infoType is not issued by or tied to a specific + // region, but is used almost everywhere. + // "ARGENTINA" - The infoType is typically used in Argentina. + // "AUSTRALIA" - The infoType is typically used in Australia. + // "BELGIUM" - The infoType is typically used in Belgium. + // "BRAZIL" - The infoType is typically used in Brazil. + // "CANADA" - The infoType is typically used in Canada. + // "CHILE" - The infoType is typically used in Chile. + // "CHINA" - The infoType is typically used in China. + // "COLOMBIA" - The infoType is typically used in Colombia. + // "CROATIA" - The infoType is typically used in Croatia. + // "DENMARK" - The infoType is typically used in Denmark. + // "FRANCE" - The infoType is typically used in France. + // "FINLAND" - The infoType is typically used in Finland. + // "GERMANY" - The infoType is typically used in Germany. + // "HONG_KONG" - The infoType is typically used in Hong Kong. + // "INDIA" - The infoType is typically used in India. + // "INDONESIA" - The infoType is typically used in Indonesia. + // "IRELAND" - The infoType is typically used in Ireland. + // "ISRAEL" - The infoType is typically used in Israel. + // "ITALY" - The infoType is typically used in Italy. + // "JAPAN" - The infoType is typically used in Japan. + // "KOREA" - The infoType is typically used in Korea. + // "MEXICO" - The infoType is typically used in Mexico. + // "THE_NETHERLANDS" - The infoType is typically used in the + // Netherlands. + // "NEW_ZEALAND" - The infoType is typically used in New Zealand. + // "NORWAY" - The infoType is typically used in Norway. + // "PARAGUAY" - The infoType is typically used in Paraguay. + // "PERU" - The infoType is typically used in Peru. + // "POLAND" - The infoType is typically used in Poland. + // "PORTUGAL" - The infoType is typically used in Portugal. + // "SINGAPORE" - The infoType is typically used in Singapore. + // "SOUTH_AFRICA" - The infoType is typically used in South Africa. + // "SPAIN" - The infoType is typically used in Spain. + // "SWEDEN" - The infoType is typically used in Sweden. + // "SWITZERLAND" - The infoType is typically used in Switzerland. + // "TAIWAN" - The infoType is typically used in Taiwan. + // "THAILAND" - The infoType is typically used in Thailand. + // "TURKEY" - The infoType is typically used in Turkey. + // "UNITED_KINGDOM" - The infoType is typically used in the United + // Kingdom. + // "UNITED_STATES" - The infoType is typically used in the United + // States. + // "URUGUAY" - The infoType is typically used in Uruguay. + // "VENEZUELA" - The infoType is typically used in Venezuela. + // "INTERNAL" - The infoType is typically used in Google internally. + LocationCategory string `json:"locationCategory,omitempty"` - // RuleSet: Set of rules to apply to the findings for this - // InspectConfig. Exclusion rules, contained in the set are executed in - // the end, other rules are executed in the order they are specified for - // each info type. - RuleSet []*GooglePrivacyDlpV2InspectionRuleSet `json:"ruleSet,omitempty"` + // TypeCategory: The class of identifiers where this infoType belongs + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unused type + // "PII" - Personally identifiable information, for example, a name or + // phone number + // "SPII" - Personally identifiable information that is especially + // sensitive, for example, a passport number. + // "DEMOGRAPHIC" - Attributes that can partially identify someone, + // especially in combination with other attributes, like age, height, + // and gender. + // "CREDENTIAL" - Confidential or secret information, for example, a + // password. + // "GOVERNMENT_ID" - An identification document issued by a + // government. + // "DOCUMENT" - A document, for example, a resume or source code. + // "CONTEXTUAL_INFORMATION" - Information that is not sensitive on its + // own, but provides details about the circumstances surrounding an + // entity or an event. + TypeCategory string `json:"typeCategory,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentOptions") to + // ForceSendFields is a list of field names (e.g. "IndustryCategory") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5293,7 +5560,7 @@ type GooglePrivacyDlpV2InspectConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentOptions") to + // NullFields is a list of field names (e.g. "IndustryCategory") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -5303,34 +5570,42 @@ type GooglePrivacyDlpV2InspectConfig struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InspectConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InspectConfig +func (s *GooglePrivacyDlpV2InfoTypeCategory) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InfoTypeCategory raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InspectContentRequest: Request to search for -// potentially sensitive info in a ContentItem. -type GooglePrivacyDlpV2InspectContentRequest struct { - // InspectConfig: Configuration for the inspector. What specified here - // will override the template referenced by the inspect_template_name - // argument. - InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` +// GooglePrivacyDlpV2InfoTypeDescription: InfoType description. +type GooglePrivacyDlpV2InfoTypeDescription struct { + // Categories: The category of the infoType. + Categories []*GooglePrivacyDlpV2InfoTypeCategory `json:"categories,omitempty"` - // InspectTemplateName: Template to use. Any configuration directly - // specified in inspect_config will override those set in the template. - // Singular fields that are set in this request will replace their - // corresponding fields in the template. Repeated fields are appended. - // Singular sub-messages and groups are recursively merged. - InspectTemplateName string `json:"inspectTemplateName,omitempty"` + // Description: Description of the infotype. Translated when language is + // provided in the request. + Description string `json:"description,omitempty"` - // Item: The item to inspect. - Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` + // DisplayName: Human readable form of the infoType name. + DisplayName string `json:"displayName,omitempty"` - // LocationId: Deprecated. This field has no effect. - LocationId string `json:"locationId,omitempty"` + // Name: Internal name of the infoType. + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "InspectConfig") to + // SensitivityScore: The default sensitivity of the infoType. + SensitivityScore *GooglePrivacyDlpV2SensitivityScore `json:"sensitivityScore,omitempty"` + + // SupportedBy: Which parts of the API supports this InfoType. + // + // Possible values: + // "ENUM_TYPE_UNSPECIFIED" - Unused. + // "INSPECT" - Supported by the inspect operations. + // "RISK_ANALYSIS" - Supported by the risk analysis operations. + SupportedBy []string `json:"supportedBy,omitempty"` + + // Versions: A list of available versions for the infotype. + Versions []*GooglePrivacyDlpV2VersionDescription `json:"versions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Categories") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5338,32 +5613,47 @@ type GooglePrivacyDlpV2InspectContentRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InspectConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Categories") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InspectContentRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InspectContentRequest +func (s *GooglePrivacyDlpV2InfoTypeDescription) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InfoTypeDescription raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InspectContentResponse: Results of inspecting an -// item. -type GooglePrivacyDlpV2InspectContentResponse struct { - // Result: The findings. - Result *GooglePrivacyDlpV2InspectResult `json:"result,omitempty"` +// GooglePrivacyDlpV2InfoTypeLikelihood: Configuration for setting a +// minimum likelihood per infotype. Used to customize the minimum +// likelihood level for specific infotypes in the request. For example, +// use this if you want to lower the precision for PERSON_NAME without +// lowering the precision for the other infotypes in the request. +type GooglePrivacyDlpV2InfoTypeLikelihood struct { + // InfoType: Type of information the likelihood threshold applies to. + // Only one likelihood per info_type should be provided. If + // InfoTypeLikelihood does not have an info_type, the configuration + // fails. + InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // MinLikelihood: Only returns findings equal to or above this + // threshold. This field is required or else the configuration fails. + // + // Possible values: + // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. + // "VERY_UNLIKELY" - Highest chance of a false positive. + // "UNLIKELY" - High chance of a false positive. + // "POSSIBLE" - Some matching signals. The default value. + // "LIKELY" - Low chance of a false positive. + // "VERY_LIKELY" - Confidence level is high. Lowest chance of a false + // positive. + MinLikelihood string `json:"minLikelihood,omitempty"` - // ForceSendFields is a list of field names (e.g. "Result") to + // ForceSendFields is a list of field names (e.g. "InfoType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5371,8 +5661,8 @@ type GooglePrivacyDlpV2InspectContentResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Result") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "InfoType") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -5380,22 +5670,25 @@ type GooglePrivacyDlpV2InspectContentResponse struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InspectContentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InspectContentResponse +func (s *GooglePrivacyDlpV2InfoTypeLikelihood) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InfoTypeLikelihood raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InspectDataSourceDetails: The results of an inspect -// DataSource job. -type GooglePrivacyDlpV2InspectDataSourceDetails struct { - // RequestedOptions: The configuration used for this job. - RequestedOptions *GooglePrivacyDlpV2RequestedOptions `json:"requestedOptions,omitempty"` +// GooglePrivacyDlpV2InfoTypeLimit: Max findings configuration per +// infoType, per content item or long running DlpJob. +type GooglePrivacyDlpV2InfoTypeLimit struct { + // InfoType: Type of information the findings limit applies to. Only one + // limit per info_type should be provided. If InfoTypeLimit does not + // have an info_type, the DLP API applies the limit against all + // info_types that are found but not specified in another InfoTypeLimit. + InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` - // Result: A summary of the outcome of this inspection job. - Result *GooglePrivacyDlpV2Result `json:"result,omitempty"` + // MaxFindings: Max findings limit for the given infoType. + MaxFindings int64 `json:"maxFindings,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestedOptions") to + // ForceSendFields is a list of field names (e.g. "InfoType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5403,40 +5696,31 @@ type GooglePrivacyDlpV2InspectDataSourceDetails struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestedOptions") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "InfoType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InspectDataSourceDetails) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InspectDataSourceDetails +func (s *GooglePrivacyDlpV2InfoTypeLimit) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InfoTypeLimit raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InspectJobConfig: Controls what and how to inspect -// for findings. -type GooglePrivacyDlpV2InspectJobConfig struct { - // Actions: Actions to execute at the completion of the job. - Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"` - - // InspectConfig: How and what to scan for. - InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` - - // InspectTemplateName: If provided, will be used as the default for all - // values in InspectConfig. `inspect_config` will be merged into the - // values persisted as part of the template. - InspectTemplateName string `json:"inspectTemplateName,omitempty"` +// GooglePrivacyDlpV2InfoTypeStats: Statistics regarding a specific +// InfoType. +type GooglePrivacyDlpV2InfoTypeStats struct { + // Count: Number of findings for this infoType. + Count int64 `json:"count,omitempty,string"` - // StorageConfig: The data to scan. - StorageConfig *GooglePrivacyDlpV2StorageConfig `json:"storageConfig,omitempty"` + // InfoType: The type of finding this stat is for. + InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Actions") to + // ForceSendFields is a list of field names (e.g. "Count") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5444,8 +5728,8 @@ type GooglePrivacyDlpV2InspectJobConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Actions") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Count") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -5453,83 +5737,58 @@ type GooglePrivacyDlpV2InspectJobConfig struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InspectJobConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InspectJobConfig +func (s *GooglePrivacyDlpV2InfoTypeStats) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InfoTypeStats raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InspectResult: All the findings for a single -// scanned item. -type GooglePrivacyDlpV2InspectResult struct { - // Findings: List of findings for an item. - Findings []*GooglePrivacyDlpV2Finding `json:"findings,omitempty"` +// GooglePrivacyDlpV2InfoTypeSummary: The infoType details for this +// column. +type GooglePrivacyDlpV2InfoTypeSummary struct { + // EstimatedPrevalence: Not populated for predicted infotypes. + EstimatedPrevalence int64 `json:"estimatedPrevalence,omitempty"` - // FindingsTruncated: If true, then this item might have more findings - // than were returned, and the findings returned are an arbitrary subset - // of all findings. The findings list might be truncated because the - // input items were too large, or because the server reached the maximum - // amount of resources allowed for a single API call. For best results, - // divide the input into smaller batches. - FindingsTruncated bool `json:"findingsTruncated,omitempty"` + // InfoType: The infoType. + InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Findings") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "EstimatedPrevalence") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Findings") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "EstimatedPrevalence") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InspectResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InspectResult +func (s *GooglePrivacyDlpV2InfoTypeSummary) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InfoTypeSummary raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InspectTemplate: The inspectTemplate contains a -// configuration (set of types of sensitive data to be detected) to be -// used anywhere you otherwise would normally specify InspectConfig. See -// https://cloud.google.com/dlp/docs/concepts-templates to learn more. -type GooglePrivacyDlpV2InspectTemplate struct { - // CreateTime: Output only. The creation timestamp of an - // inspectTemplate. - CreateTime string `json:"createTime,omitempty"` - - // Description: Short description (max 256 chars). - Description string `json:"description,omitempty"` - - // DisplayName: Display name (max 256 chars). - DisplayName string `json:"displayName,omitempty"` - - // InspectConfig: The core content of the template. Configuration of the - // scanning process. - InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` - - // Name: Output only. The template name. The template will have one of - // the following formats: - // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR - // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`; - Name string `json:"name,omitempty"` - - // UpdateTime: Output only. The last update timestamp of an - // inspectTemplate. - UpdateTime string `json:"updateTime,omitempty"` +// GooglePrivacyDlpV2InfoTypeTransformation: A transformation to apply +// to text that is identified as a specific info_type. +type GooglePrivacyDlpV2InfoTypeTransformation struct { + // InfoTypes: InfoTypes to apply the transformation to. An empty list + // will cause this transformation to apply to all findings that + // correspond to infoTypes that were requested in `InspectConfig`. + InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // PrimitiveTransformation: Required. Primitive transformation to apply + // to the infoType. + PrimitiveTransformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"primitiveTransformation,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "InfoTypes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5537,7 +5796,7 @@ type GooglePrivacyDlpV2InspectTemplate struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "InfoTypes") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5546,22 +5805,23 @@ type GooglePrivacyDlpV2InspectTemplate struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InspectTemplate) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InspectTemplate +func (s *GooglePrivacyDlpV2InfoTypeTransformation) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InfoTypeTransformation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InspectionRule: A single inspection rule to be -// applied to infoTypes, specified in `InspectionRuleSet`. -type GooglePrivacyDlpV2InspectionRule struct { - // ExclusionRule: Exclusion rule. - ExclusionRule *GooglePrivacyDlpV2ExclusionRule `json:"exclusionRule,omitempty"` - - // HotwordRule: Hotword-based detection rule. - HotwordRule *GooglePrivacyDlpV2HotwordRule `json:"hotwordRule,omitempty"` +// GooglePrivacyDlpV2InfoTypeTransformations: A type of transformation +// that will scan unstructured text and apply various +// `PrimitiveTransformation`s to each finding, where the transformation +// is applied to only values that were identified as a specific +// info_type. +type GooglePrivacyDlpV2InfoTypeTransformations struct { + // Transformations: Required. Transformation for each infoType. Cannot + // specify more than one for a given infoType. + Transformations []*GooglePrivacyDlpV2InfoTypeTransformation `json:"transformations,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExclusionRule") to + // ForceSendFields is a list of field names (e.g. "Transformations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5569,33 +5829,102 @@ type GooglePrivacyDlpV2InspectionRule struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExclusionRule") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "Transformations") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InspectionRule) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InspectionRule +func (s *GooglePrivacyDlpV2InfoTypeTransformations) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InfoTypeTransformations raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2InspectionRuleSet: Rule set for modifying a set of -// infoTypes to alter behavior under certain circumstances, depending on -// the specific details of the rules within the set. -type GooglePrivacyDlpV2InspectionRuleSet struct { - // InfoTypes: List of infoTypes this rule set is applied to. +// GooglePrivacyDlpV2InspectConfig: Configuration description of the +// scanning process. When used with redactContent only info_types and +// min_likelihood are currently used. +type GooglePrivacyDlpV2InspectConfig struct { + // ContentOptions: Deprecated and unused. + // + // Possible values: + // "CONTENT_UNSPECIFIED" - Includes entire content of a file or a data + // stream. + // "CONTENT_TEXT" - Text content within the data, excluding any + // metadata. + // "CONTENT_IMAGE" - Images found in the data. + ContentOptions []string `json:"contentOptions,omitempty"` + + // CustomInfoTypes: CustomInfoTypes provided by the user. See + // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn + // more. + CustomInfoTypes []*GooglePrivacyDlpV2CustomInfoType `json:"customInfoTypes,omitempty"` + + // ExcludeInfoTypes: When true, excludes type information of the + // findings. This is not used for data profiling. + ExcludeInfoTypes bool `json:"excludeInfoTypes,omitempty"` + + // IncludeQuote: When true, a contextual quote from the data that + // triggered a finding is included in the response; see Finding.quote. + // This is not used for data profiling. + IncludeQuote bool `json:"includeQuote,omitempty"` + + // InfoTypes: Restricts what info_types to look for. The values must + // correspond to InfoType values returned by ListInfoTypes or listed at + // https://cloud.google.com/dlp/docs/infotypes-reference. When no + // InfoTypes or CustomInfoTypes are specified in a request, the system + // may automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. If + // you need precise control and predictability as to what detectors are + // run you should specify specific InfoTypes listed in the reference, + // otherwise a default list will be used, which may change over time. InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` - // Rules: Set of rules to be applied to infoTypes. The rules are applied - // in order. - Rules []*GooglePrivacyDlpV2InspectionRule `json:"rules,omitempty"` + // Limits: Configuration to control the number of findings returned. + // This is not used for data profiling. When redacting sensitive data + // from images, finding limits don't apply. They can cause unexpected or + // inconsistent results, where only some data is redacted. Don't include + // finding limits in RedactImage requests. Otherwise, Cloud DLP returns + // an error. When set within an InspectJobConfig, the specified maximum + // values aren't hard limits. If an inspection job reaches these limits, + // the job ends gradually, not abruptly. Therefore, the actual number of + // findings that Cloud DLP returns can be multiple times higher than + // these maximum values. + Limits *GooglePrivacyDlpV2FindingLimits `json:"limits,omitempty"` - // ForceSendFields is a list of field names (e.g. "InfoTypes") to + // MinLikelihood: Only returns findings equal to or above this + // threshold. The default is POSSIBLE. In general, the highest + // likelihood setting yields the fewest findings in results and the + // lowest chance of a false positive. For more information, see Match + // likelihood (https://cloud.google.com/dlp/docs/likelihood). + // + // Possible values: + // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. + // "VERY_UNLIKELY" - Highest chance of a false positive. + // "UNLIKELY" - High chance of a false positive. + // "POSSIBLE" - Some matching signals. The default value. + // "LIKELY" - Low chance of a false positive. + // "VERY_LIKELY" - Confidence level is high. Lowest chance of a false + // positive. + MinLikelihood string `json:"minLikelihood,omitempty"` + + // MinLikelihoodPerInfoType: Minimum likelihood per infotype. For each + // infotype, a user can specify a minimum likelihood. The system only + // returns a finding if its likelihood is above this threshold. If this + // field is not set, the system uses the InspectConfig min_likelihood. + MinLikelihoodPerInfoType []*GooglePrivacyDlpV2InfoTypeLikelihood `json:"minLikelihoodPerInfoType,omitempty"` + + // RuleSet: Set of rules to apply to the findings for this + // InspectConfig. Exclusion rules, contained in the set are executed in + // the end, other rules are executed in the order they are specified for + // each info type. + RuleSet []*GooglePrivacyDlpV2InspectionRuleSet `json:"ruleSet,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentOptions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5603,83 +5932,44 @@ type GooglePrivacyDlpV2InspectionRuleSet struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InfoTypes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ContentOptions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2InspectionRuleSet) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2InspectionRuleSet +func (s *GooglePrivacyDlpV2InspectConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InspectConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2JobNotificationEmails: Sends an email when the job -// completes. The email goes to IAM project owners and technical -// Essential Contacts -// (https://cloud.google.com/resource-manager/docs/managing-notification-contacts). -type GooglePrivacyDlpV2JobNotificationEmails struct { -} +// GooglePrivacyDlpV2InspectContentRequest: Request to search for +// potentially sensitive info in a ContentItem. +type GooglePrivacyDlpV2InspectContentRequest struct { + // InspectConfig: Configuration for the inspector. What specified here + // will override the template referenced by the inspect_template_name + // argument. + InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` -// GooglePrivacyDlpV2JobTrigger: Contains a configuration to make dlp -// api calls on a repeating basis. See -// https://cloud.google.com/dlp/docs/concepts-job-triggers to learn -// more. -type GooglePrivacyDlpV2JobTrigger struct { - // CreateTime: Output only. The creation timestamp of a triggeredJob. - CreateTime string `json:"createTime,omitempty"` + // InspectTemplateName: Template to use. Any configuration directly + // specified in inspect_config will override those set in the template. + // Singular fields that are set in this request will replace their + // corresponding fields in the template. Repeated fields are appended. + // Singular sub-messages and groups are recursively merged. + InspectTemplateName string `json:"inspectTemplateName,omitempty"` - // Description: User provided description (max 256 chars) - Description string `json:"description,omitempty"` + // Item: The item to inspect. + Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` - // DisplayName: Display name (max 100 chars) - DisplayName string `json:"displayName,omitempty"` - - // Errors: Output only. A stream of errors encountered when the trigger - // was activated. Repeated errors may result in the JobTrigger - // automatically being paused. Will return the last 100 errors. Whenever - // the JobTrigger is modified this list will be cleared. - Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` - - // InspectJob: For inspect jobs, a snapshot of the configuration. - InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"` - - // LastRunTime: Output only. The timestamp of the last time this trigger - // executed. - LastRunTime string `json:"lastRunTime,omitempty"` - - // Name: Unique resource name for the triggeredJob, assigned by the - // service when the triggeredJob is created, for example - // `projects/dlp-test-project/jobTriggers/53234423`. - Name string `json:"name,omitempty"` - - // Status: Required. A status for this trigger. - // - // Possible values: - // "STATUS_UNSPECIFIED" - Unused. - // "HEALTHY" - Trigger is healthy. - // "PAUSED" - Trigger is temporarily paused. - // "CANCELLED" - Trigger is cancelled and can not be resumed. - Status string `json:"status,omitempty"` - - // Triggers: A list of triggers which will be OR'ed together. Only one - // in the list needs to trigger for a job to be started. The list may - // contain only a single Schedule trigger and must have at least one - // object. - Triggers []*GooglePrivacyDlpV2Trigger `json:"triggers,omitempty"` - - // UpdateTime: Output only. The last update timestamp of a triggeredJob. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // LocationId: Deprecated. This field has no effect. + LocationId string `json:"locationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "InspectConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5687,43 +5977,32 @@ type GooglePrivacyDlpV2JobTrigger struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "InspectConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2JobTrigger) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2JobTrigger +func (s *GooglePrivacyDlpV2InspectContentRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InspectContentRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2KAnonymityConfig: k-anonymity metric, used for -// analysis of reidentification risk. -type GooglePrivacyDlpV2KAnonymityConfig struct { - // EntityId: Message indicating that multiple rows might be associated - // to a single individual. If the same entity_id is associated to - // multiple quasi-identifier tuples over distinct rows, we consider the - // entire collection of tuples as the composite quasi-identifier. This - // collection is a multiset: the order in which the different tuples - // appear in the dataset is ignored, but their frequency is taken into - // account. Important note: a maximum of 1000 rows can be associated to - // a single entity ID. If more rows are associated with the same entity - // ID, some might be ignored. - EntityId *GooglePrivacyDlpV2EntityId `json:"entityId,omitempty"` +// GooglePrivacyDlpV2InspectContentResponse: Results of inspecting an +// item. +type GooglePrivacyDlpV2InspectContentResponse struct { + // Result: The findings. + Result *GooglePrivacyDlpV2InspectResult `json:"result,omitempty"` - // QuasiIds: Set of fields to compute k-anonymity over. When multiple - // fields are specified, they are considered a single composite key. - // Structs and repeated data types are not supported; however, nested - // fields are supported so long as they are not structs themselves or - // nested within a repeated field. - QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EntityId") to + // ForceSendFields is a list of field names (e.g. "Result") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5731,8 +6010,8 @@ type GooglePrivacyDlpV2KAnonymityConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EntityId") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Result") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -5740,34 +6019,30 @@ type GooglePrivacyDlpV2KAnonymityConfig struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2KAnonymityConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2KAnonymityConfig +func (s *GooglePrivacyDlpV2InspectContentResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InspectContentResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2KAnonymityEquivalenceClass: The set of columns' -// values that share the same ldiversity value -type GooglePrivacyDlpV2KAnonymityEquivalenceClass struct { - // EquivalenceClassSize: Size of the equivalence class, for example - // number of rows with the above set of values. - EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` +// GooglePrivacyDlpV2InspectDataSourceDetails: The results of an inspect +// DataSource job. +type GooglePrivacyDlpV2InspectDataSourceDetails struct { + // RequestedOptions: The configuration used for this job. + RequestedOptions *GooglePrivacyDlpV2RequestedOptions `json:"requestedOptions,omitempty"` - // QuasiIdsValues: Set of values defining the equivalence class. One - // value per quasi-identifier column in the original KAnonymity metric - // message. The order is always the same as the original request. - QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` + // Result: A summary of the outcome of this inspection job. + Result *GooglePrivacyDlpV2Result `json:"result,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "EquivalenceClassSize") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "RequestedOptions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EquivalenceClassSize") to + // NullFields is a list of field names (e.g. "RequestedOptions") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -5777,35 +6052,30 @@ type GooglePrivacyDlpV2KAnonymityEquivalenceClass struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2KAnonymityEquivalenceClass +func (s *GooglePrivacyDlpV2InspectDataSourceDetails) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InspectDataSourceDetails raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2KAnonymityHistogramBucket: Histogram of k-anonymity -// equivalence classes. -type GooglePrivacyDlpV2KAnonymityHistogramBucket struct { - // BucketSize: Total number of equivalence classes in this bucket. - BucketSize int64 `json:"bucketSize,omitempty,string"` - - // BucketValueCount: Total number of distinct equivalence classes in - // this bucket. - BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` +// GooglePrivacyDlpV2InspectJobConfig: Controls what and how to inspect +// for findings. +type GooglePrivacyDlpV2InspectJobConfig struct { + // Actions: Actions to execute at the completion of the job. + Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"` - // BucketValues: Sample of equivalence classes in this bucket. The total - // number of classes returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2KAnonymityEquivalenceClass `json:"bucketValues,omitempty"` + // InspectConfig: How and what to scan for. + InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` - // EquivalenceClassSizeLowerBound: Lower bound on the size of the - // equivalence classes in this bucket. - EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"` + // InspectTemplateName: If provided, will be used as the default for all + // values in InspectConfig. `inspect_config` will be merged into the + // values persisted as part of the template. + InspectTemplateName string `json:"inspectTemplateName,omitempty"` - // EquivalenceClassSizeUpperBound: Upper bound on the size of the - // equivalence classes in this bucket. - EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"` + // StorageConfig: The data to scan. + StorageConfig *GooglePrivacyDlpV2StorageConfig `json:"storageConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "BucketSize") to + // ForceSendFields is a list of field names (e.g. "Actions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5813,7 +6083,7 @@ type GooglePrivacyDlpV2KAnonymityHistogramBucket struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BucketSize") to include in + // NullFields is a list of field names (e.g. "Actions") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5822,68 +6092,27 @@ type GooglePrivacyDlpV2KAnonymityHistogramBucket struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2KAnonymityHistogramBucket - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2KAnonymityResult: Result of the k-anonymity -// computation. -type GooglePrivacyDlpV2KAnonymityResult struct { - // EquivalenceClassHistogramBuckets: Histogram of k-anonymity - // equivalence classes. - EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EquivalenceClassHistogramBuckets") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "EquivalenceClassHistogramBuckets") to include in API requests with - // the JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GooglePrivacyDlpV2KAnonymityResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2KAnonymityResult +func (s *GooglePrivacyDlpV2InspectJobConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InspectJobConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2KMapEstimationConfig: Reidentifiability metric. -// This corresponds to a risk model similar to what is called -// "journalist risk" in the literature, except the attack dataset is -// statistically modeled instead of being perfectly known. This can be -// done using publicly available data (like the US Census), or using a -// custom statistical model (indicated as one or several BigQuery -// tables), or by extrapolating from the distribution of values in the -// input dataset. -type GooglePrivacyDlpV2KMapEstimationConfig struct { - // AuxiliaryTables: Several auxiliary tables can be used in the - // analysis. Each custom_tag used to tag a quasi-identifiers column must - // appear in exactly one column of one auxiliary table. - AuxiliaryTables []*GooglePrivacyDlpV2AuxiliaryTable `json:"auxiliaryTables,omitempty"` - - // QuasiIds: Required. Fields considered to be quasi-identifiers. No two - // columns can have the same tag. - QuasiIds []*GooglePrivacyDlpV2TaggedField `json:"quasiIds,omitempty"` +// GooglePrivacyDlpV2InspectResult: All the findings for a single +// scanned item. +type GooglePrivacyDlpV2InspectResult struct { + // Findings: List of findings for an item. + Findings []*GooglePrivacyDlpV2Finding `json:"findings,omitempty"` - // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical - // modeling. Set if no column is tagged with a region-specific InfoType - // (like US_ZIP_5) or a region code. - RegionCode string `json:"regionCode,omitempty"` + // FindingsTruncated: If true, then this item might have more findings + // than were returned, and the findings returned are an arbitrary subset + // of all findings. The findings list might be truncated because the + // input items were too large, or because the server reached the maximum + // amount of resources allowed for a single API call. For best results, + // divide the input into smaller batches. + FindingsTruncated bool `json:"findingsTruncated,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to + // ForceSendFields is a list of field names (e.g. "Findings") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5891,48 +6120,55 @@ type GooglePrivacyDlpV2KMapEstimationConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuxiliaryTables") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Findings") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2KMapEstimationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2KMapEstimationConfig +func (s *GooglePrivacyDlpV2InspectResult) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InspectResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2KMapEstimationHistogramBucket: A -// KMapEstimationHistogramBucket message with the following values: -// min_anonymity: 3 max_anonymity: 5 frequency: 42 means that there are -// 42 records whose quasi-identifier values correspond to 3, 4 or 5 -// people in the overlying population. An important particular case is -// when min_anonymity = max_anonymity = 1: the frequency field then -// corresponds to the number of uniquely identifiable records. -type GooglePrivacyDlpV2KMapEstimationHistogramBucket struct { - // BucketSize: Number of records within these anonymity bounds. - BucketSize int64 `json:"bucketSize,omitempty,string"` +// GooglePrivacyDlpV2InspectTemplate: The inspectTemplate contains a +// configuration (set of types of sensitive data to be detected) to be +// used anywhere you otherwise would normally specify InspectConfig. See +// https://cloud.google.com/dlp/docs/concepts-templates to learn more. +type GooglePrivacyDlpV2InspectTemplate struct { + // CreateTime: Output only. The creation timestamp of an + // inspectTemplate. + CreateTime string `json:"createTime,omitempty"` - // BucketValueCount: Total number of distinct quasi-identifier tuple - // values in this bucket. - BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` + // Description: Short description (max 256 chars). + Description string `json:"description,omitempty"` - // BucketValues: Sample of quasi-identifier tuple values in this bucket. - // The total number of classes returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"` + // DisplayName: Display name (max 256 chars). + DisplayName string `json:"displayName,omitempty"` - // MaxAnonymity: Always greater than or equal to min_anonymity. - MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"` + // InspectConfig: The core content of the template. Configuration of the + // scanning process. + InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` - // MinAnonymity: Always positive. - MinAnonymity int64 `json:"minAnonymity,omitempty,string"` + // Name: Output only. The template name. The template will have one of + // the following formats: + // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR + // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`; + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "BucketSize") to + // UpdateTime: Output only. The last update timestamp of an + // inspectTemplate. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5940,7 +6176,7 @@ type GooglePrivacyDlpV2KMapEstimationHistogramBucket struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BucketSize") to include in + // NullFields is a list of field names (e.g. "CreateTime") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5949,105 +6185,56 @@ type GooglePrivacyDlpV2KMapEstimationHistogramBucket struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2KMapEstimationHistogramBucket +func (s *GooglePrivacyDlpV2InspectTemplate) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InspectTemplate raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2KMapEstimationQuasiIdValues: A tuple of values for -// the quasi-identifier columns. -type GooglePrivacyDlpV2KMapEstimationQuasiIdValues struct { - // EstimatedAnonymity: The estimated anonymity for these - // quasi-identifier values. - EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"` +// GooglePrivacyDlpV2InspectionRule: A single inspection rule to be +// applied to infoTypes, specified in `InspectionRuleSet`. +type GooglePrivacyDlpV2InspectionRule struct { + // ExclusionRule: Exclusion rule. + ExclusionRule *GooglePrivacyDlpV2ExclusionRule `json:"exclusionRule,omitempty"` - // QuasiIdsValues: The quasi-identifier values. - QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` + // HotwordRule: Hotword-based detection rule. + HotwordRule *GooglePrivacyDlpV2HotwordRule `json:"hotwordRule,omitempty"` - // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExclusionRule") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EstimatedAnonymity") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GooglePrivacyDlpV2KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2KMapEstimationQuasiIdValues - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2KMapEstimationResult: Result of the -// reidentifiability analysis. Note that these results are an -// estimation, not exact values. -type GooglePrivacyDlpV2KMapEstimationResult struct { - // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity] - // do not overlap. If a value doesn't correspond to any such interval, - // the associated frequency is zero. For example, the following records: - // {min_anonymity: 1, max_anonymity: 1, frequency: 17} {min_anonymity: - // 2, max_anonymity: 3, frequency: 42} {min_anonymity: 5, max_anonymity: - // 10, frequency: 99} mean that there are no record with an estimated - // anonymity of 4, 5, or larger than 10. - KMapEstimationHistogram []*GooglePrivacyDlpV2KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "KMapEstimationHistogram") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "KMapEstimationHistogram") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "ExclusionRule") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2KMapEstimationResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2KMapEstimationResult +func (s *GooglePrivacyDlpV2InspectionRule) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InspectionRule raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Key: A unique identifier for a Datastore entity. If -// a key's partition ID or any of its path kinds or names are -// reserved/read-only, the key is reserved/read-only. A -// reserved/read-only key is forbidden in certain documented contexts. -type GooglePrivacyDlpV2Key struct { - // PartitionId: Entities are partitioned into subsets, currently - // identified by a project ID and namespace ID. Queries are scoped to a - // single partition. - PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"` +// GooglePrivacyDlpV2InspectionRuleSet: Rule set for modifying a set of +// infoTypes to alter behavior under certain circumstances, depending on +// the specific details of the rules within the set. +type GooglePrivacyDlpV2InspectionRuleSet struct { + // InfoTypes: List of infoTypes this rule set is applied to. + InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` - // Path: The entity path. An entity path consists of one or more - // elements composed of a kind and a string or numerical identifier, - // which identify entities. The first element identifies a _root - // entity_, the second element identifies a _child_ of the root entity, - // the third element identifies a child of the second entity, and so - // forth. The entities identified by all prefixes of the path are called - // the element's _ancestors_. A path can never be empty, and a path can - // have at most 100 elements. - Path []*GooglePrivacyDlpV2PathElement `json:"path,omitempty"` + // Rules: Set of rules to be applied to infoTypes. The rules are applied + // in order. + Rules []*GooglePrivacyDlpV2InspectionRule `json:"rules,omitempty"` - // ForceSendFields is a list of field names (e.g. "PartitionId") to + // ForceSendFields is a list of field names (e.g. "InfoTypes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6055,28 +6242,83 @@ type GooglePrivacyDlpV2Key struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PartitionId") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "InfoTypes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Key) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Key +func (s *GooglePrivacyDlpV2InspectionRuleSet) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2InspectionRuleSet raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2KindExpression: A representation of a Datastore -// kind. -type GooglePrivacyDlpV2KindExpression struct { - // Name: The name of the kind. +// GooglePrivacyDlpV2JobNotificationEmails: Sends an email when the job +// completes. The email goes to IAM project owners and technical +// Essential Contacts +// (https://cloud.google.com/resource-manager/docs/managing-notification-contacts). +type GooglePrivacyDlpV2JobNotificationEmails struct { +} + +// GooglePrivacyDlpV2JobTrigger: Contains a configuration to make dlp +// api calls on a repeating basis. See +// https://cloud.google.com/dlp/docs/concepts-job-triggers to learn +// more. +type GooglePrivacyDlpV2JobTrigger struct { + // CreateTime: Output only. The creation timestamp of a triggeredJob. + CreateTime string `json:"createTime,omitempty"` + + // Description: User provided description (max 256 chars) + Description string `json:"description,omitempty"` + + // DisplayName: Display name (max 100 chars) + DisplayName string `json:"displayName,omitempty"` + + // Errors: Output only. A stream of errors encountered when the trigger + // was activated. Repeated errors may result in the JobTrigger + // automatically being paused. Will return the last 100 errors. Whenever + // the JobTrigger is modified this list will be cleared. + Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` + + // InspectJob: For inspect jobs, a snapshot of the configuration. + InspectJob *GooglePrivacyDlpV2InspectJobConfig `json:"inspectJob,omitempty"` + + // LastRunTime: Output only. The timestamp of the last time this trigger + // executed. + LastRunTime string `json:"lastRunTime,omitempty"` + + // Name: Unique resource name for the triggeredJob, assigned by the + // service when the triggeredJob is created, for example + // `projects/dlp-test-project/jobTriggers/53234423`. Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // Status: Required. A status for this trigger. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unused. + // "HEALTHY" - Trigger is healthy. + // "PAUSED" - Trigger is temporarily paused. + // "CANCELLED" - Trigger is cancelled and can not be resumed. + Status string `json:"status,omitempty"` + + // Triggers: A list of triggers which will be OR'ed together. Only one + // in the list needs to trigger for a job to be started. The list may + // contain only a single Schedule trigger and must have at least one + // object. + Triggers []*GooglePrivacyDlpV2Trigger `json:"triggers,omitempty"` + + // UpdateTime: Output only. The last update timestamp of a triggeredJob. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6084,8 +6326,8 @@ type GooglePrivacyDlpV2KindExpression struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -6093,64 +6335,34 @@ type GooglePrivacyDlpV2KindExpression struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2KindExpression) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2KindExpression +func (s *GooglePrivacyDlpV2JobTrigger) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2JobTrigger raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2KmsWrappedCryptoKey: Include to use an existing -// data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, -// or 256-bit key. Authorization requires the following IAM permissions -// when sending a request to perform a crypto transformation using a -// KMS-wrapped crypto key: dlp.kms.encrypt For more information, see -// [Creating a wrapped key] -// (https://cloud.google.com/dlp/docs/create-wrapped-key). Note: When -// you use Cloud KMS for cryptographic operations, charges apply -// (https://cloud.google.com/kms/pricing). -type GooglePrivacyDlpV2KmsWrappedCryptoKey struct { - // CryptoKeyName: Required. The resource name of the KMS CryptoKey to - // use for unwrapping. - CryptoKeyName string `json:"cryptoKeyName,omitempty"` - - // WrappedKey: Required. The wrapped data crypto key. - WrappedKey string `json:"wrappedKey,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CryptoKeyName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CryptoKeyName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GooglePrivacyDlpV2KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2KmsWrappedCryptoKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2LDiversityConfig: l-diversity metric, used for +// GooglePrivacyDlpV2KAnonymityConfig: k-anonymity metric, used for // analysis of reidentification risk. -type GooglePrivacyDlpV2LDiversityConfig struct { - // QuasiIds: Set of quasi-identifiers indicating how equivalence classes - // are defined for the l-diversity computation. When multiple fields are - // specified, they are considered a single composite key. - QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"` +type GooglePrivacyDlpV2KAnonymityConfig struct { + // EntityId: Message indicating that multiple rows might be associated + // to a single individual. If the same entity_id is associated to + // multiple quasi-identifier tuples over distinct rows, we consider the + // entire collection of tuples as the composite quasi-identifier. This + // collection is a multiset: the order in which the different tuples + // appear in the dataset is ignored, but their frequency is taken into + // account. Important note: a maximum of 1000 rows can be associated to + // a single entity ID. If more rows are associated with the same entity + // ID, some might be ignored. + EntityId *GooglePrivacyDlpV2EntityId `json:"entityId,omitempty"` - // SensitiveAttribute: Sensitive field for computing the l-value. - SensitiveAttribute *GooglePrivacyDlpV2FieldId `json:"sensitiveAttribute,omitempty"` + // QuasiIds: Set of fields to compute k-anonymity over. When multiple + // fields are specified, they are considered a single composite key. + // Structs and repeated data types are not supported; however, nested + // fields are supported so long as they are not structs themselves or + // nested within a repeated field. + QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuasiIds") to + // ForceSendFields is a list of field names (e.g. "EntityId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6158,7 +6370,7 @@ type GooglePrivacyDlpV2LDiversityConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuasiIds") to include in + // NullFields is a list of field names (e.g. "EntityId") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6167,30 +6379,24 @@ type GooglePrivacyDlpV2LDiversityConfig struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2LDiversityConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2LDiversityConfig +func (s *GooglePrivacyDlpV2KAnonymityConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2KAnonymityConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2LDiversityEquivalenceClass: The set of columns' -// values that share the same ldiversity value. -type GooglePrivacyDlpV2LDiversityEquivalenceClass struct { - // EquivalenceClassSize: Size of the k-anonymity equivalence class. +// GooglePrivacyDlpV2KAnonymityEquivalenceClass: The set of columns' +// values that share the same ldiversity value +type GooglePrivacyDlpV2KAnonymityEquivalenceClass struct { + // EquivalenceClassSize: Size of the equivalence class, for example + // number of rows with the above set of values. EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` - // NumDistinctSensitiveValues: Number of distinct sensitive values in - // this equivalence class. - NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"` - - // QuasiIdsValues: Quasi-identifier values defining the k-anonymity - // equivalence class. The order is always the same as the original - // request. + // QuasiIdsValues: Set of values defining the equivalence class. One + // value per quasi-identifier column in the original KAnonymity metric + // message. The order is always the same as the original request. QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` - // TopSensitiveValues: Estimated frequencies of top sensitive values. - TopSensitiveValues []*GooglePrivacyDlpV2ValueFrequency `json:"topSensitiveValues,omitempty"` - // ForceSendFields is a list of field names (e.g. // "EquivalenceClassSize") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API @@ -6210,15 +6416,15 @@ type GooglePrivacyDlpV2LDiversityEquivalenceClass struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2LDiversityEquivalenceClass +func (s *GooglePrivacyDlpV2KAnonymityEquivalenceClass) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2KAnonymityEquivalenceClass raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2LDiversityHistogramBucket: Histogram of l-diversity -// equivalence class sensitive value frequencies. -type GooglePrivacyDlpV2LDiversityHistogramBucket struct { +// GooglePrivacyDlpV2KAnonymityHistogramBucket: Histogram of k-anonymity +// equivalence classes. +type GooglePrivacyDlpV2KAnonymityHistogramBucket struct { // BucketSize: Total number of equivalence classes in this bucket. BucketSize int64 `json:"bucketSize,omitempty,string"` @@ -6228,15 +6434,15 @@ type GooglePrivacyDlpV2LDiversityHistogramBucket struct { // BucketValues: Sample of equivalence classes in this bucket. The total // number of classes returned per bucket is capped at 20. - BucketValues []*GooglePrivacyDlpV2LDiversityEquivalenceClass `json:"bucketValues,omitempty"` + BucketValues []*GooglePrivacyDlpV2KAnonymityEquivalenceClass `json:"bucketValues,omitempty"` - // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value - // frequencies of the equivalence classes in this bucket. - SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"` + // EquivalenceClassSizeLowerBound: Lower bound on the size of the + // equivalence classes in this bucket. + EquivalenceClassSizeLowerBound int64 `json:"equivalenceClassSizeLowerBound,omitempty,string"` - // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value - // frequencies of the equivalence classes in this bucket. - SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"` + // EquivalenceClassSizeUpperBound: Upper bound on the size of the + // equivalence classes in this bucket. + EquivalenceClassSizeUpperBound int64 `json:"equivalenceClassSizeUpperBound,omitempty,string"` // ForceSendFields is a list of field names (e.g. "BucketSize") to // unconditionally include in API requests. By default, fields with @@ -6255,67 +6461,68 @@ type GooglePrivacyDlpV2LDiversityHistogramBucket struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2LDiversityHistogramBucket) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2LDiversityHistogramBucket +func (s *GooglePrivacyDlpV2KAnonymityHistogramBucket) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2KAnonymityHistogramBucket raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2LDiversityResult: Result of the l-diversity +// GooglePrivacyDlpV2KAnonymityResult: Result of the k-anonymity // computation. -type GooglePrivacyDlpV2LDiversityResult struct { - // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity - // equivalence class sensitive value frequencies. - SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"` +type GooglePrivacyDlpV2KAnonymityResult struct { + // EquivalenceClassHistogramBuckets: Histogram of k-anonymity + // equivalence classes. + EquivalenceClassHistogramBuckets []*GooglePrivacyDlpV2KAnonymityHistogramBucket `json:"equivalenceClassHistogramBuckets,omitempty"` // ForceSendFields is a list of field names (e.g. - // "SensitiveValueFrequencyHistogramBuckets") to unconditionally include - // in API requests. By default, fields with empty or default values are - // omitted from API requests. However, any non-pointer, non-interface - // field appearing in ForceSendFields will be sent to the server - // regardless of whether the field is empty or not. This may be used to - // include empty fields in Patch requests. + // "EquivalenceClassHistogramBuckets") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. - // "SensitiveValueFrequencyHistogramBuckets") to include in API requests - // with the JSON null value. By default, fields with empty values are - // omitted from API requests. However, any field with an empty value - // appearing in NullFields will be sent to the server as null. It is an - // error if a field in this list has a non-empty value. This may be used - // to include null fields in Patch requests. + // "EquivalenceClassHistogramBuckets") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2LDiversityResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2LDiversityResult +func (s *GooglePrivacyDlpV2KAnonymityResult) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2KAnonymityResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2LargeCustomDictionaryConfig: Configuration for a -// custom dictionary created from a data source of any size up to the -// maximum size defined in the limits -// (https://cloud.google.com/dlp/limits) page. The artifacts of -// dictionary creation are stored in the specified Cloud Storage -// location. Consider using `CustomInfoType.Dictionary` for smaller -// dictionaries that satisfy the size requirements. -type GooglePrivacyDlpV2LargeCustomDictionaryConfig struct { - // BigQueryField: Field in a BigQuery table where each cell represents a - // dictionary phrase. - BigQueryField *GooglePrivacyDlpV2BigQueryField `json:"bigQueryField,omitempty"` +// GooglePrivacyDlpV2KMapEstimationConfig: Reidentifiability metric. +// This corresponds to a risk model similar to what is called +// "journalist risk" in the literature, except the attack dataset is +// statistically modeled instead of being perfectly known. This can be +// done using publicly available data (like the US Census), or using a +// custom statistical model (indicated as one or several BigQuery +// tables), or by extrapolating from the distribution of values in the +// input dataset. +type GooglePrivacyDlpV2KMapEstimationConfig struct { + // AuxiliaryTables: Several auxiliary tables can be used in the + // analysis. Each custom_tag used to tag a quasi-identifiers column must + // appear in exactly one column of one auxiliary table. + AuxiliaryTables []*GooglePrivacyDlpV2AuxiliaryTable `json:"auxiliaryTables,omitempty"` - // CloudStorageFileSet: Set of files containing newline-delimited lists - // of dictionary phrases. - CloudStorageFileSet *GooglePrivacyDlpV2CloudStorageFileSet `json:"cloudStorageFileSet,omitempty"` + // QuasiIds: Required. Fields considered to be quasi-identifiers. No two + // columns can have the same tag. + QuasiIds []*GooglePrivacyDlpV2TaggedField `json:"quasiIds,omitempty"` - // OutputPath: Location to store dictionary artifacts in Cloud Storage. - // These files will only be accessible by project owners and the DLP - // API. If any of these artifacts are modified, the dictionary is - // considered invalid and can no longer be used. - OutputPath *GooglePrivacyDlpV2CloudStoragePath `json:"outputPath,omitempty"` + // RegionCode: ISO 3166-1 alpha-2 region code to use in the statistical + // modeling. Set if no column is tagged with a region-specific InfoType + // (like US_ZIP_5) or a region code. + RegionCode string `json:"regionCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "BigQueryField") to + // ForceSendFields is a list of field names (e.g. "AuxiliaryTables") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6323,29 +6530,48 @@ type GooglePrivacyDlpV2LargeCustomDictionaryConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BigQueryField") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AuxiliaryTables") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2LargeCustomDictionaryConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2LargeCustomDictionaryConfig +func (s *GooglePrivacyDlpV2KMapEstimationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2KMapEstimationConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2LargeCustomDictionaryStats: Summary statistics of a -// custom dictionary. -type GooglePrivacyDlpV2LargeCustomDictionaryStats struct { - // ApproxNumPhrases: Approximate number of distinct phrases in the - // dictionary. - ApproxNumPhrases int64 `json:"approxNumPhrases,omitempty,string"` +// GooglePrivacyDlpV2KMapEstimationHistogramBucket: A +// KMapEstimationHistogramBucket message with the following values: +// min_anonymity: 3 max_anonymity: 5 frequency: 42 means that there are +// 42 records whose quasi-identifier values correspond to 3, 4 or 5 +// people in the overlying population. An important particular case is +// when min_anonymity = max_anonymity = 1: the frequency field then +// corresponds to the number of uniquely identifiable records. +type GooglePrivacyDlpV2KMapEstimationHistogramBucket struct { + // BucketSize: Number of records within these anonymity bounds. + BucketSize int64 `json:"bucketSize,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ApproxNumPhrases") to + // BucketValueCount: Total number of distinct quasi-identifier tuple + // values in this bucket. + BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` + + // BucketValues: Sample of quasi-identifier tuple values in this bucket. + // The total number of classes returned per bucket is capped at 20. + BucketValues []*GooglePrivacyDlpV2KMapEstimationQuasiIdValues `json:"bucketValues,omitempty"` + + // MaxAnonymity: Always greater than or equal to min_anonymity. + MaxAnonymity int64 `json:"maxAnonymity,omitempty,string"` + + // MinAnonymity: Always positive. + MinAnonymity int64 `json:"minAnonymity,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "BucketSize") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6353,65 +6579,40 @@ type GooglePrivacyDlpV2LargeCustomDictionaryStats struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApproxNumPhrases") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "BucketSize") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2LargeCustomDictionaryStats) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2LargeCustomDictionaryStats +func (s *GooglePrivacyDlpV2KMapEstimationHistogramBucket) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2KMapEstimationHistogramBucket raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2LeaveUntransformed: Skips the data without -// modifying it if the requested transformation would cause an error. -// For example, if a `DateShift` transformation were applied an an IP -// address, this mode would leave the IP address unchanged in the -// response. -type GooglePrivacyDlpV2LeaveUntransformed struct { -} - -// GooglePrivacyDlpV2LikelihoodAdjustment: Message for specifying an -// adjustment to the likelihood of a finding as part of a detection -// rule. -type GooglePrivacyDlpV2LikelihoodAdjustment struct { - // FixedLikelihood: Set the likelihood of a finding to a fixed value. - // - // Possible values: - // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. - // "VERY_UNLIKELY" - Highest chance of a false positive. - // "UNLIKELY" - High chance of a false positive. - // "POSSIBLE" - Some matching signals. The default value. - // "LIKELY" - Low chance of a false positive. - // "VERY_LIKELY" - Confidence level is high. Lowest chance of a false - // positive. - FixedLikelihood string `json:"fixedLikelihood,omitempty"` +// GooglePrivacyDlpV2KMapEstimationQuasiIdValues: A tuple of values for +// the quasi-identifier columns. +type GooglePrivacyDlpV2KMapEstimationQuasiIdValues struct { + // EstimatedAnonymity: The estimated anonymity for these + // quasi-identifier values. + EstimatedAnonymity int64 `json:"estimatedAnonymity,omitempty,string"` - // RelativeLikelihood: Increase or decrease the likelihood by the - // specified number of levels. For example, if a finding would be - // `POSSIBLE` without the detection rule and `relative_likelihood` is 1, - // then it is upgraded to `LIKELY`, while a value of -1 would downgrade - // it to `UNLIKELY`. Likelihood may never drop below `VERY_UNLIKELY` or - // exceed `VERY_LIKELY`, so applying an adjustment of 1 followed by an - // adjustment of -1 when base likelihood is `VERY_LIKELY` will result in - // a final likelihood of `LIKELY`. - RelativeLikelihood int64 `json:"relativeLikelihood,omitempty"` + // QuasiIdsValues: The quasi-identifier values. + QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` - // ForceSendFields is a list of field names (e.g. "FixedLikelihood") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "EstimatedAnonymity") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FixedLikelihood") to + // NullFields is a list of field names (e.g. "EstimatedAnonymity") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -6421,66 +6622,71 @@ type GooglePrivacyDlpV2LikelihoodAdjustment struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2LikelihoodAdjustment) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2LikelihoodAdjustment +func (s *GooglePrivacyDlpV2KMapEstimationQuasiIdValues) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2KMapEstimationQuasiIdValues raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ListDeidentifyTemplatesResponse: Response message -// for ListDeidentifyTemplates. -type GooglePrivacyDlpV2ListDeidentifyTemplatesResponse struct { - // DeidentifyTemplates: List of deidentify templates, up to page_size in - // ListDeidentifyTemplatesRequest. - DeidentifyTemplates []*GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplates,omitempty"` - - // NextPageToken: If the next page is available then the next page token - // to be used in following ListDeidentifyTemplates request. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GooglePrivacyDlpV2KMapEstimationResult: Result of the +// reidentifiability analysis. Note that these results are an +// estimation, not exact values. +type GooglePrivacyDlpV2KMapEstimationResult struct { + // KMapEstimationHistogram: The intervals [min_anonymity, max_anonymity] + // do not overlap. If a value doesn't correspond to any such interval, + // the associated frequency is zero. For example, the following records: + // {min_anonymity: 1, max_anonymity: 1, frequency: 17} {min_anonymity: + // 2, max_anonymity: 3, frequency: 42} {min_anonymity: 5, max_anonymity: + // 10, frequency: 99} mean that there are no record with an estimated + // anonymity of 4, 5, or larger than 10. + KMapEstimationHistogram []*GooglePrivacyDlpV2KMapEstimationHistogramBucket `json:"kMapEstimationHistogram,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeidentifyTemplates") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "KMapEstimationHistogram") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeidentifyTemplates") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "KMapEstimationHistogram") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ListDeidentifyTemplatesResponse +func (s *GooglePrivacyDlpV2KMapEstimationResult) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2KMapEstimationResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ListDlpJobsResponse: The response message for -// listing DLP jobs. -type GooglePrivacyDlpV2ListDlpJobsResponse struct { - // Jobs: A list of DlpJobs that matches the specified filter in the - // request. - Jobs []*GooglePrivacyDlpV2DlpJob `json:"jobs,omitempty"` - - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` +// GooglePrivacyDlpV2Key: A unique identifier for a Datastore entity. If +// a key's partition ID or any of its path kinds or names are +// reserved/read-only, the key is reserved/read-only. A +// reserved/read-only key is forbidden in certain documented contexts. +type GooglePrivacyDlpV2Key struct { + // PartitionId: Entities are partitioned into subsets, currently + // identified by a project ID and namespace ID. Queries are scoped to a + // single partition. + PartitionId *GooglePrivacyDlpV2PartitionId `json:"partitionId,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Path: The entity path. An entity path consists of one or more + // elements composed of a kind and a string or numerical identifier, + // which identify entities. The first element identifies a _root + // entity_, the second element identifies a _child_ of the root entity, + // the third element identifies a child of the second entity, and so + // forth. The entities identified by all prefixes of the path are called + // the element's _ancestors_. A path can never be empty, and a path can + // have at most 100 elements. + Path []*GooglePrivacyDlpV2PathElement `json:"path,omitempty"` - // ForceSendFields is a list of field names (e.g. "Jobs") to + // ForceSendFields is a list of field names (e.g. "PartitionId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6488,32 +6694,28 @@ type GooglePrivacyDlpV2ListDlpJobsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Jobs") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "PartitionId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ListDlpJobsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ListDlpJobsResponse +func (s *GooglePrivacyDlpV2Key) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Key raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ListInfoTypesResponse: Response to the -// ListInfoTypes request. -type GooglePrivacyDlpV2ListInfoTypesResponse struct { - // InfoTypes: Set of sensitive infoTypes. - InfoTypes []*GooglePrivacyDlpV2InfoTypeDescription `json:"infoTypes,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GooglePrivacyDlpV2KindExpression: A representation of a Datastore +// kind. +type GooglePrivacyDlpV2KindExpression struct { + // Name: The name of the kind. + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "InfoTypes") to + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6521,8 +6723,8 @@ type GooglePrivacyDlpV2ListInfoTypesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InfoTypes") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -6530,28 +6732,30 @@ type GooglePrivacyDlpV2ListInfoTypesResponse struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ListInfoTypesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ListInfoTypesResponse +func (s *GooglePrivacyDlpV2KindExpression) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2KindExpression raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ListInspectTemplatesResponse: Response message for -// ListInspectTemplates. -type GooglePrivacyDlpV2ListInspectTemplatesResponse struct { - // InspectTemplates: List of inspectTemplates, up to page_size in - // ListInspectTemplatesRequest. - InspectTemplates []*GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplates,omitempty"` - - // NextPageToken: If the next page is available then the next page token - // to be used in following ListInspectTemplates request. - NextPageToken string `json:"nextPageToken,omitempty"` +// GooglePrivacyDlpV2KmsWrappedCryptoKey: Include to use an existing +// data crypto key wrapped by KMS. The wrapped key must be a 128-, 192-, +// or 256-bit key. Authorization requires the following IAM permissions +// when sending a request to perform a crypto transformation using a +// KMS-wrapped crypto key: dlp.kms.encrypt For more information, see +// [Creating a wrapped key] +// (https://cloud.google.com/dlp/docs/create-wrapped-key). Note: When +// you use Cloud KMS for cryptographic operations, charges apply +// (https://cloud.google.com/kms/pricing). +type GooglePrivacyDlpV2KmsWrappedCryptoKey struct { + // CryptoKeyName: Required. The resource name of the KMS CryptoKey to + // use for unwrapping. + CryptoKeyName string `json:"cryptoKeyName,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // WrappedKey: Required. The wrapped data crypto key. + WrappedKey string `json:"wrappedKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "InspectTemplates") to + // ForceSendFields is a list of field names (e.g. "CryptoKeyName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6559,38 +6763,33 @@ type GooglePrivacyDlpV2ListInspectTemplatesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InspectTemplates") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CryptoKeyName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ListInspectTemplatesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ListInspectTemplatesResponse +func (s *GooglePrivacyDlpV2KmsWrappedCryptoKey) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2KmsWrappedCryptoKey raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ListJobTriggersResponse: Response message for -// ListJobTriggers. -type GooglePrivacyDlpV2ListJobTriggersResponse struct { - // JobTriggers: List of triggeredJobs, up to page_size in - // ListJobTriggersRequest. - JobTriggers []*GooglePrivacyDlpV2JobTrigger `json:"jobTriggers,omitempty"` - - // NextPageToken: If the next page is available then the next page token - // to be used in following ListJobTriggers request. - NextPageToken string `json:"nextPageToken,omitempty"` +// GooglePrivacyDlpV2LDiversityConfig: l-diversity metric, used for +// analysis of reidentification risk. +type GooglePrivacyDlpV2LDiversityConfig struct { + // QuasiIds: Set of quasi-identifiers indicating how equivalence classes + // are defined for the l-diversity computation. When multiple fields are + // specified, they are considered a single composite key. + QuasiIds []*GooglePrivacyDlpV2FieldId `json:"quasiIds,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // SensitiveAttribute: Sensitive field for computing the l-value. + SensitiveAttribute *GooglePrivacyDlpV2FieldId `json:"sensitiveAttribute,omitempty"` - // ForceSendFields is a list of field names (e.g. "JobTriggers") to + // ForceSendFields is a list of field names (e.g. "QuasiIds") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6598,81 +6797,87 @@ type GooglePrivacyDlpV2ListJobTriggersResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JobTriggers") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "QuasiIds") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ListJobTriggersResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ListJobTriggersResponse +func (s *GooglePrivacyDlpV2LDiversityConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2LDiversityConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ListStoredInfoTypesResponse: Response message for -// ListStoredInfoTypes. -type GooglePrivacyDlpV2ListStoredInfoTypesResponse struct { - // NextPageToken: If the next page is available then the next page token - // to be used in following ListStoredInfoTypes request. - NextPageToken string `json:"nextPageToken,omitempty"` +// GooglePrivacyDlpV2LDiversityEquivalenceClass: The set of columns' +// values that share the same ldiversity value. +type GooglePrivacyDlpV2LDiversityEquivalenceClass struct { + // EquivalenceClassSize: Size of the k-anonymity equivalence class. + EquivalenceClassSize int64 `json:"equivalenceClassSize,omitempty,string"` - // StoredInfoTypes: List of storedInfoTypes, up to page_size in - // ListStoredInfoTypesRequest. - StoredInfoTypes []*GooglePrivacyDlpV2StoredInfoType `json:"storedInfoTypes,omitempty"` + // NumDistinctSensitiveValues: Number of distinct sensitive values in + // this equivalence class. + NumDistinctSensitiveValues int64 `json:"numDistinctSensitiveValues,omitempty,string"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // QuasiIdsValues: Quasi-identifier values defining the k-anonymity + // equivalence class. The order is always the same as the original + // request. + QuasiIdsValues []*GooglePrivacyDlpV2Value `json:"quasiIdsValues,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // TopSensitiveValues: Estimated frequencies of top sensitive values. + TopSensitiveValues []*GooglePrivacyDlpV2ValueFrequency `json:"topSensitiveValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EquivalenceClassSize") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "EquivalenceClassSize") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ListStoredInfoTypesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ListStoredInfoTypesResponse +func (s *GooglePrivacyDlpV2LDiversityEquivalenceClass) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2LDiversityEquivalenceClass raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Location: Specifies the location of the finding. -type GooglePrivacyDlpV2Location struct { - // ByteRange: Zero-based byte offsets delimiting the finding. These are - // relative to the finding's containing element. Note that when the - // content is not textual, this references the UTF-8 encoded textual - // representation of the content. Omitted if content is an image. - ByteRange *GooglePrivacyDlpV2Range `json:"byteRange,omitempty"` +// GooglePrivacyDlpV2LDiversityHistogramBucket: Histogram of l-diversity +// equivalence class sensitive value frequencies. +type GooglePrivacyDlpV2LDiversityHistogramBucket struct { + // BucketSize: Total number of equivalence classes in this bucket. + BucketSize int64 `json:"bucketSize,omitempty,string"` - // CodepointRange: Unicode character offsets delimiting the finding. - // These are relative to the finding's containing element. Provided when - // the content is text. - CodepointRange *GooglePrivacyDlpV2Range `json:"codepointRange,omitempty"` + // BucketValueCount: Total number of distinct equivalence classes in + // this bucket. + BucketValueCount int64 `json:"bucketValueCount,omitempty,string"` - // Container: Information about the container where this finding - // occurred, if available. - Container *GooglePrivacyDlpV2Container `json:"container,omitempty"` + // BucketValues: Sample of equivalence classes in this bucket. The total + // number of classes returned per bucket is capped at 20. + BucketValues []*GooglePrivacyDlpV2LDiversityEquivalenceClass `json:"bucketValues,omitempty"` - // ContentLocations: List of nested objects pointing to the precise - // location of the finding within the file or record. - ContentLocations []*GooglePrivacyDlpV2ContentLocation `json:"contentLocations,omitempty"` + // SensitiveValueFrequencyLowerBound: Lower bound on the sensitive value + // frequencies of the equivalence classes in this bucket. + SensitiveValueFrequencyLowerBound int64 `json:"sensitiveValueFrequencyLowerBound,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ByteRange") to + // SensitiveValueFrequencyUpperBound: Upper bound on the sensitive value + // frequencies of the equivalence classes in this bucket. + SensitiveValueFrequencyUpperBound int64 `json:"sensitiveValueFrequencyUpperBound,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "BucketSize") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6680,7 +6885,7 @@ type GooglePrivacyDlpV2Location struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ByteRange") to include in + // NullFields is a list of field names (e.g. "BucketSize") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6689,31 +6894,67 @@ type GooglePrivacyDlpV2Location struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Location) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Location +func (s *GooglePrivacyDlpV2LDiversityHistogramBucket) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2LDiversityHistogramBucket raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Manual: Job trigger option for hybrid jobs. Jobs -// must be manually created and finished. -type GooglePrivacyDlpV2Manual struct { +// GooglePrivacyDlpV2LDiversityResult: Result of the l-diversity +// computation. +type GooglePrivacyDlpV2LDiversityResult struct { + // SensitiveValueFrequencyHistogramBuckets: Histogram of l-diversity + // equivalence class sensitive value frequencies. + SensitiveValueFrequencyHistogramBuckets []*GooglePrivacyDlpV2LDiversityHistogramBucket `json:"sensitiveValueFrequencyHistogramBuckets,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "SensitiveValueFrequencyHistogramBuckets") to unconditionally include + // in API requests. By default, fields with empty or default values are + // omitted from API requests. However, any non-pointer, non-interface + // field appearing in ForceSendFields will be sent to the server + // regardless of whether the field is empty or not. This may be used to + // include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "SensitiveValueFrequencyHistogramBuckets") to include in API requests + // with the JSON null value. By default, fields with empty values are + // omitted from API requests. However, any field with an empty value + // appearing in NullFields will be sent to the server as null. It is an + // error if a field in this list has a non-empty value. This may be used + // to include null fields in Patch requests. + NullFields []string `json:"-"` } -// GooglePrivacyDlpV2MetadataLocation: Metadata Location -type GooglePrivacyDlpV2MetadataLocation struct { - // StorageLabel: Storage metadata. - StorageLabel *GooglePrivacyDlpV2StorageMetadataLabel `json:"storageLabel,omitempty"` +func (s *GooglePrivacyDlpV2LDiversityResult) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2LDiversityResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Type: Type of metadata containing the finding. - // - // Possible values: - // "METADATATYPE_UNSPECIFIED" - Unused - // "STORAGE_METADATA" - General file metadata provided by Cloud - // Storage. - Type string `json:"type,omitempty"` +// GooglePrivacyDlpV2LargeCustomDictionaryConfig: Configuration for a +// custom dictionary created from a data source of any size up to the +// maximum size defined in the limits +// (https://cloud.google.com/dlp/limits) page. The artifacts of +// dictionary creation are stored in the specified Cloud Storage +// location. Consider using `CustomInfoType.Dictionary` for smaller +// dictionaries that satisfy the size requirements. +type GooglePrivacyDlpV2LargeCustomDictionaryConfig struct { + // BigQueryField: Field in a BigQuery table where each cell represents a + // dictionary phrase. + BigQueryField *GooglePrivacyDlpV2BigQueryField `json:"bigQueryField,omitempty"` - // ForceSendFields is a list of field names (e.g. "StorageLabel") to + // CloudStorageFileSet: Set of files containing newline-delimited lists + // of dictionary phrases. + CloudStorageFileSet *GooglePrivacyDlpV2CloudStorageFileSet `json:"cloudStorageFileSet,omitempty"` + + // OutputPath: Location to store dictionary artifacts in Cloud Storage. + // These files will only be accessible by project owners and the DLP + // API. If any of these artifacts are modified, the dictionary is + // considered invalid and can no longer be used. + OutputPath *GooglePrivacyDlpV2CloudStoragePath `json:"outputPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigQueryField") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6721,7 +6962,7 @@ type GooglePrivacyDlpV2MetadataLocation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StorageLabel") to include + // NullFields is a list of field names (e.g. "BigQueryField") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -6730,20 +6971,20 @@ type GooglePrivacyDlpV2MetadataLocation struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2MetadataLocation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2MetadataLocation +func (s *GooglePrivacyDlpV2LargeCustomDictionaryConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2LargeCustomDictionaryConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2NumericalStatsConfig: Compute numerical stats over -// an individual column, including min, max, and quantiles. -type GooglePrivacyDlpV2NumericalStatsConfig struct { - // Field: Field to compute numerical stats on. Supported types are - // integer, float, date, datetime, timestamp, time. - Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` +// GooglePrivacyDlpV2LargeCustomDictionaryStats: Summary statistics of a +// custom dictionary. +type GooglePrivacyDlpV2LargeCustomDictionaryStats struct { + // ApproxNumPhrases: Approximate number of distinct phrases in the + // dictionary. + ApproxNumPhrases int64 `json:"approxNumPhrases,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Field") to + // ForceSendFields is a list of field names (e.g. "ApproxNumPhrases") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6751,35 +6992,57 @@ type GooglePrivacyDlpV2NumericalStatsConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Field") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ApproxNumPhrases") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2NumericalStatsConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2NumericalStatsConfig +func (s *GooglePrivacyDlpV2LargeCustomDictionaryStats) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2LargeCustomDictionaryStats raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2NumericalStatsResult: Result of the numerical stats -// computation. -type GooglePrivacyDlpV2NumericalStatsResult struct { - // MaxValue: Maximum value appearing in the column. - MaxValue *GooglePrivacyDlpV2Value `json:"maxValue,omitempty"` +// GooglePrivacyDlpV2LeaveUntransformed: Skips the data without +// modifying it if the requested transformation would cause an error. +// For example, if a `DateShift` transformation were applied an an IP +// address, this mode would leave the IP address unchanged in the +// response. +type GooglePrivacyDlpV2LeaveUntransformed struct { +} - // MinValue: Minimum value appearing in the column. - MinValue *GooglePrivacyDlpV2Value `json:"minValue,omitempty"` +// GooglePrivacyDlpV2LikelihoodAdjustment: Message for specifying an +// adjustment to the likelihood of a finding as part of a detection +// rule. +type GooglePrivacyDlpV2LikelihoodAdjustment struct { + // FixedLikelihood: Set the likelihood of a finding to a fixed value. + // + // Possible values: + // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. + // "VERY_UNLIKELY" - Highest chance of a false positive. + // "UNLIKELY" - High chance of a false positive. + // "POSSIBLE" - Some matching signals. The default value. + // "LIKELY" - Low chance of a false positive. + // "VERY_LIKELY" - Confidence level is high. Lowest chance of a false + // positive. + FixedLikelihood string `json:"fixedLikelihood,omitempty"` - // QuantileValues: List of 99 values that partition the set of field - // values into 100 equal sized buckets. - QuantileValues []*GooglePrivacyDlpV2Value `json:"quantileValues,omitempty"` + // RelativeLikelihood: Increase or decrease the likelihood by the + // specified number of levels. For example, if a finding would be + // `POSSIBLE` without the detection rule and `relative_likelihood` is 1, + // then it is upgraded to `LIKELY`, while a value of -1 would downgrade + // it to `UNLIKELY`. Likelihood may never drop below `VERY_UNLIKELY` or + // exceed `VERY_LIKELY`, so applying an adjustment of 1 followed by an + // adjustment of -1 when base likelihood is `VERY_LIKELY` will result in + // a final likelihood of `LIKELY`. + RelativeLikelihood int64 `json:"relativeLikelihood,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxValue") to + // ForceSendFields is a list of field names (e.g. "FixedLikelihood") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6787,37 +7050,38 @@ type GooglePrivacyDlpV2NumericalStatsResult struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxValue") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "FixedLikelihood") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2NumericalStatsResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2NumericalStatsResult +func (s *GooglePrivacyDlpV2LikelihoodAdjustment) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2LikelihoodAdjustment raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2OtherInfoTypeSummary: Infotype details for other -// infoTypes found within a column. -type GooglePrivacyDlpV2OtherInfoTypeSummary struct { - // EstimatedPrevalence: Approximate percentage of non-null rows that - // contained data detected by this infotype. - EstimatedPrevalence int64 `json:"estimatedPrevalence,omitempty"` +// GooglePrivacyDlpV2ListDeidentifyTemplatesResponse: Response message +// for ListDeidentifyTemplates. +type GooglePrivacyDlpV2ListDeidentifyTemplatesResponse struct { + // DeidentifyTemplates: List of deidentify templates, up to page_size in + // ListDeidentifyTemplatesRequest. + DeidentifyTemplates []*GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplates,omitempty"` - // ExcludedFromAnalysis: Whether this infoType was excluded from - // sensitivity and risk analysis due to factors such as low prevalence - // (subject to change). - ExcludedFromAnalysis bool `json:"excludedFromAnalysis,omitempty"` + // NextPageToken: If the next page is available then the next page token + // to be used in following ListDeidentifyTemplates request. + NextPageToken string `json:"nextPageToken,omitempty"` - // InfoType: The other infoType. - InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EstimatedPrevalence") + // ForceSendFields is a list of field names (e.g. "DeidentifyTemplates") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6825,7 +7089,7 @@ type GooglePrivacyDlpV2OtherInfoTypeSummary struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EstimatedPrevalence") to + // NullFields is a list of field names (e.g. "DeidentifyTemplates") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -6835,53 +7099,28 @@ type GooglePrivacyDlpV2OtherInfoTypeSummary struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2OtherInfoTypeSummary) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2OtherInfoTypeSummary +func (s *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ListDeidentifyTemplatesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2OutputStorageConfig: Cloud repository for storing -// output. -type GooglePrivacyDlpV2OutputStorageConfig struct { - // OutputSchema: Schema used for writing the findings for Inspect jobs. - // This field is only used for Inspect and must be unspecified for Risk - // jobs. Columns are derived from the `Finding` object. If appending to - // an existing table, any columns from the predefined schema that are - // missing will be added. No columns in the existing table will be - // deleted. If unspecified, then all available columns will be used for - // a new table or an (existing) table with no schema, and no changes - // will be made to an existing table that has a schema. Only for use - // with external storage. - // - // Possible values: - // "OUTPUT_SCHEMA_UNSPECIFIED" - Unused. - // "BASIC_COLUMNS" - Basic schema including only `info_type`, `quote`, - // `certainty`, and `timestamp`. - // "GCS_COLUMNS" - Schema tailored to findings from scanning Cloud - // Storage. - // "DATASTORE_COLUMNS" - Schema tailored to findings from scanning - // Google Datastore. - // "BIG_QUERY_COLUMNS" - Schema tailored to findings from scanning - // Google BigQuery. - // "ALL_COLUMNS" - Schema containing all columns. - OutputSchema string `json:"outputSchema,omitempty"` +// GooglePrivacyDlpV2ListDiscoveryConfigsResponse: Response message for +// ListDiscoveryConfigs. +type GooglePrivacyDlpV2ListDiscoveryConfigsResponse struct { + // DiscoveryConfigs: List of configs, up to page_size in + // ListDiscoveryConfigsRequest. + DiscoveryConfigs []*GooglePrivacyDlpV2DiscoveryConfig `json:"discoveryConfigs,omitempty"` - // Table: Store findings in an existing table or a new table in an - // existing dataset. If table_id is not set a new one will be generated - // for you with the following format: - // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be - // used for generating the date details. For Inspect, each column in an - // existing output table must have the same name, type, and mode of a - // field in the `Finding` object. For Risk, an existing output table - // should be the output of a previous Risk analysis job run on the same - // source table, with the same privacy metric and quasi-identifiers. - // Risk jobs that analyze the same table but compute a different privacy - // metric, or use different sets of quasi-identifiers, cannot store - // their results in the same table. - Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` + // NextPageToken: If the next page is available then the next page token + // to be used in following ListDiscoveryConfigs request. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "OutputSchema") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DiscoveryConfigs") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6889,34 +7128,37 @@ type GooglePrivacyDlpV2OutputStorageConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OutputSchema") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "DiscoveryConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2OutputStorageConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2OutputStorageConfig +func (s *GooglePrivacyDlpV2ListDiscoveryConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ListDiscoveryConfigsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2PartitionId: Datastore partition ID. A partition ID -// identifies a grouping of entities. The grouping is always by project -// and namespace, however the namespace ID may be empty. A partition ID -// contains several dimensions: project ID and namespace ID. -type GooglePrivacyDlpV2PartitionId struct { - // NamespaceId: If not empty, the ID of the namespace to which the - // entities belong. - NamespaceId string `json:"namespaceId,omitempty"` +// GooglePrivacyDlpV2ListDlpJobsResponse: The response message for +// listing DLP jobs. +type GooglePrivacyDlpV2ListDlpJobsResponse struct { + // Jobs: A list of DlpJobs that matches the specified filter in the + // request. + Jobs []*GooglePrivacyDlpV2DlpJob `json:"jobs,omitempty"` - // ProjectId: The ID of the project to which the entities belong. - ProjectId string `json:"projectId,omitempty"` + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "NamespaceId") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Jobs") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6924,41 +7166,32 @@ type GooglePrivacyDlpV2PartitionId struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NamespaceId") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Jobs") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2PartitionId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2PartitionId +func (s *GooglePrivacyDlpV2ListDlpJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ListDlpJobsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2PathElement: A (kind, ID/name) pair used to -// construct a key path. If either name or ID is set, the element is -// complete. If neither is set, the element is incomplete. -type GooglePrivacyDlpV2PathElement struct { - // Id: The auto-allocated ID of the entity. Never equal to zero. Values - // less than zero are discouraged and may not be supported in the - // future. - Id int64 `json:"id,omitempty,string"` - - // Kind: The kind of the entity. A kind matching regex `__.*__` is - // reserved/read-only. A kind must not contain more than 1500 bytes when - // UTF-8 encoded. Cannot be "". - Kind string `json:"kind,omitempty"` +// GooglePrivacyDlpV2ListInfoTypesResponse: Response to the +// ListInfoTypes request. +type GooglePrivacyDlpV2ListInfoTypesResponse struct { + // InfoTypes: Set of sensitive infoTypes. + InfoTypes []*GooglePrivacyDlpV2InfoTypeDescription `json:"infoTypes,omitempty"` - // Name: The name of the entity. A name matching regex `__.*__` is - // reserved/read-only. A name must not be more than 1500 bytes when - // UTF-8 encoded. Cannot be "". - Name string `json:"name,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "InfoTypes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6966,8 +7199,8 @@ type GooglePrivacyDlpV2PathElement struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "InfoTypes") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -6975,53 +7208,28 @@ type GooglePrivacyDlpV2PathElement struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2PathElement) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2PathElement +func (s *GooglePrivacyDlpV2ListInfoTypesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ListInfoTypesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2PrimitiveTransformation: A rule for transforming a -// value. -type GooglePrivacyDlpV2PrimitiveTransformation struct { - // BucketingConfig: Bucketing - BucketingConfig *GooglePrivacyDlpV2BucketingConfig `json:"bucketingConfig,omitempty"` - - // CharacterMaskConfig: Mask - CharacterMaskConfig *GooglePrivacyDlpV2CharacterMaskConfig `json:"characterMaskConfig,omitempty"` - - // CryptoDeterministicConfig: Deterministic Crypto - CryptoDeterministicConfig *GooglePrivacyDlpV2CryptoDeterministicConfig `json:"cryptoDeterministicConfig,omitempty"` - - // CryptoHashConfig: Crypto - CryptoHashConfig *GooglePrivacyDlpV2CryptoHashConfig `json:"cryptoHashConfig,omitempty"` - - // CryptoReplaceFfxFpeConfig: Ffx-Fpe - CryptoReplaceFfxFpeConfig *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig `json:"cryptoReplaceFfxFpeConfig,omitempty"` - - // DateShiftConfig: Date Shift - DateShiftConfig *GooglePrivacyDlpV2DateShiftConfig `json:"dateShiftConfig,omitempty"` - - // FixedSizeBucketingConfig: Fixed size bucketing - FixedSizeBucketingConfig *GooglePrivacyDlpV2FixedSizeBucketingConfig `json:"fixedSizeBucketingConfig,omitempty"` - - // RedactConfig: Redact - RedactConfig *GooglePrivacyDlpV2RedactConfig `json:"redactConfig,omitempty"` - - // ReplaceConfig: Replace with a specified value. - ReplaceConfig *GooglePrivacyDlpV2ReplaceValueConfig `json:"replaceConfig,omitempty"` - - // ReplaceDictionaryConfig: Replace with a value randomly drawn (with - // replacement) from a dictionary. - ReplaceDictionaryConfig *GooglePrivacyDlpV2ReplaceDictionaryConfig `json:"replaceDictionaryConfig,omitempty"` +// GooglePrivacyDlpV2ListInspectTemplatesResponse: Response message for +// ListInspectTemplates. +type GooglePrivacyDlpV2ListInspectTemplatesResponse struct { + // InspectTemplates: List of inspectTemplates, up to page_size in + // ListInspectTemplatesRequest. + InspectTemplates []*GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplates,omitempty"` - // ReplaceWithInfoTypeConfig: Replace with infotype - ReplaceWithInfoTypeConfig *GooglePrivacyDlpV2ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"` + // NextPageToken: If the next page is available then the next page token + // to be used in following ListInspectTemplates request. + NextPageToken string `json:"nextPageToken,omitempty"` - // TimePartConfig: Time extraction - TimePartConfig *GooglePrivacyDlpV2TimePartConfig `json:"timePartConfig,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BucketingConfig") to + // ForceSendFields is a list of field names (e.g. "InspectTemplates") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7029,7 +7237,7 @@ type GooglePrivacyDlpV2PrimitiveTransformation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BucketingConfig") to + // NullFields is a list of field names (e.g. "InspectTemplates") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -7039,67 +7247,110 @@ type GooglePrivacyDlpV2PrimitiveTransformation struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2PrimitiveTransformation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2PrimitiveTransformation +func (s *GooglePrivacyDlpV2ListInspectTemplatesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ListInspectTemplatesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2PrivacyMetric: Privacy metric to compute for -// reidentification risk analysis. -type GooglePrivacyDlpV2PrivacyMetric struct { - // CategoricalStatsConfig: Categorical stats - CategoricalStatsConfig *GooglePrivacyDlpV2CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"` - - // DeltaPresenceEstimationConfig: delta-presence - DeltaPresenceEstimationConfig *GooglePrivacyDlpV2DeltaPresenceEstimationConfig `json:"deltaPresenceEstimationConfig,omitempty"` +// GooglePrivacyDlpV2ListJobTriggersResponse: Response message for +// ListJobTriggers. +type GooglePrivacyDlpV2ListJobTriggersResponse struct { + // JobTriggers: List of triggeredJobs, up to page_size in + // ListJobTriggersRequest. + JobTriggers []*GooglePrivacyDlpV2JobTrigger `json:"jobTriggers,omitempty"` - // KAnonymityConfig: K-anonymity - KAnonymityConfig *GooglePrivacyDlpV2KAnonymityConfig `json:"kAnonymityConfig,omitempty"` + // NextPageToken: If the next page is available then the next page token + // to be used in following ListJobTriggers request. + NextPageToken string `json:"nextPageToken,omitempty"` - // KMapEstimationConfig: k-map - KMapEstimationConfig *GooglePrivacyDlpV2KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // LDiversityConfig: l-diversity - LDiversityConfig *GooglePrivacyDlpV2LDiversityConfig `json:"lDiversityConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "JobTriggers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // NumericalStatsConfig: Numerical stats - NumericalStatsConfig *GooglePrivacyDlpV2NumericalStatsConfig `json:"numericalStatsConfig,omitempty"` + // NullFields is a list of field names (e.g. "JobTriggers") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // ForceSendFields is a list of field names (e.g. - // "CategoricalStatsConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. +func (s *GooglePrivacyDlpV2ListJobTriggersResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ListJobTriggersResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2ListStoredInfoTypesResponse: Response message for +// ListStoredInfoTypes. +type GooglePrivacyDlpV2ListStoredInfoTypesResponse struct { + // NextPageToken: If the next page is available then the next page token + // to be used in following ListStoredInfoTypes request. + NextPageToken string `json:"nextPageToken,omitempty"` + + // StoredInfoTypes: List of storedInfoTypes, up to page_size in + // ListStoredInfoTypesRequest. + StoredInfoTypes []*GooglePrivacyDlpV2StoredInfoType `json:"storedInfoTypes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CategoricalStatsConfig") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2PrivacyMetric) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2PrivacyMetric +func (s *GooglePrivacyDlpV2ListStoredInfoTypesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ListStoredInfoTypesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GooglePrivacyDlpV2ProfileStatus struct { - // Status: Profiling status code and optional message. The `status.code` - // value is 0 (default value) for OK. - Status *GoogleRpcStatus `json:"status,omitempty"` +// GooglePrivacyDlpV2Location: Specifies the location of the finding. +type GooglePrivacyDlpV2Location struct { + // ByteRange: Zero-based byte offsets delimiting the finding. These are + // relative to the finding's containing element. Note that when the + // content is not textual, this references the UTF-8 encoded textual + // representation of the content. Omitted if content is an image. + ByteRange *GooglePrivacyDlpV2Range `json:"byteRange,omitempty"` - // Timestamp: Time when the profile generation status was updated - Timestamp string `json:"timestamp,omitempty"` + // CodepointRange: Unicode character offsets delimiting the finding. + // These are relative to the finding's containing element. Provided when + // the content is text. + CodepointRange *GooglePrivacyDlpV2Range `json:"codepointRange,omitempty"` - // ForceSendFields is a list of field names (e.g. "Status") to + // Container: Information about the container where this finding + // occurred, if available. + Container *GooglePrivacyDlpV2Container `json:"container,omitempty"` + + // ContentLocations: List of nested objects pointing to the precise + // location of the finding within the file or record. + ContentLocations []*GooglePrivacyDlpV2ContentLocation `json:"contentLocations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ByteRange") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7107,8 +7358,8 @@ type GooglePrivacyDlpV2ProfileStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Status") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "ByteRange") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -7116,26 +7367,31 @@ type GooglePrivacyDlpV2ProfileStatus struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ProfileStatus) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ProfileStatus +func (s *GooglePrivacyDlpV2Location) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Location raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Proximity: Message for specifying a window around a -// finding to apply a detection rule. -type GooglePrivacyDlpV2Proximity struct { - // WindowAfter: Number of characters after the finding to consider. - WindowAfter int64 `json:"windowAfter,omitempty"` +// GooglePrivacyDlpV2Manual: Job trigger option for hybrid jobs. Jobs +// must be manually created and finished. +type GooglePrivacyDlpV2Manual struct { +} - // WindowBefore: Number of characters before the finding to consider. - // For tabular data, if you want to modify the likelihood of an entire - // column of findngs, set this to 1. For more information, see [Hotword - // example: Set the match likelihood of a table column] - // (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values). - WindowBefore int64 `json:"windowBefore,omitempty"` +// GooglePrivacyDlpV2MetadataLocation: Metadata Location +type GooglePrivacyDlpV2MetadataLocation struct { + // StorageLabel: Storage metadata. + StorageLabel *GooglePrivacyDlpV2StorageMetadataLabel `json:"storageLabel,omitempty"` - // ForceSendFields is a list of field names (e.g. "WindowAfter") to + // Type: Type of metadata containing the finding. + // + // Possible values: + // "METADATATYPE_UNSPECIFIED" - Unused + // "STORAGE_METADATA" - General file metadata provided by Cloud + // Storage. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "StorageLabel") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7143,7 +7399,7 @@ type GooglePrivacyDlpV2Proximity struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WindowAfter") to include + // NullFields is a list of field names (e.g. "StorageLabel") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -7152,33 +7408,20 @@ type GooglePrivacyDlpV2Proximity struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Proximity) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Proximity +func (s *GooglePrivacyDlpV2MetadataLocation) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2MetadataLocation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2PubSubCondition: A condition consisting of a value. -type GooglePrivacyDlpV2PubSubCondition struct { - // MinimumRiskScore: The minimum data risk score that triggers the - // condition. - // - // Possible values: - // "PROFILE_SCORE_BUCKET_UNSPECIFIED" - Unused. - // "HIGH" - High risk/sensitivity detected. - // "MEDIUM_OR_HIGH" - Medium or high risk/sensitivity detected. - MinimumRiskScore string `json:"minimumRiskScore,omitempty"` - - // MinimumSensitivityScore: The minimum sensitivity level that triggers - // the condition. - // - // Possible values: - // "PROFILE_SCORE_BUCKET_UNSPECIFIED" - Unused. - // "HIGH" - High risk/sensitivity detected. - // "MEDIUM_OR_HIGH" - Medium or high risk/sensitivity detected. - MinimumSensitivityScore string `json:"minimumSensitivityScore,omitempty"` +// GooglePrivacyDlpV2NumericalStatsConfig: Compute numerical stats over +// an individual column, including min, max, and quantiles. +type GooglePrivacyDlpV2NumericalStatsConfig struct { + // Field: Field to compute numerical stats on. Supported types are + // integer, float, date, datetime, timestamp, time. + Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` - // ForceSendFields is a list of field names (e.g. "MinimumRiskScore") to + // ForceSendFields is a list of field names (e.g. "Field") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7186,38 +7429,35 @@ type GooglePrivacyDlpV2PubSubCondition struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MinimumRiskScore") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Field") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2PubSubCondition) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2PubSubCondition +func (s *GooglePrivacyDlpV2NumericalStatsConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2NumericalStatsConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2PubSubExpressions: An expression, consisting of an -// operator and conditions. -type GooglePrivacyDlpV2PubSubExpressions struct { - // Conditions: Conditions to apply to the expression. - Conditions []*GooglePrivacyDlpV2PubSubCondition `json:"conditions,omitempty"` +// GooglePrivacyDlpV2NumericalStatsResult: Result of the numerical stats +// computation. +type GooglePrivacyDlpV2NumericalStatsResult struct { + // MaxValue: Maximum value appearing in the column. + MaxValue *GooglePrivacyDlpV2Value `json:"maxValue,omitempty"` - // LogicalOperator: The operator to apply to the collection of - // conditions. - // - // Possible values: - // "LOGICAL_OPERATOR_UNSPECIFIED" - Unused. - // "OR" - Conditional OR. - // "AND" - Conditional AND. - LogicalOperator string `json:"logicalOperator,omitempty"` + // MinValue: Minimum value appearing in the column. + MinValue *GooglePrivacyDlpV2Value `json:"minValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "Conditions") to + // QuantileValues: List of 99 values that partition the set of field + // values into 100 equal sized buckets. + QuantileValues []*GooglePrivacyDlpV2Value `json:"quantileValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxValue") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7225,7 +7465,7 @@ type GooglePrivacyDlpV2PubSubExpressions struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Conditions") to include in + // NullFields is a list of field names (e.g. "MaxValue") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -7234,52 +7474,25 @@ type GooglePrivacyDlpV2PubSubExpressions struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2PubSubExpressions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2PubSubExpressions +func (s *GooglePrivacyDlpV2NumericalStatsResult) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2NumericalStatsResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2PubSubNotification: Send a Pub/Sub message into the -// given Pub/Sub topic to connect other systems to data profile -// generation. The message payload data will be the byte serialization -// of `DataProfilePubSubMessage`. -type GooglePrivacyDlpV2PubSubNotification struct { - // DetailOfMessage: How much data to include in the Pub/Sub message. If - // the user wishes to limit the size of the message, they can use - // resource_name and fetch the profile fields they wish to. Per table - // profile (not per column). - // - // Possible values: - // "DETAIL_LEVEL_UNSPECIFIED" - Unused. - // "TABLE_PROFILE" - The full table data profile. - // "RESOURCE_NAME" - The resource name of the table. - DetailOfMessage string `json:"detailOfMessage,omitempty"` - - // Event: The type of event that triggers a Pub/Sub. At most one - // `PubSubNotification` per EventType is permitted. - // - // Possible values: - // "EVENT_TYPE_UNSPECIFIED" - Unused. - // "NEW_PROFILE" - New profile (not a re-profile). - // "CHANGED_PROFILE" - Changed one of the following profile metrics: * - // Table data risk score * Table sensitivity score * Table resource - // visibility * Table encryption type * Table predicted infoTypes * - // Table other infoTypes - // "SCORE_INCREASED" - Table data risk score or sensitivity score - // increased. - // "ERROR_CHANGED" - A user (non-internal) error occurred. - Event string `json:"event,omitempty"` - - // PubsubCondition: Conditions (e.g., data risk or sensitivity level) - // for triggering a Pub/Sub. - PubsubCondition *GooglePrivacyDlpV2DataProfilePubSubCondition `json:"pubsubCondition,omitempty"` +// GooglePrivacyDlpV2OrConditions: There is an OR relationship between +// these attributes. They are used to determine if a table should be +// scanned or not in Discovery. +type GooglePrivacyDlpV2OrConditions struct { + // MinAge: Minimum age a table must have before Cloud DLP can profile + // it. Value must be 1 hour or greater. + MinAge string `json:"minAge,omitempty"` - // Topic: Cloud Pub/Sub topic to send notifications to. Format is - // projects/{project}/topics/{topic}. - Topic string `json:"topic,omitempty"` + // MinRowCount: Minimum number of rows that should be present before + // Cloud DLP profiles a table + MinRowCount int64 `json:"minRowCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetailOfMessage") to + // ForceSendFields is a list of field names (e.g. "MinAge") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7287,68 +7500,33 @@ type GooglePrivacyDlpV2PubSubNotification struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetailOfMessage") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "MinAge") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2PubSubNotification) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2PubSubNotification +func (s *GooglePrivacyDlpV2OrConditions) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2OrConditions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog: Publish findings -// of a DlpJob to Data Catalog. In Data Catalog, tag templates are -// applied to the resource that Cloud DLP scanned. Data Catalog tag -// templates are stored in the same project and region where the -// BigQuery table exists. For Cloud DLP to create and apply the tag -// template, the Cloud DLP service agent must have the -// `roles/datacatalog.tagTemplateOwner` permission on the project. The -// tag template contains fields summarizing the results of the DlpJob. -// Any field values previously written by another DlpJob are deleted. -// InfoType naming patterns are strictly enforced when using this -// feature. Findings are persisted in Data Catalog storage and are -// governed by service-specific policies for Data Catalog. For more -// information, see Service Specific Terms -// (https://cloud.google.com/terms/service-terms). Only a single -// instance of this action can be specified. This action is allowed only -// if all resources being scanned are BigQuery tables. Compatible with: -// Inspect -type GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog struct { -} - -// GooglePrivacyDlpV2PublishSummaryToCscc: Publish the result summary of -// a DlpJob to Security Command Center -// (https://cloud.google.com/security-command-center). This action is -// available for only projects that belong to an organization. This -// action publishes the count of finding instances and their infoTypes. -// The summary of findings are persisted in Security Command Center and -// are governed by service-specific policies for Security Command Center -// (https://cloud.google.com/terms/service-terms). Only a single -// instance of this action can be specified. Compatible with: Inspect -type GooglePrivacyDlpV2PublishSummaryToCscc struct { -} +// GooglePrivacyDlpV2OrgConfig: Project and scan location information. +// Only set when the parent is an org. +type GooglePrivacyDlpV2OrgConfig struct { + // Location: The data to scan: folder, org, or project + Location *GooglePrivacyDlpV2DiscoveryStartingLocation `json:"location,omitempty"` -// GooglePrivacyDlpV2PublishToPubSub: Publish a message into a given -// Pub/Sub topic when DlpJob has completed. The message contains a -// single field, `DlpJobName`, which is equal to the finished job's -// `DlpJob.name` -// (https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob). -// Compatible with: Inspect, Risk -type GooglePrivacyDlpV2PublishToPubSub struct { - // Topic: Cloud Pub/Sub topic to send notifications to. The topic must - // have given publishing access rights to the DLP API service account - // executing the long running DlpJob sending the notifications. Format - // is projects/{project}/topics/{topic}. - Topic string `json:"topic,omitempty"` + // ProjectId: The project that will run the scan. The DLP service + // account that exists within this project must have access to all + // resources that are profiled, and the Cloud DLP API must be enabled. + ProjectId string `json:"projectId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Topic") to + // ForceSendFields is a list of field names (e.g. "Location") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7356,8 +7534,8 @@ type GooglePrivacyDlpV2PublishToPubSub struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Topic") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Location") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -7365,75 +7543,92 @@ type GooglePrivacyDlpV2PublishToPubSub struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2PublishToPubSub) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2PublishToPubSub +func (s *GooglePrivacyDlpV2OrgConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2OrgConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2PublishToStackdriver: Enable Stackdriver metric -// dlp.googleapis.com/finding_count. This will publish a metric to stack -// driver on each infotype requested and how many findings were found -// for it. CustomDetectors will be bucketed as 'Custom' under the -// Stackdriver label 'info_type'. -type GooglePrivacyDlpV2PublishToStackdriver struct { -} - -// GooglePrivacyDlpV2QuasiId: A column with a semantic tag attached. -type GooglePrivacyDlpV2QuasiId struct { - // CustomTag: A column can be tagged with a custom tag. In this case, - // the user must indicate an auxiliary table that contains statistical - // information on the possible values of this column (below). - CustomTag string `json:"customTag,omitempty"` - - // Field: Required. Identifies the column. - Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` +// GooglePrivacyDlpV2OtherInfoTypeSummary: Infotype details for other +// infoTypes found within a column. +type GooglePrivacyDlpV2OtherInfoTypeSummary struct { + // EstimatedPrevalence: Approximate percentage of non-null rows that + // contained data detected by this infotype. + EstimatedPrevalence int64 `json:"estimatedPrevalence,omitempty"` - // Inferred: If no semantic tag is indicated, we infer the statistical - // model from the distribution of values in the input data - Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` + // ExcludedFromAnalysis: Whether this infoType was excluded from + // sensitivity and risk analysis due to factors such as low prevalence + // (subject to change). + ExcludedFromAnalysis bool `json:"excludedFromAnalysis,omitempty"` - // InfoType: A column can be tagged with a InfoType to use the relevant - // public dataset as a statistical model of population, if available. We - // currently support US ZIP codes, region codes, ages and genders. To - // programmatically obtain the list of supported InfoTypes, use - // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. + // InfoType: The other infoType. InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomTag") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "EstimatedPrevalence") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomTag") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "EstimatedPrevalence") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2QuasiId) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2QuasiId +func (s *GooglePrivacyDlpV2OtherInfoTypeSummary) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2OtherInfoTypeSummary raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2QuasiIdField: A quasi-identifier column has a -// custom_tag, used to know which column in the data corresponds to -// which column in the statistical model. -type GooglePrivacyDlpV2QuasiIdField struct { - // CustomTag: A auxiliary field. - CustomTag string `json:"customTag,omitempty"` +// GooglePrivacyDlpV2OutputStorageConfig: Cloud repository for storing +// output. +type GooglePrivacyDlpV2OutputStorageConfig struct { + // OutputSchema: Schema used for writing the findings for Inspect jobs. + // This field is only used for Inspect and must be unspecified for Risk + // jobs. Columns are derived from the `Finding` object. If appending to + // an existing table, any columns from the predefined schema that are + // missing will be added. No columns in the existing table will be + // deleted. If unspecified, then all available columns will be used for + // a new table or an (existing) table with no schema, and no changes + // will be made to an existing table that has a schema. Only for use + // with external storage. + // + // Possible values: + // "OUTPUT_SCHEMA_UNSPECIFIED" - Unused. + // "BASIC_COLUMNS" - Basic schema including only `info_type`, `quote`, + // `certainty`, and `timestamp`. + // "GCS_COLUMNS" - Schema tailored to findings from scanning Cloud + // Storage. + // "DATASTORE_COLUMNS" - Schema tailored to findings from scanning + // Google Datastore. + // "BIG_QUERY_COLUMNS" - Schema tailored to findings from scanning + // Google BigQuery. + // "ALL_COLUMNS" - Schema containing all columns. + OutputSchema string `json:"outputSchema,omitempty"` - // Field: Identifies the column. - Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` + // Table: Store findings in an existing table or a new table in an + // existing dataset. If table_id is not set a new one will be generated + // for you with the following format: + // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be + // used for generating the date details. For Inspect, each column in an + // existing output table must have the same name, type, and mode of a + // field in the `Finding` object. For Risk, an existing output table + // should be the output of a previous Risk analysis job run on the same + // source table, with the same privacy metric and quasi-identifiers. + // Risk jobs that analyze the same table but compute a different privacy + // metric, or use different sets of quasi-identifiers, cannot store + // their results in the same table. + Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomTag") to + // ForceSendFields is a list of field names (e.g. "OutputSchema") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7441,34 +7636,34 @@ type GooglePrivacyDlpV2QuasiIdField struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomTag") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "OutputSchema") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2QuasiIdField) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2QuasiIdField +func (s *GooglePrivacyDlpV2OutputStorageConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2OutputStorageConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2QuasiIdentifierField: A quasi-identifier column has -// a custom_tag, used to know which column in the data corresponds to -// which column in the statistical model. -type GooglePrivacyDlpV2QuasiIdentifierField struct { - // CustomTag: A column can be tagged with a custom tag. In this case, - // the user must indicate an auxiliary table that contains statistical - // information on the possible values of this column (below). - CustomTag string `json:"customTag,omitempty"` +// GooglePrivacyDlpV2PartitionId: Datastore partition ID. A partition ID +// identifies a grouping of entities. The grouping is always by project +// and namespace, however the namespace ID may be empty. A partition ID +// contains several dimensions: project ID and namespace ID. +type GooglePrivacyDlpV2PartitionId struct { + // NamespaceId: If not empty, the ID of the namespace to which the + // entities belong. + NamespaceId string `json:"namespaceId,omitempty"` - // Field: Identifies the column. - Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` + // ProjectId: The ID of the project to which the entities belong. + ProjectId string `json:"projectId,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomTag") to + // ForceSendFields is a list of field names (e.g. "NamespaceId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7476,28 +7671,41 @@ type GooglePrivacyDlpV2QuasiIdentifierField struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CustomTag") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NamespaceId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2QuasiIdentifierField) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2QuasiIdentifierField +func (s *GooglePrivacyDlpV2PartitionId) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2PartitionId raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2QuoteInfo: Message for infoType-dependent details -// parsed from quote. -type GooglePrivacyDlpV2QuoteInfo struct { - // DateTime: The date time indicated by the quote. - DateTime *GooglePrivacyDlpV2DateTime `json:"dateTime,omitempty"` +// GooglePrivacyDlpV2PathElement: A (kind, ID/name) pair used to +// construct a key path. If either name or ID is set, the element is +// complete. If neither is set, the element is incomplete. +type GooglePrivacyDlpV2PathElement struct { + // Id: The auto-allocated ID of the entity. Never equal to zero. Values + // less than zero are discouraged and may not be supported in the + // future. + Id int64 `json:"id,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "DateTime") to + // Kind: The kind of the entity. A kind matching regex `__.*__` is + // reserved/read-only. A kind must not contain more than 1500 bytes when + // UTF-8 encoded. Cannot be "". + Kind string `json:"kind,omitempty"` + + // Name: The name of the entity. A name matching regex `__.*__` is + // reserved/read-only. A name must not be more than 1500 bytes when + // UTF-8 encoded. Cannot be "". + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7505,8 +7713,8 @@ type GooglePrivacyDlpV2QuoteInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DateTime") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -7514,50 +7722,53 @@ type GooglePrivacyDlpV2QuoteInfo struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2QuoteInfo) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2QuoteInfo +func (s *GooglePrivacyDlpV2PathElement) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2PathElement raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Range: Generic half-open interval [start, end) -type GooglePrivacyDlpV2Range struct { - // End: Index of the last character of the range (exclusive). - End int64 `json:"end,omitempty,string"` +// GooglePrivacyDlpV2PrimitiveTransformation: A rule for transforming a +// value. +type GooglePrivacyDlpV2PrimitiveTransformation struct { + // BucketingConfig: Bucketing + BucketingConfig *GooglePrivacyDlpV2BucketingConfig `json:"bucketingConfig,omitempty"` - // Start: Index of the first character of the range (inclusive). - Start int64 `json:"start,omitempty,string"` + // CharacterMaskConfig: Mask + CharacterMaskConfig *GooglePrivacyDlpV2CharacterMaskConfig `json:"characterMaskConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "End") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // CryptoDeterministicConfig: Deterministic Crypto + CryptoDeterministicConfig *GooglePrivacyDlpV2CryptoDeterministicConfig `json:"cryptoDeterministicConfig,omitempty"` - // NullFields is a list of field names (e.g. "End") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // CryptoHashConfig: Crypto + CryptoHashConfig *GooglePrivacyDlpV2CryptoHashConfig `json:"cryptoHashConfig,omitempty"` -func (s *GooglePrivacyDlpV2Range) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Range - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // CryptoReplaceFfxFpeConfig: Ffx-Fpe + CryptoReplaceFfxFpeConfig *GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig `json:"cryptoReplaceFfxFpeConfig,omitempty"` -// GooglePrivacyDlpV2RecordCondition: A condition for determining -// whether a transformation should be applied to a field. -type GooglePrivacyDlpV2RecordCondition struct { - // Expressions: An expression. - Expressions *GooglePrivacyDlpV2Expressions `json:"expressions,omitempty"` + // DateShiftConfig: Date Shift + DateShiftConfig *GooglePrivacyDlpV2DateShiftConfig `json:"dateShiftConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Expressions") to + // FixedSizeBucketingConfig: Fixed size bucketing + FixedSizeBucketingConfig *GooglePrivacyDlpV2FixedSizeBucketingConfig `json:"fixedSizeBucketingConfig,omitempty"` + + // RedactConfig: Redact + RedactConfig *GooglePrivacyDlpV2RedactConfig `json:"redactConfig,omitempty"` + + // ReplaceConfig: Replace with a specified value. + ReplaceConfig *GooglePrivacyDlpV2ReplaceValueConfig `json:"replaceConfig,omitempty"` + + // ReplaceDictionaryConfig: Replace with a value randomly drawn (with + // replacement) from a dictionary. + ReplaceDictionaryConfig *GooglePrivacyDlpV2ReplaceDictionaryConfig `json:"replaceDictionaryConfig,omitempty"` + + // ReplaceWithInfoTypeConfig: Replace with infotype + ReplaceWithInfoTypeConfig *GooglePrivacyDlpV2ReplaceWithInfoTypeConfig `json:"replaceWithInfoTypeConfig,omitempty"` + + // TimePartConfig: Time extraction + TimePartConfig *GooglePrivacyDlpV2TimePartConfig `json:"timePartConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BucketingConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7565,69 +7776,77 @@ type GooglePrivacyDlpV2RecordCondition struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Expressions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BucketingConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2RecordCondition) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2RecordCondition +func (s *GooglePrivacyDlpV2PrimitiveTransformation) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2PrimitiveTransformation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2RecordKey: Message for a unique key indicating a -// record that contains a finding. -type GooglePrivacyDlpV2RecordKey struct { - BigQueryKey *GooglePrivacyDlpV2BigQueryKey `json:"bigQueryKey,omitempty"` +// GooglePrivacyDlpV2PrivacyMetric: Privacy metric to compute for +// reidentification risk analysis. +type GooglePrivacyDlpV2PrivacyMetric struct { + // CategoricalStatsConfig: Categorical stats + CategoricalStatsConfig *GooglePrivacyDlpV2CategoricalStatsConfig `json:"categoricalStatsConfig,omitempty"` - DatastoreKey *GooglePrivacyDlpV2DatastoreKey `json:"datastoreKey,omitempty"` + // DeltaPresenceEstimationConfig: delta-presence + DeltaPresenceEstimationConfig *GooglePrivacyDlpV2DeltaPresenceEstimationConfig `json:"deltaPresenceEstimationConfig,omitempty"` - // IdValues: Values of identifying columns in the given row. Order of - // values matches the order of `identifying_fields` specified in the - // scanning request. - IdValues []string `json:"idValues,omitempty"` + // KAnonymityConfig: K-anonymity + KAnonymityConfig *GooglePrivacyDlpV2KAnonymityConfig `json:"kAnonymityConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "BigQueryKey") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // KMapEstimationConfig: k-map + KMapEstimationConfig *GooglePrivacyDlpV2KMapEstimationConfig `json:"kMapEstimationConfig,omitempty"` + + // LDiversityConfig: l-diversity + LDiversityConfig *GooglePrivacyDlpV2LDiversityConfig `json:"lDiversityConfig,omitempty"` + + // NumericalStatsConfig: Numerical stats + NumericalStatsConfig *GooglePrivacyDlpV2NumericalStatsConfig `json:"numericalStatsConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CategoricalStatsConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BigQueryKey") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CategoricalStatsConfig") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2RecordKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2RecordKey +func (s *GooglePrivacyDlpV2PrivacyMetric) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2PrivacyMetric raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2RecordLocation: Location of a finding within a row -// or record. -type GooglePrivacyDlpV2RecordLocation struct { - // FieldId: Field id of the field containing the finding. - FieldId *GooglePrivacyDlpV2FieldId `json:"fieldId,omitempty"` - - // RecordKey: Key of the finding. - RecordKey *GooglePrivacyDlpV2RecordKey `json:"recordKey,omitempty"` +type GooglePrivacyDlpV2ProfileStatus struct { + // Status: Profiling status code and optional message. The `status.code` + // value is 0 (default value) for OK. + Status *GoogleRpcStatus `json:"status,omitempty"` - // TableLocation: Location within a `ContentItem.Table`. - TableLocation *GooglePrivacyDlpV2TableLocation `json:"tableLocation,omitempty"` + // Timestamp: Time when the profile generation status was updated + Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "FieldId") to + // ForceSendFields is a list of field names (e.g. "Status") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7635,8 +7854,8 @@ type GooglePrivacyDlpV2RecordLocation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldId") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Status") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -7644,21 +7863,26 @@ type GooglePrivacyDlpV2RecordLocation struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2RecordLocation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2RecordLocation +func (s *GooglePrivacyDlpV2ProfileStatus) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ProfileStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2RecordSuppression: Configuration to suppress -// records whose suppression conditions evaluate to true. -type GooglePrivacyDlpV2RecordSuppression struct { - // Condition: A condition that when it evaluates to true will result in - // the record being evaluated to be suppressed from the transformed - // content. - Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"` +// GooglePrivacyDlpV2Proximity: Message for specifying a window around a +// finding to apply a detection rule. +type GooglePrivacyDlpV2Proximity struct { + // WindowAfter: Number of characters after the finding to consider. + WindowAfter int64 `json:"windowAfter,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to + // WindowBefore: Number of characters before the finding to consider. + // For tabular data, if you want to modify the likelihood of an entire + // column of findngs, set this to 1. For more information, see [Hotword + // example: Set the match likelihood of a table column] + // (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values). + WindowBefore int64 `json:"windowBefore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "WindowAfter") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7666,42 +7890,50 @@ type GooglePrivacyDlpV2RecordSuppression struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "WindowAfter") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2RecordSuppression) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2RecordSuppression +func (s *GooglePrivacyDlpV2Proximity) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Proximity raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GooglePrivacyDlpV2RecordTransformation struct { - // ContainerTimestamp: Findings container modification timestamp, if - // applicable. - ContainerTimestamp string `json:"containerTimestamp,omitempty"` - - // ContainerVersion: Container version, if available ("generation" for - // Cloud Storage). - ContainerVersion string `json:"containerVersion,omitempty"` +// GooglePrivacyDlpV2PubSubCondition: A condition consisting of a value. +type GooglePrivacyDlpV2PubSubCondition struct { + // MinimumRiskScore: The minimum data risk score that triggers the + // condition. + // + // Possible values: + // "PROFILE_SCORE_BUCKET_UNSPECIFIED" - Unused. + // "HIGH" - High risk/sensitivity detected. + // "MEDIUM_OR_HIGH" - Medium or high risk/sensitivity detected. + MinimumRiskScore string `json:"minimumRiskScore,omitempty"` - // FieldId: For record transformations, provide a field. - FieldId *GooglePrivacyDlpV2FieldId `json:"fieldId,omitempty"` + // MinimumSensitivityScore: The minimum sensitivity level that triggers + // the condition. + // + // Possible values: + // "PROFILE_SCORE_BUCKET_UNSPECIFIED" - Unused. + // "HIGH" - High risk/sensitivity detected. + // "MEDIUM_OR_HIGH" - Medium or high risk/sensitivity detected. + MinimumSensitivityScore string `json:"minimumSensitivityScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContainerTimestamp") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "MinimumRiskScore") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContainerTimestamp") to + // NullFields is a list of field names (e.g. "MinimumRiskScore") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -7711,34 +7943,98 @@ type GooglePrivacyDlpV2RecordTransformation struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2RecordTransformation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2RecordTransformation +func (s *GooglePrivacyDlpV2PubSubCondition) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2PubSubCondition raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2RecordTransformations: A type of transformation -// that is applied over structured data such as a table. -type GooglePrivacyDlpV2RecordTransformations struct { - // FieldTransformations: Transform the record by applying various field - // transformations. - FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"` +// GooglePrivacyDlpV2PubSubExpressions: An expression, consisting of an +// operator and conditions. +type GooglePrivacyDlpV2PubSubExpressions struct { + // Conditions: Conditions to apply to the expression. + Conditions []*GooglePrivacyDlpV2PubSubCondition `json:"conditions,omitempty"` - // RecordSuppressions: Configuration defining which records get - // suppressed entirely. Records that match any suppression rule are - // omitted from the output. - RecordSuppressions []*GooglePrivacyDlpV2RecordSuppression `json:"recordSuppressions,omitempty"` + // LogicalOperator: The operator to apply to the collection of + // conditions. + // + // Possible values: + // "LOGICAL_OPERATOR_UNSPECIFIED" - Unused. + // "OR" - Conditional OR. + // "AND" - Conditional AND. + LogicalOperator string `json:"logicalOperator,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "FieldTransformations") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "Conditions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldTransformations") to + // NullFields is a list of field names (e.g. "Conditions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2PubSubExpressions) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2PubSubExpressions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2PubSubNotification: Send a Pub/Sub message into the +// given Pub/Sub topic to connect other systems to data profile +// generation. The message payload data will be the byte serialization +// of `DataProfilePubSubMessage`. +type GooglePrivacyDlpV2PubSubNotification struct { + // DetailOfMessage: How much data to include in the Pub/Sub message. If + // the user wishes to limit the size of the message, they can use + // resource_name and fetch the profile fields they wish to. Per table + // profile (not per column). + // + // Possible values: + // "DETAIL_LEVEL_UNSPECIFIED" - Unused. + // "TABLE_PROFILE" - The full table data profile. + // "RESOURCE_NAME" - The resource name of the table. + DetailOfMessage string `json:"detailOfMessage,omitempty"` + + // Event: The type of event that triggers a Pub/Sub. At most one + // `PubSubNotification` per EventType is permitted. + // + // Possible values: + // "EVENT_TYPE_UNSPECIFIED" - Unused. + // "NEW_PROFILE" - New profile (not a re-profile). + // "CHANGED_PROFILE" - Changed one of the following profile metrics: * + // Table data risk score * Table sensitivity score * Table resource + // visibility * Table encryption type * Table predicted infoTypes * + // Table other infoTypes + // "SCORE_INCREASED" - Table data risk score or sensitivity score + // increased. + // "ERROR_CHANGED" - A user (non-internal) error occurred. + Event string `json:"event,omitempty"` + + // PubsubCondition: Conditions (e.g., data risk or sensitivity level) + // for triggering a Pub/Sub. + PubsubCondition *GooglePrivacyDlpV2DataProfilePubSubCondition `json:"pubsubCondition,omitempty"` + + // Topic: Cloud Pub/Sub topic to send notifications to. Format is + // projects/{project}/topics/{topic}. + Topic string `json:"topic,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DetailOfMessage") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DetailOfMessage") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -7748,41 +8044,58 @@ type GooglePrivacyDlpV2RecordTransformations struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2RecordTransformations) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2RecordTransformations +func (s *GooglePrivacyDlpV2PubSubNotification) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2PubSubNotification raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2RedactConfig: Redact a given value. For example, if -// used with an `InfoTypeTransformation` transforming PHONE_NUMBER, and -// input 'My phone number is 206-555-0123', the output would be 'My -// phone number is '. -type GooglePrivacyDlpV2RedactConfig struct { +// GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog: Publish findings +// of a DlpJob to Data Catalog. In Data Catalog, tag templates are +// applied to the resource that Cloud DLP scanned. Data Catalog tag +// templates are stored in the same project and region where the +// BigQuery table exists. For Cloud DLP to create and apply the tag +// template, the Cloud DLP service agent must have the +// `roles/datacatalog.tagTemplateOwner` permission on the project. The +// tag template contains fields summarizing the results of the DlpJob. +// Any field values previously written by another DlpJob are deleted. +// InfoType naming patterns are strictly enforced when using this +// feature. Findings are persisted in Data Catalog storage and are +// governed by service-specific policies for Data Catalog. For more +// information, see Service Specific Terms +// (https://cloud.google.com/terms/service-terms). Only a single +// instance of this action can be specified. This action is allowed only +// if all resources being scanned are BigQuery tables. Compatible with: +// Inspect +type GooglePrivacyDlpV2PublishFindingsToCloudDataCatalog struct { } -// GooglePrivacyDlpV2RedactImageRequest: Request to search for -// potentially sensitive info in an image and redact it by covering it -// with a colored rectangle. -type GooglePrivacyDlpV2RedactImageRequest struct { - // ByteItem: The content must be PNG, JPEG, SVG or BMP. - ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"` - - // ImageRedactionConfigs: The configuration for specifying what content - // to redact from images. - ImageRedactionConfigs []*GooglePrivacyDlpV2ImageRedactionConfig `json:"imageRedactionConfigs,omitempty"` - - // IncludeFindings: Whether the response should include findings along - // with the redacted image. - IncludeFindings bool `json:"includeFindings,omitempty"` - - // InspectConfig: Configuration for the inspector. - InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` +// GooglePrivacyDlpV2PublishSummaryToCscc: Publish the result summary of +// a DlpJob to Security Command Center +// (https://cloud.google.com/security-command-center). This action is +// available for only projects that belong to an organization. This +// action publishes the count of finding instances and their infoTypes. +// The summary of findings are persisted in Security Command Center and +// are governed by service-specific policies for Security Command Center +// (https://cloud.google.com/terms/service-terms). Only a single +// instance of this action can be specified. Compatible with: Inspect +type GooglePrivacyDlpV2PublishSummaryToCscc struct { +} - // LocationId: Deprecated. This field has no effect. - LocationId string `json:"locationId,omitempty"` +// GooglePrivacyDlpV2PublishToPubSub: Publish a message into a given +// Pub/Sub topic when DlpJob has completed. The message contains a +// single field, `DlpJobName`, which is equal to the finished job's +// `DlpJob.name` +// (https://cloud.google.com/dlp/docs/reference/rest/v2/projects.dlpJobs#DlpJob). +// Compatible with: Inspect, Risk +type GooglePrivacyDlpV2PublishToPubSub struct { + // Topic: Cloud Pub/Sub topic to send notifications to. The topic must + // have given publishing access rights to the DLP API service account + // executing the long running DlpJob sending the notifications. Format + // is projects/{project}/topics/{topic}. + Topic string `json:"topic,omitempty"` - // ForceSendFields is a list of field names (e.g. "ByteItem") to + // ForceSendFields is a list of field names (e.g. "Topic") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7790,8 +8103,8 @@ type GooglePrivacyDlpV2RedactImageRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ByteItem") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Topic") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -7799,32 +8112,42 @@ type GooglePrivacyDlpV2RedactImageRequest struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2RedactImageRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2RedactImageRequest +func (s *GooglePrivacyDlpV2PublishToPubSub) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2PublishToPubSub raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2RedactImageResponse: Results of redacting an image. -type GooglePrivacyDlpV2RedactImageResponse struct { - // ExtractedText: If an image was being inspected and the - // InspectConfig's include_quote was set to true, then this field will - // include all text, if any, that was found in the image. - ExtractedText string `json:"extractedText,omitempty"` +// GooglePrivacyDlpV2PublishToStackdriver: Enable Stackdriver metric +// dlp.googleapis.com/finding_count. This will publish a metric to stack +// driver on each infotype requested and how many findings were found +// for it. CustomDetectors will be bucketed as 'Custom' under the +// Stackdriver label 'info_type'. +type GooglePrivacyDlpV2PublishToStackdriver struct { +} - // InspectResult: The findings. Populated when include_findings in the - // request is true. - InspectResult *GooglePrivacyDlpV2InspectResult `json:"inspectResult,omitempty"` +// GooglePrivacyDlpV2QuasiId: A column with a semantic tag attached. +type GooglePrivacyDlpV2QuasiId struct { + // CustomTag: A column can be tagged with a custom tag. In this case, + // the user must indicate an auxiliary table that contains statistical + // information on the possible values of this column (below). + CustomTag string `json:"customTag,omitempty"` - // RedactedImage: The redacted image. The type will be the same as the - // original image. - RedactedImage string `json:"redactedImage,omitempty"` + // Field: Required. Identifies the column. + Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Inferred: If no semantic tag is indicated, we infer the statistical + // model from the distribution of values in the input data + Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExtractedText") to + // InfoType: A column can be tagged with a InfoType to use the relevant + // public dataset as a statistical model of population, if available. We + // currently support US ZIP codes, region codes, ages and genders. To + // programmatically obtain the list of supported InfoTypes, use + // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. + InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomTag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7832,35 +8155,32 @@ type GooglePrivacyDlpV2RedactImageResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExtractedText") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CustomTag") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2RedactImageResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2RedactImageResponse +func (s *GooglePrivacyDlpV2QuasiId) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2QuasiId raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Regex: Message defining a custom regular -// expression. -type GooglePrivacyDlpV2Regex struct { - // GroupIndexes: The index of the submatch to extract as findings. When - // not specified, the entire match is returned. No more than 3 may be - // included. - GroupIndexes []int64 `json:"groupIndexes,omitempty"` +// GooglePrivacyDlpV2QuasiIdField: A quasi-identifier column has a +// custom_tag, used to know which column in the data corresponds to +// which column in the statistical model. +type GooglePrivacyDlpV2QuasiIdField struct { + // CustomTag: A auxiliary field. + CustomTag string `json:"customTag,omitempty"` - // Pattern: Pattern defining the regular expression. Its syntax - // (https://github.com/google/re2/wiki/Syntax) can be found under the - // google/re2 repository on GitHub. - Pattern string `json:"pattern,omitempty"` + // Field: Identifies the column. + Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` - // ForceSendFields is a list of field names (e.g. "GroupIndexes") to + // ForceSendFields is a list of field names (e.g. "CustomTag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7868,61 +8188,34 @@ type GooglePrivacyDlpV2Regex struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GroupIndexes") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CustomTag") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Regex) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Regex +func (s *GooglePrivacyDlpV2QuasiIdField) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2QuasiIdField raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ReidentifyContentRequest: Request to re-identify an -// item. -type GooglePrivacyDlpV2ReidentifyContentRequest struct { - // InspectConfig: Configuration for the inspector. - InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` - - // InspectTemplateName: Template to use. Any configuration directly - // specified in `inspect_config` will override those set in the - // template. Singular fields that are set in this request will replace - // their corresponding fields in the template. Repeated fields are - // appended. Singular sub-messages and groups are recursively merged. - InspectTemplateName string `json:"inspectTemplateName,omitempty"` +// GooglePrivacyDlpV2QuasiIdentifierField: A quasi-identifier column has +// a custom_tag, used to know which column in the data corresponds to +// which column in the statistical model. +type GooglePrivacyDlpV2QuasiIdentifierField struct { + // CustomTag: A column can be tagged with a custom tag. In this case, + // the user must indicate an auxiliary table that contains statistical + // information on the possible values of this column (below). + CustomTag string `json:"customTag,omitempty"` - // Item: The item to re-identify. Will be treated as text. - Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` + // Field: Identifies the column. + Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` - // LocationId: Deprecated. This field has no effect. - LocationId string `json:"locationId,omitempty"` - - // ReidentifyConfig: Configuration for the re-identification of the - // content item. This field shares the same proto message type that is - // used for de-identification, however its usage here is for the - // reversal of the previous de-identification. Re-identification is - // performed by examining the transformations used to de-identify the - // items and executing the reverse. This requires that only reversible - // transformations be provided here. The reversible transformations are: - // - `CryptoDeterministicConfig` - `CryptoReplaceFfxFpeConfig` - ReidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"reidentifyConfig,omitempty"` - - // ReidentifyTemplateName: Template to use. References an instance of - // `DeidentifyTemplate`. Any configuration directly specified in - // `reidentify_config` or `inspect_config` will override those set in - // the template. The `DeidentifyTemplate` used must include only - // reversible transformations. Singular fields that are set in this - // request will replace their corresponding fields in the template. - // Repeated fields are appended. Singular sub-messages and groups are - // recursively merged. - ReidentifyTemplateName string `json:"reidentifyTemplateName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "InspectConfig") to + // ForceSendFields is a list of field names (e.g. "CustomTag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7930,35 +8223,28 @@ type GooglePrivacyDlpV2ReidentifyContentRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InspectConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CustomTag") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ReidentifyContentRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ReidentifyContentRequest +func (s *GooglePrivacyDlpV2QuasiIdentifierField) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2QuasiIdentifierField raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ReidentifyContentResponse: Results of -// re-identifying an item. -type GooglePrivacyDlpV2ReidentifyContentResponse struct { - // Item: The re-identified item. - Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` - - // Overview: An overview of the changes that were made to the `item`. - Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GooglePrivacyDlpV2QuoteInfo: Message for infoType-dependent details +// parsed from quote. +type GooglePrivacyDlpV2QuoteInfo struct { + // DateTime: The date time indicated by the quote. + DateTime *GooglePrivacyDlpV2DateTime `json:"dateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Item") to + // ForceSendFields is a list of field names (e.g. "DateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7966,8 +8252,8 @@ type GooglePrivacyDlpV2ReidentifyContentResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Item") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "DateTime") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -7975,21 +8261,21 @@ type GooglePrivacyDlpV2ReidentifyContentResponse struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ReidentifyContentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ReidentifyContentResponse +func (s *GooglePrivacyDlpV2QuoteInfo) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2QuoteInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ReplaceDictionaryConfig: Replace each input value -// with a value randomly selected from the dictionary. -type GooglePrivacyDlpV2ReplaceDictionaryConfig struct { - // WordList: A list of words to select from for random replacement. The - // limits (https://cloud.google.com/dlp/limits) page contains details - // about the size limits of dictionaries. - WordList *GooglePrivacyDlpV2WordList `json:"wordList,omitempty"` +// GooglePrivacyDlpV2Range: Generic half-open interval [start, end) +type GooglePrivacyDlpV2Range struct { + // End: Index of the last character of the range (exclusive). + End int64 `json:"end,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "WordList") to + // Start: Index of the first character of the range (inclusive). + Start int64 `json:"start,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "End") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7997,8 +8283,8 @@ type GooglePrivacyDlpV2ReplaceDictionaryConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WordList") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "End") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -8006,19 +8292,19 @@ type GooglePrivacyDlpV2ReplaceDictionaryConfig struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ReplaceDictionaryConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ReplaceDictionaryConfig +func (s *GooglePrivacyDlpV2Range) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Range raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ReplaceValueConfig: Replace each input value with a -// given `Value`. -type GooglePrivacyDlpV2ReplaceValueConfig struct { - // NewValue: Value to replace it with. - NewValue *GooglePrivacyDlpV2Value `json:"newValue,omitempty"` +// GooglePrivacyDlpV2RecordCondition: A condition for determining +// whether a transformation should be applied to a field. +type GooglePrivacyDlpV2RecordCondition struct { + // Expressions: An expression. + Expressions *GooglePrivacyDlpV2Expressions `json:"expressions,omitempty"` - // ForceSendFields is a list of field names (e.g. "NewValue") to + // ForceSendFields is a list of field names (e.g. "Expressions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8026,79 +8312,69 @@ type GooglePrivacyDlpV2ReplaceValueConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NewValue") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Expressions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ReplaceValueConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ReplaceValueConfig +func (s *GooglePrivacyDlpV2RecordCondition) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2RecordCondition raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ReplaceWithInfoTypeConfig: Replace each matching -// finding with the name of the info_type. -type GooglePrivacyDlpV2ReplaceWithInfoTypeConfig struct { -} - -// GooglePrivacyDlpV2RequestedDeidentifyOptions: De-id options. -type GooglePrivacyDlpV2RequestedDeidentifyOptions struct { - // SnapshotDeidentifyTemplate: Snapshot of the state of the - // `DeidentifyTemplate` from the Deidentify action at the time this job - // was run. - SnapshotDeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"snapshotDeidentifyTemplate,omitempty"` +// GooglePrivacyDlpV2RecordKey: Message for a unique key indicating a +// record that contains a finding. +type GooglePrivacyDlpV2RecordKey struct { + BigQueryKey *GooglePrivacyDlpV2BigQueryKey `json:"bigQueryKey,omitempty"` - // SnapshotImageRedactTemplate: Snapshot of the state of the image - // transformation `DeidentifyTemplate` from the `Deidentify` action at - // the time this job was run. - SnapshotImageRedactTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"snapshotImageRedactTemplate,omitempty"` + DatastoreKey *GooglePrivacyDlpV2DatastoreKey `json:"datastoreKey,omitempty"` - // SnapshotStructuredDeidentifyTemplate: Snapshot of the state of the - // structured `DeidentifyTemplate` from the `Deidentify` action at the - // time this job was run. - SnapshotStructuredDeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"snapshotStructuredDeidentifyTemplate,omitempty"` + // IdValues: Values of identifying columns in the given row. Order of + // values matches the order of `identifying_fields` specified in the + // scanning request. + IdValues []string `json:"idValues,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "SnapshotDeidentifyTemplate") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "BigQueryKey") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "SnapshotDeidentifyTemplate") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "BigQueryKey") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2RequestedDeidentifyOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2RequestedDeidentifyOptions +func (s *GooglePrivacyDlpV2RecordKey) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2RecordKey raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2RequestedOptions: Snapshot of the inspection -// configuration. -type GooglePrivacyDlpV2RequestedOptions struct { - // JobConfig: Inspect config. - JobConfig *GooglePrivacyDlpV2InspectJobConfig `json:"jobConfig,omitempty"` +// GooglePrivacyDlpV2RecordLocation: Location of a finding within a row +// or record. +type GooglePrivacyDlpV2RecordLocation struct { + // FieldId: Field id of the field containing the finding. + FieldId *GooglePrivacyDlpV2FieldId `json:"fieldId,omitempty"` - // SnapshotInspectTemplate: If run with an InspectTemplate, a snapshot - // of its state at the time of this run. - SnapshotInspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"snapshotInspectTemplate,omitempty"` + // RecordKey: Key of the finding. + RecordKey *GooglePrivacyDlpV2RecordKey `json:"recordKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "JobConfig") to + // TableLocation: Location within a `ContentItem.Table`. + TableLocation *GooglePrivacyDlpV2TableLocation `json:"tableLocation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8106,7 +8382,7 @@ type GooglePrivacyDlpV2RequestedOptions struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JobConfig") to include in + // NullFields is a list of field names (e.g. "FieldId") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8115,19 +8391,21 @@ type GooglePrivacyDlpV2RequestedOptions struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2RequestedOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2RequestedOptions +func (s *GooglePrivacyDlpV2RecordLocation) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2RecordLocation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2RequestedRiskAnalysisOptions: Risk analysis -// options. -type GooglePrivacyDlpV2RequestedRiskAnalysisOptions struct { - // JobConfig: The job config for the risk job. - JobConfig *GooglePrivacyDlpV2RiskAnalysisJobConfig `json:"jobConfig,omitempty"` +// GooglePrivacyDlpV2RecordSuppression: Configuration to suppress +// records whose suppression conditions evaluate to true. +type GooglePrivacyDlpV2RecordSuppression struct { + // Condition: A condition that when it evaluates to true will result in + // the record being evaluated to be suppressed from the transformed + // content. + Condition *GooglePrivacyDlpV2RecordCondition `json:"condition,omitempty"` - // ForceSendFields is a list of field names (e.g. "JobConfig") to + // ForceSendFields is a list of field names (e.g. "Condition") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8135,7 +8413,7 @@ type GooglePrivacyDlpV2RequestedRiskAnalysisOptions struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JobConfig") to include in + // NullFields is a list of field names (e.g. "Condition") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8144,67 +8422,114 @@ type GooglePrivacyDlpV2RequestedRiskAnalysisOptions struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2RequestedRiskAnalysisOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2RequestedRiskAnalysisOptions +func (s *GooglePrivacyDlpV2RecordSuppression) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2RecordSuppression raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Result: All result fields mentioned below are -// updated while the job is processing. -type GooglePrivacyDlpV2Result struct { - // HybridStats: Statistics related to the processing of hybrid inspect. - HybridStats *GooglePrivacyDlpV2HybridInspectStatistics `json:"hybridStats,omitempty"` - - // InfoTypeStats: Statistics of how many instances of each info type - // were found during inspect job. - InfoTypeStats []*GooglePrivacyDlpV2InfoTypeStats `json:"infoTypeStats,omitempty"` +type GooglePrivacyDlpV2RecordTransformation struct { + // ContainerTimestamp: Findings container modification timestamp, if + // applicable. + ContainerTimestamp string `json:"containerTimestamp,omitempty"` - // ProcessedBytes: Total size in bytes that were processed. - ProcessedBytes int64 `json:"processedBytes,omitempty,string"` + // ContainerVersion: Container version, if available ("generation" for + // Cloud Storage). + ContainerVersion string `json:"containerVersion,omitempty"` - // TotalEstimatedBytes: Estimate of the number of bytes to process. - TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"` + // FieldId: For record transformations, provide a field. + FieldId *GooglePrivacyDlpV2FieldId `json:"fieldId,omitempty"` - // ForceSendFields is a list of field names (e.g. "HybridStats") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ContainerTimestamp") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HybridStats") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ContainerTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Result) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Result - raw := NoMethod(*s) +func (s *GooglePrivacyDlpV2RecordTransformation) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2RecordTransformation + raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2RiskAnalysisJobConfig: Configuration for a risk -// analysis job. See -// https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn -// more. -type GooglePrivacyDlpV2RiskAnalysisJobConfig struct { - // Actions: Actions to execute at the completion of the job. Are - // executed in the order provided. - Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"` +// GooglePrivacyDlpV2RecordTransformations: A type of transformation +// that is applied over structured data such as a table. +type GooglePrivacyDlpV2RecordTransformations struct { + // FieldTransformations: Transform the record by applying various field + // transformations. + FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"` - // PrivacyMetric: Privacy metric to compute. - PrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"privacyMetric,omitempty"` + // RecordSuppressions: Configuration defining which records get + // suppressed entirely. Records that match any suppression rule are + // omitted from the output. + RecordSuppressions []*GooglePrivacyDlpV2RecordSuppression `json:"recordSuppressions,omitempty"` - // SourceTable: Input dataset to compute metrics over. - SourceTable *GooglePrivacyDlpV2BigQueryTable `json:"sourceTable,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "FieldTransformations") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "Actions") to + // NullFields is a list of field names (e.g. "FieldTransformations") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2RecordTransformations) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2RecordTransformations + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2RedactConfig: Redact a given value. For example, if +// used with an `InfoTypeTransformation` transforming PHONE_NUMBER, and +// input 'My phone number is 206-555-0123', the output would be 'My +// phone number is '. +type GooglePrivacyDlpV2RedactConfig struct { +} + +// GooglePrivacyDlpV2RedactImageRequest: Request to search for +// potentially sensitive info in an image and redact it by covering it +// with a colored rectangle. +type GooglePrivacyDlpV2RedactImageRequest struct { + // ByteItem: The content must be PNG, JPEG, SVG or BMP. + ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"` + + // ImageRedactionConfigs: The configuration for specifying what content + // to redact from images. + ImageRedactionConfigs []*GooglePrivacyDlpV2ImageRedactionConfig `json:"imageRedactionConfigs,omitempty"` + + // IncludeFindings: Whether the response should include findings along + // with the redacted image. + IncludeFindings bool `json:"includeFindings,omitempty"` + + // InspectConfig: Configuration for the inspector. + InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` + + // LocationId: Deprecated. This field has no effect. + LocationId string `json:"locationId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ByteItem") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8212,7 +8537,7 @@ type GooglePrivacyDlpV2RiskAnalysisJobConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Actions") to include in + // NullFields is a list of field names (e.g. "ByteItem") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8221,18 +8546,32 @@ type GooglePrivacyDlpV2RiskAnalysisJobConfig struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2RiskAnalysisJobConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2RiskAnalysisJobConfig +func (s *GooglePrivacyDlpV2RedactImageRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2RedactImageRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Row: Values of the row. -type GooglePrivacyDlpV2Row struct { - // Values: Individual cells. - Values []*GooglePrivacyDlpV2Value `json:"values,omitempty"` +// GooglePrivacyDlpV2RedactImageResponse: Results of redacting an image. +type GooglePrivacyDlpV2RedactImageResponse struct { + // ExtractedText: If an image was being inspected and the + // InspectConfig's include_quote was set to true, then this field will + // include all text, if any, that was found in the image. + ExtractedText string `json:"extractedText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Values") to + // InspectResult: The findings. Populated when include_findings in the + // request is true. + InspectResult *GooglePrivacyDlpV2InspectResult `json:"inspectResult,omitempty"` + + // RedactedImage: The redacted image. The type will be the same as the + // original image. + RedactedImage string `json:"redactedImage,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ExtractedText") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8240,30 +8579,35 @@ type GooglePrivacyDlpV2Row struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Values") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ExtractedText") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Row) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Row +func (s *GooglePrivacyDlpV2RedactImageResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2RedactImageResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2SaveFindings: If set, the detailed findings will be -// persisted to the specified OutputStorageConfig. Only a single -// instance of this action can be specified. Compatible with: Inspect, -// Risk -type GooglePrivacyDlpV2SaveFindings struct { - // OutputConfig: Location to store findings outside of DLP. - OutputConfig *GooglePrivacyDlpV2OutputStorageConfig `json:"outputConfig,omitempty"` +// GooglePrivacyDlpV2Regex: Message defining a custom regular +// expression. +type GooglePrivacyDlpV2Regex struct { + // GroupIndexes: The index of the submatch to extract as findings. When + // not specified, the entire match is returned. No more than 3 may be + // included. + GroupIndexes []int64 `json:"groupIndexes,omitempty"` - // ForceSendFields is a list of field names (e.g. "OutputConfig") to + // Pattern: Pattern defining the regular expression. Its syntax + // (https://github.com/google/re2/wiki/Syntax) can be found under the + // google/re2 repository on GitHub. + Pattern string `json:"pattern,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GroupIndexes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8271,7 +8615,7 @@ type GooglePrivacyDlpV2SaveFindings struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OutputConfig") to include + // NullFields is a list of field names (e.g. "GroupIndexes") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -8280,56 +8624,88 @@ type GooglePrivacyDlpV2SaveFindings struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2SaveFindings) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2SaveFindings +func (s *GooglePrivacyDlpV2Regex) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Regex raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Schedule: Schedule for inspect job triggers. -type GooglePrivacyDlpV2Schedule struct { - // RecurrencePeriodDuration: With this option a job is started on a - // regular periodic basis. For example: every day (86400 seconds). A - // scheduled start time will be skipped if the previous execution has - // not ended when its scheduled time occurs. This value must be set to a - // time duration greater than or equal to 1 day and can be no longer - // than 60 days. - RecurrencePeriodDuration string `json:"recurrencePeriodDuration,omitempty"` +// GooglePrivacyDlpV2ReidentifyContentRequest: Request to re-identify an +// item. +type GooglePrivacyDlpV2ReidentifyContentRequest struct { + // InspectConfig: Configuration for the inspector. + InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "RecurrencePeriodDuration") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // InspectTemplateName: Template to use. Any configuration directly + // specified in `inspect_config` will override those set in the + // template. Singular fields that are set in this request will replace + // their corresponding fields in the template. Repeated fields are + // appended. Singular sub-messages and groups are recursively merged. + InspectTemplateName string `json:"inspectTemplateName,omitempty"` + + // Item: The item to re-identify. Will be treated as text. + Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` + + // LocationId: Deprecated. This field has no effect. + LocationId string `json:"locationId,omitempty"` + + // ReidentifyConfig: Configuration for the re-identification of the + // content item. This field shares the same proto message type that is + // used for de-identification, however its usage here is for the + // reversal of the previous de-identification. Re-identification is + // performed by examining the transformations used to de-identify the + // items and executing the reverse. This requires that only reversible + // transformations be provided here. The reversible transformations are: + // - `CryptoDeterministicConfig` - `CryptoReplaceFfxFpeConfig` + ReidentifyConfig *GooglePrivacyDlpV2DeidentifyConfig `json:"reidentifyConfig,omitempty"` + + // ReidentifyTemplateName: Template to use. References an instance of + // `DeidentifyTemplate`. Any configuration directly specified in + // `reidentify_config` or `inspect_config` will override those set in + // the template. The `DeidentifyTemplate` used must include only + // reversible transformations. Singular fields that are set in this + // request will replace their corresponding fields in the template. + // Repeated fields are appended. Singular sub-messages and groups are + // recursively merged. + ReidentifyTemplateName string `json:"reidentifyTemplateName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InspectConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RecurrencePeriodDuration") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "InspectConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Schedule) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Schedule +func (s *GooglePrivacyDlpV2ReidentifyContentRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ReidentifyContentRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2SelectedInfoTypes: Apply transformation to the -// selected info_types. -type GooglePrivacyDlpV2SelectedInfoTypes struct { - // InfoTypes: Required. InfoTypes to apply the transformation to. - // Required. Provided InfoType must be unique within the - // ImageTransformations message. - InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` +// GooglePrivacyDlpV2ReidentifyContentResponse: Results of +// re-identifying an item. +type GooglePrivacyDlpV2ReidentifyContentResponse struct { + // Item: The re-identified item. + Item *GooglePrivacyDlpV2ContentItem `json:"item,omitempty"` - // ForceSendFields is a list of field names (e.g. "InfoTypes") to + // Overview: An overview of the changes that were made to the `item`. + Overview *GooglePrivacyDlpV2TransformationOverview `json:"overview,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Item") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8337,8 +8713,8 @@ type GooglePrivacyDlpV2SelectedInfoTypes struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InfoTypes") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Item") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -8346,33 +8722,21 @@ type GooglePrivacyDlpV2SelectedInfoTypes struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2SelectedInfoTypes) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2SelectedInfoTypes +func (s *GooglePrivacyDlpV2ReidentifyContentResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ReidentifyContentResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2SensitivityScore: Score is calculated from of all -// elements in the data profile. A higher level means the data is more -// sensitive. -type GooglePrivacyDlpV2SensitivityScore struct { - // Score: The sensitivity score applied to the resource. - // - // Possible values: - // "SENSITIVITY_SCORE_UNSPECIFIED" - Unused. - // "SENSITIVITY_LOW" - No sensitive information detected. The resource - // isn't publicly accessible. - // "SENSITIVITY_MODERATE" - Medium risk. Contains personally - // identifiable information (PII), potentially sensitive data, or fields - // with free-text data that are at a higher risk of having intermittent - // sensitive data. Consider limiting access. - // "SENSITIVITY_HIGH" - High risk. Sensitive personally identifiable - // information (SPII) can be present. Exfiltration of data can lead to - // user data loss. Re-identification of users might be possible. - // Consider limiting usage and or removing SPII. - Score string `json:"score,omitempty"` +// GooglePrivacyDlpV2ReplaceDictionaryConfig: Replace each input value +// with a value randomly selected from the dictionary. +type GooglePrivacyDlpV2ReplaceDictionaryConfig struct { + // WordList: A list of words to select from for random replacement. The + // limits (https://cloud.google.com/dlp/limits) page contains details + // about the size limits of dictionaries. + WordList *GooglePrivacyDlpV2WordList `json:"wordList,omitempty"` - // ForceSendFields is a list of field names (e.g. "Score") to + // ForceSendFields is a list of field names (e.g. "WordList") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8380,8 +8744,8 @@ type GooglePrivacyDlpV2SensitivityScore struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Score") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "WordList") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -8389,32 +8753,19 @@ type GooglePrivacyDlpV2SensitivityScore struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2SensitivityScore) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2SensitivityScore +func (s *GooglePrivacyDlpV2ReplaceDictionaryConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ReplaceDictionaryConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2StatisticalTable: An auxiliary table containing -// statistical information on the relative frequency of different -// quasi-identifiers values. It has one or several quasi-identifiers -// columns, and one column that indicates the relative frequency of each -// quasi-identifier tuple. If a tuple is present in the data but not in -// the auxiliary table, the corresponding relative frequency is assumed -// to be zero (and thus, the tuple is highly reidentifiable). -type GooglePrivacyDlpV2StatisticalTable struct { - // QuasiIds: Required. Quasi-identifier columns. - QuasiIds []*GooglePrivacyDlpV2QuasiIdentifierField `json:"quasiIds,omitempty"` - - // RelativeFrequency: Required. The relative frequency column must - // contain a floating-point number between 0 and 1 (inclusive). Null - // values are assumed to be zero. - RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"` - - // Table: Required. Auxiliary table location. - Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` +// GooglePrivacyDlpV2ReplaceValueConfig: Replace each input value with a +// given `Value`. +type GooglePrivacyDlpV2ReplaceValueConfig struct { + // NewValue: Value to replace it with. + NewValue *GooglePrivacyDlpV2Value `json:"newValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuasiIds") to + // ForceSendFields is a list of field names (e.g. "NewValue") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8422,7 +8773,7 @@ type GooglePrivacyDlpV2StatisticalTable struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuasiIds") to include in + // NullFields is a list of field names (e.g. "NewValue") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8431,30 +8782,70 @@ type GooglePrivacyDlpV2StatisticalTable struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2StatisticalTable) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2StatisticalTable +func (s *GooglePrivacyDlpV2ReplaceValueConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ReplaceValueConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2StorageConfig: Shared message indicating Cloud -// storage type. -type GooglePrivacyDlpV2StorageConfig struct { - // BigQueryOptions: BigQuery options. - BigQueryOptions *GooglePrivacyDlpV2BigQueryOptions `json:"bigQueryOptions,omitempty"` +// GooglePrivacyDlpV2ReplaceWithInfoTypeConfig: Replace each matching +// finding with the name of the info_type. +type GooglePrivacyDlpV2ReplaceWithInfoTypeConfig struct { +} - // CloudStorageOptions: Cloud Storage options. - CloudStorageOptions *GooglePrivacyDlpV2CloudStorageOptions `json:"cloudStorageOptions,omitempty"` +// GooglePrivacyDlpV2RequestedDeidentifyOptions: De-id options. +type GooglePrivacyDlpV2RequestedDeidentifyOptions struct { + // SnapshotDeidentifyTemplate: Snapshot of the state of the + // `DeidentifyTemplate` from the Deidentify action at the time this job + // was run. + SnapshotDeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"snapshotDeidentifyTemplate,omitempty"` - // DatastoreOptions: Google Cloud Datastore options. - DatastoreOptions *GooglePrivacyDlpV2DatastoreOptions `json:"datastoreOptions,omitempty"` + // SnapshotImageRedactTemplate: Snapshot of the state of the image + // transformation `DeidentifyTemplate` from the `Deidentify` action at + // the time this job was run. + SnapshotImageRedactTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"snapshotImageRedactTemplate,omitempty"` - // HybridOptions: Hybrid inspection options. - HybridOptions *GooglePrivacyDlpV2HybridOptions `json:"hybridOptions,omitempty"` + // SnapshotStructuredDeidentifyTemplate: Snapshot of the state of the + // structured `DeidentifyTemplate` from the `Deidentify` action at the + // time this job was run. + SnapshotStructuredDeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"snapshotStructuredDeidentifyTemplate,omitempty"` - TimespanConfig *GooglePrivacyDlpV2TimespanConfig `json:"timespanConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "SnapshotDeidentifyTemplate") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "BigQueryOptions") to + // NullFields is a list of field names (e.g. + // "SnapshotDeidentifyTemplate") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2RequestedDeidentifyOptions) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2RequestedDeidentifyOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2RequestedOptions: Snapshot of the inspection +// configuration. +type GooglePrivacyDlpV2RequestedOptions struct { + // JobConfig: Inspect config. + JobConfig *GooglePrivacyDlpV2InspectJobConfig `json:"jobConfig,omitempty"` + + // SnapshotInspectTemplate: If run with an InspectTemplate, a snapshot + // of its state at the time of this run. + SnapshotInspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"snapshotInspectTemplate,omitempty"` + + // ForceSendFields is a list of field names (e.g. "JobConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8462,28 +8853,28 @@ type GooglePrivacyDlpV2StorageConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BigQueryOptions") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "JobConfig") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2StorageConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2StorageConfig +func (s *GooglePrivacyDlpV2RequestedOptions) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2RequestedOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2StorageMetadataLabel: Storage metadata label to -// indicate which metadata entry contains findings. -type GooglePrivacyDlpV2StorageMetadataLabel struct { - Key string `json:"key,omitempty"` +// GooglePrivacyDlpV2RequestedRiskAnalysisOptions: Risk analysis +// options. +type GooglePrivacyDlpV2RequestedRiskAnalysisOptions struct { + // JobConfig: The job config for the risk job. + JobConfig *GooglePrivacyDlpV2RiskAnalysisJobConfig `json:"jobConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "JobConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8491,8 +8882,8 @@ type GooglePrivacyDlpV2StorageMetadataLabel struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "JobConfig") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -8500,31 +8891,29 @@ type GooglePrivacyDlpV2StorageMetadataLabel struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2StorageMetadataLabel) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2StorageMetadataLabel +func (s *GooglePrivacyDlpV2RequestedRiskAnalysisOptions) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2RequestedRiskAnalysisOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2StoredInfoType: StoredInfoType resource message -// that contains information about the current version and any pending -// updates. -type GooglePrivacyDlpV2StoredInfoType struct { - // CurrentVersion: Current version of the stored info type. - CurrentVersion *GooglePrivacyDlpV2StoredInfoTypeVersion `json:"currentVersion,omitempty"` +// GooglePrivacyDlpV2Result: All result fields mentioned below are +// updated while the job is processing. +type GooglePrivacyDlpV2Result struct { + // HybridStats: Statistics related to the processing of hybrid inspect. + HybridStats *GooglePrivacyDlpV2HybridInspectStatistics `json:"hybridStats,omitempty"` - // Name: Resource name. - Name string `json:"name,omitempty"` + // InfoTypeStats: Statistics of how many instances of each info type + // were found during inspect job. + InfoTypeStats []*GooglePrivacyDlpV2InfoTypeStats `json:"infoTypeStats,omitempty"` - // PendingVersions: Pending versions of the stored info type. Empty if - // no versions are pending. - PendingVersions []*GooglePrivacyDlpV2StoredInfoTypeVersion `json:"pendingVersions,omitempty"` + // ProcessedBytes: Total size in bytes that were processed. + ProcessedBytes int64 `json:"processedBytes,omitempty,string"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // TotalEstimatedBytes: Estimate of the number of bytes to process. + TotalEstimatedBytes int64 `json:"totalEstimatedBytes,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CurrentVersion") to + // ForceSendFields is a list of field names (e.g. "HybridStats") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8532,44 +8921,37 @@ type GooglePrivacyDlpV2StoredInfoType struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrentVersion") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "HybridStats") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2StoredInfoType) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2StoredInfoType +func (s *GooglePrivacyDlpV2Result) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Result raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2StoredInfoTypeConfig: Configuration for stored -// infoTypes. All fields and subfield are provided by the user. For more -// information, see -// https://cloud.google.com/dlp/docs/creating-custom-infotypes. -type GooglePrivacyDlpV2StoredInfoTypeConfig struct { - // Description: Description of the StoredInfoType (max 256 characters). - Description string `json:"description,omitempty"` - - // Dictionary: Store dictionary-based CustomInfoType. - Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` - - // DisplayName: Display name of the StoredInfoType (max 256 characters). - DisplayName string `json:"displayName,omitempty"` +// GooglePrivacyDlpV2RiskAnalysisJobConfig: Configuration for a risk +// analysis job. See +// https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn +// more. +type GooglePrivacyDlpV2RiskAnalysisJobConfig struct { + // Actions: Actions to execute at the completion of the job. Are + // executed in the order provided. + Actions []*GooglePrivacyDlpV2Action `json:"actions,omitempty"` - // LargeCustomDictionary: StoredInfoType where findings are defined by a - // dictionary of phrases. - LargeCustomDictionary *GooglePrivacyDlpV2LargeCustomDictionaryConfig `json:"largeCustomDictionary,omitempty"` + // PrivacyMetric: Privacy metric to compute. + PrivacyMetric *GooglePrivacyDlpV2PrivacyMetric `json:"privacyMetric,omitempty"` - // Regex: Store regular expression-based StoredInfoType. - Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` + // SourceTable: Input dataset to compute metrics over. + SourceTable *GooglePrivacyDlpV2BigQueryTable `json:"sourceTable,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "Actions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8577,96 +8959,58 @@ type GooglePrivacyDlpV2StoredInfoTypeConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Actions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2StoredInfoTypeConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2StoredInfoTypeConfig +func (s *GooglePrivacyDlpV2RiskAnalysisJobConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2RiskAnalysisJobConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2StoredInfoTypeStats: Statistics for a -// StoredInfoType. -type GooglePrivacyDlpV2StoredInfoTypeStats struct { - // LargeCustomDictionary: StoredInfoType where findings are defined by a - // dictionary of phrases. - LargeCustomDictionary *GooglePrivacyDlpV2LargeCustomDictionaryStats `json:"largeCustomDictionary,omitempty"` +// GooglePrivacyDlpV2Row: Values of the row. +type GooglePrivacyDlpV2Row struct { + // Values: Individual cells. + Values []*GooglePrivacyDlpV2Value `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "LargeCustomDictionary") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "Values") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LargeCustomDictionary") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Values") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2StoredInfoTypeStats) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2StoredInfoTypeStats +func (s *GooglePrivacyDlpV2Row) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Row raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2StoredInfoTypeVersion: Version of a StoredInfoType, -// including the configuration used to build it, create timestamp, and -// current state. -type GooglePrivacyDlpV2StoredInfoTypeVersion struct { - // Config: StoredInfoType configuration. - Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` - - // CreateTime: Create timestamp of the version. Read-only, determined by - // the system when the version is created. - CreateTime string `json:"createTime,omitempty"` - - // Errors: Errors that occurred when creating this storedInfoType - // version, or anomalies detected in the storedInfoType data that render - // it unusable. Only the five most recent errors will be displayed, with - // the most recent error appearing first. For example, some of the data - // for stored custom dictionaries is put in the user's Cloud Storage - // bucket, and if this data is modified or deleted by the user or - // another system, the dictionary becomes invalid. If any errors occur, - // fix the problem indicated by the error message and use the - // UpdateStoredInfoType API method to create another version of the - // storedInfoType to continue using it, reusing the same `config` if it - // was not the source of the error. - Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` - - // State: Stored info type version state. Read-only, updated by the - // system during dictionary creation. - // - // Possible values: - // "STORED_INFO_TYPE_STATE_UNSPECIFIED" - Unused - // "PENDING" - StoredInfoType version is being created. - // "READY" - StoredInfoType version is ready for use. - // "FAILED" - StoredInfoType creation failed. All relevant error - // messages are returned in the `StoredInfoTypeVersion` message. - // "INVALID" - StoredInfoType is no longer valid because artifacts - // stored in user-controlled storage were modified. To fix an invalid - // StoredInfoType, use the `UpdateStoredInfoType` method to create a new - // version. - State string `json:"state,omitempty"` - - // Stats: Statistics about this storedInfoType version. - Stats *GooglePrivacyDlpV2StoredInfoTypeStats `json:"stats,omitempty"` +// GooglePrivacyDlpV2SaveFindings: If set, the detailed findings will be +// persisted to the specified OutputStorageConfig. Only a single +// instance of this action can be specified. Compatible with: Inspect, +// Risk +type GooglePrivacyDlpV2SaveFindings struct { + // OutputConfig: Location to store findings outside of DLP. + OutputConfig *GooglePrivacyDlpV2OutputStorageConfig `json:"outputConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Config") to + // ForceSendFields is a list of field names (e.g. "OutputConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8674,35 +9018,65 @@ type GooglePrivacyDlpV2StoredInfoTypeVersion struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Config") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "OutputConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2StoredInfoTypeVersion) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2StoredInfoTypeVersion +func (s *GooglePrivacyDlpV2SaveFindings) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2SaveFindings raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2StoredType: A reference to a StoredInfoType to use -// with scanning. -type GooglePrivacyDlpV2StoredType struct { - // CreateTime: Timestamp indicating when the version of the - // `StoredInfoType` used for inspection was created. Output-only field, - // populated by the system. - CreateTime string `json:"createTime,omitempty"` +// GooglePrivacyDlpV2Schedule: Schedule for inspect job triggers. +type GooglePrivacyDlpV2Schedule struct { + // RecurrencePeriodDuration: With this option a job is started on a + // regular periodic basis. For example: every day (86400 seconds). A + // scheduled start time will be skipped if the previous execution has + // not ended when its scheduled time occurs. This value must be set to a + // time duration greater than or equal to 1 day and can be no longer + // than 60 days. + RecurrencePeriodDuration string `json:"recurrencePeriodDuration,omitempty"` - // Name: Resource name of the requested `StoredInfoType`, for example - // `organizations/433245324/storedInfoTypes/432452342` or - // `projects/project-id/storedInfoTypes/432452342`. - Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "RecurrencePeriodDuration") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // NullFields is a list of field names (e.g. "RecurrencePeriodDuration") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2Schedule) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Schedule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2SelectedInfoTypes: Apply transformation to the +// selected info_types. +type GooglePrivacyDlpV2SelectedInfoTypes struct { + // InfoTypes: Required. InfoTypes to apply the transformation to. + // Required. Provided InfoType must be unique within the + // ImageTransformations message. + InfoTypes []*GooglePrivacyDlpV2InfoType `json:"infoTypes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InfoTypes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8710,7 +9084,7 @@ type GooglePrivacyDlpV2StoredType struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "InfoTypes") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8719,32 +9093,33 @@ type GooglePrivacyDlpV2StoredType struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2StoredType) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2StoredType +func (s *GooglePrivacyDlpV2SelectedInfoTypes) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2SelectedInfoTypes raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2SummaryResult: A collection that informs the user -// the number of times a particular `TransformationResultCode` and error -// details occurred. -type GooglePrivacyDlpV2SummaryResult struct { - // Code: Outcome of the transformation. +// GooglePrivacyDlpV2SensitivityScore: Score is calculated from of all +// elements in the data profile. A higher level means the data is more +// sensitive. +type GooglePrivacyDlpV2SensitivityScore struct { + // Score: The sensitivity score applied to the resource. // // Possible values: - // "TRANSFORMATION_RESULT_CODE_UNSPECIFIED" - Unused - // "SUCCESS" - Transformation completed without an error. - // "ERROR" - Transformation had an error. - Code string `json:"code,omitempty"` - - // Count: Number of transformations counted by this result. - Count int64 `json:"count,omitempty,string"` - - // Details: A place for warnings or errors to show up if a - // transformation didn't work as expected. - Details string `json:"details,omitempty"` + // "SENSITIVITY_SCORE_UNSPECIFIED" - Unused. + // "SENSITIVITY_LOW" - No sensitive information detected. The resource + // isn't publicly accessible. + // "SENSITIVITY_MODERATE" - Medium risk. Contains personally + // identifiable information (PII), potentially sensitive data, or fields + // with free-text data that are at a higher risk of having intermittent + // sensitive data. Consider limiting access. + // "SENSITIVITY_HIGH" - High risk. Sensitive personally identifiable + // information (SPII) can be present. Exfiltration of data can lead to + // user data loss. Re-identification of users might be possible. + // Consider limiting usage and or removing SPII. + Score string `json:"score,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // ForceSendFields is a list of field names (e.g. "Score") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8752,7 +9127,7 @@ type GooglePrivacyDlpV2SummaryResult struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "Score") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8761,35 +9136,32 @@ type GooglePrivacyDlpV2SummaryResult struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2SummaryResult) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2SummaryResult +func (s *GooglePrivacyDlpV2SensitivityScore) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2SensitivityScore raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2SurrogateType: Message for detecting output from -// deidentification transformations such as `CryptoReplaceFfxFpeConfig` -// (https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). -// These types of transformations are those that perform -// pseudonymization, thereby producing a "surrogate" as output. This -// should be used in conjunction with a field on the transformation such -// as `surrogate_info_type`. This CustomInfoType does not support the -// use of `detection_rules`. -type GooglePrivacyDlpV2SurrogateType struct { -} +// GooglePrivacyDlpV2StatisticalTable: An auxiliary table containing +// statistical information on the relative frequency of different +// quasi-identifiers values. It has one or several quasi-identifiers +// columns, and one column that indicates the relative frequency of each +// quasi-identifier tuple. If a tuple is present in the data but not in +// the auxiliary table, the corresponding relative frequency is assumed +// to be zero (and thus, the tuple is highly reidentifiable). +type GooglePrivacyDlpV2StatisticalTable struct { + // QuasiIds: Required. Quasi-identifier columns. + QuasiIds []*GooglePrivacyDlpV2QuasiIdentifierField `json:"quasiIds,omitempty"` -// GooglePrivacyDlpV2Table: Structured content to inspect. Up to 50,000 -// `Value`s per request allowed. See -// https://cloud.google.com/dlp/docs/inspecting-structured-text#inspecting_a_table -// to learn more. -type GooglePrivacyDlpV2Table struct { - // Headers: Headers of the table. - Headers []*GooglePrivacyDlpV2FieldId `json:"headers,omitempty"` + // RelativeFrequency: Required. The relative frequency column must + // contain a floating-point number between 0 and 1 (inclusive). Null + // values are assumed to be zero. + RelativeFrequency *GooglePrivacyDlpV2FieldId `json:"relativeFrequency,omitempty"` - // Rows: Rows of the table. - Rows []*GooglePrivacyDlpV2Row `json:"rows,omitempty"` + // Table: Required. Auxiliary table location. + Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` - // ForceSendFields is a list of field names (e.g. "Headers") to + // ForceSendFields is a list of field names (e.g. "QuasiIds") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8797,7 +9169,7 @@ type GooglePrivacyDlpV2Table struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Headers") to include in + // NullFields is a list of field names (e.g. "QuasiIds") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8806,120 +9178,30 @@ type GooglePrivacyDlpV2Table struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Table) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Table +func (s *GooglePrivacyDlpV2StatisticalTable) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2StatisticalTable raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TableDataProfile: The profile for a scanned table. -type GooglePrivacyDlpV2TableDataProfile struct { - // ConfigSnapshot: The snapshot of the configurations used to generate - // the profile. - ConfigSnapshot *GooglePrivacyDlpV2DataProfileConfigSnapshot `json:"configSnapshot,omitempty"` +// GooglePrivacyDlpV2StorageConfig: Shared message indicating Cloud +// storage type. +type GooglePrivacyDlpV2StorageConfig struct { + // BigQueryOptions: BigQuery options. + BigQueryOptions *GooglePrivacyDlpV2BigQueryOptions `json:"bigQueryOptions,omitempty"` - // CreateTime: The time at which the table was created. - CreateTime string `json:"createTime,omitempty"` - - // DataRiskLevel: The data risk level of this table. - DataRiskLevel *GooglePrivacyDlpV2DataRiskLevel `json:"dataRiskLevel,omitempty"` - - // DatasetId: The BigQuery dataset ID. - DatasetId string `json:"datasetId,omitempty"` - - // DatasetLocation: The BigQuery location where the dataset's data is - // stored. See https://cloud.google.com/bigquery/docs/locations for - // supported locations. - DatasetLocation string `json:"datasetLocation,omitempty"` - - // DatasetProjectId: The Google Cloud project ID that owns the BigQuery - // dataset. - DatasetProjectId string `json:"datasetProjectId,omitempty"` - - // EncryptionStatus: How the table is encrypted. - // - // Possible values: - // "ENCRYPTION_STATUS_UNSPECIFIED" - Unused. - // "ENCRYPTION_GOOGLE_MANAGED" - Google manages server-side encryption - // keys on your behalf. - // "ENCRYPTION_CUSTOMER_MANAGED" - Customer provides the key. - EncryptionStatus string `json:"encryptionStatus,omitempty"` - - // ExpirationTime: Optional. The time when this table expires. - ExpirationTime string `json:"expirationTime,omitempty"` - - // FailedColumnCount: The number of columns skipped in the table because - // of an error. - FailedColumnCount int64 `json:"failedColumnCount,omitempty,string"` - - // FullResource: The resource name of the table. - // https://cloud.google.com/apis/design/resource_names#full_resource_name - FullResource string `json:"fullResource,omitempty"` - - // LastModifiedTime: The time when this table was last modified - LastModifiedTime string `json:"lastModifiedTime,omitempty"` - - // Name: The name of the profile. - Name string `json:"name,omitempty"` - - // OtherInfoTypes: Other infoTypes found in this table's data. - OtherInfoTypes []*GooglePrivacyDlpV2OtherInfoTypeSummary `json:"otherInfoTypes,omitempty"` - - // PredictedInfoTypes: The infoTypes predicted from this table's data. - PredictedInfoTypes []*GooglePrivacyDlpV2InfoTypeSummary `json:"predictedInfoTypes,omitempty"` - - // ProfileLastGenerated: The last time the profile was generated. - ProfileLastGenerated string `json:"profileLastGenerated,omitempty"` - - // ProfileStatus: Success or error status from the most recent profile - // generation attempt. May be empty if the profile is still being - // generated. - ProfileStatus *GooglePrivacyDlpV2ProfileStatus `json:"profileStatus,omitempty"` - - // ProjectDataProfile: The resource name to the project data profile for - // this table. - ProjectDataProfile string `json:"projectDataProfile,omitempty"` - - // ResourceLabels: The labels applied to the resource at the time the - // profile was generated. - ResourceLabels map[string]string `json:"resourceLabels,omitempty"` - - // ResourceVisibility: How broadly a resource has been shared. - // - // Possible values: - // "RESOURCE_VISIBILITY_UNSPECIFIED" - Unused. - // "RESOURCE_VISIBILITY_PUBLIC" - Visible to any user. - // "RESOURCE_VISIBILITY_RESTRICTED" - Visible only to specific users. - ResourceVisibility string `json:"resourceVisibility,omitempty"` - - // RowCount: Number of rows in the table when the profile was generated. - // This will not be populated for BigLake tables. - RowCount int64 `json:"rowCount,omitempty,string"` - - // ScannedColumnCount: The number of columns profiled in the table. - ScannedColumnCount int64 `json:"scannedColumnCount,omitempty,string"` - - // SensitivityScore: The sensitivity score of this table. - SensitivityScore *GooglePrivacyDlpV2SensitivityScore `json:"sensitivityScore,omitempty"` + // CloudStorageOptions: Cloud Storage options. + CloudStorageOptions *GooglePrivacyDlpV2CloudStorageOptions `json:"cloudStorageOptions,omitempty"` - // State: State of a profile. - // - // Possible values: - // "STATE_UNSPECIFIED" - Unused. - // "RUNNING" - The profile is currently running. Once a profile has - // finished it will transition to DONE. - // "DONE" - The profile is no longer generating. If - // profile_status.status.code is 0, the profile succeeded, otherwise, it - // failed. - State string `json:"state,omitempty"` + // DatastoreOptions: Google Cloud Datastore options. + DatastoreOptions *GooglePrivacyDlpV2DatastoreOptions `json:"datastoreOptions,omitempty"` - // TableId: The BigQuery table ID. - TableId string `json:"tableId,omitempty"` + // HybridOptions: Hybrid inspection options. + HybridOptions *GooglePrivacyDlpV2HybridOptions `json:"hybridOptions,omitempty"` - // TableSizeBytes: The size of the table when the profile was generated. - TableSizeBytes int64 `json:"tableSizeBytes,omitempty,string"` + TimespanConfig *GooglePrivacyDlpV2TimespanConfig `json:"timespanConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfigSnapshot") to + // ForceSendFields is a list of field names (e.g. "BigQueryOptions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8927,7 +9209,7 @@ type GooglePrivacyDlpV2TableDataProfile struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfigSnapshot") to + // NullFields is a list of field names (e.g. "BigQueryOptions") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -8937,24 +9219,18 @@ type GooglePrivacyDlpV2TableDataProfile struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TableDataProfile) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TableDataProfile +func (s *GooglePrivacyDlpV2StorageConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2StorageConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TableLocation: Location of a finding within a -// table. -type GooglePrivacyDlpV2TableLocation struct { - // RowIndex: The zero-based index of the row where the finding is - // located. Only populated for resources that have a natural ordering, - // not BigQuery. In BigQuery, to identify the row a finding came from, - // populate BigQueryOptions.identifying_fields with your primary key - // column names and when you store the findings the value of those - // columns will be stored inside of Finding. - RowIndex int64 `json:"rowIndex,omitempty,string"` +// GooglePrivacyDlpV2StorageMetadataLabel: Storage metadata label to +// indicate which metadata entry contains findings. +type GooglePrivacyDlpV2StorageMetadataLabel struct { + Key string `json:"key,omitempty"` - // ForceSendFields is a list of field names (e.g. "RowIndex") to + // ForceSendFields is a list of field names (e.g. "Key") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8962,8 +9238,8 @@ type GooglePrivacyDlpV2TableLocation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RowIndex") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -8971,31 +9247,39 @@ type GooglePrivacyDlpV2TableLocation struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TableLocation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TableLocation +func (s *GooglePrivacyDlpV2StorageMetadataLabel) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2StorageMetadataLabel raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TableOptions: Instructions regarding the table -// content being inspected. -type GooglePrivacyDlpV2TableOptions struct { - // IdentifyingFields: The columns that are the primary keys for table - // objects included in ContentItem. A copy of this cell's value will - // stored alongside alongside each finding so that the finding can be - // traced to the specific row it came from. No more than 3 may be - // provided. - IdentifyingFields []*GooglePrivacyDlpV2FieldId `json:"identifyingFields,omitempty"` +// GooglePrivacyDlpV2StoredInfoType: StoredInfoType resource message +// that contains information about the current version and any pending +// updates. +type GooglePrivacyDlpV2StoredInfoType struct { + // CurrentVersion: Current version of the stored info type. + CurrentVersion *GooglePrivacyDlpV2StoredInfoTypeVersion `json:"currentVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "IdentifyingFields") - // to unconditionally include in API requests. By default, fields with + // Name: Resource name. + Name string `json:"name,omitempty"` + + // PendingVersions: Pending versions of the stored info type. Empty if + // no versions are pending. + PendingVersions []*GooglePrivacyDlpV2StoredInfoTypeVersion `json:"pendingVersions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CurrentVersion") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IdentifyingFields") to + // NullFields is a list of field names (e.g. "CurrentVersion") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -9005,77 +9289,34 @@ type GooglePrivacyDlpV2TableOptions struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TableOptions) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TableOptions +func (s *GooglePrivacyDlpV2StoredInfoType) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2StoredInfoType raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TaggedField: A column with a semantic tag attached. -type GooglePrivacyDlpV2TaggedField struct { - // CustomTag: A column can be tagged with a custom tag. In this case, - // the user must indicate an auxiliary table that contains statistical - // information on the possible values of this column (below). - CustomTag string `json:"customTag,omitempty"` - - // Field: Required. Identifies the column. - Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` - - // Inferred: If no semantic tag is indicated, we infer the statistical - // model from the distribution of values in the input data - Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` - - // InfoType: A column can be tagged with a InfoType to use the relevant - // public dataset as a statistical model of population, if available. We - // currently support US ZIP codes, region codes, ages and genders. To - // programmatically obtain the list of supported InfoTypes, use - // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. - InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CustomTag") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// GooglePrivacyDlpV2StoredInfoTypeConfig: Configuration for stored +// infoTypes. All fields and subfield are provided by the user. For more +// information, see +// https://cloud.google.com/dlp/docs/creating-custom-infotypes. +type GooglePrivacyDlpV2StoredInfoTypeConfig struct { + // Description: Description of the StoredInfoType (max 256 characters). + Description string `json:"description,omitempty"` - // NullFields is a list of field names (e.g. "CustomTag") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // Dictionary: Store dictionary-based CustomInfoType. + Dictionary *GooglePrivacyDlpV2Dictionary `json:"dictionary,omitempty"` -func (s *GooglePrivacyDlpV2TaggedField) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TaggedField - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // DisplayName: Display name of the StoredInfoType (max 256 characters). + DisplayName string `json:"displayName,omitempty"` -// GooglePrivacyDlpV2ThrowError: Throw an error and fail the request -// when a transformation error occurs. -type GooglePrivacyDlpV2ThrowError struct { -} + // LargeCustomDictionary: StoredInfoType where findings are defined by a + // dictionary of phrases. + LargeCustomDictionary *GooglePrivacyDlpV2LargeCustomDictionaryConfig `json:"largeCustomDictionary,omitempty"` -// GooglePrivacyDlpV2TimePartConfig: For use with `Date`, `Timestamp`, -// and `TimeOfDay`, extract or preserve a portion of the value. -type GooglePrivacyDlpV2TimePartConfig struct { - // PartToExtract: The part of the time to keep. - // - // Possible values: - // "TIME_PART_UNSPECIFIED" - Unused - // "YEAR" - [0-9999] - // "MONTH" - [1-12] - // "DAY_OF_MONTH" - [1-31] - // "DAY_OF_WEEK" - [1-7] - // "WEEK_OF_YEAR" - [1-53] - // "HOUR_OF_DAY" - [0-23] - PartToExtract string `json:"partToExtract,omitempty"` + // Regex: Store regular expression-based StoredInfoType. + Regex *GooglePrivacyDlpV2Regex `json:"regex,omitempty"` - // ForceSendFields is a list of field names (e.g. "PartToExtract") to + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9083,7 +9324,7 @@ type GooglePrivacyDlpV2TimePartConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PartToExtract") to include + // NullFields is a list of field names (e.g. "Description") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -9092,203 +9333,123 @@ type GooglePrivacyDlpV2TimePartConfig struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TimePartConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TimePartConfig +func (s *GooglePrivacyDlpV2StoredInfoTypeConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2StoredInfoTypeConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TimeZone: Time zone of the date time object. -type GooglePrivacyDlpV2TimeZone struct { - // OffsetMinutes: Set only if the offset can be determined. Positive for - // time ahead of UTC. E.g. For "UTC-9", this value is -540. - OffsetMinutes int64 `json:"offsetMinutes,omitempty"` +// GooglePrivacyDlpV2StoredInfoTypeStats: Statistics for a +// StoredInfoType. +type GooglePrivacyDlpV2StoredInfoTypeStats struct { + // LargeCustomDictionary: StoredInfoType where findings are defined by a + // dictionary of phrases. + LargeCustomDictionary *GooglePrivacyDlpV2LargeCustomDictionaryStats `json:"largeCustomDictionary,omitempty"` - // ForceSendFields is a list of field names (e.g. "OffsetMinutes") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "LargeCustomDictionary") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OffsetMinutes") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "LargeCustomDictionary") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TimeZone) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TimeZone +func (s *GooglePrivacyDlpV2StoredInfoTypeStats) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2StoredInfoTypeStats raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TimespanConfig: Configuration of the timespan of -// the items to include in scanning. Currently only supported when -// inspecting Cloud Storage and BigQuery. -type GooglePrivacyDlpV2TimespanConfig struct { - // EnableAutoPopulationOfTimespanConfig: When the job is started by a - // JobTrigger we will automatically figure out a valid start_time to - // avoid scanning files that have not been modified since the last time - // the JobTrigger executed. This will be based on the time of the - // execution of the last run of the JobTrigger or the timespan end_time - // used in the last run of the JobTrigger. - EnableAutoPopulationOfTimespanConfig bool `json:"enableAutoPopulationOfTimespanConfig,omitempty"` - - // EndTime: Exclude files, tables, or rows newer than this value. If not - // set, no upper time limit is applied. - EndTime string `json:"endTime,omitempty"` - - // StartTime: Exclude files, tables, or rows older than this value. If - // not set, no lower time limit is applied. - StartTime string `json:"startTime,omitempty"` - - // TimestampField: Specification of the field containing the timestamp - // of scanned items. Used for data sources like Datastore and BigQuery. - // *For BigQuery* If this value is not specified and the table was - // modified between the given start and end times, the entire table will - // be scanned. If this value is specified, then rows are filtered based - // on the given start and end times. Rows with a `NULL` value in the - // provided BigQuery column are skipped. Valid data types of the - // provided BigQuery column are: `INTEGER`, `DATE`, `TIMESTAMP`, and - // `DATETIME`. If your BigQuery table is partitioned at ingestion time - // (https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), - // you can use any of the following pseudo-columns as your timestamp - // field. When used with Cloud DLP, these pseudo-column names are case - // sensitive. - _PARTITIONTIME - _PARTITIONDATE - _PARTITION_LOAD_TIME - // *For Datastore* If this value is specified, then entities are - // filtered based on the given start and end times. If an entity does - // not contain the provided timestamp property or contains empty or - // invalid values, then it is included. Valid data types of the provided - // timestamp property are: `TIMESTAMP`. See the known issue - // (https://cloud.google.com/dlp/docs/known-issues#bq-timespan) related - // to this operation. - TimestampField *GooglePrivacyDlpV2FieldId `json:"timestampField,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EnableAutoPopulationOfTimespanConfig") to unconditionally include in - // API requests. By default, fields with empty or default values are - // omitted from API requests. However, any non-pointer, non-interface - // field appearing in ForceSendFields will be sent to the server - // regardless of whether the field is empty or not. This may be used to - // include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "EnableAutoPopulationOfTimespanConfig") to include in API requests - // with the JSON null value. By default, fields with empty values are - // omitted from API requests. However, any field with an empty value - // appearing in NullFields will be sent to the server as null. It is an - // error if a field in this list has a non-empty value. This may be used - // to include null fields in Patch requests. - NullFields []string `json:"-"` -} +// GooglePrivacyDlpV2StoredInfoTypeVersion: Version of a StoredInfoType, +// including the configuration used to build it, create timestamp, and +// current state. +type GooglePrivacyDlpV2StoredInfoTypeVersion struct { + // Config: StoredInfoType configuration. + Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` -func (s *GooglePrivacyDlpV2TimespanConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TimespanConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // CreateTime: Create timestamp of the version. Read-only, determined by + // the system when the version is created. + CreateTime string `json:"createTime,omitempty"` -// GooglePrivacyDlpV2TransformationConfig: User specified templates and -// configs for how to deidentify structured, unstructures, and image -// files. User must provide either a unstructured deidentify template or -// at least one redact image config. -type GooglePrivacyDlpV2TransformationConfig struct { - // DeidentifyTemplate: De-identify template. If this template is - // specified, it will serve as the default de-identify template. This - // template cannot contain `record_transformations` since it can be used - // for unstructured content such as free-form text files. If this - // template is not set, a default `ReplaceWithInfoTypeConfig` will be - // used to de-identify unstructured content. - DeidentifyTemplate string `json:"deidentifyTemplate,omitempty"` + // Errors: Errors that occurred when creating this storedInfoType + // version, or anomalies detected in the storedInfoType data that render + // it unusable. Only the five most recent errors will be displayed, with + // the most recent error appearing first. For example, some of the data + // for stored custom dictionaries is put in the user's Cloud Storage + // bucket, and if this data is modified or deleted by the user or + // another system, the dictionary becomes invalid. If any errors occur, + // fix the problem indicated by the error message and use the + // UpdateStoredInfoType API method to create another version of the + // storedInfoType to continue using it, reusing the same `config` if it + // was not the source of the error. + Errors []*GooglePrivacyDlpV2Error `json:"errors,omitempty"` - // ImageRedactTemplate: Image redact template. If this template is - // specified, it will serve as the de-identify template for images. If - // this template is not set, all findings in the image will be redacted - // with a black box. - ImageRedactTemplate string `json:"imageRedactTemplate,omitempty"` + // State: Stored info type version state. Read-only, updated by the + // system during dictionary creation. + // + // Possible values: + // "STORED_INFO_TYPE_STATE_UNSPECIFIED" - Unused + // "PENDING" - StoredInfoType version is being created. + // "READY" - StoredInfoType version is ready for use. + // "FAILED" - StoredInfoType creation failed. All relevant error + // messages are returned in the `StoredInfoTypeVersion` message. + // "INVALID" - StoredInfoType is no longer valid because artifacts + // stored in user-controlled storage were modified. To fix an invalid + // StoredInfoType, use the `UpdateStoredInfoType` method to create a new + // version. + State string `json:"state,omitempty"` - // StructuredDeidentifyTemplate: Structured de-identify template. If - // this template is specified, it will serve as the de-identify template - // for structured content such as delimited files and tables. If this - // template is not set but the `deidentify_template` is set, then - // `deidentify_template` will also apply to the structured content. If - // neither template is set, a default `ReplaceWithInfoTypeConfig` will - // be used to de-identify structured content. - StructuredDeidentifyTemplate string `json:"structuredDeidentifyTemplate,omitempty"` + // Stats: Statistics about this storedInfoType version. + Stats *GooglePrivacyDlpV2StoredInfoTypeStats `json:"stats,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Config") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeidentifyTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Config") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TransformationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TransformationConfig +func (s *GooglePrivacyDlpV2StoredInfoTypeVersion) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2StoredInfoTypeVersion raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TransformationDescription: A flattened description -// of a `PrimitiveTransformation` or `RecordSuppression`. -type GooglePrivacyDlpV2TransformationDescription struct { - // Condition: A human-readable string representation of the - // `RecordCondition` corresponding to this transformation. Set if a - // `RecordCondition` was used to determine whether or not to apply this - // transformation. Examples: * (age_field > 85) * (age_field <= 18) * - // (zip_field exists) * (zip_field == 01234) && (city_field != - // "Springville") * (zip_field == 01234) && (age_field <= 18) && - // (city_field exists) - Condition string `json:"condition,omitempty"` - - // Description: A description of the transformation. This is empty for a - // RECORD_SUPPRESSION, or is the output of calling toString() on the - // `PrimitiveTransformation` protocol buffer message for any other type - // of transformation. - Description string `json:"description,omitempty"` - - // InfoType: Set if the transformation was limited to a specific - // `InfoType`. - InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` +// GooglePrivacyDlpV2StoredType: A reference to a StoredInfoType to use +// with scanning. +type GooglePrivacyDlpV2StoredType struct { + // CreateTime: Timestamp indicating when the version of the + // `StoredInfoType` used for inspection was created. Output-only field, + // populated by the system. + CreateTime string `json:"createTime,omitempty"` - // Type: The transformation type. - // - // Possible values: - // "TRANSFORMATION_TYPE_UNSPECIFIED" - Unused - // "RECORD_SUPPRESSION" - Record suppression - // "REPLACE_VALUE" - Replace value - // "REPLACE_DICTIONARY" - Replace value using a dictionary. - // "REDACT" - Redact - // "CHARACTER_MASK" - Character mask - // "CRYPTO_REPLACE_FFX_FPE" - FFX-FPE - // "FIXED_SIZE_BUCKETING" - Fixed size bucketing - // "BUCKETING" - Bucketing - // "REPLACE_WITH_INFO_TYPE" - Replace with info type - // "TIME_PART" - Time part - // "CRYPTO_HASH" - Crypto hash - // "DATE_SHIFT" - Date shift - // "CRYPTO_DETERMINISTIC_CONFIG" - Deterministic crypto - // "REDACT_IMAGE" - Redact image - Type string `json:"type,omitempty"` + // Name: Resource name of the requested `StoredInfoType`, for example + // `organizations/433245324/storedInfoTypes/432452342` or + // `projects/project-id/storedInfoTypes/432452342`. + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9296,7 +9457,7 @@ type GooglePrivacyDlpV2TransformationDescription struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in + // NullFields is a list of field names (e.g. "CreateTime") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9305,50 +9466,32 @@ type GooglePrivacyDlpV2TransformationDescription struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TransformationDescription) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TransformationDescription +func (s *GooglePrivacyDlpV2StoredType) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2StoredType raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TransformationDetails: Details about a single -// transformation. This object contains a description of the -// transformation, information about whether the transformation was -// successfully applied, and the precise location where the -// transformation occurred. These details are stored in a user-specified -// BigQuery table. -type GooglePrivacyDlpV2TransformationDetails struct { - // ContainerName: The top level name of the container where the - // transformation is located (this will be the source file name or table - // name). - ContainerName string `json:"containerName,omitempty"` - - // ResourceName: The name of the job that completed the transformation. - ResourceName string `json:"resourceName,omitempty"` - - // StatusDetails: Status of the transformation, if transformation was - // not successful, this will specify what caused it to fail, otherwise - // it will show that the transformation was successful. - StatusDetails *GooglePrivacyDlpV2TransformationResultStatus `json:"statusDetails,omitempty"` - - // Transformation: Description of transformation. This would only - // contain more than one element if there were multiple matching - // transformations and which one to apply was ambiguous. Not set for - // states that contain no transformation, currently only state that - // contains no transformation is - // TransformationResultStateType.METADATA_UNRETRIEVABLE. - Transformation []*GooglePrivacyDlpV2TransformationDescription `json:"transformation,omitempty"` +// GooglePrivacyDlpV2SummaryResult: A collection that informs the user +// the number of times a particular `TransformationResultCode` and error +// details occurred. +type GooglePrivacyDlpV2SummaryResult struct { + // Code: Outcome of the transformation. + // + // Possible values: + // "TRANSFORMATION_RESULT_CODE_UNSPECIFIED" - Unused + // "SUCCESS" - Transformation completed without an error. + // "ERROR" - Transformation had an error. + Code string `json:"code,omitempty"` - // TransformationLocation: The precise location of the transformed - // content in the original container. - TransformationLocation *GooglePrivacyDlpV2TransformationLocation `json:"transformationLocation,omitempty"` + // Count: Number of transformations counted by this result. + Count int64 `json:"count,omitempty,string"` - // TransformedBytes: The number of bytes that were transformed. If - // transformation was unsuccessful or did not take place because there - // was no content to transform, this will be zero. - TransformedBytes int64 `json:"transformedBytes,omitempty,string"` + // Details: A place for warnings or errors to show up if a + // transformation didn't work as expected. + Details string `json:"details,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContainerName") to + // ForceSendFields is a list of field names (e.g. "Code") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9356,33 +9499,44 @@ type GooglePrivacyDlpV2TransformationDetails struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContainerName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TransformationDetails) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TransformationDetails +func (s *GooglePrivacyDlpV2SummaryResult) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2SummaryResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TransformationDetailsStorageConfig: Config for -// storing transformation details. -type GooglePrivacyDlpV2TransformationDetailsStorageConfig struct { - // Table: The BigQuery table in which to store the output. This may be - // an existing table or in a new table in an existing dataset. If - // table_id is not set a new one will be generated for you with the - // following format: - // dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. - // Pacific time zone will be used for generating the date details. - Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` +// GooglePrivacyDlpV2SurrogateType: Message for detecting output from +// deidentification transformations such as `CryptoReplaceFfxFpeConfig` +// (https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). +// These types of transformations are those that perform +// pseudonymization, thereby producing a "surrogate" as output. This +// should be used in conjunction with a field on the transformation such +// as `surrogate_info_type`. This CustomInfoType does not support the +// use of `detection_rules`. +type GooglePrivacyDlpV2SurrogateType struct { +} - // ForceSendFields is a list of field names (e.g. "Table") to +// GooglePrivacyDlpV2Table: Structured content to inspect. Up to 50,000 +// `Value`s per request allowed. See +// https://cloud.google.com/dlp/docs/inspecting-structured-text#inspecting_a_table +// to learn more. +type GooglePrivacyDlpV2Table struct { + // Headers: Headers of the table. + Headers []*GooglePrivacyDlpV2FieldId `json:"headers,omitempty"` + + // Rows: Rows of the table. + Rows []*GooglePrivacyDlpV2Row `json:"rows,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Headers") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9390,8 +9544,8 @@ type GooglePrivacyDlpV2TransformationDetailsStorageConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Table") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Headers") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -9399,36 +9553,128 @@ type GooglePrivacyDlpV2TransformationDetailsStorageConfig struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TransformationDetailsStorageConfig) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TransformationDetailsStorageConfig +func (s *GooglePrivacyDlpV2Table) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Table raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TransformationErrorHandling: How to handle -// transformation errors during de-identification. A transformation -// error occurs when the requested transformation is incompatible with -// the data. For example, trying to de-identify an IP address using a -// `DateShift` transformation would result in a transformation error, -// since date info cannot be extracted from an IP address. Information -// about any incompatible transformations, and how they were handled, is -// returned in the response as part of the `TransformationOverviews`. -type GooglePrivacyDlpV2TransformationErrorHandling struct { - // LeaveUntransformed: Ignore errors - LeaveUntransformed *GooglePrivacyDlpV2LeaveUntransformed `json:"leaveUntransformed,omitempty"` +// GooglePrivacyDlpV2TableDataProfile: The profile for a scanned table. +type GooglePrivacyDlpV2TableDataProfile struct { + // ConfigSnapshot: The snapshot of the configurations used to generate + // the profile. + ConfigSnapshot *GooglePrivacyDlpV2DataProfileConfigSnapshot `json:"configSnapshot,omitempty"` - // ThrowError: Throw an error - ThrowError *GooglePrivacyDlpV2ThrowError `json:"throwError,omitempty"` + // CreateTime: The time at which the table was created. + CreateTime string `json:"createTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "LeaveUntransformed") - // to unconditionally include in API requests. By default, fields with + // DataRiskLevel: The data risk level of this table. + DataRiskLevel *GooglePrivacyDlpV2DataRiskLevel `json:"dataRiskLevel,omitempty"` + + // DatasetId: The BigQuery dataset ID. + DatasetId string `json:"datasetId,omitempty"` + + // DatasetLocation: The BigQuery location where the dataset's data is + // stored. See https://cloud.google.com/bigquery/docs/locations for + // supported locations. + DatasetLocation string `json:"datasetLocation,omitempty"` + + // DatasetProjectId: The Google Cloud project ID that owns the BigQuery + // dataset. + DatasetProjectId string `json:"datasetProjectId,omitempty"` + + // EncryptionStatus: How the table is encrypted. + // + // Possible values: + // "ENCRYPTION_STATUS_UNSPECIFIED" - Unused. + // "ENCRYPTION_GOOGLE_MANAGED" - Google manages server-side encryption + // keys on your behalf. + // "ENCRYPTION_CUSTOMER_MANAGED" - Customer provides the key. + EncryptionStatus string `json:"encryptionStatus,omitempty"` + + // ExpirationTime: Optional. The time when this table expires. + ExpirationTime string `json:"expirationTime,omitempty"` + + // FailedColumnCount: The number of columns skipped in the table because + // of an error. + FailedColumnCount int64 `json:"failedColumnCount,omitempty,string"` + + // FullResource: The resource name of the table. + // https://cloud.google.com/apis/design/resource_names#full_resource_name + FullResource string `json:"fullResource,omitempty"` + + // LastModifiedTime: The time when this table was last modified + LastModifiedTime string `json:"lastModifiedTime,omitempty"` + + // Name: The name of the profile. + Name string `json:"name,omitempty"` + + // OtherInfoTypes: Other infoTypes found in this table's data. + OtherInfoTypes []*GooglePrivacyDlpV2OtherInfoTypeSummary `json:"otherInfoTypes,omitempty"` + + // PredictedInfoTypes: The infoTypes predicted from this table's data. + PredictedInfoTypes []*GooglePrivacyDlpV2InfoTypeSummary `json:"predictedInfoTypes,omitempty"` + + // ProfileLastGenerated: The last time the profile was generated. + ProfileLastGenerated string `json:"profileLastGenerated,omitempty"` + + // ProfileStatus: Success or error status from the most recent profile + // generation attempt. May be empty if the profile is still being + // generated. + ProfileStatus *GooglePrivacyDlpV2ProfileStatus `json:"profileStatus,omitempty"` + + // ProjectDataProfile: The resource name to the project data profile for + // this table. + ProjectDataProfile string `json:"projectDataProfile,omitempty"` + + // ResourceLabels: The labels applied to the resource at the time the + // profile was generated. + ResourceLabels map[string]string `json:"resourceLabels,omitempty"` + + // ResourceVisibility: How broadly a resource has been shared. + // + // Possible values: + // "RESOURCE_VISIBILITY_UNSPECIFIED" - Unused. + // "RESOURCE_VISIBILITY_PUBLIC" - Visible to any user. + // "RESOURCE_VISIBILITY_RESTRICTED" - Visible only to specific users. + ResourceVisibility string `json:"resourceVisibility,omitempty"` + + // RowCount: Number of rows in the table when the profile was generated. + // This will not be populated for BigLake tables. + RowCount int64 `json:"rowCount,omitempty,string"` + + // ScannedColumnCount: The number of columns profiled in the table. + ScannedColumnCount int64 `json:"scannedColumnCount,omitempty,string"` + + // SensitivityScore: The sensitivity score of this table. + SensitivityScore *GooglePrivacyDlpV2SensitivityScore `json:"sensitivityScore,omitempty"` + + // State: State of a profile. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unused. + // "RUNNING" - The profile is currently running. Once a profile has + // finished it will transition to DONE. + // "DONE" - The profile is no longer generating. If + // profile_status.status.code is 0, the profile succeeded, otherwise, it + // failed. + State string `json:"state,omitempty"` + + // TableId: The BigQuery table ID. + TableId string `json:"tableId,omitempty"` + + // TableSizeBytes: The size of the table when the profile was generated. + TableSizeBytes int64 `json:"tableSizeBytes,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ConfigSnapshot") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LeaveUntransformed") to + // NullFields is a list of field names (e.g. "ConfigSnapshot") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -9438,37 +9684,24 @@ type GooglePrivacyDlpV2TransformationErrorHandling struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TransformationErrorHandling) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TransformationErrorHandling +func (s *GooglePrivacyDlpV2TableDataProfile) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TableDataProfile raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TransformationLocation: Specifies the location of a -// transformation. -type GooglePrivacyDlpV2TransformationLocation struct { - // ContainerType: Information about the functionality of the container - // where this finding occurred, if available. - // - // Possible values: - // "TRANSFORM_UNKNOWN_CONTAINER" - // "TRANSFORM_BODY" - // "TRANSFORM_METADATA" - // "TRANSFORM_TABLE" - ContainerType string `json:"containerType,omitempty"` - - // FindingId: For infotype transformations, link to the corresponding - // findings ID so that location information does not need to be - // duplicated. Each findings ID correlates to an entry in the findings - // output table, this table only gets created when users specify to save - // findings (add the save findings action to the request). - FindingId string `json:"findingId,omitempty"` +// GooglePrivacyDlpV2TableLocation: Location of a finding within a +// table. +type GooglePrivacyDlpV2TableLocation struct { + // RowIndex: The zero-based index of the row where the finding is + // located. Only populated for resources that have a natural ordering, + // not BigQuery. In BigQuery, to identify the row a finding came from, + // populate BigQueryOptions.identifying_fields with your primary key + // column names and when you store the findings the value of those + // columns will be stored inside of Finding. + RowIndex int64 `json:"rowIndex,omitempty,string"` - // RecordTransformation: For record transformations, provide a field and - // container information. - RecordTransformation *GooglePrivacyDlpV2RecordTransformation `json:"recordTransformation,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ContainerType") to + // ForceSendFields is a list of field names (e.g. "RowIndex") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9476,132 +9709,77 @@ type GooglePrivacyDlpV2TransformationLocation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContainerType") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "RowIndex") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TransformationLocation) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TransformationLocation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GooglePrivacyDlpV2TransformationOverview: Overview of the -// modifications that occurred. -type GooglePrivacyDlpV2TransformationOverview struct { - // TransformationSummaries: Transformations applied to the dataset. - TransformationSummaries []*GooglePrivacyDlpV2TransformationSummary `json:"transformationSummaries,omitempty"` - - // TransformedBytes: Total size in bytes that were transformed in some - // way. - TransformedBytes int64 `json:"transformedBytes,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. - // "TransformationSummaries") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TransformationSummaries") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GooglePrivacyDlpV2TransformationOverview) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TransformationOverview +func (s *GooglePrivacyDlpV2TableLocation) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TableLocation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GooglePrivacyDlpV2TransformationResultStatus struct { - // Details: Detailed error codes and messages - Details *GoogleRpcStatus `json:"details,omitempty"` - - // ResultStatusType: Transformation result status type, this will be - // either SUCCESS, or it will be the reason for why the transformation - // was not completely successful. - // - // Possible values: - // "STATE_TYPE_UNSPECIFIED" - // "INVALID_TRANSFORM" - This will be set when a finding could not be - // transformed (i.e. outside user set bucket range). - // "BIGQUERY_MAX_ROW_SIZE_EXCEEDED" - This will be set when a BigQuery - // transformation was successful but could not be stored back in - // BigQuery because the transformed row exceeds BigQuery's max row size. - // "METADATA_UNRETRIEVABLE" - This will be set when there is a finding - // in the custom metadata of a file, but at the write time of the - // transformed file, this key / value pair is unretrievable. - // "SUCCESS" - This will be set when the transformation and storing of - // it is successful. - ResultStatusType string `json:"resultStatusType,omitempty"` +// GooglePrivacyDlpV2TableOptions: Instructions regarding the table +// content being inspected. +type GooglePrivacyDlpV2TableOptions struct { + // IdentifyingFields: The columns that are the primary keys for table + // objects included in ContentItem. A copy of this cell's value will + // stored alongside alongside each finding so that the finding can be + // traced to the specific row it came from. No more than 3 may be + // provided. + IdentifyingFields []*GooglePrivacyDlpV2FieldId `json:"identifyingFields,omitempty"` - // ForceSendFields is a list of field names (e.g. "Details") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "IdentifyingFields") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Details") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "IdentifyingFields") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TransformationResultStatus) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TransformationResultStatus +func (s *GooglePrivacyDlpV2TableOptions) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TableOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TransformationSummary: Summary of a single -// transformation. Only one of 'transformation', 'field_transformation', -// or 'record_suppress' will be set. -type GooglePrivacyDlpV2TransformationSummary struct { - // Field: Set if the transformation was limited to a specific FieldId. +// GooglePrivacyDlpV2TaggedField: A column with a semantic tag attached. +type GooglePrivacyDlpV2TaggedField struct { + // CustomTag: A column can be tagged with a custom tag. In this case, + // the user must indicate an auxiliary table that contains statistical + // information on the possible values of this column (below). + CustomTag string `json:"customTag,omitempty"` + + // Field: Required. Identifies the column. Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` - // FieldTransformations: The field transformation that was applied. If - // multiple field transformations are requested for a single field, this - // list will contain all of them; otherwise, only one is supplied. - FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"` + // Inferred: If no semantic tag is indicated, we infer the statistical + // model from the distribution of values in the input data + Inferred *GoogleProtobufEmpty `json:"inferred,omitempty"` - // InfoType: Set if the transformation was limited to a specific - // InfoType. + // InfoType: A column can be tagged with a InfoType to use the relevant + // public dataset as a statistical model of population, if available. We + // currently support US ZIP codes, region codes, ages and genders. To + // programmatically obtain the list of supported InfoTypes, use + // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` - // RecordSuppress: The specific suppression option these stats apply to. - RecordSuppress *GooglePrivacyDlpV2RecordSuppression `json:"recordSuppress,omitempty"` - - // Results: Collection of all transformations that took place or had an - // error. - Results []*GooglePrivacyDlpV2SummaryResult `json:"results,omitempty"` - - // Transformation: The specific transformation these stats apply to. - Transformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"transformation,omitempty"` - - // TransformedBytes: Total size in bytes that were transformed in some - // way. - TransformedBytes int64 `json:"transformedBytes,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "Field") to + // ForceSendFields is a list of field names (e.g. "CustomTag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9609,8 +9787,8 @@ type GooglePrivacyDlpV2TransformationSummary struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Field") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "CustomTag") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -9618,59 +9796,33 @@ type GooglePrivacyDlpV2TransformationSummary struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2TransformationSummary) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TransformationSummary +func (s *GooglePrivacyDlpV2TaggedField) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TaggedField raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2TransientCryptoKey: Use this to have a random data -// crypto key generated. It will be discarded after the request -// finishes. -type GooglePrivacyDlpV2TransientCryptoKey struct { - // Name: Required. Name of the key. This is an arbitrary string used to - // differentiate different keys. A unique key is generated per name: two - // separate `TransientCryptoKey` protos share the same generated key if - // their names are the same. When the data crypto key is generated, this - // name is not used in any way (repeating the api call will result in a - // different key being generated). - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GooglePrivacyDlpV2TransientCryptoKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2TransientCryptoKey - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// GooglePrivacyDlpV2ThrowError: Throw an error and fail the request +// when a transformation error occurs. +type GooglePrivacyDlpV2ThrowError struct { } -// GooglePrivacyDlpV2Trigger: What event needs to occur for a new job to -// be started. -type GooglePrivacyDlpV2Trigger struct { - // Manual: For use with hybrid jobs. Jobs must be manually created and - // finished. - Manual *GooglePrivacyDlpV2Manual `json:"manual,omitempty"` - - // Schedule: Create a job on a repeating basis based on the elapse of - // time. - Schedule *GooglePrivacyDlpV2Schedule `json:"schedule,omitempty"` +// GooglePrivacyDlpV2TimePartConfig: For use with `Date`, `Timestamp`, +// and `TimeOfDay`, extract or preserve a portion of the value. +type GooglePrivacyDlpV2TimePartConfig struct { + // PartToExtract: The part of the time to keep. + // + // Possible values: + // "TIME_PART_UNSPECIFIED" - Unused + // "YEAR" - [0-9999] + // "MONTH" - [1-12] + // "DAY_OF_MONTH" - [1-31] + // "DAY_OF_WEEK" - [1-7] + // "WEEK_OF_YEAR" - [1-53] + // "HOUR_OF_DAY" - [0-23] + PartToExtract string `json:"partToExtract,omitempty"` - // ForceSendFields is a list of field names (e.g. "Manual") to + // ForceSendFields is a list of field names (e.g. "PartToExtract") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9678,29 +9830,28 @@ type GooglePrivacyDlpV2Trigger struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Manual") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "PartToExtract") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Trigger) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Trigger +func (s *GooglePrivacyDlpV2TimePartConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TimePartConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2UnwrappedCryptoKey: Using raw keys is prone to -// security risks due to accidentally leaking the key. Choose another -// type of key if possible. -type GooglePrivacyDlpV2UnwrappedCryptoKey struct { - // Key: Required. A 128/192/256 bit key. - Key string `json:"key,omitempty"` +// GooglePrivacyDlpV2TimeZone: Time zone of the date time object. +type GooglePrivacyDlpV2TimeZone struct { + // OffsetMinutes: Set only if the offset can be determined. Positive for + // time ahead of UTC. E.g. For "UTC-9", this value is -540. + OffsetMinutes int64 `json:"offsetMinutes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to + // ForceSendFields is a list of field names (e.g. "OffsetMinutes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9708,29 +9859,115 @@ type GooglePrivacyDlpV2UnwrappedCryptoKey struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Key") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "OffsetMinutes") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2UnwrappedCryptoKey) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2UnwrappedCryptoKey +func (s *GooglePrivacyDlpV2TimeZone) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TimeZone raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest: Request message -// for UpdateDeidentifyTemplate. -type GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest struct { - // DeidentifyTemplate: New DeidentifyTemplate value. - DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"` +// GooglePrivacyDlpV2TimespanConfig: Configuration of the timespan of +// the items to include in scanning. Currently only supported when +// inspecting Cloud Storage and BigQuery. +type GooglePrivacyDlpV2TimespanConfig struct { + // EnableAutoPopulationOfTimespanConfig: When the job is started by a + // JobTrigger we will automatically figure out a valid start_time to + // avoid scanning files that have not been modified since the last time + // the JobTrigger executed. This will be based on the time of the + // execution of the last run of the JobTrigger or the timespan end_time + // used in the last run of the JobTrigger. + EnableAutoPopulationOfTimespanConfig bool `json:"enableAutoPopulationOfTimespanConfig,omitempty"` - // UpdateMask: Mask to control which fields get updated. - UpdateMask string `json:"updateMask,omitempty"` + // EndTime: Exclude files, tables, or rows newer than this value. If not + // set, no upper time limit is applied. + EndTime string `json:"endTime,omitempty"` + + // StartTime: Exclude files, tables, or rows older than this value. If + // not set, no lower time limit is applied. + StartTime string `json:"startTime,omitempty"` + + // TimestampField: Specification of the field containing the timestamp + // of scanned items. Used for data sources like Datastore and BigQuery. + // *For BigQuery* If this value is not specified and the table was + // modified between the given start and end times, the entire table will + // be scanned. If this value is specified, then rows are filtered based + // on the given start and end times. Rows with a `NULL` value in the + // provided BigQuery column are skipped. Valid data types of the + // provided BigQuery column are: `INTEGER`, `DATE`, `TIMESTAMP`, and + // `DATETIME`. If your BigQuery table is partitioned at ingestion time + // (https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), + // you can use any of the following pseudo-columns as your timestamp + // field. When used with Cloud DLP, these pseudo-column names are case + // sensitive. - _PARTITIONTIME - _PARTITIONDATE - _PARTITION_LOAD_TIME + // *For Datastore* If this value is specified, then entities are + // filtered based on the given start and end times. If an entity does + // not contain the provided timestamp property or contains empty or + // invalid values, then it is included. Valid data types of the provided + // timestamp property are: `TIMESTAMP`. See the known issue + // (https://cloud.google.com/dlp/docs/known-issues#bq-timespan) related + // to this operation. + TimestampField *GooglePrivacyDlpV2FieldId `json:"timestampField,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableAutoPopulationOfTimespanConfig") to unconditionally include in + // API requests. By default, fields with empty or default values are + // omitted from API requests. However, any non-pointer, non-interface + // field appearing in ForceSendFields will be sent to the server + // regardless of whether the field is empty or not. This may be used to + // include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EnableAutoPopulationOfTimespanConfig") to include in API requests + // with the JSON null value. By default, fields with empty values are + // omitted from API requests. However, any field with an empty value + // appearing in NullFields will be sent to the server as null. It is an + // error if a field in this list has a non-empty value. This may be used + // to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2TimespanConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TimespanConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2TransformationConfig: User specified templates and +// configs for how to deidentify structured, unstructures, and image +// files. User must provide either a unstructured deidentify template or +// at least one redact image config. +type GooglePrivacyDlpV2TransformationConfig struct { + // DeidentifyTemplate: De-identify template. If this template is + // specified, it will serve as the default de-identify template. This + // template cannot contain `record_transformations` since it can be used + // for unstructured content such as free-form text files. If this + // template is not set, a default `ReplaceWithInfoTypeConfig` will be + // used to de-identify unstructured content. + DeidentifyTemplate string `json:"deidentifyTemplate,omitempty"` + + // ImageRedactTemplate: Image redact template. If this template is + // specified, it will serve as the de-identify template for images. If + // this template is not set, all findings in the image will be redacted + // with a black box. + ImageRedactTemplate string `json:"imageRedactTemplate,omitempty"` + + // StructuredDeidentifyTemplate: Structured de-identify template. If + // this template is specified, it will serve as the de-identify template + // for structured content such as delimited files and tables. If this + // template is not set but the `deidentify_template` is set, then + // `deidentify_template` will also apply to the structured content. If + // neither template is set, a default `ReplaceWithInfoTypeConfig` will + // be used to de-identify structured content. + StructuredDeidentifyTemplate string `json:"structuredDeidentifyTemplate,omitempty"` // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") // to unconditionally include in API requests. By default, fields with @@ -9750,22 +9987,55 @@ type GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest +func (s *GooglePrivacyDlpV2TransformationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TransformationConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2UpdateInspectTemplateRequest: Request message for -// UpdateInspectTemplate. -type GooglePrivacyDlpV2UpdateInspectTemplateRequest struct { - // InspectTemplate: New InspectTemplate value. - InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"` +// GooglePrivacyDlpV2TransformationDescription: A flattened description +// of a `PrimitiveTransformation` or `RecordSuppression`. +type GooglePrivacyDlpV2TransformationDescription struct { + // Condition: A human-readable string representation of the + // `RecordCondition` corresponding to this transformation. Set if a + // `RecordCondition` was used to determine whether or not to apply this + // transformation. Examples: * (age_field > 85) * (age_field <= 18) * + // (zip_field exists) * (zip_field == 01234) && (city_field != + // "Springville") * (zip_field == 01234) && (age_field <= 18) && + // (city_field exists) + Condition string `json:"condition,omitempty"` - // UpdateMask: Mask to control which fields get updated. - UpdateMask string `json:"updateMask,omitempty"` + // Description: A description of the transformation. This is empty for a + // RECORD_SUPPRESSION, or is the output of calling toString() on the + // `PrimitiveTransformation` protocol buffer message for any other type + // of transformation. + Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "InspectTemplate") to + // InfoType: Set if the transformation was limited to a specific + // `InfoType`. + InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` + + // Type: The transformation type. + // + // Possible values: + // "TRANSFORMATION_TYPE_UNSPECIFIED" - Unused + // "RECORD_SUPPRESSION" - Record suppression + // "REPLACE_VALUE" - Replace value + // "REPLACE_DICTIONARY" - Replace value using a dictionary. + // "REDACT" - Redact + // "CHARACTER_MASK" - Character mask + // "CRYPTO_REPLACE_FFX_FPE" - FFX-FPE + // "FIXED_SIZE_BUCKETING" - Fixed size bucketing + // "BUCKETING" - Bucketing + // "REPLACE_WITH_INFO_TYPE" - Replace with info type + // "TIME_PART" - Time part + // "CRYPTO_HASH" - Crypto hash + // "DATE_SHIFT" - Date shift + // "CRYPTO_DETERMINISTIC_CONFIG" - Deterministic crypto + // "REDACT_IMAGE" - Redact image + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9773,32 +10043,59 @@ type GooglePrivacyDlpV2UpdateInspectTemplateRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InspectTemplate") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2UpdateInspectTemplateRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2UpdateInspectTemplateRequest +func (s *GooglePrivacyDlpV2TransformationDescription) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TransformationDescription raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2UpdateJobTriggerRequest: Request message for -// UpdateJobTrigger. -type GooglePrivacyDlpV2UpdateJobTriggerRequest struct { - // JobTrigger: New JobTrigger value. - JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"` +// GooglePrivacyDlpV2TransformationDetails: Details about a single +// transformation. This object contains a description of the +// transformation, information about whether the transformation was +// successfully applied, and the precise location where the +// transformation occurred. These details are stored in a user-specified +// BigQuery table. +type GooglePrivacyDlpV2TransformationDetails struct { + // ContainerName: The top level name of the container where the + // transformation is located (this will be the source file name or table + // name). + ContainerName string `json:"containerName,omitempty"` - // UpdateMask: Mask to control which fields get updated. - UpdateMask string `json:"updateMask,omitempty"` + // ResourceName: The name of the job that completed the transformation. + ResourceName string `json:"resourceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "JobTrigger") to + // StatusDetails: Status of the transformation, if transformation was + // not successful, this will specify what caused it to fail, otherwise + // it will show that the transformation was successful. + StatusDetails *GooglePrivacyDlpV2TransformationResultStatus `json:"statusDetails,omitempty"` + + // Transformation: Description of transformation. This would only + // contain more than one element if there were multiple matching + // transformations and which one to apply was ambiguous. Not set for + // states that contain no transformation, currently only state that + // contains no transformation is + // TransformationResultStateType.METADATA_UNRETRIEVABLE. + Transformation []*GooglePrivacyDlpV2TransformationDescription `json:"transformation,omitempty"` + + // TransformationLocation: The precise location of the transformed + // content in the original container. + TransformationLocation *GooglePrivacyDlpV2TransformationLocation `json:"transformationLocation,omitempty"` + + // TransformedBytes: The number of bytes that were transformed. If + // transformation was unsuccessful or did not take place because there + // was no content to transform, this will be zero. + TransformedBytes int64 `json:"transformedBytes,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ContainerName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9806,33 +10103,33 @@ type GooglePrivacyDlpV2UpdateJobTriggerRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JobTrigger") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ContainerName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2UpdateJobTriggerRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2UpdateJobTriggerRequest +func (s *GooglePrivacyDlpV2TransformationDetails) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TransformationDetails raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2UpdateStoredInfoTypeRequest: Request message for -// UpdateStoredInfoType. -type GooglePrivacyDlpV2UpdateStoredInfoTypeRequest struct { - // Config: Updated configuration for the storedInfoType. If not - // provided, a new version of the storedInfoType will be created with - // the existing configuration. - Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` - - // UpdateMask: Mask to control which fields get updated. - UpdateMask string `json:"updateMask,omitempty"` +// GooglePrivacyDlpV2TransformationDetailsStorageConfig: Config for +// storing transformation details. +type GooglePrivacyDlpV2TransformationDetailsStorageConfig struct { + // Table: The BigQuery table in which to store the output. This may be + // an existing table or in a new table in an existing dataset. If + // table_id is not set a new one will be generated for you with the + // following format: + // dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. + // Pacific time zone will be used for generating the date details. + Table *GooglePrivacyDlpV2BigQueryTable `json:"table,omitempty"` - // ForceSendFields is a list of field names (e.g. "Config") to + // ForceSendFields is a list of field names (e.g. "Table") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9840,7 +10137,7 @@ type GooglePrivacyDlpV2UpdateStoredInfoTypeRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Config") to include in API + // NullFields is a list of field names (e.g. "Table") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9849,54 +10146,76 @@ type GooglePrivacyDlpV2UpdateStoredInfoTypeRequest struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2UpdateStoredInfoTypeRequest +func (s *GooglePrivacyDlpV2TransformationDetailsStorageConfig) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TransformationDetailsStorageConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2Value: Set of primitive values supported by the -// system. Note that for the purposes of inspection or transformation, -// the number of bytes considered to comprise a 'Value' is based on its -// representation as a UTF-8 encoded string. For example, if -// 'integer_value' is set to 123456789, the number of bytes would be -// counted as 9, even though an int64 only holds up to 8 bytes of data. -type GooglePrivacyDlpV2Value struct { - // BooleanValue: boolean - BooleanValue bool `json:"booleanValue,omitempty"` +// GooglePrivacyDlpV2TransformationErrorHandling: How to handle +// transformation errors during de-identification. A transformation +// error occurs when the requested transformation is incompatible with +// the data. For example, trying to de-identify an IP address using a +// `DateShift` transformation would result in a transformation error, +// since date info cannot be extracted from an IP address. Information +// about any incompatible transformations, and how they were handled, is +// returned in the response as part of the `TransformationOverviews`. +type GooglePrivacyDlpV2TransformationErrorHandling struct { + // LeaveUntransformed: Ignore errors + LeaveUntransformed *GooglePrivacyDlpV2LeaveUntransformed `json:"leaveUntransformed,omitempty"` - // DateValue: date - DateValue *GoogleTypeDate `json:"dateValue,omitempty"` + // ThrowError: Throw an error + ThrowError *GooglePrivacyDlpV2ThrowError `json:"throwError,omitempty"` - // DayOfWeekValue: day of week - // - // Possible values: - // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. - // "MONDAY" - Monday - // "TUESDAY" - Tuesday - // "WEDNESDAY" - Wednesday - // "THURSDAY" - Thursday - // "FRIDAY" - Friday - // "SATURDAY" - Saturday - // "SUNDAY" - Sunday - DayOfWeekValue string `json:"dayOfWeekValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "LeaveUntransformed") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // FloatValue: float - FloatValue float64 `json:"floatValue,omitempty"` + // NullFields is a list of field names (e.g. "LeaveUntransformed") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // IntegerValue: integer - IntegerValue int64 `json:"integerValue,omitempty,string"` +func (s *GooglePrivacyDlpV2TransformationErrorHandling) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TransformationErrorHandling + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // StringValue: string - StringValue string `json:"stringValue,omitempty"` +// GooglePrivacyDlpV2TransformationLocation: Specifies the location of a +// transformation. +type GooglePrivacyDlpV2TransformationLocation struct { + // ContainerType: Information about the functionality of the container + // where this finding occurred, if available. + // + // Possible values: + // "TRANSFORM_UNKNOWN_CONTAINER" + // "TRANSFORM_BODY" + // "TRANSFORM_METADATA" + // "TRANSFORM_TABLE" + ContainerType string `json:"containerType,omitempty"` - // TimeValue: time of day - TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"` + // FindingId: For infotype transformations, link to the corresponding + // findings ID so that location information does not need to be + // duplicated. Each findings ID correlates to an entry in the findings + // output table, this table only gets created when users specify to save + // findings (add the save findings action to the request). + FindingId string `json:"findingId,omitempty"` - // TimestampValue: timestamp - TimestampValue string `json:"timestampValue,omitempty"` + // RecordTransformation: For record transformations, provide a field and + // container information. + RecordTransformation *GooglePrivacyDlpV2RecordTransformation `json:"recordTransformation,omitempty"` - // ForceSendFields is a list of field names (e.g. "BooleanValue") to + // ForceSendFields is a list of field names (e.g. "ContainerType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9904,7 +10223,7 @@ type GooglePrivacyDlpV2Value struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BooleanValue") to include + // NullFields is a list of field names (e.g. "ContainerType") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -9913,36 +10232,70 @@ type GooglePrivacyDlpV2Value struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2Value) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2Value +func (s *GooglePrivacyDlpV2TransformationLocation) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TransformationLocation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GooglePrivacyDlpV2Value) UnmarshalJSON(data []byte) error { - type NoMethod GooglePrivacyDlpV2Value - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil +// GooglePrivacyDlpV2TransformationOverview: Overview of the +// modifications that occurred. +type GooglePrivacyDlpV2TransformationOverview struct { + // TransformationSummaries: Transformations applied to the dataset. + TransformationSummaries []*GooglePrivacyDlpV2TransformationSummary `json:"transformationSummaries,omitempty"` + + // TransformedBytes: Total size in bytes that were transformed in some + // way. + TransformedBytes int64 `json:"transformedBytes,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. + // "TransformationSummaries") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TransformationSummaries") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } -// GooglePrivacyDlpV2ValueFrequency: A value of a field, including its -// frequency. -type GooglePrivacyDlpV2ValueFrequency struct { - // Count: How many times the value is contained in the field. - Count int64 `json:"count,omitempty,string"` +func (s *GooglePrivacyDlpV2TransformationOverview) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TransformationOverview + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Value: A value contained in the field in question. - Value *GooglePrivacyDlpV2Value `json:"value,omitempty"` +type GooglePrivacyDlpV2TransformationResultStatus struct { + // Details: Detailed error codes and messages + Details *GoogleRpcStatus `json:"details,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to + // ResultStatusType: Transformation result status type, this will be + // either SUCCESS, or it will be the reason for why the transformation + // was not completely successful. + // + // Possible values: + // "STATE_TYPE_UNSPECIFIED" + // "INVALID_TRANSFORM" - This will be set when a finding could not be + // transformed (i.e. outside user set bucket range). + // "BIGQUERY_MAX_ROW_SIZE_EXCEEDED" - This will be set when a BigQuery + // transformation was successful but could not be stored back in + // BigQuery because the transformed row exceeds BigQuery's max row size. + // "METADATA_UNRETRIEVABLE" - This will be set when there is a finding + // in the custom metadata of a file, but at the write time of the + // transformed file, this key / value pair is unretrievable. + // "SUCCESS" - This will be set when the transformation and storing of + // it is successful. + ResultStatusType string `json:"resultStatusType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Details") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9950,8 +10303,8 @@ type GooglePrivacyDlpV2ValueFrequency struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Details") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -9959,22 +10312,43 @@ type GooglePrivacyDlpV2ValueFrequency struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2ValueFrequency) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2ValueFrequency +func (s *GooglePrivacyDlpV2TransformationResultStatus) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TransformationResultStatus raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2VersionDescription: Details about each available -// version for an infotype. -type GooglePrivacyDlpV2VersionDescription struct { - // Description: Description of the version. - Description string `json:"description,omitempty"` +// GooglePrivacyDlpV2TransformationSummary: Summary of a single +// transformation. Only one of 'transformation', 'field_transformation', +// or 'record_suppress' will be set. +type GooglePrivacyDlpV2TransformationSummary struct { + // Field: Set if the transformation was limited to a specific FieldId. + Field *GooglePrivacyDlpV2FieldId `json:"field,omitempty"` - // Version: Name of the version - Version string `json:"version,omitempty"` + // FieldTransformations: The field transformation that was applied. If + // multiple field transformations are requested for a single field, this + // list will contain all of them; otherwise, only one is supplied. + FieldTransformations []*GooglePrivacyDlpV2FieldTransformation `json:"fieldTransformations,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // InfoType: Set if the transformation was limited to a specific + // InfoType. + InfoType *GooglePrivacyDlpV2InfoType `json:"infoType,omitempty"` + + // RecordSuppress: The specific suppression option these stats apply to. + RecordSuppress *GooglePrivacyDlpV2RecordSuppression `json:"recordSuppress,omitempty"` + + // Results: Collection of all transformations that took place or had an + // error. + Results []*GooglePrivacyDlpV2SummaryResult `json:"results,omitempty"` + + // Transformation: The specific transformation these stats apply to. + Transformation *GooglePrivacyDlpV2PrimitiveTransformation `json:"transformation,omitempty"` + + // TransformedBytes: Total size in bytes that were transformed in some + // way. + TransformedBytes int64 `json:"transformedBytes,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Field") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9982,30 +10356,34 @@ type GooglePrivacyDlpV2VersionDescription struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Field") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2VersionDescription) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2VersionDescription +func (s *GooglePrivacyDlpV2TransformationSummary) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TransformationSummary raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2WordList: Message defining a list of words or -// phrases to search for in the data. -type GooglePrivacyDlpV2WordList struct { - // Words: Words or phrases defining the dictionary. The dictionary must - // contain at least one phrase and every phrase must contain at least 2 - // characters that are letters or digits. [required] - Words []string `json:"words,omitempty"` +// GooglePrivacyDlpV2TransientCryptoKey: Use this to have a random data +// crypto key generated. It will be discarded after the request +// finishes. +type GooglePrivacyDlpV2TransientCryptoKey struct { + // Name: Required. Name of the key. This is an arbitrary string used to + // differentiate different keys. A unique key is generated per name: two + // separate `TransientCryptoKey` protos share the same generated key if + // their names are the same. When the data crypto key is generated, this + // name is not used in any way (repeating the api call will result in a + // different key being generated). + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Words") to + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10013,7 +10391,7 @@ type GooglePrivacyDlpV2WordList struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Words") to include in API + // NullFields is a list of field names (e.g. "Name") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10022,45 +10400,54 @@ type GooglePrivacyDlpV2WordList struct { NullFields []string `json:"-"` } -func (s *GooglePrivacyDlpV2WordList) MarshalJSON() ([]byte, error) { - type NoMethod GooglePrivacyDlpV2WordList +func (s *GooglePrivacyDlpV2TransientCryptoKey) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TransientCryptoKey raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleProtobufEmpty: A generic empty message that you can re-use to -// avoid defining duplicated empty messages in your APIs. A typical -// example is to use it as the request or the response type of an API -// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) -// returns (google.protobuf.Empty); } -type GoogleProtobufEmpty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} +// GooglePrivacyDlpV2Trigger: What event needs to occur for a new job to +// be started. +type GooglePrivacyDlpV2Trigger struct { + // Manual: For use with hybrid jobs. Jobs must be manually created and + // finished. + Manual *GooglePrivacyDlpV2Manual `json:"manual,omitempty"` -// GoogleRpcStatus: The `Status` type defines a logical error model that -// is suitable for different programming environments, including REST -// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -type GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` + // Schedule: Create a job on a repeating basis based on the elapse of + // time. + Schedule *GooglePrivacyDlpV2Schedule `json:"schedule,omitempty"` - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Manual") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` + // NullFields is a list of field names (e.g. "Manual") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // ForceSendFields is a list of field names (e.g. "Code") to +func (s *GooglePrivacyDlpV2Trigger) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Trigger + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2UnwrappedCryptoKey: Using raw keys is prone to +// security risks due to accidentally leaking the key. Choose another +// type of key if possible. +type GooglePrivacyDlpV2UnwrappedCryptoKey struct { + // Key: Required. A 128/192/256 bit key. + Key string `json:"key,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10068,7 +10455,7 @@ type GoogleRpcStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "Key") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10077,37 +10464,55 @@ type GoogleRpcStatus struct { NullFields []string `json:"-"` } -func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus +func (s *GooglePrivacyDlpV2UnwrappedCryptoKey) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2UnwrappedCryptoKey raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeDate: Represents a whole or partial calendar date, such as -// a birthday. The time of day and time zone are either specified -// elsewhere or are insignificant. The date is relative to the Gregorian -// Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values. * A month and day, with a -// zero year (for example, an anniversary). * A year on its own, with a -// zero month and a zero day. * A year and month, with a zero day (for -// example, a credit card expiration date). Related types: * -// google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type GoogleTypeDate struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and - // month, or 0 to specify a year by itself or a year and month where the - // day isn't significant. - Day int64 `json:"day,omitempty"` +// GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest: Request message +// for UpdateDeidentifyTemplate. +type GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest struct { + // DeidentifyTemplate: New DeidentifyTemplate value. + DeidentifyTemplate *GooglePrivacyDlpV2DeidentifyTemplate `json:"deidentifyTemplate,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year - // without a month and day. - Month int64 `json:"month,omitempty"` + // UpdateMask: Mask to control which fields get updated. + UpdateMask string `json:"updateMask,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a - // date without a year. - Year int64 `json:"year,omitempty"` + // ForceSendFields is a list of field names (e.g. "DeidentifyTemplate") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "Day") to + // NullFields is a list of field names (e.g. "DeidentifyTemplate") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2UpdateDiscoveryConfigRequest: Request message for +// UpdateDiscoveryConfig. +type GooglePrivacyDlpV2UpdateDiscoveryConfigRequest struct { + // DiscoveryConfig: New DiscoveryConfig value. + DiscoveryConfig *GooglePrivacyDlpV2DiscoveryConfig `json:"discoveryConfig,omitempty"` + + // UpdateMask: Mask to control which fields get updated. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiscoveryConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10115,8 +10520,74 @@ type GoogleTypeDate struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "DiscoveryConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2UpdateDiscoveryConfigRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2UpdateDiscoveryConfigRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2UpdateInspectTemplateRequest: Request message for +// UpdateInspectTemplate. +type GooglePrivacyDlpV2UpdateInspectTemplateRequest struct { + // InspectTemplate: New InspectTemplate value. + InspectTemplate *GooglePrivacyDlpV2InspectTemplate `json:"inspectTemplate,omitempty"` + + // UpdateMask: Mask to control which fields get updated. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InspectTemplate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InspectTemplate") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2UpdateInspectTemplateRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2UpdateInspectTemplateRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2UpdateJobTriggerRequest: Request message for +// UpdateJobTrigger. +type GooglePrivacyDlpV2UpdateJobTriggerRequest struct { + // JobTrigger: New JobTrigger value. + JobTrigger *GooglePrivacyDlpV2JobTrigger `json:"jobTrigger,omitempty"` + + // UpdateMask: Mask to control which fields get updated. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "JobTrigger") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "JobTrigger") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -10124,34 +10595,24 @@ type GoogleTypeDate struct { NullFields []string `json:"-"` } -func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate +func (s *GooglePrivacyDlpV2UpdateJobTriggerRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2UpdateJobTriggerRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeTimeOfDay: Represents a time of day. The date and time zone -// are either not significant or are specified elsewhere. An API may -// choose to allow leap seconds. Related types are google.type.Date and -// `google.protobuf.Timestamp`. -type GoogleTypeTimeOfDay struct { - // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API - // may choose to allow the value "24:00:00" for scenarios like business - // closing time. - Hours int64 `json:"hours,omitempty"` - - // Minutes: Minutes of hour of day. Must be from 0 to 59. - Minutes int64 `json:"minutes,omitempty"` - - // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to - // 999,999,999. - Nanos int64 `json:"nanos,omitempty"` +// GooglePrivacyDlpV2UpdateStoredInfoTypeRequest: Request message for +// UpdateStoredInfoType. +type GooglePrivacyDlpV2UpdateStoredInfoTypeRequest struct { + // Config: Updated configuration for the storedInfoType. If not + // provided, a new version of the storedInfoType will be created with + // the existing configuration. + Config *GooglePrivacyDlpV2StoredInfoTypeConfig `json:"config,omitempty"` - // Seconds: Seconds of minutes of the time. Must normally be from 0 to - // 59. An API may allow the value 60 if it allows leap-seconds. - Seconds int64 `json:"seconds,omitempty"` + // UpdateMask: Mask to control which fields get updated. + UpdateMask string `json:"updateMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "Hours") to + // ForceSendFields is a list of field names (e.g. "Config") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10159,7 +10620,7 @@ type GoogleTypeTimeOfDay struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Hours") to include in API + // NullFields is a list of field names (e.g. "Config") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10168,65 +10629,2062 @@ type GoogleTypeTimeOfDay struct { NullFields []string `json:"-"` } -func (s *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeTimeOfDay - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +func (s *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2UpdateStoredInfoTypeRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2Value: Set of primitive values supported by the +// system. Note that for the purposes of inspection or transformation, +// the number of bytes considered to comprise a 'Value' is based on its +// representation as a UTF-8 encoded string. For example, if +// 'integer_value' is set to 123456789, the number of bytes would be +// counted as 9, even though an int64 only holds up to 8 bytes of data. +type GooglePrivacyDlpV2Value struct { + // BooleanValue: boolean + BooleanValue bool `json:"booleanValue,omitempty"` + + // DateValue: date + DateValue *GoogleTypeDate `json:"dateValue,omitempty"` + + // DayOfWeekValue: day of week + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + DayOfWeekValue string `json:"dayOfWeekValue,omitempty"` + + // FloatValue: float + FloatValue float64 `json:"floatValue,omitempty"` + + // IntegerValue: integer + IntegerValue int64 `json:"integerValue,omitempty,string"` + + // StringValue: string + StringValue string `json:"stringValue,omitempty"` + + // TimeValue: time of day + TimeValue *GoogleTypeTimeOfDay `json:"timeValue,omitempty"` + + // TimestampValue: timestamp + TimestampValue string `json:"timestampValue,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BooleanValue") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BooleanValue") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2Value) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2Value + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GooglePrivacyDlpV2Value) UnmarshalJSON(data []byte) error { + type NoMethod GooglePrivacyDlpV2Value + var s1 struct { + FloatValue gensupport.JSONFloat64 `json:"floatValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.FloatValue = float64(s1.FloatValue) + return nil +} + +// GooglePrivacyDlpV2ValueFrequency: A value of a field, including its +// frequency. +type GooglePrivacyDlpV2ValueFrequency struct { + // Count: How many times the value is contained in the field. + Count int64 `json:"count,omitempty,string"` + + // Value: A value contained in the field in question. + Value *GooglePrivacyDlpV2Value `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Count") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Count") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2ValueFrequency) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ValueFrequency + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2VersionDescription: Details about each available +// version for an infotype. +type GooglePrivacyDlpV2VersionDescription struct { + // Description: Description of the version. + Description string `json:"description,omitempty"` + + // Version: Name of the version + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2VersionDescription) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2VersionDescription + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2WordList: Message defining a list of words or +// phrases to search for in the data. +type GooglePrivacyDlpV2WordList struct { + // Words: Words or phrases defining the dictionary. The dictionary must + // contain at least one phrase and every phrase must contain at least 2 + // characters that are letters or digits. [required] + Words []string `json:"words,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Words") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Words") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GooglePrivacyDlpV2WordList) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2WordList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to +// avoid defining duplicated empty messages in your APIs. A typical +// example is to use it as the request or the response type of an API +// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) +// returns (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleRpcStatus: The `Status` type defines a logical error model that +// is suitable for different programming environments, including REST +// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeTimeOfDay: Represents a time of day. The date and time zone +// are either not significant or are specified elsewhere. An API may +// choose to allow leap seconds. Related types are google.type.Date and +// `google.protobuf.Timestamp`. +type GoogleTypeTimeOfDay struct { + // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API + // may choose to allow the value "24:00:00" for scenarios like business + // closing time. + Hours int64 `json:"hours,omitempty"` + + // Minutes: Minutes of hour of day. Must be from 0 to 59. + Minutes int64 `json:"minutes,omitempty"` + + // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to + // 999,999,999. + Nanos int64 `json:"nanos,omitempty"` + + // Seconds: Seconds of minutes of the time. Must normally be from 0 to + // 59. An API may allow the value 60 if it allows leap-seconds. + Seconds int64 `json:"seconds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Hours") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Hours") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeTimeOfDay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeTimeOfDay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "dlp.infoTypes.list": + +type InfoTypesListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns a list of the sensitive information types that DLP API +// supports. See https://cloud.google.com/dlp/docs/infotypes-reference +// to learn more. +func (r *InfoTypesService) List() *InfoTypesListCall { + c := &InfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": filter to only return +// infoTypes supported by certain parts of the API. Defaults to +// supported_by=INSPECT. +func (c *InfoTypesListCall) Filter(filter string) *InfoTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// LanguageCode sets the optional parameter "languageCode": BCP-47 +// language code for localized infoType friendly names. If omitted, or +// if localized strings are not available, en-US strings will be +// returned. +func (c *InfoTypesListCall) LanguageCode(languageCode string) *InfoTypesListCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// LocationId sets the optional parameter "locationId": Deprecated. This +// field has no effect. +func (c *InfoTypesListCall) LocationId(locationId string) *InfoTypesListCall { + c.urlParams_.Set("locationId", locationId) + return c +} + +// Parent sets the optional parameter "parent": The parent resource +// name. The format of this value is as follows: locations/ LOCATION_ID +func (c *InfoTypesListCall) Parent(parent string) *InfoTypesListCall { + c.urlParams_.Set("parent", parent) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InfoTypesListCall) Fields(s ...googleapi.Field) *InfoTypesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *InfoTypesListCall) IfNoneMatch(entityTag string) *InfoTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InfoTypesListCall) Context(ctx context.Context) *InfoTypesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InfoTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InfoTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/infoTypes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.infoTypes.list" call. +// Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GooglePrivacyDlpV2ListInfoTypesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", + // "flatPath": "v2/infoTypes", + // "httpMethod": "GET", + // "id": "dlp.infoTypes.list", + // "parameterOrder": [], + // "parameters": { + // "filter": { + // "description": "filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.", + // "location": "query", + // "type": "string" + // }, + // "languageCode": { + // "description": "BCP-47 language code for localized infoType friendly names. If omitted, or if localized strings are not available, en-US strings will be returned.", + // "location": "query", + // "type": "string" + // }, + // "locationId": { + // "description": "Deprecated. This field has no effect.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "The parent resource name. The format of this value is as follows: locations/ LOCATION_ID", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v2/infoTypes", + // "response": { + // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.locations.infoTypes.list": + +type LocationsInfoTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns a list of the sensitive information types that DLP API +// supports. See https://cloud.google.com/dlp/docs/infotypes-reference +// to learn more. +// +// - parent: The parent resource name. The format of this value is as +// follows: locations/ LOCATION_ID. +func (r *LocationsInfoTypesService) List(parent string) *LocationsInfoTypesListCall { + c := &LocationsInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": filter to only return +// infoTypes supported by certain parts of the API. Defaults to +// supported_by=INSPECT. +func (c *LocationsInfoTypesListCall) Filter(filter string) *LocationsInfoTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// LanguageCode sets the optional parameter "languageCode": BCP-47 +// language code for localized infoType friendly names. If omitted, or +// if localized strings are not available, en-US strings will be +// returned. +func (c *LocationsInfoTypesListCall) LanguageCode(languageCode string) *LocationsInfoTypesListCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// LocationId sets the optional parameter "locationId": Deprecated. This +// field has no effect. +func (c *LocationsInfoTypesListCall) LocationId(locationId string) *LocationsInfoTypesListCall { + c.urlParams_.Set("locationId", locationId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LocationsInfoTypesListCall) Fields(s ...googleapi.Field) *LocationsInfoTypesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *LocationsInfoTypesListCall) IfNoneMatch(entityTag string) *LocationsInfoTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LocationsInfoTypesListCall) Context(ctx context.Context) *LocationsInfoTypesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LocationsInfoTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsInfoTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/infoTypes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.locations.infoTypes.list" call. +// Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *LocationsInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GooglePrivacyDlpV2ListInfoTypesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", + // "flatPath": "v2/locations/{locationsId}/infoTypes", + // "httpMethod": "GET", + // "id": "dlp.locations.infoTypes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.", + // "location": "query", + // "type": "string" + // }, + // "languageCode": { + // "description": "BCP-47 language code for localized infoType friendly names. If omitted, or if localized strings are not available, en-US strings will be returned.", + // "location": "query", + // "type": "string" + // }, + // "locationId": { + // "description": "Deprecated. This field has no effect.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "The parent resource name. The format of this value is as follows: locations/ LOCATION_ID", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/infoTypes", + // "response": { + // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.deidentifyTemplates.create": + +type OrganizationsDeidentifyTemplatesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a DeidentifyTemplate for reusing frequently used +// configuration for de-identifying content, images, and storage. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// more. +// +// - parent: Parent resource name. The format of this value varies +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *OrganizationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesCreateCall { + c := &OrganizationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsDeidentifyTemplatesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parentid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.organizations.deidentifyTemplates.create" call. +// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", + // "httpMethod": "POST", + // "id": "dlp.organizations.deidentifyTemplates.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/deidentifyTemplates", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" + // }, + // "response": { + // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.deidentifyTemplates.delete": + +type OrganizationsDeidentifyTemplatesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DeidentifyTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// more. +// +// - name: Resource name of the organization and deidentify template to +// be deleted, for example +// `organizations/433245324/deidentifyTemplates/432452342` or +// projects/project-id/deidentifyTemplates/432452342. +func (r *OrganizationsDeidentifyTemplatesService) Delete(name string) *OrganizationsDeidentifyTemplatesDeleteCall { + c := &OrganizationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsDeidentifyTemplatesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.organizations.deidentifyTemplates.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "httpMethod": "DELETE", + // "id": "dlp.organizations.deidentifyTemplates.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the organization and deidentify template to be deleted, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", + // "location": "path", + // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.deidentifyTemplates.get": + +type OrganizationsDeidentifyTemplatesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a DeidentifyTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// more. +// +// - name: Resource name of the organization and deidentify template to +// be read, for example +// `organizations/433245324/deidentifyTemplates/432452342` or +// projects/project-id/deidentifyTemplates/432452342. +func (r *OrganizationsDeidentifyTemplatesService) Get(name string) *OrganizationsDeidentifyTemplatesGetCall { + c := &OrganizationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsDeidentifyTemplatesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.organizations.deidentifyTemplates.get" call. +// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "httpMethod": "GET", + // "id": "dlp.organizations.deidentifyTemplates.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the organization and deidentify template to be read, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", + // "location": "path", + // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.deidentifyTemplates.list": + +type OrganizationsDeidentifyTemplatesListCall struct { + s *Service + parentid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists DeidentifyTemplates. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// more. +// +// - parent: Parent resource name. The format of this value varies +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *OrganizationsDeidentifyTemplatesService) List(parentid string) *OrganizationsDeidentifyTemplatesListCall { + c := &OrganizationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + return c +} + +// LocationId sets the optional parameter "locationId": Deprecated. This +// field has no effect. +func (c *OrganizationsDeidentifyTemplatesListCall) LocationId(locationId string) *OrganizationsDeidentifyTemplatesListCall { + c.urlParams_.Set("locationId", locationId) + return c +} + +// OrderBy sets the optional parameter "orderBy": Comma separated list +// of fields to order by, followed by `asc` or `desc` postfix. This list +// is case-insensitive, default sorting order is ascending, redundant +// space characters are insignificant. Example: `name asc,update_time, +// create_time desc` Supported fields are: - `create_time`: corresponds +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. +func (c *OrganizationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsDeidentifyTemplatesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Size of the page, +// can be limited by the server. If zero server returns a page of max +// size 100. +func (c *OrganizationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsDeidentifyTemplatesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. Comes from previous call to +// `ListDeidentifyTemplates`. +func (c *OrganizationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsDeidentifyTemplatesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsDeidentifyTemplatesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parentid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.organizations.deidentifyTemplates.list" call. +// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", + // "httpMethod": "GET", + // "id": "dlp.organizations.deidentifyTemplates.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "locationId": { + // "description": "Deprecated. This field has no effect.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/deidentifyTemplates", + // "response": { + // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "dlp.organizations.deidentifyTemplates.patch": + +type OrganizationsDeidentifyTemplatesPatchCall struct { + s *Service + name string + googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the DeidentifyTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// more. +// +// - name: Resource name of organization and deidentify template to be +// updated, for example +// `organizations/433245324/deidentifyTemplates/432452342` or +// projects/project-id/deidentifyTemplates/432452342. +func (r *OrganizationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesPatchCall { + c := &OrganizationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsDeidentifyTemplatesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.organizations.deidentifyTemplates.patch" call. +// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "httpMethod": "PATCH", + // "id": "dlp.organizations.deidentifyTemplates.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", + // "location": "path", + // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" + // }, + // "response": { + // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.inspectTemplates.create": + +type OrganizationsInspectTemplatesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an InspectTemplate for reusing frequently used +// configuration for inspecting content, images, and storage. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// +// - parent: Parent resource name. The format of this value varies +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *OrganizationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *OrganizationsInspectTemplatesCreateCall { + c := &OrganizationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsInspectTemplatesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsInspectTemplatesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parentid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.organizations.inspectTemplates.create" call. +// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GooglePrivacyDlpV2InspectTemplate{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", + // "httpMethod": "POST", + // "id": "dlp.organizations.inspectTemplates.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/inspectTemplates", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" + // }, + // "response": { + // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.inspectTemplates.delete": + +type OrganizationsInspectTemplatesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an InspectTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// +// - name: Resource name of the organization and inspectTemplate to be +// deleted, for example +// `organizations/433245324/inspectTemplates/432452342` or +// projects/project-id/inspectTemplates/432452342. +func (r *OrganizationsInspectTemplatesService) Delete(name string) *OrganizationsInspectTemplatesDeleteCall { + c := &OrganizationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsInspectTemplatesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsInspectTemplatesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.organizations.inspectTemplates.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "DELETE", + // "id": "dlp.organizations.inspectTemplates.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", + // "location": "path", + // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.inspectTemplates.get": + +type OrganizationsInspectTemplatesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an InspectTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// +// - name: Resource name of the organization and inspectTemplate to be +// read, for example +// `organizations/433245324/inspectTemplates/432452342` or +// projects/project-id/inspectTemplates/432452342. +func (r *OrganizationsInspectTemplatesService) Get(name string) *OrganizationsInspectTemplatesGetCall { + c := &OrganizationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *OrganizationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsInspectTemplatesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *OrganizationsInspectTemplatesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.organizations.inspectTemplates.get" call. +// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GooglePrivacyDlpV2InspectTemplate{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "GET", + // "id": "dlp.organizations.inspectTemplates.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", + // "location": "path", + // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// method id "dlp.infoTypes.list": +// method id "dlp.organizations.inspectTemplates.list": -type InfoTypesListCall struct { +type OrganizationsInspectTemplatesListCall struct { s *Service + parentid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Returns a list of the sensitive information types that DLP API -// supports. See https://cloud.google.com/dlp/docs/infotypes-reference -// to learn more. -func (r *InfoTypesService) List() *InfoTypesListCall { - c := &InfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// List: Lists InspectTemplates. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// +// - parent: Parent resource name. The format of this value varies +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *OrganizationsInspectTemplatesService) List(parentid string) *OrganizationsInspectTemplatesListCall { + c := &OrganizationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid return c } -// Filter sets the optional parameter "filter": filter to only return -// infoTypes supported by certain parts of the API. Defaults to -// supported_by=INSPECT. -func (c *InfoTypesListCall) Filter(filter string) *InfoTypesListCall { - c.urlParams_.Set("filter", filter) +// LocationId sets the optional parameter "locationId": Deprecated. This +// field has no effect. +func (c *OrganizationsInspectTemplatesListCall) LocationId(locationId string) *OrganizationsInspectTemplatesListCall { + c.urlParams_.Set("locationId", locationId) return c } -// LanguageCode sets the optional parameter "languageCode": BCP-47 -// language code for localized infoType friendly names. If omitted, or -// if localized strings are not available, en-US strings will be -// returned. -func (c *InfoTypesListCall) LanguageCode(languageCode string) *InfoTypesListCall { - c.urlParams_.Set("languageCode", languageCode) +// OrderBy sets the optional parameter "orderBy": Comma separated list +// of fields to order by, followed by `asc` or `desc` postfix. This list +// is case-insensitive, default sorting order is ascending, redundant +// space characters are insignificant. Example: `name asc,update_time, +// create_time desc` Supported fields are: - `create_time`: corresponds +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. +func (c *OrganizationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsInspectTemplatesListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// LocationId sets the optional parameter "locationId": Deprecated. This -// field has no effect. -func (c *InfoTypesListCall) LocationId(locationId string) *InfoTypesListCall { - c.urlParams_.Set("locationId", locationId) +// PageSize sets the optional parameter "pageSize": Size of the page, +// can be limited by the server. If zero server returns a page of max +// size 100. +func (c *OrganizationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsInspectTemplatesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// Parent sets the optional parameter "parent": The parent resource -// name. The format of this value is as follows: locations/ LOCATION_ID -func (c *InfoTypesListCall) Parent(parent string) *InfoTypesListCall { - c.urlParams_.Set("parent", parent) +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. Comes from previous call to +// `ListInspectTemplates`. +func (c *OrganizationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsInspectTemplatesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *InfoTypesListCall) Fields(s ...googleapi.Field) *InfoTypesListCall { +func (c *OrganizationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10236,7 +12694,7 @@ func (c *InfoTypesListCall) Fields(s ...googleapi.Field) *InfoTypesListCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *InfoTypesListCall) IfNoneMatch(entityTag string) *InfoTypesListCall { +func (c *OrganizationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesListCall { c.ifNoneMatch_ = entityTag return c } @@ -10244,21 +12702,21 @@ func (c *InfoTypesListCall) IfNoneMatch(entityTag string) *InfoTypesListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *InfoTypesListCall) Context(ctx context.Context) *InfoTypesListCall { +func (c *OrganizationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsInspectTemplatesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *InfoTypesListCall) Header() http.Header { +func (c *OrganizationsInspectTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InfoTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10271,25 +12729,29 @@ func (c *InfoTypesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/infoTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parentid, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.infoTypes.list" call. -// Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) { +// Do executes the "dlp.organizations.inspectTemplates.list" call. +// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10308,7 +12770,7 @@ func (c *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListInfoTypesResponse{ + ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10320,36 +12782,46 @@ func (c *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV } return ret, nil // { - // "description": "Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", - // "flatPath": "v2/infoTypes", + // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", // "httpMethod": "GET", - // "id": "dlp.infoTypes.list", - // "parameterOrder": [], + // "id": "dlp.organizations.inspectTemplates.list", + // "parameterOrder": [ + // "parent" + // ], // "parameters": { - // "filter": { - // "description": "filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.", + // "locationId": { + // "description": "Deprecated. This field has no effect.", // "location": "query", // "type": "string" // }, - // "languageCode": { - // "description": "BCP-47 language code for localized infoType friendly names. If omitted, or if localized strings are not available, en-US strings will be returned.", + // "orderBy": { + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", // "location": "query", // "type": "string" // }, - // "locationId": { - // "description": "Deprecated. This field has no effect.", + // "pageSize": { + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "The parent resource name. The format of this value is as follows: locations/ LOCATION_ID", - // "location": "query", + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "location": "path", + // "pattern": "^organizations/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v2/infoTypes", + // "path": "v2/{+parent}/inspectTemplates", // "response": { - // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse" + // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10358,123 +12830,114 @@ func (c *InfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV } -// method id "dlp.locations.infoTypes.list": - -type LocationsInfoTypesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns a list of the sensitive information types that DLP API -// supports. See https://cloud.google.com/dlp/docs/infotypes-reference -// to learn more. -// -// - parent: The parent resource name. The format of this value is as -// follows: locations/ LOCATION_ID. -func (r *LocationsInfoTypesService) List(parent string) *LocationsInfoTypesListCall { - c := &LocationsInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Filter sets the optional parameter "filter": filter to only return -// infoTypes supported by certain parts of the API. Defaults to -// supported_by=INSPECT. -func (c *LocationsInfoTypesListCall) Filter(filter string) *LocationsInfoTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} +// method id "dlp.organizations.inspectTemplates.patch": -// LanguageCode sets the optional parameter "languageCode": BCP-47 -// language code for localized infoType friendly names. If omitted, or -// if localized strings are not available, en-US strings will be -// returned. -func (c *LocationsInfoTypesListCall) LanguageCode(languageCode string) *LocationsInfoTypesListCall { - c.urlParams_.Set("languageCode", languageCode) - return c +type OrganizationsInspectTemplatesPatchCall struct { + s *Service + name string + googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// LocationId sets the optional parameter "locationId": Deprecated. This -// field has no effect. -func (c *LocationsInfoTypesListCall) LocationId(locationId string) *LocationsInfoTypesListCall { - c.urlParams_.Set("locationId", locationId) +// Patch: Updates the InspectTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// +// - name: Resource name of organization and inspectTemplate to be +// updated, for example +// `organizations/433245324/inspectTemplates/432452342` or +// projects/project-id/inspectTemplates/432452342. +func (r *OrganizationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsInspectTemplatesPatchCall { + c := &OrganizationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *LocationsInfoTypesListCall) Fields(s ...googleapi.Field) *LocationsInfoTypesListCall { +func (c *OrganizationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *LocationsInfoTypesListCall) IfNoneMatch(entityTag string) *LocationsInfoTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *LocationsInfoTypesListCall) Context(ctx context.Context) *LocationsInfoTypesListCall { +func (c *OrganizationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsInspectTemplatesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *LocationsInfoTypesListCall) Header() http.Header { +func (c *OrganizationsInspectTemplatesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsInfoTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/infoTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.locations.infoTypes.list" call. -// Exactly one of *GooglePrivacyDlpV2ListInfoTypesResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2ListInfoTypesResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *LocationsInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInfoTypesResponse, error) { +// Do executes the "dlp.organizations.inspectTemplates.patch" call. +// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10493,7 +12956,7 @@ func (c *LocationsInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePr if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListInfoTypesResponse{ + ret := &GooglePrivacyDlpV2InspectTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10505,40 +12968,28 @@ func (c *LocationsInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePr } return ret, nil // { - // "description": "Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.", - // "flatPath": "v2/locations/{locationsId}/infoTypes", - // "httpMethod": "GET", - // "id": "dlp.locations.infoTypes.list", + // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "PATCH", + // "id": "dlp.organizations.inspectTemplates.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "filter to only return infoTypes supported by certain parts of the API. Defaults to supported_by=INSPECT.", - // "location": "query", - // "type": "string" - // }, - // "languageCode": { - // "description": "BCP-47 language code for localized infoType friendly names. If omitted, or if localized strings are not available, en-US strings will be returned.", - // "location": "query", - // "type": "string" - // }, - // "locationId": { - // "description": "Deprecated. This field has no effect.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "The parent resource name. The format of this value is as follows: locations/ LOCATION_ID", + // "name": { + // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", // "location": "path", - // "pattern": "^locations/[^/]+$", + // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/infoTypes", + // "path": "v2/{+name}", + // "request": { + // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" + // }, // "response": { - // "$ref": "GooglePrivacyDlpV2ListInfoTypesResponse" + // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10547,9 +12998,9 @@ func (c *LocationsInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePr } -// method id "dlp.organizations.deidentifyTemplates.create": +// method id "dlp.organizations.locations.deidentifyTemplates.create": -type OrganizationsDeidentifyTemplatesCreateCall struct { +type OrganizationsLocationsDeidentifyTemplatesCreateCall struct { s *Service parentid string googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest @@ -10577,8 +13028,8 @@ type OrganizationsDeidentifyTemplatesCreateCall struct { // specifies a parent project with the identifier `example-project`, // and specifies the `europe-west3` location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesCreateCall { - c := &OrganizationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesCreateCall { + c := &OrganizationsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest return c @@ -10587,7 +13038,7 @@ func (r *OrganizationsDeidentifyTemplatesService) Create(parentid string, google // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesCreateCall { +func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10595,21 +13046,21 @@ func (c *OrganizationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesCreateCall { +func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDeidentifyTemplatesCreateCall) Header() http.Header { +func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10637,7 +13088,7 @@ func (c *OrganizationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.deidentifyTemplates.create" call. +// Do executes the "dlp.organizations.locations.deidentifyTemplates.create" call. // Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or @@ -10645,7 +13096,7 @@ func (c *OrganizationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*htt // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { +func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10677,9 +13128,9 @@ func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOp return ret, nil // { // "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", // "httpMethod": "POST", - // "id": "dlp.organizations.deidentifyTemplates.create", + // "id": "dlp.organizations.locations.deidentifyTemplates.create", // "parameterOrder": [ // "parent" // ], @@ -10687,7 +13138,7 @@ func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOp // "parent": { // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } @@ -10706,9 +13157,9 @@ func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOp } -// method id "dlp.organizations.deidentifyTemplates.delete": +// method id "dlp.organizations.locations.deidentifyTemplates.delete": -type OrganizationsDeidentifyTemplatesDeleteCall struct { +type OrganizationsLocationsDeidentifyTemplatesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -10724,8 +13175,8 @@ type OrganizationsDeidentifyTemplatesDeleteCall struct { // be deleted, for example // `organizations/433245324/deidentifyTemplates/432452342` or // projects/project-id/deidentifyTemplates/432452342. -func (r *OrganizationsDeidentifyTemplatesService) Delete(name string) *OrganizationsDeidentifyTemplatesDeleteCall { - c := &OrganizationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsDeidentifyTemplatesService) Delete(name string) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { + c := &OrganizationsLocationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -10733,7 +13184,7 @@ func (r *OrganizationsDeidentifyTemplatesService) Delete(name string) *Organizat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesDeleteCall { +func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10741,21 +13192,21 @@ func (c *OrganizationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesDeleteCall { +func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDeidentifyTemplatesDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10778,14 +13229,14 @@ func (c *OrganizationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.deidentifyTemplates.delete" call. +// Do executes the "dlp.organizations.locations.deidentifyTemplates.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10817,9 +13268,9 @@ func (c *OrganizationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOp return ret, nil // { // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", // "httpMethod": "DELETE", - // "id": "dlp.organizations.deidentifyTemplates.delete", + // "id": "dlp.organizations.locations.deidentifyTemplates.delete", // "parameterOrder": [ // "name" // ], @@ -10827,7 +13278,7 @@ func (c *OrganizationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOp // "name": { // "description": "Required. Resource name of the organization and deidentify template to be deleted, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", // "required": true, // "type": "string" // } @@ -10843,9 +13294,9 @@ func (c *OrganizationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOp } -// method id "dlp.organizations.deidentifyTemplates.get": +// method id "dlp.organizations.locations.deidentifyTemplates.get": -type OrganizationsDeidentifyTemplatesGetCall struct { +type OrganizationsLocationsDeidentifyTemplatesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -10862,8 +13313,8 @@ type OrganizationsDeidentifyTemplatesGetCall struct { // be read, for example // `organizations/433245324/deidentifyTemplates/432452342` or // projects/project-id/deidentifyTemplates/432452342. -func (r *OrganizationsDeidentifyTemplatesService) Get(name string) *OrganizationsDeidentifyTemplatesGetCall { - c := &OrganizationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsDeidentifyTemplatesService) Get(name string) *OrganizationsLocationsDeidentifyTemplatesGetCall { + c := &OrganizationsLocationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -10871,7 +13322,7 @@ func (r *OrganizationsDeidentifyTemplatesService) Get(name string) *Organization // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesGetCall { +func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10881,7 +13332,7 @@ func (c *OrganizationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) * // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesGetCall { +func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDeidentifyTemplatesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -10889,21 +13340,21 @@ func (c *OrganizationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesGetCall { +func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDeidentifyTemplatesGetCall) Header() http.Header { +func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -10929,7 +13380,7 @@ func (c *OrganizationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.deidentifyTemplates.get" call. +// Do executes the "dlp.organizations.locations.deidentifyTemplates.get" call. // Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or @@ -10937,7 +13388,7 @@ func (c *OrganizationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.R // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { +func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10969,9 +13420,9 @@ func (c *OrganizationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOptio return ret, nil // { // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", // "httpMethod": "GET", - // "id": "dlp.organizations.deidentifyTemplates.get", + // "id": "dlp.organizations.locations.deidentifyTemplates.get", // "parameterOrder": [ // "name" // ], @@ -10979,7 +13430,7 @@ func (c *OrganizationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOptio // "name": { // "description": "Required. Resource name of the organization and deidentify template to be read, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", // "required": true, // "type": "string" // } @@ -10995,9 +13446,9 @@ func (c *OrganizationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOptio } -// method id "dlp.organizations.deidentifyTemplates.list": +// method id "dlp.organizations.locations.deidentifyTemplates.list": -type OrganizationsDeidentifyTemplatesListCall struct { +type OrganizationsLocationsDeidentifyTemplatesListCall struct { s *Service parentid string urlParams_ gensupport.URLParams @@ -11024,15 +13475,15 @@ type OrganizationsDeidentifyTemplatesListCall struct { // specifies a parent project with the identifier `example-project`, // and specifies the `europe-west3` location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsDeidentifyTemplatesService) List(parentid string) *OrganizationsDeidentifyTemplatesListCall { - c := &OrganizationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsDeidentifyTemplatesService) List(parentid string) *OrganizationsLocationsDeidentifyTemplatesListCall { + c := &OrganizationsLocationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid return c } // LocationId sets the optional parameter "locationId": Deprecated. This // field has no effect. -func (c *OrganizationsDeidentifyTemplatesListCall) LocationId(locationId string) *OrganizationsDeidentifyTemplatesListCall { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) LocationId(locationId string) *OrganizationsLocationsDeidentifyTemplatesListCall { c.urlParams_.Set("locationId", locationId) return c } @@ -11046,7 +13497,7 @@ func (c *OrganizationsDeidentifyTemplatesListCall) LocationId(locationId string) // the time the template was last updated. - `name`: corresponds to the // template's name. - `display_name`: corresponds to the template's // display name. -func (c *OrganizationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsDeidentifyTemplatesListCall { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsLocationsDeidentifyTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -11054,7 +13505,7 @@ func (c *OrganizationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *Orga // PageSize sets the optional parameter "pageSize": Size of the page, // can be limited by the server. If zero server returns a page of max // size 100. -func (c *OrganizationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsDeidentifyTemplatesListCall { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsLocationsDeidentifyTemplatesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -11062,7 +13513,7 @@ func (c *OrganizationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *Org // PageToken sets the optional parameter "pageToken": Page token to // continue retrieval. Comes from previous call to // `ListDeidentifyTemplates`. -func (c *OrganizationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsDeidentifyTemplatesListCall { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsDeidentifyTemplatesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -11070,7 +13521,7 @@ func (c *OrganizationsDeidentifyTemplatesListCall) PageToken(pageToken string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesListCall { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11080,7 +13531,7 @@ func (c *OrganizationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsDeidentifyTemplatesListCall { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDeidentifyTemplatesListCall { c.ifNoneMatch_ = entityTag return c } @@ -11088,21 +13539,21 @@ func (c *OrganizationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesListCall { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDeidentifyTemplatesListCall) Header() http.Header { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11128,7 +13579,7 @@ func (c *OrganizationsDeidentifyTemplatesListCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.deidentifyTemplates.list" call. +// Do executes the "dlp.organizations.locations.deidentifyTemplates.list" call. // Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -11137,7 +13588,7 @@ func (c *OrganizationsDeidentifyTemplatesListCall) doRequest(alt string) (*http. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11169,9 +13620,9 @@ func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOpti return ret, nil // { // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", // "httpMethod": "GET", - // "id": "dlp.organizations.deidentifyTemplates.list", + // "id": "dlp.organizations.locations.deidentifyTemplates.list", // "parameterOrder": [ // "parent" // ], @@ -11200,7 +13651,7 @@ func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOpti // "parent": { // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } @@ -11219,7 +13670,7 @@ func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOpti // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OrganizationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -11237,9 +13688,9 @@ func (c *OrganizationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f } } -// method id "dlp.organizations.deidentifyTemplates.patch": +// method id "dlp.organizations.locations.deidentifyTemplates.patch": -type OrganizationsDeidentifyTemplatesPatchCall struct { +type OrganizationsLocationsDeidentifyTemplatesPatchCall struct { s *Service name string googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest @@ -11256,8 +13707,8 @@ type OrganizationsDeidentifyTemplatesPatchCall struct { // updated, for example // `organizations/433245324/deidentifyTemplates/432452342` or // projects/project-id/deidentifyTemplates/432452342. -func (r *OrganizationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsDeidentifyTemplatesPatchCall { - c := &OrganizationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesPatchCall { + c := &OrganizationsLocationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest return c @@ -11266,7 +13717,7 @@ func (r *OrganizationsDeidentifyTemplatesService) Patch(name string, googlepriva // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsDeidentifyTemplatesPatchCall { +func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11274,21 +13725,21 @@ func (c *OrganizationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsDeidentifyTemplatesPatchCall { +func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsDeidentifyTemplatesPatchCall) Header() http.Header { +func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11316,7 +13767,7 @@ func (c *OrganizationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.deidentifyTemplates.patch" call. +// Do executes the "dlp.organizations.locations.deidentifyTemplates.patch" call. // Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or @@ -11324,7 +13775,7 @@ func (c *OrganizationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { +func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11356,9 +13807,9 @@ func (c *OrganizationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOpt return ret, nil // { // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", // "httpMethod": "PATCH", - // "id": "dlp.organizations.deidentifyTemplates.patch", + // "id": "dlp.organizations.locations.deidentifyTemplates.patch", // "parameterOrder": [ // "name" // ], @@ -11366,7 +13817,7 @@ func (c *OrganizationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOpt // "name": { // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", // "required": true, // "type": "string" // } @@ -11385,46 +13836,36 @@ func (c *OrganizationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOpt } -// method id "dlp.organizations.inspectTemplates.create": +// method id "dlp.organizations.locations.discoveryConfigs.create": -type OrganizationsInspectTemplatesCreateCall struct { +type OrganizationsLocationsDiscoveryConfigsCreateCall struct { s *Service parentid string - googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest + googleprivacydlpv2creatediscoveryconfigrequest *GooglePrivacyDlpV2CreateDiscoveryConfigRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates an InspectTemplate for reusing frequently used -// configuration for inspecting content, images, and storage. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Create: Creates a config for Discovery to scan and profile storage. // -// - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: +// - parent: Parent resource name. The format of this value is as +// follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *OrganizationsInspectTemplatesCreateCall { - c := &OrganizationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsDiscoveryConfigsService) Create(parentid string, googleprivacydlpv2creatediscoveryconfigrequest *GooglePrivacyDlpV2CreateDiscoveryConfigRequest) *OrganizationsLocationsDiscoveryConfigsCreateCall { + c := &OrganizationsLocationsDiscoveryConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest + c.googleprivacydlpv2creatediscoveryconfigrequest = googleprivacydlpv2creatediscoveryconfigrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesCreateCall { +func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11432,21 +13873,21 @@ func (c *OrganizationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsInspectTemplatesCreateCall { +func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) Context(ctx context.Context) *OrganizationsLocationsDiscoveryConfigsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInspectTemplatesCreateCall) Header() http.Header { +func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11454,14 +13895,14 @@ func (c *OrganizationsInspectTemplatesCreateCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2creatediscoveryconfigrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/discoveryConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -11474,15 +13915,15 @@ func (c *OrganizationsInspectTemplatesCreateCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.inspectTemplates.create" call. -// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// Do executes the "dlp.organizations.locations.discoveryConfigs.create" call. +// Exactly one of *GooglePrivacyDlpV2DiscoveryConfig or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// either *GooglePrivacyDlpV2DiscoveryConfig.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { +func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DiscoveryConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11501,7 +13942,7 @@ func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectTemplate{ + ret := &GooglePrivacyDlpV2DiscoveryConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11513,28 +13954,28 @@ func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", + // "description": "Creates a config for Discovery to scan and profile storage.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs", // "httpMethod": "POST", - // "id": "dlp.organizations.inspectTemplates.create", + // "id": "dlp.organizations.locations.discoveryConfigs.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value is as follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/inspectTemplates", + // "path": "v2/{+parent}/discoveryConfigs", // "request": { - // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" + // "$ref": "GooglePrivacyDlpV2CreateDiscoveryConfigRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11543,9 +13984,9 @@ func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOptio } -// method id "dlp.organizations.inspectTemplates.delete": +// method id "dlp.organizations.locations.discoveryConfigs.delete": -type OrganizationsInspectTemplatesDeleteCall struct { +type OrganizationsLocationsDiscoveryConfigsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -11553,15 +13994,12 @@ type OrganizationsInspectTemplatesDeleteCall struct { header_ http.Header } -// Delete: Deletes an InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Delete: Deletes a Discovery configuration. // -// - name: Resource name of the organization and inspectTemplate to be -// deleted, for example -// `organizations/433245324/inspectTemplates/432452342` or -// projects/project-id/inspectTemplates/432452342. -func (r *OrganizationsInspectTemplatesService) Delete(name string) *OrganizationsInspectTemplatesDeleteCall { - c := &OrganizationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the project and the config, for example +// `projects/dlp-test-project/discoveryConfigs/53234423`. +func (r *OrganizationsLocationsDiscoveryConfigsService) Delete(name string) *OrganizationsLocationsDiscoveryConfigsDeleteCall { + c := &OrganizationsLocationsDiscoveryConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -11569,7 +14007,7 @@ func (r *OrganizationsInspectTemplatesService) Delete(name string) *Organization // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesDeleteCall { +func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11577,21 +14015,21 @@ func (c *OrganizationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsInspectTemplatesDeleteCall { +func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsDiscoveryConfigsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInspectTemplatesDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11614,14 +14052,14 @@ func (c *OrganizationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.inspectTemplates.delete" call. +// Do executes the "dlp.organizations.locations.discoveryConfigs.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11652,18 +14090,18 @@ func (c *OrganizationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", + // "description": "Deletes a Discovery configuration.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", // "httpMethod": "DELETE", - // "id": "dlp.organizations.inspectTemplates.delete", + // "id": "dlp.organizations.locations.discoveryConfigs.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", + // "description": "Required. Resource name of the project and the config, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", // "location": "path", - // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", // "required": true, // "type": "string" // } @@ -11679,9 +14117,9 @@ func (c *OrganizationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOptio } -// method id "dlp.organizations.inspectTemplates.get": +// method id "dlp.organizations.locations.discoveryConfigs.get": -type OrganizationsInspectTemplatesGetCall struct { +type OrganizationsLocationsDiscoveryConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -11690,15 +14128,12 @@ type OrganizationsInspectTemplatesGetCall struct { header_ http.Header } -// Get: Gets an InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Get: Gets a Discovery configuration. // -// - name: Resource name of the organization and inspectTemplate to be -// read, for example -// `organizations/433245324/inspectTemplates/432452342` or -// projects/project-id/inspectTemplates/432452342. -func (r *OrganizationsInspectTemplatesService) Get(name string) *OrganizationsInspectTemplatesGetCall { - c := &OrganizationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the project and the configuration, for +// example `projects/dlp-test-project/discoveryConfigs/53234423`. +func (r *OrganizationsLocationsDiscoveryConfigsService) Get(name string) *OrganizationsLocationsDiscoveryConfigsGetCall { + c := &OrganizationsLocationsDiscoveryConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -11706,7 +14141,7 @@ func (r *OrganizationsInspectTemplatesService) Get(name string) *OrganizationsIn // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesGetCall { +func (c *OrganizationsLocationsDiscoveryConfigsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11716,7 +14151,7 @@ func (c *OrganizationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *Org // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesGetCall { +func (c *OrganizationsLocationsDiscoveryConfigsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDiscoveryConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -11724,21 +14159,21 @@ func (c *OrganizationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *Or // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsInspectTemplatesGetCall { +func (c *OrganizationsLocationsDiscoveryConfigsGetCall) Context(ctx context.Context) *OrganizationsLocationsDiscoveryConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInspectTemplatesGetCall) Header() http.Header { +func (c *OrganizationsLocationsDiscoveryConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsDiscoveryConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11764,15 +14199,15 @@ func (c *OrganizationsInspectTemplatesGetCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.inspectTemplates.get" call. -// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// Do executes the "dlp.organizations.locations.discoveryConfigs.get" call. +// Exactly one of *GooglePrivacyDlpV2DiscoveryConfig or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// either *GooglePrivacyDlpV2DiscoveryConfig.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { +func (c *OrganizationsLocationsDiscoveryConfigsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DiscoveryConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11791,7 +14226,7 @@ func (c *OrganizationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectTemplate{ + ret := &GooglePrivacyDlpV2DiscoveryConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11803,25 +14238,25 @@ func (c *OrganizationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", + // "description": "Gets a Discovery configuration.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", // "httpMethod": "GET", - // "id": "dlp.organizations.inspectTemplates.get", + // "id": "dlp.organizations.locations.discoveryConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", + // "description": "Required. Resource name of the project and the configuration, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", // "location": "path", - // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11830,9 +14265,9 @@ func (c *OrganizationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) } -// method id "dlp.organizations.inspectTemplates.list": +// method id "dlp.organizations.locations.discoveryConfigs.list": -type OrganizationsInspectTemplatesListCall struct { +type OrganizationsLocationsDiscoveryConfigsListCall struct { s *Service parentid string urlParams_ gensupport.URLParams @@ -11841,62 +14276,44 @@ type OrganizationsInspectTemplatesListCall struct { header_ http.Header } -// List: Lists InspectTemplates. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// List: Lists Discovery configurations. // -// - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: +// - parent: Parent resource name. The format of this value is as +// follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsInspectTemplatesService) List(parentid string) *OrganizationsInspectTemplatesListCall { - c := &OrganizationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsDiscoveryConfigsService) List(parentid string) *OrganizationsLocationsDiscoveryConfigsListCall { + c := &OrganizationsLocationsDiscoveryConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid return c } -// LocationId sets the optional parameter "locationId": Deprecated. This -// field has no effect. -func (c *OrganizationsInspectTemplatesListCall) LocationId(locationId string) *OrganizationsInspectTemplatesListCall { - c.urlParams_.Set("locationId", locationId) - return c -} - // OrderBy sets the optional parameter "orderBy": Comma separated list -// of fields to order by, followed by `asc` or `desc` postfix. This list -// is case-insensitive, default sorting order is ascending, redundant -// space characters are insignificant. Example: `name asc,update_time, -// create_time desc` Supported fields are: - `create_time`: corresponds -// to the time the template was created. - `update_time`: corresponds to -// the time the template was last updated. - `name`: corresponds to the -// template's name. - `display_name`: corresponds to the template's -// display name. -func (c *OrganizationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsInspectTemplatesListCall { +// of config fields to order by, followed by `asc` or `desc` postfix. +// This list is case-insensitive, default sorting order is ascending, +// redundant space characters are insignificant. Example: `name +// asc,update_time, create_time desc` Supported fields are: - +// `last_run_time`: corresponds to the last time the DiscoveryConfig +// ran. - `name`: corresponds to the DiscoveryConfig's name. - `status`: +// corresponds to DiscoveryConfig's status. +func (c *OrganizationsLocationsDiscoveryConfigsListCall) OrderBy(orderBy string) *OrganizationsLocationsDiscoveryConfigsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by the server. If zero server returns a page of max -// size 100. -func (c *OrganizationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsInspectTemplatesListCall { +// can be limited by a server. +func (c *OrganizationsLocationsDiscoveryConfigsListCall) PageSize(pageSize int64) *OrganizationsLocationsDiscoveryConfigsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from previous call to -// `ListInspectTemplates`. -func (c *OrganizationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsInspectTemplatesListCall { +// continue retrieval. Comes from previous call to ListDiscoveryConfigs. +// `order_by` field must not change for subsequent calls. +func (c *OrganizationsLocationsDiscoveryConfigsListCall) PageToken(pageToken string) *OrganizationsLocationsDiscoveryConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -11904,7 +14321,7 @@ func (c *OrganizationsInspectTemplatesListCall) PageToken(pageToken string) *Org // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesListCall { +func (c *OrganizationsLocationsDiscoveryConfigsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11914,7 +14331,7 @@ func (c *OrganizationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *Or // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsInspectTemplatesListCall { +func (c *OrganizationsLocationsDiscoveryConfigsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDiscoveryConfigsListCall { c.ifNoneMatch_ = entityTag return c } @@ -11922,21 +14339,21 @@ func (c *OrganizationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *O // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsInspectTemplatesListCall { +func (c *OrganizationsLocationsDiscoveryConfigsListCall) Context(ctx context.Context) *OrganizationsLocationsDiscoveryConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInspectTemplatesListCall) Header() http.Header { +func (c *OrganizationsLocationsDiscoveryConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsDiscoveryConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -11949,7 +14366,7 @@ func (c *OrganizationsInspectTemplatesListCall) doRequest(alt string) (*http.Res var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/discoveryConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11962,16 +14379,16 @@ func (c *OrganizationsInspectTemplatesListCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.inspectTemplates.list" call. -// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or +// Do executes the "dlp.organizations.locations.discoveryConfigs.list" call. +// Exactly one of *GooglePrivacyDlpV2ListDiscoveryConfigsResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header +// *GooglePrivacyDlpV2ListDiscoveryConfigsResponse.ServerResponse.Header // or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { +func (c *OrganizationsLocationsDiscoveryConfigsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDiscoveryConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11990,7 +14407,7 @@ func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ + ret := &GooglePrivacyDlpV2ListDiscoveryConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12002,46 +14419,41 @@ func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", + // "description": "Lists Discovery configurations.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs", // "httpMethod": "GET", - // "id": "dlp.organizations.inspectTemplates.list", + // "id": "dlp.organizations.locations.discoveryConfigs.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "locationId": { - // "description": "Deprecated. This field has no effect.", - // "location": "query", - // "type": "string" - // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", + // "description": "Comma separated list of config fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. - `name`: corresponds to the DiscoveryConfig's name. - `status`: corresponds to DiscoveryConfig's status.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by a server.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", + // "description": "Page token to continue retrieval. Comes from previous call to ListDiscoveryConfigs. `order_by` field must not change for subsequent calls.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value is as follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/inspectTemplates", + // "path": "v2/{+parent}/discoveryConfigs", // "response": { - // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" + // "$ref": "GooglePrivacyDlpV2ListDiscoveryConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12053,7 +14465,7 @@ func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OrganizationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { +func (c *OrganizationsLocationsDiscoveryConfigsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDiscoveryConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -12071,35 +14483,32 @@ func (c *OrganizationsInspectTemplatesListCall) Pages(ctx context.Context, f fun } } -// method id "dlp.organizations.inspectTemplates.patch": +// method id "dlp.organizations.locations.discoveryConfigs.patch": -type OrganizationsInspectTemplatesPatchCall struct { +type OrganizationsLocationsDiscoveryConfigsPatchCall struct { s *Service name string - googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest + googleprivacydlpv2updatediscoveryconfigrequest *GooglePrivacyDlpV2UpdateDiscoveryConfigRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates the InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Patch: Updates a Discovery configuration. // -// - name: Resource name of organization and inspectTemplate to be -// updated, for example -// `organizations/433245324/inspectTemplates/432452342` or -// projects/project-id/inspectTemplates/432452342. -func (r *OrganizationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsInspectTemplatesPatchCall { - c := &OrganizationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the project and the configuration, for +// example `projects/dlp-test-project/discoveryConfigs/53234423`. +func (r *OrganizationsLocationsDiscoveryConfigsService) Patch(name string, googleprivacydlpv2updatediscoveryconfigrequest *GooglePrivacyDlpV2UpdateDiscoveryConfigRequest) *OrganizationsLocationsDiscoveryConfigsPatchCall { + c := &OrganizationsLocationsDiscoveryConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest + c.googleprivacydlpv2updatediscoveryconfigrequest = googleprivacydlpv2updatediscoveryconfigrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsInspectTemplatesPatchCall { +func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12107,21 +14516,21 @@ func (c *OrganizationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *O // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsInspectTemplatesPatchCall { +func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) Context(ctx context.Context) *OrganizationsLocationsDiscoveryConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsInspectTemplatesPatchCall) Header() http.Header { +func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12129,7 +14538,7 @@ func (c *OrganizationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatediscoveryconfigrequest) if err != nil { return nil, err } @@ -12149,15 +14558,15 @@ func (c *OrganizationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.inspectTemplates.patch" call. -// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// Do executes the "dlp.organizations.locations.discoveryConfigs.patch" call. +// Exactly one of *GooglePrivacyDlpV2DiscoveryConfig or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// either *GooglePrivacyDlpV2DiscoveryConfig.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { +func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DiscoveryConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12176,7 +14585,7 @@ func (c *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectTemplate{ + ret := &GooglePrivacyDlpV2DiscoveryConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12188,28 +14597,28 @@ func (c *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", + // "description": "Updates a Discovery configuration.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", // "httpMethod": "PATCH", - // "id": "dlp.organizations.inspectTemplates.patch", + // "id": "dlp.organizations.locations.discoveryConfigs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", + // "description": "Required. Resource name of the project and the configuration, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", // "location": "path", - // "pattern": "^organizations/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" + // "$ref": "GooglePrivacyDlpV2UpdateDiscoveryConfigRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12218,86 +14627,160 @@ func (c *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption } -// method id "dlp.organizations.locations.deidentifyTemplates.create": +// method id "dlp.organizations.locations.dlpJobs.list": -type OrganizationsLocationsDeidentifyTemplatesCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsDlpJobsListCall struct { + s *Service + parentid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a DeidentifyTemplate for reusing frequently used -// configuration for de-identifying content, images, and storage. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// List: 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. // // - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location +// depending on whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesCreateCall { - c := &OrganizationsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsDlpJobsService) List(parentid string) *OrganizationsLocationsDlpJobsListCall { + c := &OrganizationsLocationsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest + return c +} + +// Filter sets the optional parameter "filter": Allows filtering. +// Supported syntax: * Filter expressions are made up of one or more +// restrictions. * Restrictions can be combined by `AND` or `OR` logical +// operators. A sequence of restrictions implicitly uses `AND`. * A +// restriction has the form of `{field} {operator} {value}`. * Supported +// fields/values for inspect jobs: - `state` - +// PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - +// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the +// trigger that created the job. - 'end_time` - Corresponds to the time +// the job finished. - 'start_time` - Corresponds to the time the job +// finished. * Supported fields for risk analysis jobs: - `state` - +// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the +// time the job finished. - 'start_time` - Corresponds to the time the +// job finished. * The operator must be `=` or `!=`. Examples: * +// inspected_storage = cloud_storage AND state = done * +// inspected_storage = cloud_storage OR inspected_storage = bigquery * +// inspected_storage = cloud_storage AND (state = done OR state = +// canceled) * end_time > \"2017-12-12T00:00:00+00:00\" The length of +// this field should be no more than 500 characters. +func (c *OrganizationsLocationsDlpJobsListCall) Filter(filter string) *OrganizationsLocationsDlpJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// LocationId sets the optional parameter "locationId": Deprecated. This +// field has no effect. +func (c *OrganizationsLocationsDlpJobsListCall) LocationId(locationId string) *OrganizationsLocationsDlpJobsListCall { + c.urlParams_.Set("locationId", locationId) + return c +} + +// OrderBy sets the optional parameter "orderBy": Comma separated list +// of fields to order by, followed by `asc` or `desc` postfix. This list +// is case-insensitive, default sorting order is ascending, redundant +// space characters are insignificant. Example: `name asc, end_time asc, +// create_time desc` Supported fields are: - `create_time`: corresponds +// to the time the job was created. - `end_time`: corresponds to the +// time the job ended. - `name`: corresponds to the job's name. - +// `state`: corresponds to `state` +func (c *OrganizationsLocationsDlpJobsListCall) OrderBy(orderBy string) *OrganizationsLocationsDlpJobsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *OrganizationsLocationsDlpJobsListCall) PageSize(pageSize int64) *OrganizationsLocationsDlpJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *OrganizationsLocationsDlpJobsListCall) PageToken(pageToken string) *OrganizationsLocationsDlpJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Type sets the optional parameter "type": The type of job. Defaults to +// `DlpJobType.INSPECT` +// +// Possible values: +// +// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. +// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. +// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. +func (c *OrganizationsLocationsDlpJobsListCall) Type(type_ string) *OrganizationsLocationsDlpJobsListCall { + c.urlParams_.Set("type", type_) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesCreateCall { +func (c *OrganizationsLocationsDlpJobsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDlpJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsDlpJobsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDlpJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesCreateCall { +func (c *OrganizationsLocationsDlpJobsListCall) Context(ctx context.Context) *OrganizationsLocationsDlpJobsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Header() http.Header { +func (c *OrganizationsLocationsDlpJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -12308,15 +14791,15 @@ func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.deidentifyTemplates.create" call. -// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { +// Do executes the "dlp.organizations.locations.dlpJobs.list" call. +// Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12335,7 +14818,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12347,28 +14830,66 @@ func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googlea } return ret, nil // { - // "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", - // "httpMethod": "POST", - // "id": "dlp.organizations.locations.deidentifyTemplates.create", + // "description": "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.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/dlpJobs", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.dlpJobs.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the trigger that created the job. - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", + // "location": "query", + // "type": "string" + // }, + // "locationId": { + // "description": "Deprecated. This field has no effect.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to the time the job was created. - `end_time`: corresponds to the time the job ended. - `name`: corresponds to the job's name. - `state`: corresponds to `state`", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "type": { + // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", + // "enum": [ + // "DLP_JOB_TYPE_UNSPECIFIED", + // "INSPECT_JOB", + // "RISK_ANALYSIS_JOB" + // ], + // "enumDescriptions": [ + // "Defaults to INSPECT_JOB.", + // "The job inspected Google Cloud for sensitive data.", + // "The job executed a Risk Analysis computation." + // ], + // "location": "query", + // "type": "string" // } // }, - // "path": "v2/{+parent}/deidentifyTemplates", - // "request": { - // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" - // }, + // "path": "v2/{+parent}/dlpJobs", // "response": { - // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12377,34 +14898,67 @@ func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googlea } -// method id "dlp.organizations.locations.deidentifyTemplates.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type OrganizationsLocationsDeidentifyTemplatesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "dlp.organizations.locations.inspectTemplates.create": + +type OrganizationsLocationsInspectTemplatesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// Create: Creates an InspectTemplate for reusing frequently used +// configuration for inspecting content, images, and storage. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. // -// - name: Resource name of the organization and deidentify template to -// be deleted, for example -// `organizations/433245324/deidentifyTemplates/432452342` or -// projects/project-id/deidentifyTemplates/432452342. -func (r *OrganizationsLocationsDeidentifyTemplatesService) Delete(name string) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { - c := &OrganizationsLocationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Parent resource name. The format of this value varies +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *OrganizationsLocationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *OrganizationsLocationsInspectTemplatesCreateCall { + c := &OrganizationsLocationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { +func (c *OrganizationsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12412,21 +14966,21 @@ func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...google // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { +func (c *OrganizationsLocationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsInspectTemplatesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12434,29 +14988,35 @@ func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) doRequest(alt stri } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parentid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.deidentifyTemplates.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "dlp.organizations.locations.inspectTemplates.create" call. +// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12475,7 +15035,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2InspectTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12487,25 +15047,28 @@ func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googlea } return ret, nil // { - // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", - // "httpMethod": "DELETE", - // "id": "dlp.organizations.locations.deidentifyTemplates.delete", + // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", + // "httpMethod": "POST", + // "id": "dlp.organizations.locations.inspectTemplates.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the organization and deidentify template to be deleted, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", + // "parent": { + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/inspectTemplates", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12514,27 +15077,25 @@ func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googlea } -// method id "dlp.organizations.locations.deidentifyTemplates.get": +// method id "dlp.organizations.locations.inspectTemplates.delete": -type OrganizationsLocationsDeidentifyTemplatesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsInspectTemplatesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// Delete: Deletes an InspectTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. // -// - name: Resource name of the organization and deidentify template to -// be read, for example -// `organizations/433245324/deidentifyTemplates/432452342` or -// projects/project-id/deidentifyTemplates/432452342. -func (r *OrganizationsLocationsDeidentifyTemplatesService) Get(name string) *OrganizationsLocationsDeidentifyTemplatesGetCall { - c := &OrganizationsLocationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the organization and inspectTemplate to be +// deleted, for example +// `organizations/433245324/inspectTemplates/432452342` or +// projects/project-id/inspectTemplates/432452342. +func (r *OrganizationsLocationsInspectTemplatesService) Delete(name string) *OrganizationsLocationsInspectTemplatesDeleteCall { + c := &OrganizationsLocationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12542,54 +15103,41 @@ func (r *OrganizationsLocationsDeidentifyTemplatesService) Get(name string) *Org // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesGetCall { +func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDeidentifyTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesGetCall { +func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Header() http.Header { +func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -12600,15 +15148,14 @@ func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.deidentifyTemplates.get" call. -// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { +// Do executes the "dlp.organizations.locations.inspectTemplates.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12627,7 +15174,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12639,25 +15186,25 @@ func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", - // "httpMethod": "GET", - // "id": "dlp.organizations.locations.deidentifyTemplates.get", + // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "DELETE", + // "id": "dlp.organizations.locations.inspectTemplates.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the organization and deidentify template to be read, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", + // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12666,82 +15213,34 @@ func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi. } -// method id "dlp.organizations.locations.deidentifyTemplates.list": +// method id "dlp.organizations.locations.inspectTemplates.get": -type OrganizationsLocationsDeidentifyTemplatesListCall struct { +type OrganizationsLocationsInspectTemplatesGetCall struct { s *Service - parentid string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists DeidentifyTemplates. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// Get: Gets an InspectTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. // -// - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: -// parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsLocationsDeidentifyTemplatesService) List(parentid string) *OrganizationsLocationsDeidentifyTemplatesListCall { - c := &OrganizationsLocationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - return c -} - -// LocationId sets the optional parameter "locationId": Deprecated. This -// field has no effect. -func (c *OrganizationsLocationsDeidentifyTemplatesListCall) LocationId(locationId string) *OrganizationsLocationsDeidentifyTemplatesListCall { - c.urlParams_.Set("locationId", locationId) - return c -} - -// OrderBy sets the optional parameter "orderBy": Comma separated list -// of fields to order by, followed by `asc` or `desc` postfix. This list -// is case-insensitive, default sorting order is ascending, redundant -// space characters are insignificant. Example: `name asc,update_time, -// create_time desc` Supported fields are: - `create_time`: corresponds -// to the time the template was created. - `update_time`: corresponds to -// the time the template was last updated. - `name`: corresponds to the -// template's name. - `display_name`: corresponds to the template's -// display name. -func (c *OrganizationsLocationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *OrganizationsLocationsDeidentifyTemplatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by the server. If zero server returns a page of max -// size 100. -func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *OrganizationsLocationsDeidentifyTemplatesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from previous call to -// `ListDeidentifyTemplates`. -func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsDeidentifyTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Resource name of the organization and inspectTemplate to be +// read, for example +// `organizations/433245324/inspectTemplates/432452342` or +// projects/project-id/inspectTemplates/432452342. +func (r *OrganizationsLocationsInspectTemplatesService) Get(name string) *OrganizationsLocationsInspectTemplatesGetCall { + c := &OrganizationsLocationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesListCall { +func (c *OrganizationsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12751,7 +15250,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Fields(s ...googleap // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDeidentifyTemplatesListCall { +func (c *OrganizationsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInspectTemplatesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -12759,21 +15258,21 @@ func (c *OrganizationsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesListCall { +func (c *OrganizationsLocationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Header() http.Header { +func (c *OrganizationsLocationsInspectTemplatesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12786,7 +15285,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesListCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12794,21 +15293,20 @@ func (c *OrganizationsLocationsDeidentifyTemplatesListCall) doRequest(alt string } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parentid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.deidentifyTemplates.list" call. -// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// Do executes the "dlp.organizations.locations.inspectTemplates.get" call. +// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { +func (c *OrganizationsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12827,7 +15325,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ + ret := &GooglePrivacyDlpV2InspectTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12839,46 +15337,25 @@ func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", + // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", // "httpMethod": "GET", - // "id": "dlp.organizations.locations.deidentifyTemplates.list", + // "id": "dlp.organizations.locations.inspectTemplates.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "locationId": { - // "description": "Deprecated. This field has no effect.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "name": { + // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/deidentifyTemplates", + // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" + // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12887,115 +15364,148 @@ func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +// method id "dlp.organizations.locations.inspectTemplates.list": + +type OrganizationsLocationsInspectTemplatesListCall struct { + s *Service + parentid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists InspectTemplates. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// +// - parent: Parent resource name. The format of this value varies +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *OrganizationsLocationsInspectTemplatesService) List(parentid string) *OrganizationsLocationsInspectTemplatesListCall { + c := &OrganizationsLocationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + return c +} + +// LocationId sets the optional parameter "locationId": Deprecated. This +// field has no effect. +func (c *OrganizationsLocationsInspectTemplatesListCall) LocationId(locationId string) *OrganizationsLocationsInspectTemplatesListCall { + c.urlParams_.Set("locationId", locationId) + return c +} + +// OrderBy sets the optional parameter "orderBy": Comma separated list +// of fields to order by, followed by `asc` or `desc` postfix. This list +// is case-insensitive, default sorting order is ascending, redundant +// space characters are insignificant. Example: `name asc,update_time, +// create_time desc` Supported fields are: - `create_time`: corresponds +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. +func (c *OrganizationsLocationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsLocationsInspectTemplatesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -// method id "dlp.organizations.locations.deidentifyTemplates.patch": - -type OrganizationsLocationsDeidentifyTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": Size of the page, +// can be limited by the server. If zero server returns a page of max +// size 100. +func (c *OrganizationsLocationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsLocationsInspectTemplatesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Patch: Updates the DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. -// -// - name: Resource name of organization and deidentify template to be -// updated, for example -// `organizations/433245324/deidentifyTemplates/432452342` or -// projects/project-id/deidentifyTemplates/432452342. -func (r *OrganizationsLocationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesPatchCall { - c := &OrganizationsLocationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. Comes from previous call to +// `ListInspectTemplates`. +func (c *OrganizationsLocationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsInspectTemplatesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesPatchCall { +func (c *OrganizationsLocationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *OrganizationsLocationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInspectTemplatesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesPatchCall { +func (c *OrganizationsLocationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Header() http.Header { +func (c *OrganizationsLocationsInspectTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parentid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.deidentifyTemplates.patch" call. -// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "dlp.organizations.locations.inspectTemplates.list" call. +// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { +func (c *OrganizationsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13014,7 +15524,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13026,28 +15536,46 @@ func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleap } return ret, nil // { - // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", - // "httpMethod": "PATCH", - // "id": "dlp.organizations.locations.deidentifyTemplates.patch", + // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.inspectTemplates.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", + // "locationId": { + // "description": "Deprecated. This field has no effect.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" - // }, + // "path": "v2/{+parent}/inspectTemplates", // "response": { - // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13056,179 +15584,114 @@ func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleap } -// method id "dlp.organizations.locations.dlpJobs.list": - -type OrganizationsLocationsDlpJobsListCall struct { - s *Service - parentid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: 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. -// -// - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: -// parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsLocationsDlpJobsService) List(parentid string) *OrganizationsLocationsDlpJobsListCall { - c := &OrganizationsLocationsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - return c -} - -// Filter sets the optional parameter "filter": Allows filtering. -// Supported syntax: * Filter expressions are made up of one or more -// restrictions. * Restrictions can be combined by `AND` or `OR` logical -// operators. A sequence of restrictions implicitly uses `AND`. * A -// restriction has the form of `{field} {operator} {value}`. * Supported -// fields/values for inspect jobs: - `state` - -// PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - -// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the -// trigger that created the job. - 'end_time` - Corresponds to the time -// the job finished. - 'start_time` - Corresponds to the time the job -// finished. * Supported fields for risk analysis jobs: - `state` - -// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the -// time the job finished. - 'start_time` - Corresponds to the time the -// job finished. * The operator must be `=` or `!=`. Examples: * -// inspected_storage = cloud_storage AND state = done * -// inspected_storage = cloud_storage OR inspected_storage = bigquery * -// inspected_storage = cloud_storage AND (state = done OR state = -// canceled) * end_time > \"2017-12-12T00:00:00+00:00\" The length of -// this field should be no more than 500 characters. -func (c *OrganizationsLocationsDlpJobsListCall) Filter(filter string) *OrganizationsLocationsDlpJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// LocationId sets the optional parameter "locationId": Deprecated. This -// field has no effect. -func (c *OrganizationsLocationsDlpJobsListCall) LocationId(locationId string) *OrganizationsLocationsDlpJobsListCall { - c.urlParams_.Set("locationId", locationId) - return c -} - -// OrderBy sets the optional parameter "orderBy": Comma separated list -// of fields to order by, followed by `asc` or `desc` postfix. This list -// is case-insensitive, default sorting order is ascending, redundant -// space characters are insignificant. Example: `name asc, end_time asc, -// create_time desc` Supported fields are: - `create_time`: corresponds -// to the time the job was created. - `end_time`: corresponds to the -// time the job ended. - `name`: corresponds to the job's name. - -// `state`: corresponds to `state` -func (c *OrganizationsLocationsDlpJobsListCall) OrderBy(orderBy string) *OrganizationsLocationsDlpJobsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OrganizationsLocationsDlpJobsListCall) PageSize(pageSize int64) *OrganizationsLocationsDlpJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OrganizationsLocationsDlpJobsListCall) PageToken(pageToken string) *OrganizationsLocationsDlpJobsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +// method id "dlp.organizations.locations.inspectTemplates.patch": + +type OrganizationsLocationsInspectTemplatesPatchCall struct { + s *Service + name string + googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Type sets the optional parameter "type": The type of job. Defaults to -// `DlpJobType.INSPECT` -// -// Possible values: +// Patch: Updates the InspectTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. // -// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. -// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. -// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. -func (c *OrganizationsLocationsDlpJobsListCall) Type(type_ string) *OrganizationsLocationsDlpJobsListCall { - c.urlParams_.Set("type", type_) +// - name: Resource name of organization and inspectTemplate to be +// updated, for example +// `organizations/433245324/inspectTemplates/432452342` or +// projects/project-id/inspectTemplates/432452342. +func (r *OrganizationsLocationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsLocationsInspectTemplatesPatchCall { + c := &OrganizationsLocationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsDlpJobsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDlpJobsListCall { +func (c *OrganizationsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsDlpJobsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDlpJobsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsDlpJobsListCall) Context(ctx context.Context) *OrganizationsLocationsDlpJobsListCall { +func (c *OrganizationsLocationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsDlpJobsListCall) Header() http.Header { +func (c *OrganizationsLocationsInspectTemplatesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parentid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.dlpJobs.list" call. -// Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { +// Do executes the "dlp.organizations.locations.inspectTemplates.patch" call. +// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13247,7 +15710,7 @@ func (c *OrganizationsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ + ret := &GooglePrivacyDlpV2InspectTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13259,66 +15722,28 @@ func (c *OrganizationsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "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.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/dlpJobs", - // "httpMethod": "GET", - // "id": "dlp.organizations.locations.dlpJobs.list", + // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "PATCH", + // "id": "dlp.organizations.locations.inspectTemplates.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the trigger that created the job. - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", - // "location": "query", - // "type": "string" - // }, - // "locationId": { - // "description": "Deprecated. This field has no effect.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to the time the job was created. - `end_time`: corresponds to the time the job ended. - `name`: corresponds to the job's name. - `state`: corresponds to `state`", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "name": { + // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", // "required": true, // "type": "string" - // }, - // "type": { - // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", - // "enum": [ - // "DLP_JOB_TYPE_UNSPECIFIED", - // "INSPECT_JOB", - // "RISK_ANALYSIS_JOB" - // ], - // "enumDescriptions": [ - // "Defaults to INSPECT_JOB.", - // "The job inspected Google Cloud for sensitive data.", - // "The job executed a Risk Analysis computation." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v2/{+parent}/dlpJobs", + // "path": "v2/{+name}", + // "request": { + // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" + // }, // "response": { - // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" + // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13327,67 +15752,43 @@ func (c *OrganizationsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "dlp.organizations.locations.inspectTemplates.create": +// method id "dlp.organizations.locations.jobTriggers.create": -type OrganizationsLocationsInspectTemplatesCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsJobTriggersCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an InspectTemplate for reusing frequently used -// configuration for inspecting content, images, and storage. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Create: 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. // // - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location +// depending on whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsLocationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *OrganizationsLocationsInspectTemplatesCreateCall { - c := &OrganizationsLocationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *OrganizationsLocationsJobTriggersCreateCall { + c := &OrganizationsLocationsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest + c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesCreateCall { +func (c *OrganizationsLocationsJobTriggersCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13395,21 +15796,21 @@ func (c *OrganizationsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsInspectTemplatesCreateCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesCreateCall { +func (c *OrganizationsLocationsJobTriggersCreateCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsInspectTemplatesCreateCall) Header() http.Header { +func (c *OrganizationsLocationsJobTriggersCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -13417,14 +15818,14 @@ func (c *OrganizationsLocationsInspectTemplatesCreateCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -13437,15 +15838,14 @@ func (c *OrganizationsLocationsInspectTemplatesCreateCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.inspectTemplates.create" call. -// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// Do executes the "dlp.organizations.locations.jobTriggers.create" call. +// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { +// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13464,7 +15864,7 @@ func (c *OrganizationsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectTemplate{ + ret := &GooglePrivacyDlpV2JobTrigger{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13476,28 +15876,28 @@ func (c *OrganizationsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", + // "description": "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.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers", // "httpMethod": "POST", - // "id": "dlp.organizations.locations.inspectTemplates.create", + // "id": "dlp.organizations.locations.jobTriggers.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/inspectTemplates", + // "path": "v2/{+parent}/jobTriggers", // "request": { - // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" + // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GooglePrivacyDlpV2JobTrigger" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13506,9 +15906,9 @@ func (c *OrganizationsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi. } -// method id "dlp.organizations.locations.inspectTemplates.delete": +// method id "dlp.organizations.locations.jobTriggers.delete": -type OrganizationsLocationsInspectTemplatesDeleteCall struct { +type OrganizationsLocationsJobTriggersDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -13516,15 +15916,14 @@ type OrganizationsLocationsInspectTemplatesDeleteCall struct { header_ http.Header } -// Delete: Deletes an InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Delete: Deletes a job trigger. See +// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// more. // -// - name: Resource name of the organization and inspectTemplate to be -// deleted, for example -// `organizations/433245324/inspectTemplates/432452342` or -// projects/project-id/inspectTemplates/432452342. -func (r *OrganizationsLocationsInspectTemplatesService) Delete(name string) *OrganizationsLocationsInspectTemplatesDeleteCall { - c := &OrganizationsLocationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the project and the triggeredJob, for +// example `projects/dlp-test-project/jobTriggers/53234423`. +func (r *OrganizationsLocationsJobTriggersService) Delete(name string) *OrganizationsLocationsJobTriggersDeleteCall { + c := &OrganizationsLocationsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -13532,7 +15931,7 @@ func (r *OrganizationsLocationsInspectTemplatesService) Delete(name string) *Org // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesDeleteCall { +func (c *OrganizationsLocationsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13540,21 +15939,21 @@ func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Fields(s ...googleapi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesDeleteCall { +func (c *OrganizationsLocationsJobTriggersDeleteCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsJobTriggersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -13577,14 +15976,14 @@ func (c *OrganizationsLocationsInspectTemplatesDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.inspectTemplates.delete" call. +// Do executes the "dlp.organizations.locations.jobTriggers.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13615,18 +16014,18 @@ func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", + // "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", // "httpMethod": "DELETE", - // "id": "dlp.organizations.locations.inspectTemplates.delete", + // "id": "dlp.organizations.locations.jobTriggers.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", + // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", // "required": true, // "type": "string" // } @@ -13642,9 +16041,9 @@ func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi. } -// method id "dlp.organizations.locations.inspectTemplates.get": +// method id "dlp.organizations.locations.jobTriggers.get": -type OrganizationsLocationsInspectTemplatesGetCall struct { +type OrganizationsLocationsJobTriggersGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -13653,15 +16052,14 @@ type OrganizationsLocationsInspectTemplatesGetCall struct { header_ http.Header } -// Get: Gets an InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Get: Gets a job trigger. See +// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// more. // -// - name: Resource name of the organization and inspectTemplate to be -// read, for example -// `organizations/433245324/inspectTemplates/432452342` or -// projects/project-id/inspectTemplates/432452342. -func (r *OrganizationsLocationsInspectTemplatesService) Get(name string) *OrganizationsLocationsInspectTemplatesGetCall { - c := &OrganizationsLocationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the project and the triggeredJob, for +// example `projects/dlp-test-project/jobTriggers/53234423`. +func (r *OrganizationsLocationsJobTriggersService) Get(name string) *OrganizationsLocationsJobTriggersGetCall { + c := &OrganizationsLocationsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -13669,7 +16067,7 @@ func (r *OrganizationsLocationsInspectTemplatesService) Get(name string) *Organi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesGetCall { +func (c *OrganizationsLocationsJobTriggersGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13679,7 +16077,7 @@ func (c *OrganizationsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Fi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInspectTemplatesGetCall { +func (c *OrganizationsLocationsJobTriggersGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsJobTriggersGetCall { c.ifNoneMatch_ = entityTag return c } @@ -13687,21 +16085,21 @@ func (c *OrganizationsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesGetCall { +func (c *OrganizationsLocationsJobTriggersGetCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsInspectTemplatesGetCall) Header() http.Header { +func (c *OrganizationsLocationsJobTriggersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -13727,15 +16125,14 @@ func (c *OrganizationsLocationsInspectTemplatesGetCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.inspectTemplates.get" call. -// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// Do executes the "dlp.organizations.locations.jobTriggers.get" call. +// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { +// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13754,7 +16151,7 @@ func (c *OrganizationsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectTemplate{ + ret := &GooglePrivacyDlpV2JobTrigger{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13766,25 +16163,25 @@ func (c *OrganizationsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", + // "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", // "httpMethod": "GET", - // "id": "dlp.organizations.locations.inspectTemplates.get", + // "id": "dlp.organizations.locations.jobTriggers.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", + // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GooglePrivacyDlpV2JobTrigger" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13793,9 +16190,9 @@ func (c *OrganizationsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.Cal } -// method id "dlp.organizations.locations.inspectTemplates.list": +// method id "dlp.organizations.locations.jobTriggers.list": -type OrganizationsLocationsInspectTemplatesListCall struct { +type OrganizationsLocationsJobTriggersListCall struct { s *Service parentid string urlParams_ gensupport.URLParams @@ -13804,70 +16201,103 @@ type OrganizationsLocationsInspectTemplatesListCall struct { header_ http.Header } -// List: Lists InspectTemplates. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// List: Lists job triggers. See +// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// more. // // - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location +// depending on whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsLocationsInspectTemplatesService) List(parentid string) *OrganizationsLocationsInspectTemplatesListCall { - c := &OrganizationsLocationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsJobTriggersService) List(parentid string) *OrganizationsLocationsJobTriggersListCall { + c := &OrganizationsLocationsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid return c } +// Filter sets the optional parameter "filter": Allows filtering. +// Supported syntax: * Filter expressions are made up of one or more +// restrictions. * Restrictions can be combined by `AND` or `OR` logical +// operators. A sequence of restrictions implicitly uses `AND`. * A +// restriction has the form of `{field} {operator} {value}`. * Supported +// fields/values for inspect triggers: - `status` - +// HEALTHY|PAUSED|CANCELLED - `inspected_storage` - +// DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 +// formatted timestamp, surrounded by quotation marks. Nanoseconds are +// ignored. - 'error_count' - Number of errors that have occurred while +// running. * The operator must be `=` or `!=` for status and +// inspected_storage. Examples: * inspected_storage = cloud_storage AND +// status = HEALTHY * inspected_storage = cloud_storage OR +// inspected_storage = bigquery * inspected_storage = cloud_storage AND +// (state = PAUSED OR state = HEALTHY) * last_run_time > +// \"2017-12-12T00:00:00+00:00\" The length of this field should be no +// more than 500 characters. +func (c *OrganizationsLocationsJobTriggersListCall) Filter(filter string) *OrganizationsLocationsJobTriggersListCall { + c.urlParams_.Set("filter", filter) + return c +} + // LocationId sets the optional parameter "locationId": Deprecated. This // field has no effect. -func (c *OrganizationsLocationsInspectTemplatesListCall) LocationId(locationId string) *OrganizationsLocationsInspectTemplatesListCall { +func (c *OrganizationsLocationsJobTriggersListCall) LocationId(locationId string) *OrganizationsLocationsJobTriggersListCall { c.urlParams_.Set("locationId", locationId) return c } // OrderBy sets the optional parameter "orderBy": Comma separated list -// of fields to order by, followed by `asc` or `desc` postfix. This list -// is case-insensitive, default sorting order is ascending, redundant -// space characters are insignificant. Example: `name asc,update_time, -// create_time desc` Supported fields are: - `create_time`: corresponds -// to the time the template was created. - `update_time`: corresponds to -// the time the template was last updated. - `name`: corresponds to the -// template's name. - `display_name`: corresponds to the template's -// display name. -func (c *OrganizationsLocationsInspectTemplatesListCall) OrderBy(orderBy string) *OrganizationsLocationsInspectTemplatesListCall { +// of triggeredJob fields to order by, followed by `asc` or `desc` +// postfix. This list is case-insensitive, default sorting order is +// ascending, redundant space characters are insignificant. Example: +// `name asc,update_time, create_time desc` Supported fields are: - +// `create_time`: corresponds to the time the JobTrigger was created. - +// `update_time`: corresponds to the time the JobTrigger was last +// updated. - `last_run_time`: corresponds to the last time the +// JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - +// `display_name`: corresponds to the JobTrigger's display name. - +// `status`: corresponds to JobTrigger's status. +func (c *OrganizationsLocationsJobTriggersListCall) OrderBy(orderBy string) *OrganizationsLocationsJobTriggersListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by the server. If zero server returns a page of max -// size 100. -func (c *OrganizationsLocationsInspectTemplatesListCall) PageSize(pageSize int64) *OrganizationsLocationsInspectTemplatesListCall { +// can be limited by a server. +func (c *OrganizationsLocationsJobTriggersListCall) PageSize(pageSize int64) *OrganizationsLocationsJobTriggersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from previous call to -// `ListInspectTemplates`. -func (c *OrganizationsLocationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsInspectTemplatesListCall { +// continue retrieval. Comes from previous call to ListJobTriggers. +// `order_by` field must not change for subsequent calls. +func (c *OrganizationsLocationsJobTriggersListCall) PageToken(pageToken string) *OrganizationsLocationsJobTriggersListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// Type sets the optional parameter "type": The type of jobs. Will use +// `DlpJobType.INSPECT` if not set. +// +// Possible values: +// +// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. +// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. +// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. +func (c *OrganizationsLocationsJobTriggersListCall) Type(type_ string) *OrganizationsLocationsJobTriggersListCall { + c.urlParams_.Set("type", type_) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesListCall { +func (c *OrganizationsLocationsJobTriggersListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13877,7 +16307,7 @@ func (c *OrganizationsLocationsInspectTemplatesListCall) Fields(s ...googleapi.F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInspectTemplatesListCall { +func (c *OrganizationsLocationsJobTriggersListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsJobTriggersListCall { c.ifNoneMatch_ = entityTag return c } @@ -13885,21 +16315,21 @@ func (c *OrganizationsLocationsInspectTemplatesListCall) IfNoneMatch(entityTag s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesListCall { +func (c *OrganizationsLocationsJobTriggersListCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsInspectTemplatesListCall) Header() http.Header { +func (c *OrganizationsLocationsJobTriggersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -13912,7 +16342,7 @@ func (c *OrganizationsLocationsInspectTemplatesListCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -13925,16 +16355,16 @@ func (c *OrganizationsLocationsInspectTemplatesListCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.inspectTemplates.list" call. -// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "dlp.organizations.locations.jobTriggers.list" call. +// Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header -// or (if a response was returned at all) in +// *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { +func (c *OrganizationsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13953,7 +16383,7 @@ func (c *OrganizationsLocationsInspectTemplatesListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ + ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13965,46 +16395,66 @@ func (c *OrganizationsLocationsInspectTemplatesListCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", + // "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers", // "httpMethod": "GET", - // "id": "dlp.organizations.locations.inspectTemplates.list", + // "id": "dlp.organizations.locations.jobTriggers.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect triggers: - `status` - HEALTHY|PAUSED|CANCELLED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by quotation marks. Nanoseconds are ignored. - 'error_count' - Number of errors that have occurred while running. * The operator must be `=` or `!=` for status and inspected_storage. Examples: * inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", + // "location": "query", + // "type": "string" + // }, // "locationId": { // "description": "Deprecated. This field has no effect.", // "location": "query", // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", + // "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the JobTrigger was created. - `update_time`: corresponds to the time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - `display_name`: corresponds to the JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by a server.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", + // "description": "Page token to continue retrieval. Comes from previous call to ListJobTriggers. `order_by` field must not change for subsequent calls.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "type": { + // "description": "The type of jobs. Will use `DlpJobType.INSPECT` if not set.", + // "enum": [ + // "DLP_JOB_TYPE_UNSPECIFIED", + // "INSPECT_JOB", + // "RISK_ANALYSIS_JOB" + // ], + // "enumDescriptions": [ + // "Defaults to INSPECT_JOB.", + // "The job inspected Google Cloud for sensitive data.", + // "The job executed a Risk Analysis computation." + // ], + // "location": "query", + // "type": "string" // } // }, - // "path": "v2/{+parent}/inspectTemplates", + // "path": "v2/{+parent}/jobTriggers", // "response": { - // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" + // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14016,7 +16466,7 @@ func (c *OrganizationsLocationsInspectTemplatesListCall) Do(opts ...googleapi.Ca // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { +func (c *OrganizationsLocationsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -14034,35 +16484,34 @@ func (c *OrganizationsLocationsInspectTemplatesListCall) Pages(ctx context.Conte } } -// method id "dlp.organizations.locations.inspectTemplates.patch": +// method id "dlp.organizations.locations.jobTriggers.patch": -type OrganizationsLocationsInspectTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsJobTriggersPatchCall struct { + s *Service + name string + googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Patch: Updates a job trigger. See +// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// more. // -// - name: Resource name of organization and inspectTemplate to be -// updated, for example -// `organizations/433245324/inspectTemplates/432452342` or -// projects/project-id/inspectTemplates/432452342. -func (r *OrganizationsLocationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsLocationsInspectTemplatesPatchCall { - c := &OrganizationsLocationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the project and the triggeredJob, for +// example `projects/dlp-test-project/jobTriggers/53234423`. +func (r *OrganizationsLocationsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *OrganizationsLocationsJobTriggersPatchCall { + c := &OrganizationsLocationsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest + c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesPatchCall { +func (c *OrganizationsLocationsJobTriggersPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14070,21 +16519,21 @@ func (c *OrganizationsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesPatchCall { +func (c *OrganizationsLocationsJobTriggersPatchCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsInspectTemplatesPatchCall) Header() http.Header { +func (c *OrganizationsLocationsJobTriggersPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14092,7 +16541,7 @@ func (c *OrganizationsLocationsInspectTemplatesPatchCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest) if err != nil { return nil, err } @@ -14112,15 +16561,14 @@ func (c *OrganizationsLocationsInspectTemplatesPatchCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.inspectTemplates.patch" call. -// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// Do executes the "dlp.organizations.locations.jobTriggers.patch" call. +// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { +// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14139,7 +16587,7 @@ func (c *OrganizationsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectTemplate{ + ret := &GooglePrivacyDlpV2JobTrigger{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14151,28 +16599,28 @@ func (c *OrganizationsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", + // "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", // "httpMethod": "PATCH", - // "id": "dlp.organizations.locations.inspectTemplates.patch", + // "id": "dlp.organizations.locations.jobTriggers.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", + // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" + // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GooglePrivacyDlpV2JobTrigger" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14181,43 +16629,47 @@ func (c *OrganizationsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.C } -// method id "dlp.organizations.locations.jobTriggers.create": +// method id "dlp.organizations.locations.storedInfoTypes.create": -type OrganizationsLocationsJobTriggersCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsStoredInfoTypesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: 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 +// Create: Creates a pre-built stored infoType to be used for +// inspection. See +// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn // more. // // - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsLocationsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *OrganizationsLocationsJobTriggersCreateCall { - c := &OrganizationsLocationsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *OrganizationsLocationsStoredInfoTypesCreateCall { + c := &OrganizationsLocationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest + c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsJobTriggersCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersCreateCall { +func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14225,21 +16677,21 @@ func (c *OrganizationsLocationsJobTriggersCreateCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsJobTriggersCreateCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersCreateCall { +func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsJobTriggersCreateCall) Header() http.Header { +func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14247,14 +16699,14 @@ func (c *OrganizationsLocationsJobTriggersCreateCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -14267,14 +16719,14 @@ func (c *OrganizationsLocationsJobTriggersCreateCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.jobTriggers.create" call. -// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be +// Do executes the "dlp.organizations.locations.storedInfoTypes.create" call. +// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { +func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14293,7 +16745,7 @@ func (c *OrganizationsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2JobTrigger{ + ret := &GooglePrivacyDlpV2StoredInfoType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14305,28 +16757,28 @@ func (c *OrganizationsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "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.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers", + // "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", // "httpMethod": "POST", - // "id": "dlp.organizations.locations.jobTriggers.create", + // "id": "dlp.organizations.locations.storedInfoTypes.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/jobTriggers", + // "path": "v2/{+parent}/storedInfoTypes", // "request": { - // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" + // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2JobTrigger" + // "$ref": "GooglePrivacyDlpV2StoredInfoType" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14335,9 +16787,9 @@ func (c *OrganizationsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallO } -// method id "dlp.organizations.locations.jobTriggers.delete": +// method id "dlp.organizations.locations.storedInfoTypes.delete": -type OrganizationsLocationsJobTriggersDeleteCall struct { +type OrganizationsLocationsStoredInfoTypesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -14345,14 +16797,16 @@ type OrganizationsLocationsJobTriggersDeleteCall struct { header_ http.Header } -// Delete: Deletes a job trigger. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// Delete: Deletes a stored infoType. See +// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn // more. // -// - name: Resource name of the project and the triggeredJob, for -// example `projects/dlp-test-project/jobTriggers/53234423`. -func (r *OrganizationsLocationsJobTriggersService) Delete(name string) *OrganizationsLocationsJobTriggersDeleteCall { - c := &OrganizationsLocationsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the organization and storedInfoType to be +// deleted, for example +// `organizations/433245324/storedInfoTypes/432452342` or +// projects/project-id/storedInfoTypes/432452342. +func (r *OrganizationsLocationsStoredInfoTypesService) Delete(name string) *OrganizationsLocationsStoredInfoTypesDeleteCall { + c := &OrganizationsLocationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14360,7 +16814,7 @@ func (r *OrganizationsLocationsJobTriggersService) Delete(name string) *Organiza // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersDeleteCall { +func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14368,21 +16822,21 @@ func (c *OrganizationsLocationsJobTriggersDeleteCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsJobTriggersDeleteCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersDeleteCall { +func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsJobTriggersDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14405,14 +16859,14 @@ func (c *OrganizationsLocationsJobTriggersDeleteCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.jobTriggers.delete" call. +// Do executes the "dlp.organizations.locations.storedInfoTypes.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14443,18 +16897,18 @@ func (c *OrganizationsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", + // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", // "httpMethod": "DELETE", - // "id": "dlp.organizations.locations.jobTriggers.delete", + // "id": "dlp.organizations.locations.storedInfoTypes.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", // "required": true, // "type": "string" // } @@ -14470,9 +16924,9 @@ func (c *OrganizationsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallO } -// method id "dlp.organizations.locations.jobTriggers.get": +// method id "dlp.organizations.locations.storedInfoTypes.get": -type OrganizationsLocationsJobTriggersGetCall struct { +type OrganizationsLocationsStoredInfoTypesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -14481,14 +16935,16 @@ type OrganizationsLocationsJobTriggersGetCall struct { header_ http.Header } -// Get: Gets a job trigger. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// Get: Gets a stored infoType. See +// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn // more. // -// - name: Resource name of the project and the triggeredJob, for -// example `projects/dlp-test-project/jobTriggers/53234423`. -func (r *OrganizationsLocationsJobTriggersService) Get(name string) *OrganizationsLocationsJobTriggersGetCall { - c := &OrganizationsLocationsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the organization and storedInfoType to be +// read, for example +// `organizations/433245324/storedInfoTypes/432452342` or +// projects/project-id/storedInfoTypes/432452342. +func (r *OrganizationsLocationsStoredInfoTypesService) Get(name string) *OrganizationsLocationsStoredInfoTypesGetCall { + c := &OrganizationsLocationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14496,7 +16952,7 @@ func (r *OrganizationsLocationsJobTriggersService) Get(name string) *Organizatio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsJobTriggersGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersGetCall { +func (c *OrganizationsLocationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14506,7 +16962,7 @@ func (c *OrganizationsLocationsJobTriggersGetCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsJobTriggersGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsJobTriggersGetCall { +func (c *OrganizationsLocationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsStoredInfoTypesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -14514,21 +16970,21 @@ func (c *OrganizationsLocationsJobTriggersGetCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsJobTriggersGetCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersGetCall { +func (c *OrganizationsLocationsStoredInfoTypesGetCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsJobTriggersGetCall) Header() http.Header { +func (c *OrganizationsLocationsStoredInfoTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14554,14 +17010,14 @@ func (c *OrganizationsLocationsJobTriggersGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.jobTriggers.get" call. -// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be +// Do executes the "dlp.organizations.locations.storedInfoTypes.get" call. +// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { +func (c *OrganizationsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14580,7 +17036,7 @@ func (c *OrganizationsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2JobTrigger{ + ret := &GooglePrivacyDlpV2StoredInfoType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14592,25 +17048,25 @@ func (c *OrganizationsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", + // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", // "httpMethod": "GET", - // "id": "dlp.organizations.locations.jobTriggers.get", + // "id": "dlp.organizations.locations.storedInfoTypes.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2JobTrigger" + // "$ref": "GooglePrivacyDlpV2StoredInfoType" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14619,9 +17075,9 @@ func (c *OrganizationsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOpti } -// method id "dlp.organizations.locations.jobTriggers.list": +// method id "dlp.organizations.locations.storedInfoTypes.list": -type OrganizationsLocationsJobTriggersListCall struct { +type OrganizationsLocationsStoredInfoTypesListCall struct { s *Service parentid string urlParams_ gensupport.URLParams @@ -14630,12 +17086,13 @@ type OrganizationsLocationsJobTriggersListCall struct { header_ http.Header } -// List: Lists job triggers. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// List: Lists stored infoTypes. See +// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn // more. // // - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no @@ -14644,89 +17101,53 @@ type OrganizationsLocationsJobTriggersListCall struct { // the identifier `example-project`, and specifies the `europe-west3` // location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsLocationsJobTriggersService) List(parentid string) *OrganizationsLocationsJobTriggersListCall { - c := &OrganizationsLocationsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsStoredInfoTypesService) List(parentid string) *OrganizationsLocationsStoredInfoTypesListCall { + c := &OrganizationsLocationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid return c } -// Filter sets the optional parameter "filter": Allows filtering. -// Supported syntax: * Filter expressions are made up of one or more -// restrictions. * Restrictions can be combined by `AND` or `OR` logical -// operators. A sequence of restrictions implicitly uses `AND`. * A -// restriction has the form of `{field} {operator} {value}`. * Supported -// fields/values for inspect triggers: - `status` - -// HEALTHY|PAUSED|CANCELLED - `inspected_storage` - -// DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 -// formatted timestamp, surrounded by quotation marks. Nanoseconds are -// ignored. - 'error_count' - Number of errors that have occurred while -// running. * The operator must be `=` or `!=` for status and -// inspected_storage. Examples: * inspected_storage = cloud_storage AND -// status = HEALTHY * inspected_storage = cloud_storage OR -// inspected_storage = bigquery * inspected_storage = cloud_storage AND -// (state = PAUSED OR state = HEALTHY) * last_run_time > -// \"2017-12-12T00:00:00+00:00\" The length of this field should be no -// more than 500 characters. -func (c *OrganizationsLocationsJobTriggersListCall) Filter(filter string) *OrganizationsLocationsJobTriggersListCall { - c.urlParams_.Set("filter", filter) - return c -} - // LocationId sets the optional parameter "locationId": Deprecated. This // field has no effect. -func (c *OrganizationsLocationsJobTriggersListCall) LocationId(locationId string) *OrganizationsLocationsJobTriggersListCall { +func (c *OrganizationsLocationsStoredInfoTypesListCall) LocationId(locationId string) *OrganizationsLocationsStoredInfoTypesListCall { c.urlParams_.Set("locationId", locationId) return c } // OrderBy sets the optional parameter "orderBy": Comma separated list -// of triggeredJob fields to order by, followed by `asc` or `desc` -// postfix. This list is case-insensitive, default sorting order is -// ascending, redundant space characters are insignificant. Example: -// `name asc,update_time, create_time desc` Supported fields are: - -// `create_time`: corresponds to the time the JobTrigger was created. - -// `update_time`: corresponds to the time the JobTrigger was last -// updated. - `last_run_time`: corresponds to the last time the -// JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - -// `display_name`: corresponds to the JobTrigger's display name. - -// `status`: corresponds to JobTrigger's status. -func (c *OrganizationsLocationsJobTriggersListCall) OrderBy(orderBy string) *OrganizationsLocationsJobTriggersListCall { +// of fields to order by, followed by `asc` or `desc` postfix. This list +// is case-insensitive, default sorting order is ascending, redundant +// space characters are insignificant. Example: `name asc, display_name, +// create_time desc` Supported fields are: - `create_time`: corresponds +// to the time the most recent version of the resource was created. - +// `state`: corresponds to the state of the resource. - `name`: +// corresponds to resource name. - `display_name`: corresponds to info +// type's display name. +func (c *OrganizationsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) *OrganizationsLocationsStoredInfoTypesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by a server. -func (c *OrganizationsLocationsJobTriggersListCall) PageSize(pageSize int64) *OrganizationsLocationsJobTriggersListCall { +// can be limited by the server. If zero server returns a page of max +// size 100. +func (c *OrganizationsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsLocationsStoredInfoTypesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from previous call to ListJobTriggers. -// `order_by` field must not change for subsequent calls. -func (c *OrganizationsLocationsJobTriggersListCall) PageToken(pageToken string) *OrganizationsLocationsJobTriggersListCall { +// continue retrieval. Comes from previous call to +// `ListStoredInfoTypes`. +func (c *OrganizationsLocationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsLocationsStoredInfoTypesListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Type sets the optional parameter "type": The type of jobs. Will use -// `DlpJobType.INSPECT` if not set. -// -// Possible values: -// -// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. -// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. -// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. -func (c *OrganizationsLocationsJobTriggersListCall) Type(type_ string) *OrganizationsLocationsJobTriggersListCall { - c.urlParams_.Set("type", type_) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsJobTriggersListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersListCall { +func (c *OrganizationsLocationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14736,7 +17157,7 @@ func (c *OrganizationsLocationsJobTriggersListCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsJobTriggersListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsJobTriggersListCall { +func (c *OrganizationsLocationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsStoredInfoTypesListCall { c.ifNoneMatch_ = entityTag return c } @@ -14744,21 +17165,21 @@ func (c *OrganizationsLocationsJobTriggersListCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsJobTriggersListCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersListCall { +func (c *OrganizationsLocationsStoredInfoTypesListCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsJobTriggersListCall) Header() http.Header { +func (c *OrganizationsLocationsStoredInfoTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14771,7 +17192,7 @@ func (c *OrganizationsLocationsJobTriggersListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14784,16 +17205,16 @@ func (c *OrganizationsLocationsJobTriggersListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.jobTriggers.list" call. -// Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "dlp.organizations.locations.storedInfoTypes.list" call. +// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or -// (if a response was returned at all) in +// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { +func (c *OrganizationsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14812,7 +17233,7 @@ func (c *OrganizationsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ + ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14824,66 +17245,46 @@ func (c *OrganizationsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers", + // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", // "httpMethod": "GET", - // "id": "dlp.organizations.locations.jobTriggers.list", + // "id": "dlp.organizations.locations.storedInfoTypes.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect triggers: - `status` - HEALTHY|PAUSED|CANCELLED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by quotation marks. Nanoseconds are ignored. - 'error_count' - Number of errors that have occurred while running. * The operator must be `=` or `!=` for status and inspected_storage. Examples: * inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", - // "location": "query", - // "type": "string" - // }, // "locationId": { // "description": "Deprecated. This field has no effect.", // "location": "query", // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the JobTrigger was created. - `update_time`: corresponds to the time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - `display_name`: corresponds to the JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to the time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by a server.", + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token to continue retrieval. Comes from previous call to ListJobTriggers. `order_by` field must not change for subsequent calls.", + // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" - // }, - // "type": { - // "description": "The type of jobs. Will use `DlpJobType.INSPECT` if not set.", - // "enum": [ - // "DLP_JOB_TYPE_UNSPECIFIED", - // "INSPECT_JOB", - // "RISK_ANALYSIS_JOB" - // ], - // "enumDescriptions": [ - // "Defaults to INSPECT_JOB.", - // "The job inspected Google Cloud for sensitive data.", - // "The job executed a Risk Analysis computation." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v2/{+parent}/jobTriggers", + // "path": "v2/{+parent}/storedInfoTypes", // "response": { - // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" + // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14895,7 +17296,7 @@ func (c *OrganizationsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOpt // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error { +func (c *OrganizationsLocationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -14913,34 +17314,38 @@ func (c *OrganizationsLocationsJobTriggersListCall) Pages(ctx context.Context, f } } -// method id "dlp.organizations.locations.jobTriggers.patch": +// method id "dlp.organizations.locations.storedInfoTypes.patch": -type OrganizationsLocationsJobTriggersPatchCall struct { - s *Service - name string - googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsStoredInfoTypesPatchCall struct { + s *Service + name string + googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a job trigger. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// Patch: 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. // -// - name: Resource name of the project and the triggeredJob, for -// example `projects/dlp-test-project/jobTriggers/53234423`. -func (r *OrganizationsLocationsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *OrganizationsLocationsJobTriggersPatchCall { - c := &OrganizationsLocationsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of organization and storedInfoType to be +// updated, for example +// `organizations/433245324/storedInfoTypes/432452342` or +// projects/project-id/storedInfoTypes/432452342. +func (r *OrganizationsLocationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *OrganizationsLocationsStoredInfoTypesPatchCall { + c := &OrganizationsLocationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest + c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsJobTriggersPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersPatchCall { +func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14948,21 +17353,21 @@ func (c *OrganizationsLocationsJobTriggersPatchCall) Fields(s ...googleapi.Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsJobTriggersPatchCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersPatchCall { +func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsJobTriggersPatchCall) Header() http.Header { +func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14970,7 +17375,7 @@ func (c *OrganizationsLocationsJobTriggersPatchCall) doRequest(alt string) (*htt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) if err != nil { return nil, err } @@ -14990,14 +17395,14 @@ func (c *OrganizationsLocationsJobTriggersPatchCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.jobTriggers.patch" call. -// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be +// Do executes the "dlp.organizations.locations.storedInfoTypes.patch" call. +// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { +func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15016,7 +17421,7 @@ func (c *OrganizationsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2JobTrigger{ + ret := &GooglePrivacyDlpV2StoredInfoType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15028,28 +17433,28 @@ func (c *OrganizationsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", + // "description": "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.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", // "httpMethod": "PATCH", - // "id": "dlp.organizations.locations.jobTriggers.patch", + // "id": "dlp.organizations.locations.storedInfoTypes.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" + // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2JobTrigger" + // "$ref": "GooglePrivacyDlpV2StoredInfoType" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15058,9 +17463,9 @@ func (c *OrganizationsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOp } -// method id "dlp.organizations.locations.storedInfoTypes.create": +// method id "dlp.organizations.storedInfoTypes.create": -type OrganizationsLocationsStoredInfoTypesCreateCall struct { +type OrganizationsStoredInfoTypesCreateCall struct { s *Service parentid string googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest @@ -15088,8 +17493,8 @@ type OrganizationsLocationsStoredInfoTypesCreateCall struct { // specifies a parent project with the identifier `example-project`, // and specifies the `europe-west3` location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsLocationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *OrganizationsLocationsStoredInfoTypesCreateCall { - c := &OrganizationsLocationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *OrganizationsStoredInfoTypesCreateCall { + c := &OrganizationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest return c @@ -15098,7 +17503,7 @@ func (r *OrganizationsLocationsStoredInfoTypesService) Create(parentid string, g // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesCreateCall { +func (c *OrganizationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15106,21 +17511,21 @@ func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesCreateCall { +func (c *OrganizationsStoredInfoTypesCreateCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Header() http.Header { +func (c *OrganizationsStoredInfoTypesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15148,14 +17553,14 @@ func (c *OrganizationsLocationsStoredInfoTypesCreateCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.storedInfoTypes.create" call. +// Do executes the "dlp.organizations.storedInfoTypes.create" call. // Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { +func (c *OrganizationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15187,9 +17592,9 @@ func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.C return ret, nil // { // "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", + // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", // "httpMethod": "POST", - // "id": "dlp.organizations.locations.storedInfoTypes.create", + // "id": "dlp.organizations.storedInfoTypes.create", // "parameterOrder": [ // "parent" // ], @@ -15197,7 +17602,7 @@ func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.C // "parent": { // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } @@ -15216,9 +17621,9 @@ func (c *OrganizationsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.C } -// method id "dlp.organizations.locations.storedInfoTypes.delete": +// method id "dlp.organizations.storedInfoTypes.delete": -type OrganizationsLocationsStoredInfoTypesDeleteCall struct { +type OrganizationsStoredInfoTypesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15234,8 +17639,8 @@ type OrganizationsLocationsStoredInfoTypesDeleteCall struct { // deleted, for example // `organizations/433245324/storedInfoTypes/432452342` or // projects/project-id/storedInfoTypes/432452342. -func (r *OrganizationsLocationsStoredInfoTypesService) Delete(name string) *OrganizationsLocationsStoredInfoTypesDeleteCall { - c := &OrganizationsLocationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsStoredInfoTypesService) Delete(name string) *OrganizationsStoredInfoTypesDeleteCall { + c := &OrganizationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15243,7 +17648,7 @@ func (r *OrganizationsLocationsStoredInfoTypesService) Delete(name string) *Orga // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesDeleteCall { +func (c *OrganizationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15251,21 +17656,21 @@ func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesDeleteCall { +func (c *OrganizationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Header() http.Header { +func (c *OrganizationsStoredInfoTypesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15288,14 +17693,14 @@ func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.storedInfoTypes.delete" call. +// Do executes the "dlp.organizations.storedInfoTypes.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *OrganizationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15327,9 +17732,9 @@ func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.C return ret, nil // { // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", + // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", // "httpMethod": "DELETE", - // "id": "dlp.organizations.locations.storedInfoTypes.delete", + // "id": "dlp.organizations.storedInfoTypes.delete", // "parameterOrder": [ // "name" // ], @@ -15337,7 +17742,7 @@ func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.C // "name": { // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", + // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", // "required": true, // "type": "string" // } @@ -15353,9 +17758,9 @@ func (c *OrganizationsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.C } -// method id "dlp.organizations.locations.storedInfoTypes.get": +// method id "dlp.organizations.storedInfoTypes.get": -type OrganizationsLocationsStoredInfoTypesGetCall struct { +type OrganizationsStoredInfoTypesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15372,8 +17777,8 @@ type OrganizationsLocationsStoredInfoTypesGetCall struct { // read, for example // `organizations/433245324/storedInfoTypes/432452342` or // projects/project-id/storedInfoTypes/432452342. -func (r *OrganizationsLocationsStoredInfoTypesService) Get(name string) *OrganizationsLocationsStoredInfoTypesGetCall { - c := &OrganizationsLocationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsStoredInfoTypesService) Get(name string) *OrganizationsStoredInfoTypesGetCall { + c := &OrganizationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15381,7 +17786,7 @@ func (r *OrganizationsLocationsStoredInfoTypesService) Get(name string) *Organiz // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesGetCall { +func (c *OrganizationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15391,7 +17796,7 @@ func (c *OrganizationsLocationsStoredInfoTypesGetCall) Fields(s ...googleapi.Fie // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsStoredInfoTypesGetCall { +func (c *OrganizationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *OrganizationsStoredInfoTypesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -15399,21 +17804,21 @@ func (c *OrganizationsLocationsStoredInfoTypesGetCall) IfNoneMatch(entityTag str // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsStoredInfoTypesGetCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesGetCall { +func (c *OrganizationsStoredInfoTypesGetCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsStoredInfoTypesGetCall) Header() http.Header { +func (c *OrganizationsStoredInfoTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15439,14 +17844,14 @@ func (c *OrganizationsLocationsStoredInfoTypesGetCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.storedInfoTypes.get" call. +// Do executes the "dlp.organizations.storedInfoTypes.get" call. // Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { +func (c *OrganizationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15478,9 +17883,9 @@ func (c *OrganizationsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.Call return ret, nil // { // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", + // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", // "httpMethod": "GET", - // "id": "dlp.organizations.locations.storedInfoTypes.get", + // "id": "dlp.organizations.storedInfoTypes.get", // "parameterOrder": [ // "name" // ], @@ -15488,7 +17893,7 @@ func (c *OrganizationsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.Call // "name": { // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", + // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", // "required": true, // "type": "string" // } @@ -15504,9 +17909,9 @@ func (c *OrganizationsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.Call } -// method id "dlp.organizations.locations.storedInfoTypes.list": +// method id "dlp.organizations.storedInfoTypes.list": -type OrganizationsLocationsStoredInfoTypesListCall struct { +type OrganizationsStoredInfoTypesListCall struct { s *Service parentid string urlParams_ gensupport.URLParams @@ -15530,15 +17935,15 @@ type OrganizationsLocationsStoredInfoTypesListCall struct { // the identifier `example-project`, and specifies the `europe-west3` // location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsLocationsStoredInfoTypesService) List(parentid string) *OrganizationsLocationsStoredInfoTypesListCall { - c := &OrganizationsLocationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsStoredInfoTypesService) List(parentid string) *OrganizationsStoredInfoTypesListCall { + c := &OrganizationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid return c } // LocationId sets the optional parameter "locationId": Deprecated. This // field has no effect. -func (c *OrganizationsLocationsStoredInfoTypesListCall) LocationId(locationId string) *OrganizationsLocationsStoredInfoTypesListCall { +func (c *OrganizationsStoredInfoTypesListCall) LocationId(locationId string) *OrganizationsStoredInfoTypesListCall { c.urlParams_.Set("locationId", locationId) return c } @@ -15552,7 +17957,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) LocationId(locationId st // `state`: corresponds to the state of the resource. - `name`: // corresponds to resource name. - `display_name`: corresponds to info // type's display name. -func (c *OrganizationsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) *OrganizationsLocationsStoredInfoTypesListCall { +func (c *OrganizationsStoredInfoTypesListCall) OrderBy(orderBy string) *OrganizationsStoredInfoTypesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -15560,7 +17965,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) // PageSize sets the optional parameter "pageSize": Size of the page, // can be limited by the server. If zero server returns a page of max // size 100. -func (c *OrganizationsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsLocationsStoredInfoTypesListCall { +func (c *OrganizationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsStoredInfoTypesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -15568,7 +17973,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) // PageToken sets the optional parameter "pageToken": Page token to // continue retrieval. Comes from previous call to // `ListStoredInfoTypes`. -func (c *OrganizationsLocationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsLocationsStoredInfoTypesListCall { +func (c *OrganizationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsStoredInfoTypesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -15576,7 +17981,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) PageToken(pageToken stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesListCall { +func (c *OrganizationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15586,7 +17991,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) Fields(s ...googleapi.Fi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OrganizationsLocationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsStoredInfoTypesListCall { +func (c *OrganizationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *OrganizationsStoredInfoTypesListCall { c.ifNoneMatch_ = entityTag return c } @@ -15594,21 +17999,21 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsStoredInfoTypesListCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesListCall { +func (c *OrganizationsStoredInfoTypesListCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsStoredInfoTypesListCall) Header() http.Header { +func (c *OrganizationsStoredInfoTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15634,7 +18039,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.storedInfoTypes.list" call. +// Do executes the "dlp.organizations.storedInfoTypes.list" call. // Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -15643,7 +18048,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) doRequest(alt string) (* // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { +func (c *OrganizationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15675,9 +18080,9 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.Cal return ret, nil // { // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", + // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", // "httpMethod": "GET", - // "id": "dlp.organizations.locations.storedInfoTypes.list", + // "id": "dlp.organizations.storedInfoTypes.list", // "parameterOrder": [ // "parent" // ], @@ -15706,7 +18111,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.Cal // "parent": { // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+$", // "required": true, // "type": "string" // } @@ -15725,7 +18130,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.Cal // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OrganizationsLocationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { +func (c *OrganizationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -15743,9 +18148,9 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) Pages(ctx context.Contex } } -// method id "dlp.organizations.locations.storedInfoTypes.patch": +// method id "dlp.organizations.storedInfoTypes.patch": -type OrganizationsLocationsStoredInfoTypesPatchCall struct { +type OrganizationsStoredInfoTypesPatchCall struct { s *Service name string googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest @@ -15764,8 +18169,8 @@ type OrganizationsLocationsStoredInfoTypesPatchCall struct { // updated, for example // `organizations/433245324/storedInfoTypes/432452342` or // projects/project-id/storedInfoTypes/432452342. -func (r *OrganizationsLocationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *OrganizationsLocationsStoredInfoTypesPatchCall { - c := &OrganizationsLocationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *OrganizationsStoredInfoTypesPatchCall { + c := &OrganizationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest return c @@ -15774,7 +18179,7 @@ func (r *OrganizationsLocationsStoredInfoTypesService) Patch(name string, google // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesPatchCall { +func (c *OrganizationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15782,21 +18187,21 @@ func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Fields(s ...googleapi.F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Context(ctx context.Context) *OrganizationsLocationsStoredInfoTypesPatchCall { +func (c *OrganizationsStoredInfoTypesPatchCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Header() http.Header { +func (c *OrganizationsStoredInfoTypesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15824,14 +18229,173 @@ func (c *OrganizationsLocationsStoredInfoTypesPatchCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.storedInfoTypes.patch" call. +// Do executes the "dlp.organizations.storedInfoTypes.patch" call. // Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be // non-nil. Any non-2xx status code is an error. Response headers are in // either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { +func (c *OrganizationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GooglePrivacyDlpV2StoredInfoType{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "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.", + // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", + // "httpMethod": "PATCH", + // "id": "dlp.organizations.storedInfoTypes.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", + // "location": "path", + // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" + // }, + // "response": { + // "$ref": "GooglePrivacyDlpV2StoredInfoType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.projects.content.deidentify": + +type ProjectsContentDeidentifyCall struct { + s *Service + parentid string + googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Deidentify: De-identifies potentially sensitive info from a +// ContentItem. This method has limits on input size and output size. +// See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to +// learn more. When no InfoTypes or CustomInfoTypes are specified in +// this request, 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. +// +// - parent: Parent resource name. The format of this value varies +// depending on whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *ProjectsContentService) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsContentDeidentifyCall { + c := &ProjectsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentDeidentifyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsContentDeidentifyCall) Context(ctx context.Context) *ProjectsContentDeidentifyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsContentDeidentifyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parentid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.projects.content.deidentify" call. +// Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15850,7 +18414,7 @@ func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2StoredInfoType{ + ret := &GooglePrivacyDlpV2DeidentifyContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15862,28 +18426,28 @@ func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "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.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", - // "httpMethod": "PATCH", - // "id": "dlp.organizations.locations.storedInfoTypes.patch", + // "description": "De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, 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.", + // "flatPath": "v2/projects/{projectsId}/content:deidentify", + // "httpMethod": "POST", + // "id": "dlp.projects.content.deidentify", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", + // "parent": { + // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/content:deidentify", // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" + // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2StoredInfoType" + // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15892,47 +18456,47 @@ func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.Ca } -// method id "dlp.organizations.storedInfoTypes.create": +// method id "dlp.projects.content.inspect": -type OrganizationsStoredInfoTypesCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsContentInspectCall struct { + s *Service + parentid string + googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a pre-built stored infoType to be used for -// inspection. See -// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn -// more. +// Inspect: Finds potentially sensitive info in content. This method has +// limits on input size, processing time, and output size. When no +// InfoTypes or CustomInfoTypes are specified in this request, 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. For how to guides, see +// https://cloud.google.com/dlp/docs/inspecting-images and +// https://cloud.google.com/dlp/docs/inspecting-text, // // - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location +// depending on whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *OrganizationsStoredInfoTypesCreateCall { - c := &OrganizationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsContentService) Inspect(parentid string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsContentInspectCall { + c := &ProjectsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest + c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesCreateCall { +func (c *ProjectsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsContentInspectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15940,21 +18504,21 @@ func (c *OrganizationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *O // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsStoredInfoTypesCreateCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesCreateCall { +func (c *ProjectsContentInspectCall) Context(ctx context.Context) *ProjectsContentInspectCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsStoredInfoTypesCreateCall) Header() http.Header { +func (c *ProjectsContentInspectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsContentInspectCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15962,14 +18526,14 @@ func (c *OrganizationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createstoredinfotyperequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:inspect") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -15982,14 +18546,16 @@ func (c *OrganizationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.storedInfoTypes.create" call. -// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { +// Do executes the "dlp.projects.content.inspect" call. +// Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16008,7 +18574,7 @@ func (c *OrganizationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2StoredInfoType{ + ret := &GooglePrivacyDlpV2InspectContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16020,28 +18586,28 @@ func (c *OrganizationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", + // "description": "Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size. When no InfoTypes or CustomInfoTypes are specified in this request, 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. For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and https://cloud.google.com/dlp/docs/inspecting-text,", + // "flatPath": "v2/projects/{projectsId}/content:inspect", // "httpMethod": "POST", - // "id": "dlp.organizations.storedInfoTypes.create", + // "id": "dlp.projects.content.inspect", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/storedInfoTypes", + // "path": "v2/{+parent}/content:inspect", // "request": { - // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" + // "$ref": "GooglePrivacyDlpV2InspectContentRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2StoredInfoType" + // "$ref": "GooglePrivacyDlpV2InspectContentResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16050,34 +18616,42 @@ func (c *OrganizationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption } -// method id "dlp.organizations.storedInfoTypes.delete": +// method id "dlp.projects.content.reidentify": -type OrganizationsStoredInfoTypesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsContentReidentifyCall struct { + s *Service + parentid string + googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a stored infoType. See -// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn -// more. +// Reidentify: Re-identifies content that has been de-identified. See +// https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example +// to learn more. // -// - name: Resource name of the organization and storedInfoType to be -// deleted, for example -// `organizations/433245324/storedInfoTypes/432452342` or -// projects/project-id/storedInfoTypes/432452342. -func (r *OrganizationsStoredInfoTypesService) Delete(name string) *OrganizationsStoredInfoTypesDeleteCall { - c := &OrganizationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Parent resource name. The format of this value varies +// depending on whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *ProjectsContentService) Reidentify(parentid string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsContentReidentifyCall { + c := &ProjectsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesDeleteCall { +func (c *ProjectsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentReidentifyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16085,21 +18659,21 @@ func (c *OrganizationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *O // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesDeleteCall { +func (c *ProjectsContentReidentifyCall) Context(ctx context.Context) *ProjectsContentReidentifyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsStoredInfoTypesDeleteCall) Header() http.Header { +func (c *ProjectsContentReidentifyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsContentReidentifyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -16107,29 +18681,36 @@ func (c *OrganizationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:reidentify") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parentid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.storedInfoTypes.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "dlp.projects.content.reidentify" call. +// Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16148,7 +18729,7 @@ func (c *OrganizationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2ReidentifyContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16160,25 +18741,28 @@ func (c *OrganizationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", - // "httpMethod": "DELETE", - // "id": "dlp.organizations.storedInfoTypes.delete", + // "description": "Re-identifies content that has been de-identified. See https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.", + // "flatPath": "v2/projects/{projectsId}/content:reidentify", + // "httpMethod": "POST", + // "id": "dlp.projects.content.reidentify", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the organization and storedInfoType to be deleted, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", + // "parent": { + // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/content:reidentify", + // "request": { + // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16187,100 +18771,105 @@ func (c *OrganizationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption } -// method id "dlp.organizations.storedInfoTypes.get": +// method id "dlp.projects.deidentifyTemplates.create": -type OrganizationsStoredInfoTypesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsDeidentifyTemplatesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } - -// Get: Gets a stored infoType. See -// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn -// more. -// -// - name: Resource name of the organization and storedInfoType to be -// read, for example -// `organizations/433245324/storedInfoTypes/432452342` or -// projects/project-id/storedInfoTypes/432452342. -func (r *OrganizationsStoredInfoTypesService) Get(name string) *OrganizationsStoredInfoTypesGetCall { - c := &OrganizationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + +// Create: Creates a DeidentifyTemplate for reusing frequently used +// configuration for de-identifying content, images, and storage. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// more. +// +// - parent: Parent resource name. The format of this value varies +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *ProjectsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesCreateCall { + c := &ProjectsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesGetCall { +func (c *ProjectsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *OrganizationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *OrganizationsStoredInfoTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsStoredInfoTypesGetCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesGetCall { +func (c *ProjectsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsStoredInfoTypesGetCall) Header() http.Header { +func (c *ProjectsDeidentifyTemplatesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parentid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.storedInfoTypes.get" call. -// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be +// Do executes the "dlp.projects.deidentifyTemplates.create" call. +// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { +// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16299,7 +18888,7 @@ func (c *OrganizationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2StoredInfoType{ + ret := &GooglePrivacyDlpV2DeidentifyTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16311,25 +18900,28 @@ func (c *OrganizationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", - // "httpMethod": "GET", - // "id": "dlp.organizations.storedInfoTypes.get", + // "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", + // "httpMethod": "POST", + // "id": "dlp.projects.deidentifyTemplates.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the organization and storedInfoType to be read, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", + // "parent": { + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/deidentifyTemplates", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" + // }, // "response": { - // "$ref": "GooglePrivacyDlpV2StoredInfoType" + // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16338,146 +18930,86 @@ func (c *OrganizationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) ( } -// method id "dlp.organizations.storedInfoTypes.list": +// method id "dlp.projects.deidentifyTemplates.delete": -type OrganizationsStoredInfoTypesListCall struct { - s *Service - parentid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsDeidentifyTemplatesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists stored infoTypes. See -// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn +// Delete: Deletes a DeidentifyTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. // -// - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: -// parent=projects/example-project/locations/europe-west3. -func (r *OrganizationsStoredInfoTypesService) List(parentid string) *OrganizationsStoredInfoTypesListCall { - c := &OrganizationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - return c -} - -// LocationId sets the optional parameter "locationId": Deprecated. This -// field has no effect. -func (c *OrganizationsStoredInfoTypesListCall) LocationId(locationId string) *OrganizationsStoredInfoTypesListCall { - c.urlParams_.Set("locationId", locationId) - return c -} - -// OrderBy sets the optional parameter "orderBy": Comma separated list -// of fields to order by, followed by `asc` or `desc` postfix. This list -// is case-insensitive, default sorting order is ascending, redundant -// space characters are insignificant. Example: `name asc, display_name, -// create_time desc` Supported fields are: - `create_time`: corresponds -// to the time the most recent version of the resource was created. - -// `state`: corresponds to the state of the resource. - `name`: -// corresponds to resource name. - `display_name`: corresponds to info -// type's display name. -func (c *OrganizationsStoredInfoTypesListCall) OrderBy(orderBy string) *OrganizationsStoredInfoTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by the server. If zero server returns a page of max -// size 100. -func (c *OrganizationsStoredInfoTypesListCall) PageSize(pageSize int64) *OrganizationsStoredInfoTypesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from previous call to -// `ListStoredInfoTypes`. -func (c *OrganizationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsStoredInfoTypesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Resource name of the organization and deidentify template to +// be deleted, for example +// `organizations/433245324/deidentifyTemplates/432452342` or +// projects/project-id/deidentifyTemplates/432452342. +func (r *ProjectsDeidentifyTemplatesService) Delete(name string) *ProjectsDeidentifyTemplatesDeleteCall { + c := &ProjectsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesListCall { +func (c *ProjectsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *OrganizationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *OrganizationsStoredInfoTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsStoredInfoTypesListCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesListCall { +func (c *ProjectsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsStoredInfoTypesListCall) Header() http.Header { +func (c *ProjectsDeidentifyTemplatesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parentid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.storedInfoTypes.list" call. -// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2ListStoredInfoTypesResponse.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *OrganizationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { +// Do executes the "dlp.projects.deidentifyTemplates.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16496,58 +19028,37 @@ func (c *OrganizationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, }, } target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", - // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", - // "httpMethod": "GET", - // "id": "dlp.organizations.storedInfoTypes.list", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "locationId": { - // "description": "Deprecated. This field has no effect.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, display_name, create_time desc` Supported fields are: - `create_time`: corresponds to the time the most recent version of the resource was created. - `state`: corresponds to the state of the resource. - `name`: corresponds to resource name. - `display_name`: corresponds to info type's display name.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token to continue retrieval. Comes from previous call to `ListStoredInfoTypes`.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "httpMethod": "DELETE", + // "id": "dlp.projects.deidentifyTemplates.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the organization and deidentify template to be deleted, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+$", + // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/storedInfoTypes", + // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16556,98 +19067,82 @@ func (c *OrganizationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *OrganizationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "dlp.organizations.storedInfoTypes.patch": +// method id "dlp.projects.deidentifyTemplates.get": -type OrganizationsStoredInfoTypesPatchCall struct { - s *Service - name string - googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDeidentifyTemplatesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: 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 +// Get: Gets a DeidentifyTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. // -// - name: Resource name of organization and storedInfoType to be -// updated, for example -// `organizations/433245324/storedInfoTypes/432452342` or -// projects/project-id/storedInfoTypes/432452342. -func (r *OrganizationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *OrganizationsStoredInfoTypesPatchCall { - c := &OrganizationsStoredInfoTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the organization and deidentify template to +// be read, for example +// `organizations/433245324/deidentifyTemplates/432452342` or +// projects/project-id/deidentifyTemplates/432452342. +func (r *ProjectsDeidentifyTemplatesService) Get(name string) *ProjectsDeidentifyTemplatesGetCall { + c := &ProjectsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleprivacydlpv2updatestoredinfotyperequest = googleprivacydlpv2updatestoredinfotyperequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesPatchCall { +func (c *ProjectsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OrganizationsStoredInfoTypesPatchCall) Context(ctx context.Context) *OrganizationsStoredInfoTypesPatchCall { +func (c *ProjectsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OrganizationsStoredInfoTypesPatchCall) Header() http.Header { +func (c *ProjectsDeidentifyTemplatesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatestoredinfotyperequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -16658,14 +19153,15 @@ func (c *OrganizationsStoredInfoTypesPatchCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.storedInfoTypes.patch" call. -// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be +// Do executes the "dlp.projects.deidentifyTemplates.get" call. +// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2StoredInfoType.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { +// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16684,7 +19180,7 @@ func (c *OrganizationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2StoredInfoType{ + ret := &GooglePrivacyDlpV2DeidentifyTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16696,28 +19192,25 @@ func (c *OrganizationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "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.", - // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", - // "httpMethod": "PATCH", - // "id": "dlp.organizations.storedInfoTypes.patch", + // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "httpMethod": "GET", + // "id": "dlp.projects.deidentifyTemplates.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of organization and storedInfoType to be updated, for example `organizations/433245324/storedInfoTypes/432452342` or projects/project-id/storedInfoTypes/432452342.", + // "description": "Required. Resource name of the organization and deidentify template to be read, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", + // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" - // }, // "response": { - // "$ref": "GooglePrivacyDlpV2StoredInfoType" + // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16726,85 +19219,129 @@ func (c *OrganizationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) } -// method id "dlp.projects.content.deidentify": +// method id "dlp.projects.deidentifyTemplates.list": -type ProjectsContentDeidentifyCall struct { - s *Service - parentid string - googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDeidentifyTemplatesListCall struct { + s *Service + parentid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Deidentify: De-identifies potentially sensitive info from a -// ContentItem. This method has limits on input size and output size. -// See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to -// learn more. When no InfoTypes or CustomInfoTypes are specified in -// this request, 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. +// List: Lists DeidentifyTemplates. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// more. // // - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *ProjectsContentService) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsContentDeidentifyCall { - c := &ProjectsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsDeidentifyTemplatesService) List(parentid string) *ProjectsDeidentifyTemplatesListCall { + c := &ProjectsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest + return c +} + +// LocationId sets the optional parameter "locationId": Deprecated. This +// field has no effect. +func (c *ProjectsDeidentifyTemplatesListCall) LocationId(locationId string) *ProjectsDeidentifyTemplatesListCall { + c.urlParams_.Set("locationId", locationId) + return c +} + +// OrderBy sets the optional parameter "orderBy": Comma separated list +// of fields to order by, followed by `asc` or `desc` postfix. This list +// is case-insensitive, default sorting order is ascending, redundant +// space characters are insignificant. Example: `name asc,update_time, +// create_time desc` Supported fields are: - `create_time`: corresponds +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. +func (c *ProjectsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsDeidentifyTemplatesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Size of the page, +// can be limited by the server. If zero server returns a page of max +// size 100. +func (c *ProjectsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsDeidentifyTemplatesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. Comes from previous call to +// `ListDeidentifyTemplates`. +func (c *ProjectsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsDeidentifyTemplatesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentDeidentifyCall { +func (c *ProjectsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsContentDeidentifyCall) Context(ctx context.Context) *ProjectsContentDeidentifyCall { +func (c *ProjectsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsContentDeidentifyCall) Header() http.Header { +func (c *ProjectsDeidentifyTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -16813,18 +19350,18 @@ func (c *ProjectsContentDeidentifyCall) doRequest(alt string) (*http.Response, e "parent": c.parentid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.content.deidentify" call. -// Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +} + +// Do executes the "dlp.projects.deidentifyTemplates.list" call. +// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or -// (if a response was returned at all) in +// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head +// er or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) { +func (c *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16843,7 +19380,7 @@ func (c *ProjectsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DeidentifyContentResponse{ + ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16855,28 +19392,46 @@ func (c *ProjectsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*Googl } return ret, nil // { - // "description": "De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, 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.", - // "flatPath": "v2/projects/{projectsId}/content:deidentify", - // "httpMethod": "POST", - // "id": "dlp.projects.content.deidentify", + // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", + // "httpMethod": "GET", + // "id": "dlp.projects.deidentifyTemplates.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "locationId": { + // "description": "Deprecated. This field has no effect.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/content:deidentify", - // "request": { - // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" - // }, + // "path": "v2/{+parent}/deidentifyTemplates", // "response": { - // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" + // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16885,47 +19440,57 @@ func (c *ProjectsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*Googl } -// method id "dlp.projects.content.inspect": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsContentInspectCall struct { - s *Service - parentid string - googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "dlp.projects.deidentifyTemplates.patch": + +type ProjectsDeidentifyTemplatesPatchCall struct { + s *Service + name string + googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Inspect: Finds potentially sensitive info in content. This method has -// limits on input size, processing time, and output size. When no -// InfoTypes or CustomInfoTypes are specified in this request, 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. For how to guides, see -// https://cloud.google.com/dlp/docs/inspecting-images and -// https://cloud.google.com/dlp/docs/inspecting-text, +// Patch: Updates the DeidentifyTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// more. // -// - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: -// parent=projects/example-project/locations/europe-west3. -func (r *ProjectsContentService) Inspect(parentid string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsContentInspectCall { - c := &ProjectsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest +// - name: Resource name of organization and deidentify template to be +// updated, for example +// `organizations/433245324/deidentifyTemplates/432452342` or +// projects/project-id/deidentifyTemplates/432452342. +func (r *ProjectsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesPatchCall { + c := &ProjectsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsContentInspectCall { +func (c *ProjectsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16933,21 +19498,21 @@ func (c *ProjectsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsConte // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsContentInspectCall) Context(ctx context.Context) *ProjectsContentInspectCall { +func (c *ProjectsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsContentInspectCall) Header() http.Header { +func (c *ProjectsDeidentifyTemplatesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsContentInspectCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -16955,36 +19520,35 @@ func (c *ProjectsContentInspectCall) doRequest(alt string) (*http.Response, erro } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:inspect") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parentid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.content.inspect" call. -// Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or +// Do executes the "dlp.projects.deidentifyTemplates.patch" call. +// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) { +func (c *ProjectsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17003,7 +19567,7 @@ func (c *ProjectsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePr if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectContentResponse{ + ret := &GooglePrivacyDlpV2DeidentifyTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17015,28 +19579,28 @@ func (c *ProjectsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePr } return ret, nil // { - // "description": "Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size. When no InfoTypes or CustomInfoTypes are specified in this request, 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. For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and https://cloud.google.com/dlp/docs/inspecting-text,", - // "flatPath": "v2/projects/{projectsId}/content:inspect", - // "httpMethod": "POST", - // "id": "dlp.projects.content.inspect", + // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "httpMethod": "PATCH", + // "id": "dlp.projects.deidentifyTemplates.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "name": { + // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/content:inspect", + // "path": "v2/{+name}", // "request": { - // "$ref": "GooglePrivacyDlpV2InspectContentRequest" + // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2InspectContentResponse" + // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17045,42 +19609,36 @@ func (c *ProjectsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePr } -// method id "dlp.projects.content.reidentify": +// method id "dlp.projects.dlpJobs.cancel": -type ProjectsContentReidentifyCall struct { - s *Service - parentid string - googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDlpJobsCancelCall struct { + s *Service + name string + googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Reidentify: Re-identifies content that has been de-identified. See -// https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example -// to learn more. +// Cancel: 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. // -// - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: -// parent=projects/example-project/locations/europe-west3. -func (r *ProjectsContentService) Reidentify(parentid string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsContentReidentifyCall { - c := &ProjectsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest +// - name: The name of the DlpJob resource to be cancelled. +func (r *ProjectsDlpJobsService) Cancel(name string, googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest) *ProjectsDlpJobsCancelCall { + c := &ProjectsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleprivacydlpv2canceldlpjobrequest = googleprivacydlpv2canceldlpjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentReidentifyCall { +func (c *ProjectsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17088,21 +19646,21 @@ func (c *ProjectsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsCo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsContentReidentifyCall) Context(ctx context.Context) *ProjectsContentReidentifyCall { +func (c *ProjectsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsDlpJobsCancelCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsContentReidentifyCall) Header() http.Header { +func (c *ProjectsDlpJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsContentReidentifyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17110,14 +19668,14 @@ func (c *ProjectsContentReidentifyCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2canceldlpjobrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:reidentify") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17125,21 +19683,19 @@ func (c *ProjectsContentReidentifyCall) doRequest(alt string) (*http.Response, e } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parentid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.content.reidentify" call. -// Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) { +// Do executes the "dlp.projects.dlpJobs.cancel" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17158,7 +19714,7 @@ func (c *ProjectsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ReidentifyContentResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17170,28 +19726,28 @@ func (c *ProjectsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*Googl } return ret, nil // { - // "description": "Re-identifies content that has been de-identified. See https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.", - // "flatPath": "v2/projects/{projectsId}/content:reidentify", + // "description": "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.", + // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}:cancel", // "httpMethod": "POST", - // "id": "dlp.projects.content.reidentify", + // "id": "dlp.projects.dlpJobs.cancel", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "name": { + // "description": "Required. The name of the DlpJob resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/content:reidentify", + // "path": "v2/{+name}:cancel", // "request": { - // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest" + // "$ref": "GooglePrivacyDlpV2CancelDlpJobRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17200,47 +19756,46 @@ func (c *ProjectsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*Googl } -// method id "dlp.projects.deidentifyTemplates.create": +// method id "dlp.projects.dlpJobs.create": -type ProjectsDeidentifyTemplatesCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsDlpJobsCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a DeidentifyTemplate for reusing frequently used -// configuration for de-identifying content, images, and storage. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// Create: 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. // // - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location +// depending on whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *ProjectsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesCreateCall { - c := &ProjectsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsDlpJobsService) Create(parentid string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsDlpJobsCreateCall { + c := &ProjectsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest + c.googleprivacydlpv2createdlpjobrequest = googleprivacydlpv2createdlpjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesCreateCall { +func (c *ProjectsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17248,21 +19803,21 @@ func (c *ProjectsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesCreateCall { +func (c *ProjectsDlpJobsCreateCall) Context(ctx context.Context) *ProjectsDlpJobsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDeidentifyTemplatesCreateCall) Header() http.Header { +func (c *ProjectsDlpJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDlpJobsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17270,14 +19825,14 @@ func (c *ProjectsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdlpjobrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17290,15 +19845,14 @@ func (c *ProjectsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.deidentifyTemplates.create" call. -// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { +// Do executes the "dlp.projects.dlpJobs.create" call. +// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17317,7 +19871,7 @@ func (c *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ret := &GooglePrivacyDlpV2DlpJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17329,28 +19883,28 @@ func (c *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", + // "description": "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.", + // "flatPath": "v2/projects/{projectsId}/dlpJobs", // "httpMethod": "POST", - // "id": "dlp.projects.deidentifyTemplates.create", + // "id": "dlp.projects.dlpJobs.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/deidentifyTemplates", + // "path": "v2/{+parent}/dlpJobs", // "request": { - // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" + // "$ref": "GooglePrivacyDlpV2CreateDlpJobRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // "$ref": "GooglePrivacyDlpV2DlpJob" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17359,9 +19913,9 @@ func (c *ProjectsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) } -// method id "dlp.projects.deidentifyTemplates.delete": +// method id "dlp.projects.dlpJobs.delete": -type ProjectsDeidentifyTemplatesDeleteCall struct { +type ProjectsDlpJobsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17369,16 +19923,16 @@ type ProjectsDeidentifyTemplatesDeleteCall struct { header_ http.Header } -// Delete: Deletes a DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// Delete: Deletes a long-running DlpJob. This method indicates that the +// client is no longer interested in the DlpJob result. The job will be +// canceled if possible. See +// https://cloud.google.com/dlp/docs/inspecting-storage and +// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn // more. // -// - name: Resource name of the organization and deidentify template to -// be deleted, for example -// `organizations/433245324/deidentifyTemplates/432452342` or -// projects/project-id/deidentifyTemplates/432452342. -func (r *ProjectsDeidentifyTemplatesService) Delete(name string) *ProjectsDeidentifyTemplatesDeleteCall { - c := &ProjectsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DlpJob resource to be deleted. +func (r *ProjectsDlpJobsService) Delete(name string) *ProjectsDlpJobsDeleteCall { + c := &ProjectsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17386,7 +19940,7 @@ func (r *ProjectsDeidentifyTemplatesService) Delete(name string) *ProjectsDeiden // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesDeleteCall { +func (c *ProjectsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17394,21 +19948,21 @@ func (c *ProjectsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesDeleteCall { +func (c *ProjectsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsDlpJobsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDeidentifyTemplatesDeleteCall) Header() http.Header { +func (c *ProjectsDlpJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17431,14 +19985,14 @@ func (c *ProjectsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.deidentifyTemplates.delete" call. +// Do executes the "dlp.projects.dlpJobs.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17469,18 +20023,18 @@ func (c *ProjectsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "description": "Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", + // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", // "httpMethod": "DELETE", - // "id": "dlp.projects.deidentifyTemplates.delete", + // "id": "dlp.projects.dlpJobs.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the organization and deidentify template to be deleted, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", + // "description": "Required. The name of the DlpJob resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", // "required": true, // "type": "string" // } @@ -17496,9 +20050,9 @@ func (c *ProjectsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "dlp.projects.deidentifyTemplates.get": +// method id "dlp.projects.dlpJobs.get": -type ProjectsDeidentifyTemplatesGetCall struct { +type ProjectsDlpJobsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17507,16 +20061,14 @@ type ProjectsDeidentifyTemplatesGetCall struct { header_ http.Header } -// Get: Gets a DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// Get: 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. // -// - name: Resource name of the organization and deidentify template to -// be read, for example -// `organizations/433245324/deidentifyTemplates/432452342` or -// projects/project-id/deidentifyTemplates/432452342. -func (r *ProjectsDeidentifyTemplatesService) Get(name string) *ProjectsDeidentifyTemplatesGetCall { - c := &ProjectsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DlpJob resource. +func (r *ProjectsDlpJobsService) Get(name string) *ProjectsDlpJobsGetCall { + c := &ProjectsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17524,7 +20076,7 @@ func (r *ProjectsDeidentifyTemplatesService) Get(name string) *ProjectsDeidentif // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesGetCall { +func (c *ProjectsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17534,7 +20086,7 @@ func (c *ProjectsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *Proje // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesGetCall { +func (c *ProjectsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -17542,21 +20094,21 @@ func (c *ProjectsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesGetCall { +func (c *ProjectsDlpJobsGetCall) Context(ctx context.Context) *ProjectsDlpJobsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDeidentifyTemplatesGetCall) Header() http.Header { +func (c *ProjectsDlpJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17582,15 +20134,14 @@ func (c *ProjectsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.deidentifyTemplates.get" call. -// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { +// Do executes the "dlp.projects.dlpJobs.get" call. +// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17609,7 +20160,7 @@ func (c *ProjectsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ret := &GooglePrivacyDlpV2DlpJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17621,25 +20172,25 @@ func (c *ProjectsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "description": "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.", + // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", // "httpMethod": "GET", - // "id": "dlp.projects.deidentifyTemplates.get", + // "id": "dlp.projects.dlpJobs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the organization and deidentify template to be read, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", + // "description": "Required. The name of the DlpJob resource.", // "location": "path", - // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // "$ref": "GooglePrivacyDlpV2DlpJob" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17648,9 +20199,9 @@ func (c *ProjectsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "dlp.projects.deidentifyTemplates.list": +// method id "dlp.projects.dlpJobs.list": -type ProjectsDeidentifyTemplatesListCall struct { +type ProjectsDlpJobsListCall struct { s *Service parentid string urlParams_ gensupport.URLParams @@ -17659,33 +20210,54 @@ type ProjectsDeidentifyTemplatesListCall struct { header_ http.Header } -// List: Lists DeidentifyTemplates. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// List: 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. // // - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location +// depending on whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *ProjectsDeidentifyTemplatesService) List(parentid string) *ProjectsDeidentifyTemplatesListCall { - c := &ProjectsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsDlpJobsService) List(parentid string) *ProjectsDlpJobsListCall { + c := &ProjectsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid return c } +// Filter sets the optional parameter "filter": Allows filtering. +// Supported syntax: * Filter expressions are made up of one or more +// restrictions. * Restrictions can be combined by `AND` or `OR` logical +// operators. A sequence of restrictions implicitly uses `AND`. * A +// restriction has the form of `{field} {operator} {value}`. * Supported +// fields/values for inspect jobs: - `state` - +// PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - +// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the +// trigger that created the job. - 'end_time` - Corresponds to the time +// the job finished. - 'start_time` - Corresponds to the time the job +// finished. * Supported fields for risk analysis jobs: - `state` - +// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the +// time the job finished. - 'start_time` - Corresponds to the time the +// job finished. * The operator must be `=` or `!=`. Examples: * +// inspected_storage = cloud_storage AND state = done * +// inspected_storage = cloud_storage OR inspected_storage = bigquery * +// inspected_storage = cloud_storage AND (state = done OR state = +// canceled) * end_time > \"2017-12-12T00:00:00+00:00\" The length of +// this field should be no more than 500 characters. +func (c *ProjectsDlpJobsListCall) Filter(filter string) *ProjectsDlpJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} + // LocationId sets the optional parameter "locationId": Deprecated. This // field has no effect. -func (c *ProjectsDeidentifyTemplatesListCall) LocationId(locationId string) *ProjectsDeidentifyTemplatesListCall { +func (c *ProjectsDlpJobsListCall) LocationId(locationId string) *ProjectsDlpJobsListCall { c.urlParams_.Set("locationId", locationId) return c } @@ -17693,37 +20265,47 @@ func (c *ProjectsDeidentifyTemplatesListCall) LocationId(locationId string) *Pro // OrderBy sets the optional parameter "orderBy": Comma separated list // of fields to order by, followed by `asc` or `desc` postfix. This list // is case-insensitive, default sorting order is ascending, redundant -// space characters are insignificant. Example: `name asc,update_time, +// space characters are insignificant. Example: `name asc, end_time asc, // create_time desc` Supported fields are: - `create_time`: corresponds -// to the time the template was created. - `update_time`: corresponds to -// the time the template was last updated. - `name`: corresponds to the -// template's name. - `display_name`: corresponds to the template's -// display name. -func (c *ProjectsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsDeidentifyTemplatesListCall { +// to the time the job was created. - `end_time`: corresponds to the +// time the job ended. - `name`: corresponds to the job's name. - +// `state`: corresponds to `state` +func (c *ProjectsDlpJobsListCall) OrderBy(orderBy string) *ProjectsDlpJobsListCall { c.urlParams_.Set("orderBy", orderBy) return c } -// PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by the server. If zero server returns a page of max -// size 100. -func (c *ProjectsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsDeidentifyTemplatesListCall { +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsDlpJobsListCall) PageSize(pageSize int64) *ProjectsDlpJobsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from previous call to -// `ListDeidentifyTemplates`. -func (c *ProjectsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsDeidentifyTemplatesListCall { +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsDlpJobsListCall) PageToken(pageToken string) *ProjectsDlpJobsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// Type sets the optional parameter "type": The type of job. Defaults to +// `DlpJobType.INSPECT` +// +// Possible values: +// +// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. +// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. +// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. +func (c *ProjectsDlpJobsListCall) Type(type_ string) *ProjectsDlpJobsListCall { + c.urlParams_.Set("type", type_) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesListCall { +func (c *ProjectsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17733,7 +20315,7 @@ func (c *ProjectsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *Proj // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsDeidentifyTemplatesListCall { +func (c *ProjectsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsListCall { c.ifNoneMatch_ = entityTag return c } @@ -17741,21 +20323,21 @@ func (c *ProjectsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesListCall { +func (c *ProjectsDlpJobsListCall) Context(ctx context.Context) *ProjectsDlpJobsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDeidentifyTemplatesListCall) Header() http.Header { +func (c *ProjectsDlpJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17768,7 +20350,7 @@ func (c *ProjectsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17781,16 +20363,15 @@ func (c *ProjectsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.deidentifyTemplates.list" call. -// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head -// er or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { +// Do executes the "dlp.projects.dlpJobs.list" call. +// Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17809,7 +20390,7 @@ func (c *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ + ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17821,46 +20402,66 @@ func (c *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", + // "description": "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.", + // "flatPath": "v2/projects/{projectsId}/dlpJobs", // "httpMethod": "GET", - // "id": "dlp.projects.deidentifyTemplates.list", + // "id": "dlp.projects.dlpJobs.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the trigger that created the job. - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", + // "location": "query", + // "type": "string" + // }, // "locationId": { // "description": "Deprecated. This field has no effect.", // "location": "query", // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to the time the job was created. - `end_time`: corresponds to the time the job ended. - `name`: corresponds to the job's name. - `state`: corresponds to `state`", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", + // "description": "The standard list page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", + // "description": "The standard list page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" + // }, + // "type": { + // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", + // "enum": [ + // "DLP_JOB_TYPE_UNSPECIFIED", + // "INSPECT_JOB", + // "RISK_ANALYSIS_JOB" + // ], + // "enumDescriptions": [ + // "Defaults to INSPECT_JOB.", + // "The job inspected Google Cloud for sensitive data.", + // "The job executed a Risk Analysis computation." + // ], + // "location": "query", + // "type": "string" // } // }, - // "path": "v2/{+parent}/deidentifyTemplates", + // "path": "v2/{+parent}/dlpJobs", // "response": { - // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" + // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17872,7 +20473,7 @@ func (c *ProjectsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) ( // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { +func (c *ProjectsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -17890,36 +20491,46 @@ func (c *ProjectsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func( } } -// method id "dlp.projects.deidentifyTemplates.patch": +// method id "dlp.projects.image.redact": -type ProjectsDeidentifyTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsImageRedactCall struct { + s *Service + parentid string + googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// Redact: Redacts potentially sensitive info from an image. This method +// has limits on input size, processing time, and output size. See +// https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to +// learn more. When no InfoTypes or CustomInfoTypes are specified in +// this request, 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. // -// - name: Resource name of organization and deidentify template to be -// updated, for example -// `organizations/433245324/deidentifyTemplates/432452342` or -// projects/project-id/deidentifyTemplates/432452342. -func (r *ProjectsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *ProjectsDeidentifyTemplatesPatchCall { - c := &ProjectsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest +// - parent: Parent resource name. The format of this value varies +// depending on whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *ProjectsImageService) Redact(parentid string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsImageRedactCall { + c := &ProjectsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + c.googleprivacydlpv2redactimagerequest = googleprivacydlpv2redactimagerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsDeidentifyTemplatesPatchCall { +func (c *ProjectsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsImageRedactCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17927,21 +20538,21 @@ func (c *ProjectsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsDeidentifyTemplatesPatchCall { +func (c *ProjectsImageRedactCall) Context(ctx context.Context) *ProjectsImageRedactCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDeidentifyTemplatesPatchCall) Header() http.Header { +func (c *ProjectsImageRedactCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsImageRedactCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17949,35 +20560,35 @@ func (c *ProjectsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2redactimagerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/image:redact") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parentid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.deidentifyTemplates.patch" call. -// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { +// Do executes the "dlp.projects.image.redact" call. +// Exactly one of *GooglePrivacyDlpV2RedactImageResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GooglePrivacyDlpV2RedactImageResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17996,7 +20607,7 @@ func (c *ProjectsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ret := &GooglePrivacyDlpV2RedactImageResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18008,28 +20619,28 @@ func (c *ProjectsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", - // "httpMethod": "PATCH", - // "id": "dlp.projects.deidentifyTemplates.patch", + // "description": "Redacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, 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.", + // "flatPath": "v2/projects/{projectsId}/image:redact", + // "httpMethod": "POST", + // "id": "dlp.projects.image.redact", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", + // "parent": { + // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^projects/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/image:redact", // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" + // "$ref": "GooglePrivacyDlpV2RedactImageRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // "$ref": "GooglePrivacyDlpV2RedactImageResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18038,36 +20649,46 @@ func (c *ProjectsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) } -// method id "dlp.projects.dlpJobs.cancel": +// method id "dlp.projects.inspectTemplates.create": -type ProjectsDlpJobsCancelCall struct { - s *Service - name string - googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsInspectTemplatesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: 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. +// Create: Creates an InspectTemplate for reusing frequently used +// configuration for inspecting content, images, and storage. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. // -// - name: The name of the DlpJob resource to be cancelled. -func (r *ProjectsDlpJobsService) Cancel(name string, googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest) *ProjectsDlpJobsCancelCall { - c := &ProjectsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2canceldlpjobrequest = googleprivacydlpv2canceldlpjobrequest +// - parent: Parent resource name. The format of this value varies +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *ProjectsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *ProjectsInspectTemplatesCreateCall { + c := &ProjectsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCancelCall { +func (c *ProjectsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18075,21 +20696,21 @@ func (c *ProjectsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsDlpJob // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsDlpJobsCancelCall { +func (c *ProjectsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsInspectTemplatesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDlpJobsCancelCall) Header() http.Header { +func (c *ProjectsInspectTemplatesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18097,14 +20718,14 @@ func (c *ProjectsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2canceldlpjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18112,19 +20733,20 @@ func (c *ProjectsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parentid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.dlpJobs.cancel" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "dlp.projects.inspectTemplates.create" call. +// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18143,7 +20765,7 @@ func (c *ProjectsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GooglePro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2InspectTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18155,28 +20777,28 @@ func (c *ProjectsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GooglePro } return ret, nil // { - // "description": "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.", - // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}:cancel", + // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/projects/{projectsId}/inspectTemplates", // "httpMethod": "POST", - // "id": "dlp.projects.dlpJobs.cancel", + // "id": "dlp.projects.inspectTemplates.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the DlpJob resource to be cancelled.", + // "parent": { + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}:cancel", + // "path": "v2/{+parent}/inspectTemplates", // "request": { - // "$ref": "GooglePrivacyDlpV2CancelDlpJobRequest" + // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18185,46 +20807,33 @@ func (c *ProjectsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GooglePro } -// method id "dlp.projects.dlpJobs.create": +// method id "dlp.projects.inspectTemplates.delete": -type ProjectsDlpJobsCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsInspectTemplatesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: 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. +// Delete: Deletes an InspectTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. // -// - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: -// parent=projects/example-project/locations/europe-west3. -func (r *ProjectsDlpJobsService) Create(parentid string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsDlpJobsCreateCall { - c := &ProjectsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - c.googleprivacydlpv2createdlpjobrequest = googleprivacydlpv2createdlpjobrequest +// - name: Resource name of the organization and inspectTemplate to be +// deleted, for example +// `organizations/433245324/inspectTemplates/432452342` or +// projects/project-id/inspectTemplates/432452342. +func (r *ProjectsInspectTemplatesService) Delete(name string) *ProjectsInspectTemplatesDeleteCall { + c := &ProjectsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsCreateCall { +func (c *ProjectsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18232,21 +20841,21 @@ func (c *ProjectsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsDlpJob // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDlpJobsCreateCall) Context(ctx context.Context) *ProjectsDlpJobsCreateCall { +func (c *ProjectsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsInspectTemplatesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDlpJobsCreateCall) Header() http.Header { +func (c *ProjectsInspectTemplatesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDlpJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18254,34 +20863,29 @@ func (c *ProjectsDlpJobsCreateCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdlpjobrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parentid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.dlpJobs.create" call. -// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was +// Do executes the "dlp.projects.inspectTemplates.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { +func (c *ProjectsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18300,7 +20904,7 @@ func (c *ProjectsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePri if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DlpJob{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18312,28 +20916,25 @@ func (c *ProjectsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePri } return ret, nil // { - // "description": "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.", - // "flatPath": "v2/projects/{projectsId}/dlpJobs", - // "httpMethod": "POST", - // "id": "dlp.projects.dlpJobs.create", + // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "DELETE", + // "id": "dlp.projects.inspectTemplates.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "name": { + // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/dlpJobs", - // "request": { - // "$ref": "GooglePrivacyDlpV2CreateDlpJobRequest" - // }, + // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2DlpJob" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18342,26 +20943,26 @@ func (c *ProjectsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePri } -// method id "dlp.projects.dlpJobs.delete": +// method id "dlp.projects.inspectTemplates.get": -type ProjectsDlpJobsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsInspectTemplatesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a long-running DlpJob. This method indicates that the -// client is no longer interested in the DlpJob result. The job will be -// canceled if possible. See -// https://cloud.google.com/dlp/docs/inspecting-storage and -// https://cloud.google.com/dlp/docs/compute-risk-analysis to learn -// more. +// Get: Gets an InspectTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. // -// - name: The name of the DlpJob resource to be deleted. -func (r *ProjectsDlpJobsService) Delete(name string) *ProjectsDlpJobsDeleteCall { - c := &ProjectsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the organization and inspectTemplate to be +// read, for example +// `organizations/433245324/inspectTemplates/432452342` or +// projects/project-id/inspectTemplates/432452342. +func (r *ProjectsInspectTemplatesService) Get(name string) *ProjectsInspectTemplatesGetCall { + c := &ProjectsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -18369,41 +20970,54 @@ func (r *ProjectsDlpJobsService) Delete(name string) *ProjectsDlpJobsDeleteCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsDeleteCall { +func (c *ProjectsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsDlpJobsDeleteCall { +func (c *ProjectsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsInspectTemplatesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDlpJobsDeleteCall) Header() http.Header { +func (c *ProjectsInspectTemplatesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -18414,14 +21028,15 @@ func (c *ProjectsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.dlpJobs.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "dlp.projects.inspectTemplates.get" call. +// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18440,7 +21055,7 @@ func (c *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GooglePro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2InspectTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18452,25 +21067,25 @@ func (c *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GooglePro } return ret, nil // { - // "description": "Deletes a long-running DlpJob. This method indicates that the client is no longer interested in the DlpJob result. The job will be canceled if possible. See https://cloud.google.com/dlp/docs/inspecting-storage and https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.", - // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", - // "httpMethod": "DELETE", - // "id": "dlp.projects.dlpJobs.delete", + // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "GET", + // "id": "dlp.projects.inspectTemplates.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the DlpJob resource to be deleted.", + // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", // "location": "path", - // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", + // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18479,33 +21094,81 @@ func (c *ProjectsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GooglePro } -// method id "dlp.projects.dlpJobs.get": +// method id "dlp.projects.inspectTemplates.list": -type ProjectsDlpJobsGetCall struct { +type ProjectsInspectTemplatesListCall struct { s *Service - name string + parentid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: 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. +// List: Lists InspectTemplates. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. // -// - name: The name of the DlpJob resource. -func (r *ProjectsDlpJobsService) Get(name string) *ProjectsDlpJobsGetCall { - c := &ProjectsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Parent resource name. The format of this value varies +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *ProjectsInspectTemplatesService) List(parentid string) *ProjectsInspectTemplatesListCall { + c := &ProjectsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + return c +} + +// LocationId sets the optional parameter "locationId": Deprecated. This +// field has no effect. +func (c *ProjectsInspectTemplatesListCall) LocationId(locationId string) *ProjectsInspectTemplatesListCall { + c.urlParams_.Set("locationId", locationId) + return c +} + +// OrderBy sets the optional parameter "orderBy": Comma separated list +// of fields to order by, followed by `asc` or `desc` postfix. This list +// is case-insensitive, default sorting order is ascending, redundant +// space characters are insignificant. Example: `name asc,update_time, +// create_time desc` Supported fields are: - `create_time`: corresponds +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. +func (c *ProjectsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsInspectTemplatesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Size of the page, +// can be limited by the server. If zero server returns a page of max +// size 100. +func (c *ProjectsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsInspectTemplatesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. Comes from previous call to +// `ListInspectTemplates`. +func (c *ProjectsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsInspectTemplatesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsGetCall { +func (c *ProjectsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18515,7 +21178,7 @@ func (c *ProjectsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsGe // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsGetCall { +func (c *ProjectsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesListCall { c.ifNoneMatch_ = entityTag return c } @@ -18523,21 +21186,21 @@ func (c *ProjectsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsG // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDlpJobsGetCall) Context(ctx context.Context) *ProjectsDlpJobsGetCall { +func (c *ProjectsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsInspectTemplatesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDlpJobsGetCall) Header() http.Header { +func (c *ProjectsInspectTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18550,7 +21213,7 @@ func (c *ProjectsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18558,19 +21221,21 @@ func (c *ProjectsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parentid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.dlpJobs.get" call. -// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { +// Do executes the "dlp.projects.inspectTemplates.list" call. +// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18589,7 +21254,7 @@ func (c *ProjectsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivac if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DlpJob{ + ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18601,25 +21266,46 @@ func (c *ProjectsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivac } return ret, nil // { - // "description": "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.", - // "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", + // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/projects/{projectsId}/inspectTemplates", // "httpMethod": "GET", - // "id": "dlp.projects.dlpJobs.get", + // "id": "dlp.projects.inspectTemplates.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the DlpJob resource.", + // "locationId": { + // "description": "Deprecated. This field has no effect.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^projects/[^/]+/dlpJobs/[^/]+$", + // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/inspectTemplates", // "response": { - // "$ref": "GooglePrivacyDlpV2DlpJob" + // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18628,179 +21314,114 @@ func (c *ProjectsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivac } -// method id "dlp.projects.dlpJobs.list": - -type ProjectsDlpJobsListCall struct { - s *Service - parentid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: 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. -// -// - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: -// parent=projects/example-project/locations/europe-west3. -func (r *ProjectsDlpJobsService) List(parentid string) *ProjectsDlpJobsListCall { - c := &ProjectsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - return c -} - -// Filter sets the optional parameter "filter": Allows filtering. -// Supported syntax: * Filter expressions are made up of one or more -// restrictions. * Restrictions can be combined by `AND` or `OR` logical -// operators. A sequence of restrictions implicitly uses `AND`. * A -// restriction has the form of `{field} {operator} {value}`. * Supported -// fields/values for inspect jobs: - `state` - -// PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - -// DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the -// trigger that created the job. - 'end_time` - Corresponds to the time -// the job finished. - 'start_time` - Corresponds to the time the job -// finished. * Supported fields for risk analysis jobs: - `state` - -// RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the -// time the job finished. - 'start_time` - Corresponds to the time the -// job finished. * The operator must be `=` or `!=`. Examples: * -// inspected_storage = cloud_storage AND state = done * -// inspected_storage = cloud_storage OR inspected_storage = bigquery * -// inspected_storage = cloud_storage AND (state = done OR state = -// canceled) * end_time > \"2017-12-12T00:00:00+00:00\" The length of -// this field should be no more than 500 characters. -func (c *ProjectsDlpJobsListCall) Filter(filter string) *ProjectsDlpJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// LocationId sets the optional parameter "locationId": Deprecated. This -// field has no effect. -func (c *ProjectsDlpJobsListCall) LocationId(locationId string) *ProjectsDlpJobsListCall { - c.urlParams_.Set("locationId", locationId) - return c -} - -// OrderBy sets the optional parameter "orderBy": Comma separated list -// of fields to order by, followed by `asc` or `desc` postfix. This list -// is case-insensitive, default sorting order is ascending, redundant -// space characters are insignificant. Example: `name asc, end_time asc, -// create_time desc` Supported fields are: - `create_time`: corresponds -// to the time the job was created. - `end_time`: corresponds to the -// time the job ended. - `name`: corresponds to the job's name. - -// `state`: corresponds to `state` -func (c *ProjectsDlpJobsListCall) OrderBy(orderBy string) *ProjectsDlpJobsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsDlpJobsListCall) PageSize(pageSize int64) *ProjectsDlpJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} +// method id "dlp.projects.inspectTemplates.patch": -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsDlpJobsListCall) PageToken(pageToken string) *ProjectsDlpJobsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +type ProjectsInspectTemplatesPatchCall struct { + s *Service + name string + googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Type sets the optional parameter "type": The type of job. Defaults to -// `DlpJobType.INSPECT` -// -// Possible values: +// Patch: Updates the InspectTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates to learn more. // -// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. -// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. -// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. -func (c *ProjectsDlpJobsListCall) Type(type_ string) *ProjectsDlpJobsListCall { - c.urlParams_.Set("type", type_) +// - name: Resource name of organization and inspectTemplate to be +// updated, for example +// `organizations/433245324/inspectTemplates/432452342` or +// projects/project-id/inspectTemplates/432452342. +func (r *ProjectsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsInspectTemplatesPatchCall { + c := &ProjectsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsDlpJobsListCall { +func (c *ProjectsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsDlpJobsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsDlpJobsListCall) Context(ctx context.Context) *ProjectsDlpJobsListCall { +func (c *ProjectsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsInspectTemplatesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsDlpJobsListCall) Header() http.Header { +func (c *ProjectsInspectTemplatesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parentid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.dlpJobs.list" call. -// Exactly one of *GooglePrivacyDlpV2ListDlpJobsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2ListDlpJobsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { +// Do executes the "dlp.projects.inspectTemplates.patch" call. +// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18819,7 +21440,7 @@ func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePriva if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ + ret := &GooglePrivacyDlpV2InspectTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18831,66 +21452,28 @@ func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePriva } return ret, nil // { - // "description": "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.", - // "flatPath": "v2/projects/{projectsId}/dlpJobs", - // "httpMethod": "GET", - // "id": "dlp.projects.dlpJobs.list", + // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "PATCH", + // "id": "dlp.projects.inspectTemplates.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect jobs: - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - `trigger_name` - The name of the trigger that created the job. - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * Supported fields for risk analysis jobs: - `state` - RUNNING|CANCELED|FINISHED|FAILED - 'end_time` - Corresponds to the time the job finished. - 'start_time` - Corresponds to the time the job finished. * The operator must be `=` or `!=`. Examples: * inspected_storage = cloud_storage AND state = done * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = done OR state = canceled) * end_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", - // "location": "query", - // "type": "string" - // }, - // "locationId": { - // "description": "Deprecated. This field has no effect.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc, end_time asc, create_time desc` Supported fields are: - `create_time`: corresponds to the time the job was created. - `end_time`: corresponds to the time the job ended. - `name`: corresponds to the job's name. - `state`: corresponds to `state`", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "name": { + // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", // "required": true, // "type": "string" - // }, - // "type": { - // "description": "The type of job. Defaults to `DlpJobType.INSPECT`", - // "enum": [ - // "DLP_JOB_TYPE_UNSPECIFIED", - // "INSPECT_JOB", - // "RISK_ANALYSIS_JOB" - // ], - // "enumDescriptions": [ - // "Defaults to INSPECT_JOB.", - // "The job inspected Google Cloud for sensitive data.", - // "The job executed a Risk Analysis computation." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v2/{+parent}/dlpJobs", + // "path": "v2/{+name}", + // "request": { + // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" + // }, // "response": { - // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" + // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18899,67 +21482,33 @@ func (c *ProjectsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePriva } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "dlp.projects.image.redact": +// method id "dlp.projects.jobTriggers.activate": -type ProjectsImageRedactCall struct { - s *Service - parentid string - googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsJobTriggersActivateCall struct { + s *Service + name string + googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Redact: Redacts potentially sensitive info from an image. This method -// has limits on input size, processing time, and output size. See -// https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to -// learn more. When no InfoTypes or CustomInfoTypes are specified in -// this request, 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. +// Activate: Activate a job trigger. Causes the immediate execute of a +// trigger instead of waiting on the trigger event to occur. // -// - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: -// parent=projects/example-project/locations/europe-west3. -func (r *ProjectsImageService) Redact(parentid string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsImageRedactCall { - c := &ProjectsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - c.googleprivacydlpv2redactimagerequest = googleprivacydlpv2redactimagerequest +// - name: Resource name of the trigger to activate, for example +// `projects/dlp-test-project/jobTriggers/53234423`. +func (r *ProjectsJobTriggersService) Activate(name string, googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest) *ProjectsJobTriggersActivateCall { + c := &ProjectsJobTriggersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleprivacydlpv2activatejobtriggerrequest = googleprivacydlpv2activatejobtriggerrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsImageRedactCall { +func (c *ProjectsJobTriggersActivateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersActivateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18967,21 +21516,21 @@ func (c *ProjectsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsImageRed // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsImageRedactCall) Context(ctx context.Context) *ProjectsImageRedactCall { +func (c *ProjectsJobTriggersActivateCall) Context(ctx context.Context) *ProjectsJobTriggersActivateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsImageRedactCall) Header() http.Header { +func (c *ProjectsJobTriggersActivateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsImageRedactCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsJobTriggersActivateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18989,14 +21538,14 @@ func (c *ProjectsImageRedactCall) doRequest(alt string) (*http.Response, error) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2redactimagerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2activatejobtriggerrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/image:redact") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:activate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19004,20 +21553,19 @@ func (c *ProjectsImageRedactCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parentid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.image.redact" call. -// Exactly one of *GooglePrivacyDlpV2RedactImageResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2RedactImageResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "dlp.projects.jobTriggers.activate" call. +// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) { +func (c *ProjectsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19036,7 +21584,7 @@ func (c *ProjectsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePriva if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2RedactImageResponse{ + ret := &GooglePrivacyDlpV2DlpJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19048,28 +21596,28 @@ func (c *ProjectsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePriva } return ret, nil // { - // "description": "Redacts potentially sensitive info from an image. This method has limits on input size, processing time, and output size. See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, 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.", - // "flatPath": "v2/projects/{projectsId}/image:redact", + // "description": "Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.", + // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}:activate", // "httpMethod": "POST", - // "id": "dlp.projects.image.redact", + // "id": "dlp.projects.jobTriggers.activate", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "name": { + // "description": "Required. Resource name of the trigger to activate, for example `projects/dlp-test-project/jobTriggers/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/image:redact", + // "path": "v2/{+name}:activate", // "request": { - // "$ref": "GooglePrivacyDlpV2RedactImageRequest" + // "$ref": "GooglePrivacyDlpV2ActivateJobTriggerRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2RedactImageResponse" + // "$ref": "GooglePrivacyDlpV2DlpJob" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19078,46 +21626,43 @@ func (c *ProjectsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePriva } -// method id "dlp.projects.inspectTemplates.create": +// method id "dlp.projects.jobTriggers.create": -type ProjectsInspectTemplatesCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsJobTriggersCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an InspectTemplate for reusing frequently used -// configuration for inspecting content, images, and storage. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Create: 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. // // - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location +// depending on whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *ProjectsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *ProjectsInspectTemplatesCreateCall { - c := &ProjectsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsJobTriggersCreateCall { + c := &ProjectsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest + c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesCreateCall { +func (c *ProjectsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19125,21 +21670,21 @@ func (c *ProjectsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *Proje // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsInspectTemplatesCreateCall { +func (c *ProjectsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsJobTriggersCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsInspectTemplatesCreateCall) Header() http.Header { +func (c *ProjectsJobTriggersCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19147,14 +21692,14 @@ func (c *ProjectsInspectTemplatesCreateCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createinspecttemplaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19167,15 +21712,14 @@ func (c *ProjectsInspectTemplatesCreateCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.inspectTemplates.create" call. -// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// Do executes the "dlp.projects.jobTriggers.create" call. +// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { +// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19194,7 +21738,7 @@ func (c *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectTemplate{ + ret := &GooglePrivacyDlpV2JobTrigger{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19206,28 +21750,28 @@ func (c *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/projects/{projectsId}/inspectTemplates", + // "description": "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.", + // "flatPath": "v2/projects/{projectsId}/jobTriggers", // "httpMethod": "POST", - // "id": "dlp.projects.inspectTemplates.create", + // "id": "dlp.projects.jobTriggers.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/inspectTemplates", + // "path": "v2/{+parent}/jobTriggers", // "request": { - // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" + // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GooglePrivacyDlpV2JobTrigger" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19236,9 +21780,9 @@ func (c *ProjectsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (* } -// method id "dlp.projects.inspectTemplates.delete": +// method id "dlp.projects.jobTriggers.delete": -type ProjectsInspectTemplatesDeleteCall struct { +type ProjectsJobTriggersDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -19246,15 +21790,14 @@ type ProjectsInspectTemplatesDeleteCall struct { header_ http.Header } -// Delete: Deletes an InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Delete: Deletes a job trigger. See +// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// more. // -// - name: Resource name of the organization and inspectTemplate to be -// deleted, for example -// `organizations/433245324/inspectTemplates/432452342` or -// projects/project-id/inspectTemplates/432452342. -func (r *ProjectsInspectTemplatesService) Delete(name string) *ProjectsInspectTemplatesDeleteCall { - c := &ProjectsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the project and the triggeredJob, for +// example `projects/dlp-test-project/jobTriggers/53234423`. +func (r *ProjectsJobTriggersService) Delete(name string) *ProjectsJobTriggersDeleteCall { + c := &ProjectsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -19262,7 +21805,7 @@ func (r *ProjectsInspectTemplatesService) Delete(name string) *ProjectsInspectTe // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesDeleteCall { +func (c *ProjectsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19270,21 +21813,21 @@ func (c *ProjectsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *Proje // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsInspectTemplatesDeleteCall { +func (c *ProjectsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsJobTriggersDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsInspectTemplatesDeleteCall) Header() http.Header { +func (c *ProjectsJobTriggersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19307,14 +21850,14 @@ func (c *ProjectsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.inspectTemplates.delete" call. +// Do executes the "dlp.projects.jobTriggers.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19345,18 +21888,18 @@ func (c *ProjectsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", + // "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", // "httpMethod": "DELETE", - // "id": "dlp.projects.inspectTemplates.delete", + // "id": "dlp.projects.jobTriggers.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the organization and inspectTemplate to be deleted, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", + // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", // "required": true, // "type": "string" // } @@ -19372,9 +21915,9 @@ func (c *ProjectsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (* } -// method id "dlp.projects.inspectTemplates.get": +// method id "dlp.projects.jobTriggers.get": -type ProjectsInspectTemplatesGetCall struct { +type ProjectsJobTriggersGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -19383,15 +21926,14 @@ type ProjectsInspectTemplatesGetCall struct { header_ http.Header } -// Get: Gets an InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Get: Gets a job trigger. See +// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// more. // -// - name: Resource name of the organization and inspectTemplate to be -// read, for example -// `organizations/433245324/inspectTemplates/432452342` or -// projects/project-id/inspectTemplates/432452342. -func (r *ProjectsInspectTemplatesService) Get(name string) *ProjectsInspectTemplatesGetCall { - c := &ProjectsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the project and the triggeredJob, for +// example `projects/dlp-test-project/jobTriggers/53234423`. +func (r *ProjectsJobTriggersService) Get(name string) *ProjectsJobTriggersGetCall { + c := &ProjectsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -19399,7 +21941,7 @@ func (r *ProjectsInspectTemplatesService) Get(name string) *ProjectsInspectTempl // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesGetCall { +func (c *ProjectsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19409,7 +21951,7 @@ func (c *ProjectsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *Projects // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesGetCall { +func (c *ProjectsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersGetCall { c.ifNoneMatch_ = entityTag return c } @@ -19417,21 +21959,21 @@ func (c *ProjectsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *Project // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsInspectTemplatesGetCall { +func (c *ProjectsJobTriggersGetCall) Context(ctx context.Context) *ProjectsJobTriggersGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsInspectTemplatesGetCall) Header() http.Header { +func (c *ProjectsJobTriggersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19457,15 +21999,14 @@ func (c *ProjectsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.inspectTemplates.get" call. -// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be +// Do executes the "dlp.projects.jobTriggers.get" call. +// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { +// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19484,7 +22025,7 @@ func (c *ProjectsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectTemplate{ + ret := &GooglePrivacyDlpV2JobTrigger{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19496,25 +22037,25 @@ func (c *ProjectsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", + // "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", // "httpMethod": "GET", - // "id": "dlp.projects.inspectTemplates.get", + // "id": "dlp.projects.jobTriggers.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", + // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GooglePrivacyDlpV2JobTrigger" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19523,9 +22064,9 @@ func (c *ProjectsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "dlp.projects.inspectTemplates.list": +// method id "dlp.projects.jobTriggers.list": -type ProjectsInspectTemplatesListCall struct { +type ProjectsJobTriggersListCall struct { s *Service parentid string urlParams_ gensupport.URLParams @@ -19534,70 +22075,103 @@ type ProjectsInspectTemplatesListCall struct { header_ http.Header } -// List: Lists InspectTemplates. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// List: Lists job triggers. See +// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// more. // // - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location +// depending on whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *ProjectsInspectTemplatesService) List(parentid string) *ProjectsInspectTemplatesListCall { - c := &ProjectsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsJobTriggersService) List(parentid string) *ProjectsJobTriggersListCall { + c := &ProjectsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid return c } +// Filter sets the optional parameter "filter": Allows filtering. +// Supported syntax: * Filter expressions are made up of one or more +// restrictions. * Restrictions can be combined by `AND` or `OR` logical +// operators. A sequence of restrictions implicitly uses `AND`. * A +// restriction has the form of `{field} {operator} {value}`. * Supported +// fields/values for inspect triggers: - `status` - +// HEALTHY|PAUSED|CANCELLED - `inspected_storage` - +// DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 +// formatted timestamp, surrounded by quotation marks. Nanoseconds are +// ignored. - 'error_count' - Number of errors that have occurred while +// running. * The operator must be `=` or `!=` for status and +// inspected_storage. Examples: * inspected_storage = cloud_storage AND +// status = HEALTHY * inspected_storage = cloud_storage OR +// inspected_storage = bigquery * inspected_storage = cloud_storage AND +// (state = PAUSED OR state = HEALTHY) * last_run_time > +// \"2017-12-12T00:00:00+00:00\" The length of this field should be no +// more than 500 characters. +func (c *ProjectsJobTriggersListCall) Filter(filter string) *ProjectsJobTriggersListCall { + c.urlParams_.Set("filter", filter) + return c +} + // LocationId sets the optional parameter "locationId": Deprecated. This // field has no effect. -func (c *ProjectsInspectTemplatesListCall) LocationId(locationId string) *ProjectsInspectTemplatesListCall { +func (c *ProjectsJobTriggersListCall) LocationId(locationId string) *ProjectsJobTriggersListCall { c.urlParams_.Set("locationId", locationId) return c } // OrderBy sets the optional parameter "orderBy": Comma separated list -// of fields to order by, followed by `asc` or `desc` postfix. This list -// is case-insensitive, default sorting order is ascending, redundant -// space characters are insignificant. Example: `name asc,update_time, -// create_time desc` Supported fields are: - `create_time`: corresponds -// to the time the template was created. - `update_time`: corresponds to -// the time the template was last updated. - `name`: corresponds to the -// template's name. - `display_name`: corresponds to the template's -// display name. -func (c *ProjectsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsInspectTemplatesListCall { +// of triggeredJob fields to order by, followed by `asc` or `desc` +// postfix. This list is case-insensitive, default sorting order is +// ascending, redundant space characters are insignificant. Example: +// `name asc,update_time, create_time desc` Supported fields are: - +// `create_time`: corresponds to the time the JobTrigger was created. - +// `update_time`: corresponds to the time the JobTrigger was last +// updated. - `last_run_time`: corresponds to the last time the +// JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - +// `display_name`: corresponds to the JobTrigger's display name. - +// `status`: corresponds to JobTrigger's status. +func (c *ProjectsJobTriggersListCall) OrderBy(orderBy string) *ProjectsJobTriggersListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by the server. If zero server returns a page of max -// size 100. -func (c *ProjectsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsInspectTemplatesListCall { +// can be limited by a server. +func (c *ProjectsJobTriggersListCall) PageSize(pageSize int64) *ProjectsJobTriggersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from previous call to -// `ListInspectTemplates`. -func (c *ProjectsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsInspectTemplatesListCall { +// continue retrieval. Comes from previous call to ListJobTriggers. +// `order_by` field must not change for subsequent calls. +func (c *ProjectsJobTriggersListCall) PageToken(pageToken string) *ProjectsJobTriggersListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// Type sets the optional parameter "type": The type of jobs. Will use +// `DlpJobType.INSPECT` if not set. +// +// Possible values: +// +// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. +// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. +// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. +func (c *ProjectsJobTriggersListCall) Type(type_ string) *ProjectsJobTriggersListCall { + c.urlParams_.Set("type", type_) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesListCall { +func (c *ProjectsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19607,7 +22181,7 @@ func (c *ProjectsInspectTemplatesListCall) Fields(s ...googleapi.Field) *Project // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsInspectTemplatesListCall { +func (c *ProjectsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersListCall { c.ifNoneMatch_ = entityTag return c } @@ -19615,21 +22189,21 @@ func (c *ProjectsInspectTemplatesListCall) IfNoneMatch(entityTag string) *Projec // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsInspectTemplatesListCall { +func (c *ProjectsJobTriggersListCall) Context(ctx context.Context) *ProjectsJobTriggersListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsInspectTemplatesListCall) Header() http.Header { +func (c *ProjectsJobTriggersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19642,7 +22216,7 @@ func (c *ProjectsInspectTemplatesListCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19655,16 +22229,16 @@ func (c *ProjectsInspectTemplatesListCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.inspectTemplates.list" call. -// Exactly one of *GooglePrivacyDlpV2ListInspectTemplatesResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "dlp.projects.jobTriggers.list" call. +// Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GooglePrivacyDlpV2ListInspectTemplatesResponse.ServerResponse.Header -// or (if a response was returned at all) in +// *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { +func (c *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19683,7 +22257,7 @@ func (c *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ + ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19695,46 +22269,66 @@ func (c *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/projects/{projectsId}/inspectTemplates", + // "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/projects/{projectsId}/jobTriggers", // "httpMethod": "GET", - // "id": "dlp.projects.inspectTemplates.list", + // "id": "dlp.projects.jobTriggers.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect triggers: - `status` - HEALTHY|PAUSED|CANCELLED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by quotation marks. Nanoseconds are ignored. - 'error_count' - Number of errors that have occurred while running. * The operator must be `=` or `!=` for status and inspected_storage. Examples: * inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", + // "location": "query", + // "type": "string" + // }, // "locationId": { // "description": "Deprecated. This field has no effect.", // "location": "query", // "type": "string" // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", + // "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the JobTrigger was created. - `update_time`: corresponds to the time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - `display_name`: corresponds to the JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by a server.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token to continue retrieval. Comes from previous call to `ListInspectTemplates`.", + // "description": "Page token to continue retrieval. Comes from previous call to ListJobTriggers. `order_by` field must not change for subsequent calls.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, // "type": "string" + // }, + // "type": { + // "description": "The type of jobs. Will use `DlpJobType.INSPECT` if not set.", + // "enum": [ + // "DLP_JOB_TYPE_UNSPECIFIED", + // "INSPECT_JOB", + // "RISK_ANALYSIS_JOB" + // ], + // "enumDescriptions": [ + // "Defaults to INSPECT_JOB.", + // "The job inspected Google Cloud for sensitive data.", + // "The job executed a Risk Analysis computation." + // ], + // "location": "query", + // "type": "string" // } // }, - // "path": "v2/{+parent}/inspectTemplates", + // "path": "v2/{+parent}/jobTriggers", // "response": { - // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" + // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19746,7 +22340,7 @@ func (c *ProjectsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*Go // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsInspectTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListInspectTemplatesResponse) error) error { +func (c *ProjectsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -19764,180 +22358,34 @@ func (c *ProjectsInspectTemplatesListCall) Pages(ctx context.Context, f func(*Go } } -// method id "dlp.projects.inspectTemplates.patch": - -type ProjectsInspectTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. -// -// - name: Resource name of organization and inspectTemplate to be -// updated, for example -// `organizations/433245324/inspectTemplates/432452342` or -// projects/project-id/inspectTemplates/432452342. -func (r *ProjectsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsInspectTemplatesPatchCall { - c := &ProjectsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsInspectTemplatesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsInspectTemplatesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updateinspecttemplaterequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dlp.projects.inspectTemplates.patch" call. -// Exactly one of *GooglePrivacyDlpV2InspectTemplate or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GooglePrivacyDlpV2InspectTemplate{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", - // "httpMethod": "PATCH", - // "id": "dlp.projects.inspectTemplates.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. Resource name of organization and inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", - // "location": "path", - // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.jobTriggers.activate": +// method id "dlp.projects.jobTriggers.patch": -type ProjectsJobTriggersActivateCall struct { - s *Service - name string - googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsJobTriggersPatchCall struct { + s *Service + name string + googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Activate: Activate a job trigger. Causes the immediate execute of a -// trigger instead of waiting on the trigger event to occur. +// Patch: Updates a job trigger. See +// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// more. // -// - name: Resource name of the trigger to activate, for example -// `projects/dlp-test-project/jobTriggers/53234423`. -func (r *ProjectsJobTriggersService) Activate(name string, googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest) *ProjectsJobTriggersActivateCall { - c := &ProjectsJobTriggersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the project and the triggeredJob, for +// example `projects/dlp-test-project/jobTriggers/53234423`. +func (r *ProjectsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *ProjectsJobTriggersPatchCall { + c := &ProjectsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleprivacydlpv2activatejobtriggerrequest = googleprivacydlpv2activatejobtriggerrequest + c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsJobTriggersActivateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersActivateCall { +func (c *ProjectsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19945,21 +22393,21 @@ func (c *ProjectsJobTriggersActivateCall) Fields(s ...googleapi.Field) *Projects // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsJobTriggersActivateCall) Context(ctx context.Context) *ProjectsJobTriggersActivateCall { +func (c *ProjectsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsJobTriggersPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsJobTriggersActivateCall) Header() http.Header { +func (c *ProjectsJobTriggersPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsJobTriggersActivateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19967,16 +22415,16 @@ func (c *ProjectsJobTriggersActivateCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2activatejobtriggerrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:activate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -19987,14 +22435,14 @@ func (c *ProjectsJobTriggersActivateCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.jobTriggers.activate" call. -// Exactly one of *GooglePrivacyDlpV2DlpJob or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GooglePrivacyDlpV2DlpJob.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "dlp.projects.jobTriggers.patch" call. +// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { +func (c *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20013,7 +22461,7 @@ func (c *ProjectsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DlpJob{ + ret := &GooglePrivacyDlpV2JobTrigger{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20025,28 +22473,28 @@ func (c *ProjectsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Activate a job trigger. Causes the immediate execute of a trigger instead of waiting on the trigger event to occur.", - // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}:activate", - // "httpMethod": "POST", - // "id": "dlp.projects.jobTriggers.activate", + // "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", + // "httpMethod": "PATCH", + // "id": "dlp.projects.jobTriggers.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the trigger to activate, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", // "location": "path", // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}:activate", + // "path": "v2/{+name}", // "request": { - // "$ref": "GooglePrivacyDlpV2ActivateJobTriggerRequest" + // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2DlpJob" + // "$ref": "GooglePrivacyDlpV2JobTrigger" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20055,21 +22503,24 @@ func (c *ProjectsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "dlp.projects.jobTriggers.create": +// method id "dlp.projects.locations.content.deidentify": -type ProjectsJobTriggersCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsContentDeidentifyCall struct { + s *Service + parentid string + googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: 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. +// Deidentify: De-identifies potentially sensitive info from a +// ContentItem. This method has limits on input size and output size. +// See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to +// learn more. When no InfoTypes or CustomInfoTypes are specified in +// this request, 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. // // - parent: Parent resource name. The format of this value varies // depending on whether you have specified a processing location @@ -20081,17 +22532,17 @@ type ProjectsJobTriggersCreateCall struct { // the identifier `example-project`, and specifies the `europe-west3` // location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *ProjectsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsJobTriggersCreateCall { - c := &ProjectsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsContentService) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsLocationsContentDeidentifyCall { + c := &ProjectsLocationsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest + c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersCreateCall { +func (c *ProjectsLocationsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentDeidentifyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20099,21 +22550,21 @@ func (c *ProjectsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsJo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsJobTriggersCreateCall { +func (c *ProjectsLocationsContentDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsContentDeidentifyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsJobTriggersCreateCall) Header() http.Header { +func (c *ProjectsLocationsContentDeidentifyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20121,14 +22572,14 @@ func (c *ProjectsJobTriggersCreateCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createjobtriggerrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20141,14 +22592,16 @@ func (c *ProjectsJobTriggersCreateCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.jobTriggers.create" call. -// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { +// Do executes the "dlp.projects.locations.content.deidentify" call. +// Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20167,7 +22620,7 @@ func (c *ProjectsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2JobTrigger{ + ret := &GooglePrivacyDlpV2DeidentifyContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20179,28 +22632,28 @@ func (c *ProjectsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*Googl } return ret, nil // { - // "description": "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.", - // "flatPath": "v2/projects/{projectsId}/jobTriggers", + // "description": "De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, 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.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:deidentify", // "httpMethod": "POST", - // "id": "dlp.projects.jobTriggers.create", + // "id": "dlp.projects.locations.content.deidentify", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/jobTriggers", + // "path": "v2/{+parent}/content:deidentify", // "request": { - // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" + // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2JobTrigger" + // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20209,32 +22662,47 @@ func (c *ProjectsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*Googl } -// method id "dlp.projects.jobTriggers.delete": +// method id "dlp.projects.locations.content.inspect": -type ProjectsJobTriggersDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsContentInspectCall struct { + s *Service + parentid string + googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a job trigger. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn -// more. +// Inspect: Finds potentially sensitive info in content. This method has +// limits on input size, processing time, and output size. When no +// InfoTypes or CustomInfoTypes are specified in this request, 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. For how to guides, see +// https://cloud.google.com/dlp/docs/inspecting-images and +// https://cloud.google.com/dlp/docs/inspecting-text, // -// - name: Resource name of the project and the triggeredJob, for -// example `projects/dlp-test-project/jobTriggers/53234423`. -func (r *ProjectsJobTriggersService) Delete(name string) *ProjectsJobTriggersDeleteCall { - c := &ProjectsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Parent resource name. The format of this value varies +// depending on whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *ProjectsLocationsContentService) Inspect(parentid string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsLocationsContentInspectCall { + c := &ProjectsLocationsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersDeleteCall { +func (c *ProjectsLocationsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentInspectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20242,21 +22710,21 @@ func (c *ProjectsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsJo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsJobTriggersDeleteCall { +func (c *ProjectsLocationsContentInspectCall) Context(ctx context.Context) *ProjectsLocationsContentInspectCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsJobTriggersDeleteCall) Header() http.Header { +func (c *ProjectsLocationsContentInspectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsContentInspectCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20264,29 +22732,36 @@ func (c *ProjectsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, e } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:inspect") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parentid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.jobTriggers.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "dlp.projects.locations.content.inspect" call. +// Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20305,7 +22780,7 @@ func (c *ProjectsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*Googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2InspectContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20317,25 +22792,28 @@ func (c *ProjectsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*Googl } return ret, nil // { - // "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", - // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", - // "httpMethod": "DELETE", - // "id": "dlp.projects.jobTriggers.delete", + // "description": "Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size. When no InfoTypes or CustomInfoTypes are specified in this request, 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. For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and https://cloud.google.com/dlp/docs/inspecting-text,", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:inspect", + // "httpMethod": "POST", + // "id": "dlp.projects.locations.content.inspect", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "parent": { + // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/content:inspect", + // "request": { + // "$ref": "GooglePrivacyDlpV2InspectContentRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2InspectContentResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20344,98 +22822,101 @@ func (c *ProjectsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*Googl } -// method id "dlp.projects.jobTriggers.get": +// method id "dlp.projects.locations.content.reidentify": -type ProjectsJobTriggersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsContentReidentifyCall struct { + s *Service + parentid string + googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a job trigger. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn -// more. +// Reidentify: Re-identifies content that has been de-identified. See +// https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example +// to learn more. // -// - name: Resource name of the project and the triggeredJob, for -// example `projects/dlp-test-project/jobTriggers/53234423`. -func (r *ProjectsJobTriggersService) Get(name string) *ProjectsJobTriggersGetCall { - c := &ProjectsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Parent resource name. The format of this value varies +// depending on whether you have specified a processing location +// (https://cloud.google.com/dlp/docs/specifying-location): + Projects +// scope, location specified: +// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no +// location specified (defaults to global): `projects/`PROJECT_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: +// parent=projects/example-project/locations/europe-west3. +func (r *ProjectsLocationsContentService) Reidentify(parentid string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsLocationsContentReidentifyCall { + c := &ProjectsLocationsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersGetCall { +func (c *ProjectsLocationsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentReidentifyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsJobTriggersGetCall) Context(ctx context.Context) *ProjectsJobTriggersGetCall { +func (c *ProjectsLocationsContentReidentifyCall) Context(ctx context.Context) *ProjectsLocationsContentReidentifyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsJobTriggersGetCall) Header() http.Header { +func (c *ProjectsLocationsContentReidentifyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsContentReidentifyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:reidentify") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parentid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.jobTriggers.get" call. -// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { +// Do executes the "dlp.projects.locations.content.reidentify" call. +// Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20454,7 +22935,7 @@ func (c *ProjectsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePr if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2JobTrigger{ + ret := &GooglePrivacyDlpV2ReidentifyContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20466,25 +22947,28 @@ func (c *ProjectsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePr } return ret, nil // { - // "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", - // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", - // "httpMethod": "GET", - // "id": "dlp.projects.jobTriggers.get", + // "description": "Re-identifies content that has been de-identified. See https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:reidentify", + // "httpMethod": "POST", + // "id": "dlp.projects.locations.content.reidentify", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "parent": { + // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/content:reidentify", + // "request": { + // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest" + // }, // "response": { - // "$ref": "GooglePrivacyDlpV2JobTrigger" + // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20493,161 +22977,86 @@ func (c *ProjectsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePr } -// method id "dlp.projects.jobTriggers.list": +// method id "dlp.projects.locations.deidentifyTemplates.create": -type ProjectsJobTriggersListCall struct { - s *Service - parentid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDeidentifyTemplatesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists job triggers. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// Create: Creates a DeidentifyTemplate for reusing frequently used +// configuration for de-identifying content, images, and storage. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. // // - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *ProjectsJobTriggersService) List(parentid string) *ProjectsJobTriggersListCall { - c := &ProjectsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsLocationsDeidentifyTemplatesCreateCall { + c := &ProjectsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - return c -} - -// Filter sets the optional parameter "filter": Allows filtering. -// Supported syntax: * Filter expressions are made up of one or more -// restrictions. * Restrictions can be combined by `AND` or `OR` logical -// operators. A sequence of restrictions implicitly uses `AND`. * A -// restriction has the form of `{field} {operator} {value}`. * Supported -// fields/values for inspect triggers: - `status` - -// HEALTHY|PAUSED|CANCELLED - `inspected_storage` - -// DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 -// formatted timestamp, surrounded by quotation marks. Nanoseconds are -// ignored. - 'error_count' - Number of errors that have occurred while -// running. * The operator must be `=` or `!=` for status and -// inspected_storage. Examples: * inspected_storage = cloud_storage AND -// status = HEALTHY * inspected_storage = cloud_storage OR -// inspected_storage = bigquery * inspected_storage = cloud_storage AND -// (state = PAUSED OR state = HEALTHY) * last_run_time > -// \"2017-12-12T00:00:00+00:00\" The length of this field should be no -// more than 500 characters. -func (c *ProjectsJobTriggersListCall) Filter(filter string) *ProjectsJobTriggersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// LocationId sets the optional parameter "locationId": Deprecated. This -// field has no effect. -func (c *ProjectsJobTriggersListCall) LocationId(locationId string) *ProjectsJobTriggersListCall { - c.urlParams_.Set("locationId", locationId) - return c -} - -// OrderBy sets the optional parameter "orderBy": Comma separated list -// of triggeredJob fields to order by, followed by `asc` or `desc` -// postfix. This list is case-insensitive, default sorting order is -// ascending, redundant space characters are insignificant. Example: -// `name asc,update_time, create_time desc` Supported fields are: - -// `create_time`: corresponds to the time the JobTrigger was created. - -// `update_time`: corresponds to the time the JobTrigger was last -// updated. - `last_run_time`: corresponds to the last time the -// JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - -// `display_name`: corresponds to the JobTrigger's display name. - -// `status`: corresponds to JobTrigger's status. -func (c *ProjectsJobTriggersListCall) OrderBy(orderBy string) *ProjectsJobTriggersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by a server. -func (c *ProjectsJobTriggersListCall) PageSize(pageSize int64) *ProjectsJobTriggersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from previous call to ListJobTriggers. -// `order_by` field must not change for subsequent calls. -func (c *ProjectsJobTriggersListCall) PageToken(pageToken string) *ProjectsJobTriggersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Type sets the optional parameter "type": The type of jobs. Will use -// `DlpJobType.INSPECT` if not set. -// -// Possible values: -// -// "DLP_JOB_TYPE_UNSPECIFIED" - Defaults to INSPECT_JOB. -// "INSPECT_JOB" - The job inspected Google Cloud for sensitive data. -// "RISK_ANALYSIS_JOB" - The job executed a Risk Analysis computation. -func (c *ProjectsJobTriggersListCall) Type(type_ string) *ProjectsJobTriggersListCall { - c.urlParams_.Set("type", type_) + c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersListCall { +func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsJobTriggersListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsJobTriggersListCall) Context(ctx context.Context) *ProjectsJobTriggersListCall { +func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsJobTriggersListCall) Header() http.Header { +func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -20658,16 +23067,15 @@ func (c *ProjectsJobTriggersListCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.jobTriggers.list" call. -// Exactly one of *GooglePrivacyDlpV2ListJobTriggersResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2ListJobTriggersResponse.ServerResponse.Header or +// Do executes the "dlp.projects.locations.deidentifyTemplates.create" call. +// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { +func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20686,7 +23094,7 @@ func (c *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GoogleP if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ + ret := &GooglePrivacyDlpV2DeidentifyTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20698,66 +23106,28 @@ func (c *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GoogleP } return ret, nil // { - // "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", - // "flatPath": "v2/projects/{projectsId}/jobTriggers", - // "httpMethod": "GET", - // "id": "dlp.projects.jobTriggers.list", + // "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", + // "httpMethod": "POST", + // "id": "dlp.projects.locations.deidentifyTemplates.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values for inspect triggers: - `status` - HEALTHY|PAUSED|CANCELLED - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by quotation marks. Nanoseconds are ignored. - 'error_count' - Number of errors that have occurred while running. * The operator must be `=` or `!=` for status and inspected_storage. Examples: * inspected_storage = cloud_storage AND status = HEALTHY * inspected_storage = cloud_storage OR inspected_storage = bigquery * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) * last_run_time \u003e \\\"2017-12-12T00:00:00+00:00\\\" The length of this field should be no more than 500 characters.", - // "location": "query", - // "type": "string" - // }, - // "locationId": { - // "description": "Deprecated. This field has no effect.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Comma separated list of triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the JobTrigger was created. - `update_time`: corresponds to the time the JobTrigger was last updated. - `last_run_time`: corresponds to the last time the JobTrigger ran. - `name`: corresponds to the JobTrigger's name. - `display_name`: corresponds to the JobTrigger's display name. - `status`: corresponds to JobTrigger's status.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Size of the page, can be limited by a server.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token to continue retrieval. Comes from previous call to ListJobTriggers. `order_by` field must not change for subsequent calls.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" - // }, - // "type": { - // "description": "The type of jobs. Will use `DlpJobType.INSPECT` if not set.", - // "enum": [ - // "DLP_JOB_TYPE_UNSPECIFIED", - // "INSPECT_JOB", - // "RISK_ANALYSIS_JOB" - // ], - // "enumDescriptions": [ - // "Defaults to INSPECT_JOB.", - // "The job inspected Google Cloud for sensitive data.", - // "The job executed a Risk Analysis computation." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v2/{+parent}/jobTriggers", + // "path": "v2/{+parent}/deidentifyTemplates", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" + // }, // "response": { - // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" + // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20766,55 +23136,34 @@ func (c *ProjectsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GoogleP } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsJobTriggersListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListJobTriggersResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "dlp.projects.jobTriggers.patch": +// method id "dlp.projects.locations.deidentifyTemplates.delete": -type ProjectsJobTriggersPatchCall struct { - s *Service - name string - googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDeidentifyTemplatesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a job trigger. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn +// Delete: Deletes a DeidentifyTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn // more. // -// - name: Resource name of the project and the triggeredJob, for -// example `projects/dlp-test-project/jobTriggers/53234423`. -func (r *ProjectsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *ProjectsJobTriggersPatchCall { - c := &ProjectsJobTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the organization and deidentify template to +// be deleted, for example +// `organizations/433245324/deidentifyTemplates/432452342` or +// projects/project-id/deidentifyTemplates/432452342. +func (r *ProjectsLocationsDeidentifyTemplatesService) Delete(name string) *ProjectsLocationsDeidentifyTemplatesDeleteCall { + c := &ProjectsLocationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleprivacydlpv2updatejobtriggerrequest = googleprivacydlpv2updatejobtriggerrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersPatchCall { +func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20822,21 +23171,21 @@ func (c *ProjectsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsJob // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsJobTriggersPatchCall { +func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsJobTriggersPatchCall) Header() http.Header { +func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20844,16 +23193,11 @@ func (c *ProjectsJobTriggersPatchCall) doRequest(alt string) (*http.Response, er } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatejobtriggerrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -20864,14 +23208,14 @@ func (c *ProjectsJobTriggersPatchCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.jobTriggers.patch" call. -// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2JobTrigger.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "dlp.projects.locations.deidentifyTemplates.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { +func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20890,7 +23234,7 @@ func (c *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*Google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2JobTrigger{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20902,28 +23246,25 @@ func (c *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*Google } return ret, nil // { - // "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", - // "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", - // "httpMethod": "PATCH", - // "id": "dlp.projects.jobTriggers.patch", + // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "httpMethod": "DELETE", + // "id": "dlp.projects.locations.deidentifyTemplates.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "description": "Required. Resource name of the organization and deidentify template to be deleted, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", // "location": "path", - // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" - // }, // "response": { - // "$ref": "GooglePrivacyDlpV2JobTrigger" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20932,105 +23273,101 @@ func (c *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*Google } -// method id "dlp.projects.locations.content.deidentify": +// method id "dlp.projects.locations.deidentifyTemplates.get": -type ProjectsLocationsContentDeidentifyCall struct { - s *Service - parentid string - googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDeidentifyTemplatesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Deidentify: De-identifies potentially sensitive info from a -// ContentItem. This method has limits on input size and output size. -// See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to -// learn more. When no InfoTypes or CustomInfoTypes are specified in -// this request, 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. +// Get: Gets a DeidentifyTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// more. // -// - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: -// parent=projects/example-project/locations/europe-west3. -func (r *ProjectsLocationsContentService) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsLocationsContentDeidentifyCall { - c := &ProjectsLocationsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - c.googleprivacydlpv2deidentifycontentrequest = googleprivacydlpv2deidentifycontentrequest +// - name: Resource name of the organization and deidentify template to +// be read, for example +// `organizations/433245324/deidentifyTemplates/432452342` or +// projects/project-id/deidentifyTemplates/432452342. +func (r *ProjectsLocationsDeidentifyTemplatesService) Get(name string) *ProjectsLocationsDeidentifyTemplatesGetCall { + c := &ProjectsLocationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentDeidentifyCall { +func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeidentifyTemplatesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsContentDeidentifyCall) Context(ctx context.Context) *ProjectsLocationsContentDeidentifyCall { +func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsContentDeidentifyCall) Header() http.Header { +func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsContentDeidentifyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2deidentifycontentrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parentid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.content.deidentify" call. -// Exactly one of *GooglePrivacyDlpV2DeidentifyContentResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2DeidentifyContentResponse.ServerResponse.Header or +// Do executes the "dlp.projects.locations.deidentifyTemplates.get" call. +// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsContentDeidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyContentResponse, error) { +func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21049,7 +23386,7 @@ func (c *ProjectsLocationsContentDeidentifyCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DeidentifyContentResponse{ + ret := &GooglePrivacyDlpV2DeidentifyTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21061,28 +23398,25 @@ func (c *ProjectsLocationsContentDeidentifyCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn more. When no InfoTypes or CustomInfoTypes are specified in this request, 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.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:deidentify", - // "httpMethod": "POST", - // "id": "dlp.projects.locations.content.deidentify", + // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.deidentifyTemplates.get", // "parameterOrder": [ - // "parent" + // "name" // ], - // "parameters": { - // "parent": { - // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "parameters": { + // "name": { + // "description": "Required. Resource name of the organization and deidentify template to be read, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/content:deidentify", - // "request": { - // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" - // }, + // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" + // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21091,86 +23425,129 @@ func (c *ProjectsLocationsContentDeidentifyCall) Do(opts ...googleapi.CallOption } -// method id "dlp.projects.locations.content.inspect": +// method id "dlp.projects.locations.deidentifyTemplates.list": -type ProjectsLocationsContentInspectCall struct { - s *Service - parentid string - googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDeidentifyTemplatesListCall struct { + s *Service + parentid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Inspect: Finds potentially sensitive info in content. This method has -// limits on input size, processing time, and output size. When no -// InfoTypes or CustomInfoTypes are specified in this request, 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. For how to guides, see -// https://cloud.google.com/dlp/docs/inspecting-images and -// https://cloud.google.com/dlp/docs/inspecting-text, +// List: Lists DeidentifyTemplates. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// more. // // - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location // (https://cloud.google.com/dlp/docs/specifying-location): + Projects // scope, location specified: // `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: +// location specified (defaults to global): `projects/`PROJECT_ID + +// Organizations scope, location specified: +// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations +// scope, no location specified (defaults to global): +// `organizations/`ORG_ID The following example `parent` string +// specifies a parent project with the identifier `example-project`, +// and specifies the `europe-west3` location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *ProjectsLocationsContentService) Inspect(parentid string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsLocationsContentInspectCall { - c := &ProjectsLocationsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDeidentifyTemplatesService) List(parentid string) *ProjectsLocationsDeidentifyTemplatesListCall { + c := &ProjectsLocationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2inspectcontentrequest = googleprivacydlpv2inspectcontentrequest + return c +} + +// LocationId sets the optional parameter "locationId": Deprecated. This +// field has no effect. +func (c *ProjectsLocationsDeidentifyTemplatesListCall) LocationId(locationId string) *ProjectsLocationsDeidentifyTemplatesListCall { + c.urlParams_.Set("locationId", locationId) + return c +} + +// OrderBy sets the optional parameter "orderBy": Comma separated list +// of fields to order by, followed by `asc` or `desc` postfix. This list +// is case-insensitive, default sorting order is ascending, redundant +// space characters are insignificant. Example: `name asc,update_time, +// create_time desc` Supported fields are: - `create_time`: corresponds +// to the time the template was created. - `update_time`: corresponds to +// the time the template was last updated. - `name`: corresponds to the +// template's name. - `display_name`: corresponds to the template's +// display name. +func (c *ProjectsLocationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsDeidentifyTemplatesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Size of the page, +// can be limited by the server. If zero server returns a page of max +// size 100. +func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsDeidentifyTemplatesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. Comes from previous call to +// `ListDeidentifyTemplates`. +func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsDeidentifyTemplatesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsContentInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentInspectCall { +func (c *ProjectsLocationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeidentifyTemplatesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsContentInspectCall) Context(ctx context.Context) *ProjectsLocationsContentInspectCall { +func (c *ProjectsLocationsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsContentInspectCall) Header() http.Header { +func (c *ProjectsLocationsDeidentifyTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsContentInspectCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2inspectcontentrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:inspect") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -21181,16 +23558,16 @@ func (c *ProjectsLocationsContentInspectCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.content.inspect" call. -// Exactly one of *GooglePrivacyDlpV2InspectContentResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "dlp.projects.locations.deidentifyTemplates.list" call. +// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GooglePrivacyDlpV2InspectContentResponse.ServerResponse.Header or -// (if a response was returned at all) in +// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head +// er or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsContentInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectContentResponse, error) { +func (c *ProjectsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21209,7 +23586,7 @@ func (c *ProjectsLocationsContentInspectCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectContentResponse{ + ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21221,28 +23598,46 @@ func (c *ProjectsLocationsContentInspectCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Finds potentially sensitive info in content. This method has limits on input size, processing time, and output size. When no InfoTypes or CustomInfoTypes are specified in this request, 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. For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and https://cloud.google.com/dlp/docs/inspecting-text,", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:inspect", - // "httpMethod": "POST", - // "id": "dlp.projects.locations.content.inspect", + // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.deidentifyTemplates.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "locationId": { + // "description": "Deprecated. This field has no effect.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/content:inspect", - // "request": { - // "$ref": "GooglePrivacyDlpV2InspectContentRequest" - // }, + // "path": "v2/{+parent}/deidentifyTemplates", // "response": { - // "$ref": "GooglePrivacyDlpV2InspectContentResponse" + // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21251,42 +23646,57 @@ func (c *ProjectsLocationsContentInspectCall) Do(opts ...googleapi.CallOption) ( } -// method id "dlp.projects.locations.content.reidentify": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsContentReidentifyCall struct { - s *Service - parentid string - googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "dlp.projects.locations.deidentifyTemplates.patch": + +type ProjectsLocationsDeidentifyTemplatesPatchCall struct { + s *Service + name string + googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Reidentify: Re-identifies content that has been de-identified. See -// https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example -// to learn more. +// Patch: Updates the DeidentifyTemplate. See +// https://cloud.google.com/dlp/docs/creating-templates-deid to learn +// more. // -// - parent: Parent resource name. The format of this value varies -// depending on whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID The -// following example `parent` string specifies a parent project with -// the identifier `example-project`, and specifies the `europe-west3` -// location for processing data: -// parent=projects/example-project/locations/europe-west3. -func (r *ProjectsLocationsContentService) Reidentify(parentid string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsLocationsContentReidentifyCall { - c := &ProjectsLocationsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - c.googleprivacydlpv2reidentifycontentrequest = googleprivacydlpv2reidentifycontentrequest +// - name: Resource name of organization and deidentify template to be +// updated, for example +// `organizations/433245324/deidentifyTemplates/432452342` or +// projects/project-id/deidentifyTemplates/432452342. +func (r *ProjectsLocationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *ProjectsLocationsDeidentifyTemplatesPatchCall { + c := &ProjectsLocationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsContentReidentifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsContentReidentifyCall { +func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21294,21 +23704,21 @@ func (c *ProjectsLocationsContentReidentifyCall) Fields(s ...googleapi.Field) *P // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsContentReidentifyCall) Context(ctx context.Context) *ProjectsLocationsContentReidentifyCall { +func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsContentReidentifyCall) Header() http.Header { +func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsContentReidentifyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21316,36 +23726,35 @@ func (c *ProjectsLocationsContentReidentifyCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2reidentifycontentrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:reidentify") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parentid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.content.reidentify" call. -// Exactly one of *GooglePrivacyDlpV2ReidentifyContentResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GooglePrivacyDlpV2ReidentifyContentResponse.ServerResponse.Header or +// Do executes the "dlp.projects.locations.deidentifyTemplates.patch" call. +// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsContentReidentifyCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ReidentifyContentResponse, error) { +func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21364,7 +23773,7 @@ func (c *ProjectsLocationsContentReidentifyCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ReidentifyContentResponse{ + ret := &GooglePrivacyDlpV2DeidentifyTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21376,28 +23785,28 @@ func (c *ProjectsLocationsContentReidentifyCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Re-identifies content that has been de-identified. See https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:reidentify", - // "httpMethod": "POST", - // "id": "dlp.projects.locations.content.reidentify", + // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "httpMethod": "PATCH", + // "id": "dlp.projects.locations.deidentifyTemplates.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "name": { + // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/content:reidentify", + // "path": "v2/{+name}", // "request": { - // "$ref": "GooglePrivacyDlpV2ReidentifyContentRequest" + // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2ReidentifyContentResponse" + // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21406,47 +23815,36 @@ func (c *ProjectsLocationsContentReidentifyCall) Do(opts ...googleapi.CallOption } -// method id "dlp.projects.locations.deidentifyTemplates.create": +// method id "dlp.projects.locations.discoveryConfigs.create": -type ProjectsLocationsDeidentifyTemplatesCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDiscoveryConfigsCreateCall struct { + s *Service + parentid string + googleprivacydlpv2creatediscoveryconfigrequest *GooglePrivacyDlpV2CreateDiscoveryConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a DeidentifyTemplate for reusing frequently used -// configuration for de-identifying content, images, and storage. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// Create: Creates a config for Discovery to scan and profile storage. // -// - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: +// - parent: Parent resource name. The format of this value is as +// follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *ProjectsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsLocationsDeidentifyTemplatesCreateCall { - c := &ProjectsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDiscoveryConfigsService) Create(parentid string, googleprivacydlpv2creatediscoveryconfigrequest *GooglePrivacyDlpV2CreateDiscoveryConfigRequest) *ProjectsLocationsDiscoveryConfigsCreateCall { + c := &ProjectsLocationsDiscoveryConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest + c.googleprivacydlpv2creatediscoveryconfigrequest = googleprivacydlpv2creatediscoveryconfigrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesCreateCall { +func (c *ProjectsLocationsDiscoveryConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveryConfigsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21454,21 +23852,21 @@ func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesCreateCall { +func (c *ProjectsLocationsDiscoveryConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsDiscoveryConfigsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Header() http.Header { +func (c *ProjectsLocationsDiscoveryConfigsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDiscoveryConfigsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21476,14 +23874,14 @@ func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) doRequest(alt string) ( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2createdeidentifytemplaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2creatediscoveryconfigrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/discoveryConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21496,15 +23894,15 @@ func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.deidentifyTemplates.create" call. -// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be +// Do executes the "dlp.projects.locations.discoveryConfigs.create" call. +// Exactly one of *GooglePrivacyDlpV2DiscoveryConfig or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or +// either *GooglePrivacyDlpV2DiscoveryConfig.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { +func (c *ProjectsLocationsDiscoveryConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DiscoveryConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21523,7 +23921,7 @@ func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ret := &GooglePrivacyDlpV2DiscoveryConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21535,28 +23933,28 @@ func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", + // "description": "Creates a config for Discovery to scan and profile storage.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs", // "httpMethod": "POST", - // "id": "dlp.projects.locations.deidentifyTemplates.create", + // "id": "dlp.projects.locations.discoveryConfigs.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value is as follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/deidentifyTemplates", + // "path": "v2/{+parent}/discoveryConfigs", // "request": { - // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" + // "$ref": "GooglePrivacyDlpV2CreateDiscoveryConfigRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21565,9 +23963,9 @@ func (c *ProjectsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.Ca } -// method id "dlp.projects.locations.deidentifyTemplates.delete": +// method id "dlp.projects.locations.discoveryConfigs.delete": -type ProjectsLocationsDeidentifyTemplatesDeleteCall struct { +type ProjectsLocationsDiscoveryConfigsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21575,16 +23973,12 @@ type ProjectsLocationsDeidentifyTemplatesDeleteCall struct { header_ http.Header } -// Delete: Deletes a DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// Delete: Deletes a Discovery configuration. // -// - name: Resource name of the organization and deidentify template to -// be deleted, for example -// `organizations/433245324/deidentifyTemplates/432452342` or -// projects/project-id/deidentifyTemplates/432452342. -func (r *ProjectsLocationsDeidentifyTemplatesService) Delete(name string) *ProjectsLocationsDeidentifyTemplatesDeleteCall { - c := &ProjectsLocationsDeidentifyTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the project and the config, for example +// `projects/dlp-test-project/discoveryConfigs/53234423`. +func (r *ProjectsLocationsDiscoveryConfigsService) Delete(name string) *ProjectsLocationsDiscoveryConfigsDeleteCall { + c := &ProjectsLocationsDiscoveryConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21592,7 +23986,7 @@ func (r *ProjectsLocationsDeidentifyTemplatesService) Delete(name string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesDeleteCall { +func (c *ProjectsLocationsDiscoveryConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveryConfigsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21600,21 +23994,21 @@ func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.F // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesDeleteCall { +func (c *ProjectsLocationsDiscoveryConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDiscoveryConfigsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDiscoveryConfigsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDiscoveryConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21637,14 +24031,14 @@ func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.deidentifyTemplates.delete" call. +// Do executes the "dlp.projects.locations.discoveryConfigs.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDiscoveryConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21675,18 +24069,18 @@ func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "description": "Deletes a Discovery configuration.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", // "httpMethod": "DELETE", - // "id": "dlp.projects.locations.deidentifyTemplates.delete", + // "id": "dlp.projects.locations.discoveryConfigs.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the organization and deidentify template to be deleted, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", + // "description": "Required. Resource name of the project and the config, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", // "required": true, // "type": "string" // } @@ -21702,9 +24096,9 @@ func (c *ProjectsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googleapi.Ca } -// method id "dlp.projects.locations.deidentifyTemplates.get": +// method id "dlp.projects.locations.discoveryConfigs.get": -type ProjectsLocationsDeidentifyTemplatesGetCall struct { +type ProjectsLocationsDiscoveryConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21713,16 +24107,12 @@ type ProjectsLocationsDeidentifyTemplatesGetCall struct { header_ http.Header } -// Get: Gets a DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// Get: Gets a Discovery configuration. // -// - name: Resource name of the organization and deidentify template to -// be read, for example -// `organizations/433245324/deidentifyTemplates/432452342` or -// projects/project-id/deidentifyTemplates/432452342. -func (r *ProjectsLocationsDeidentifyTemplatesService) Get(name string) *ProjectsLocationsDeidentifyTemplatesGetCall { - c := &ProjectsLocationsDeidentifyTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the project and the configuration, for +// example `projects/dlp-test-project/discoveryConfigs/53234423`. +func (r *ProjectsLocationsDiscoveryConfigsService) Get(name string) *ProjectsLocationsDiscoveryConfigsGetCall { + c := &ProjectsLocationsDiscoveryConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21730,7 +24120,7 @@ func (r *ProjectsLocationsDeidentifyTemplatesService) Get(name string) *Projects // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesGetCall { +func (c *ProjectsLocationsDiscoveryConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveryConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21740,7 +24130,7 @@ func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Fiel // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeidentifyTemplatesGetCall { +func (c *ProjectsLocationsDiscoveryConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveryConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -21748,21 +24138,21 @@ func (c *ProjectsLocationsDeidentifyTemplatesGetCall) IfNoneMatch(entityTag stri // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesGetCall { +func (c *ProjectsLocationsDiscoveryConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveryConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Header() http.Header { +func (c *ProjectsLocationsDiscoveryConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDiscoveryConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21788,15 +24178,15 @@ func (c *ProjectsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.deidentifyTemplates.get" call. -// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be +// Do executes the "dlp.projects.locations.discoveryConfigs.get" call. +// Exactly one of *GooglePrivacyDlpV2DiscoveryConfig or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or +// either *GooglePrivacyDlpV2DiscoveryConfig.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { +func (c *ProjectsLocationsDiscoveryConfigsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DiscoveryConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21815,7 +24205,7 @@ func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ret := &GooglePrivacyDlpV2DiscoveryConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21827,25 +24217,25 @@ func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "description": "Gets a Discovery configuration.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", // "httpMethod": "GET", - // "id": "dlp.projects.locations.deidentifyTemplates.get", + // "id": "dlp.projects.locations.discoveryConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the organization and deidentify template to be read, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", + // "description": "Required. Resource name of the project and the configuration, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21854,9 +24244,9 @@ func (c *ProjectsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallO } -// method id "dlp.projects.locations.deidentifyTemplates.list": +// method id "dlp.projects.locations.discoveryConfigs.list": -type ProjectsLocationsDeidentifyTemplatesListCall struct { +type ProjectsLocationsDiscoveryConfigsListCall struct { s *Service parentid string urlParams_ gensupport.URLParams @@ -21865,63 +24255,44 @@ type ProjectsLocationsDeidentifyTemplatesListCall struct { header_ http.Header } -// List: Lists DeidentifyTemplates. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// List: Lists Discovery configurations. // -// - parent: Parent resource name. The format of this value varies -// depending on the scope of the request (project or organization) and -// whether you have specified a processing location -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no -// location specified (defaults to global): `projects/`PROJECT_ID + -// Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations -// scope, no location specified (defaults to global): -// `organizations/`ORG_ID The following example `parent` string -// specifies a parent project with the identifier `example-project`, -// and specifies the `europe-west3` location for processing data: +// - parent: Parent resource name. The format of this value is as +// follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The +// following example `parent` string specifies a parent project with +// the identifier `example-project`, and specifies the `europe-west3` +// location for processing data: // parent=projects/example-project/locations/europe-west3. -func (r *ProjectsLocationsDeidentifyTemplatesService) List(parentid string) *ProjectsLocationsDeidentifyTemplatesListCall { - c := &ProjectsLocationsDeidentifyTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDiscoveryConfigsService) List(parentid string) *ProjectsLocationsDiscoveryConfigsListCall { + c := &ProjectsLocationsDiscoveryConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid return c } -// LocationId sets the optional parameter "locationId": Deprecated. This -// field has no effect. -func (c *ProjectsLocationsDeidentifyTemplatesListCall) LocationId(locationId string) *ProjectsLocationsDeidentifyTemplatesListCall { - c.urlParams_.Set("locationId", locationId) - return c -} - // OrderBy sets the optional parameter "orderBy": Comma separated list -// of fields to order by, followed by `asc` or `desc` postfix. This list -// is case-insensitive, default sorting order is ascending, redundant -// space characters are insignificant. Example: `name asc,update_time, -// create_time desc` Supported fields are: - `create_time`: corresponds -// to the time the template was created. - `update_time`: corresponds to -// the time the template was last updated. - `name`: corresponds to the -// template's name. - `display_name`: corresponds to the template's -// display name. -func (c *ProjectsLocationsDeidentifyTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsDeidentifyTemplatesListCall { +// of config fields to order by, followed by `asc` or `desc` postfix. +// This list is case-insensitive, default sorting order is ascending, +// redundant space characters are insignificant. Example: `name +// asc,update_time, create_time desc` Supported fields are: - +// `last_run_time`: corresponds to the last time the DiscoveryConfig +// ran. - `name`: corresponds to the DiscoveryConfig's name. - `status`: +// corresponds to DiscoveryConfig's status. +func (c *ProjectsLocationsDiscoveryConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsDiscoveryConfigsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page, -// can be limited by the server. If zero server returns a page of max -// size 100. -func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsDeidentifyTemplatesListCall { +// can be limited by a server. +func (c *ProjectsLocationsDiscoveryConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsDiscoveryConfigsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from previous call to -// `ListDeidentifyTemplates`. -func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsDeidentifyTemplatesListCall { +// continue retrieval. Comes from previous call to ListDiscoveryConfigs. +// `order_by` field must not change for subsequent calls. +func (c *ProjectsLocationsDiscoveryConfigsListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveryConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -21929,7 +24300,7 @@ func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageToken(pageToken strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesListCall { +func (c *ProjectsLocationsDiscoveryConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveryConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21939,7 +24310,7 @@ func (c *ProjectsLocationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Fie // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeidentifyTemplatesListCall { +func (c *ProjectsLocationsDiscoveryConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveryConfigsListCall { c.ifNoneMatch_ = entityTag return c } @@ -21947,21 +24318,21 @@ func (c *ProjectsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag str // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDeidentifyTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesListCall { +func (c *ProjectsLocationsDiscoveryConfigsListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveryConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDeidentifyTemplatesListCall) Header() http.Header { +func (c *ProjectsLocationsDiscoveryConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeidentifyTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDiscoveryConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21974,7 +24345,7 @@ func (c *ProjectsLocationsDeidentifyTemplatesListCall) doRequest(alt string) (*h var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/deidentifyTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/discoveryConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21987,16 +24358,16 @@ func (c *ProjectsLocationsDeidentifyTemplatesListCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.deidentifyTemplates.list" call. -// Exactly one of *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse or +// Do executes the "dlp.projects.locations.discoveryConfigs.list" call. +// Exactly one of *GooglePrivacyDlpV2ListDiscoveryConfigsResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GooglePrivacyDlpV2ListDeidentifyTemplatesResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// *GooglePrivacyDlpV2ListDiscoveryConfigsResponse.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse, error) { +func (c *ProjectsLocationsDiscoveryConfigsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDiscoveryConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22015,7 +24386,7 @@ func (c *ProjectsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ + ret := &GooglePrivacyDlpV2ListDiscoveryConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22027,46 +24398,41 @@ func (c *ProjectsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", + // "description": "Lists Discovery configurations.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs", // "httpMethod": "GET", - // "id": "dlp.projects.locations.deidentifyTemplates.list", + // "id": "dlp.projects.locations.discoveryConfigs.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "locationId": { - // "description": "Deprecated. This field has no effect.", - // "location": "query", - // "type": "string" - // }, // "orderBy": { - // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `create_time`: corresponds to the time the template was created. - `update_time`: corresponds to the time the template was last updated. - `name`: corresponds to the template's name. - `display_name`: corresponds to the template's display name.", + // "description": "Comma separated list of config fields to order by, followed by `asc` or `desc` postfix. This list is case-insensitive, default sorting order is ascending, redundant space characters are insignificant. Example: `name asc,update_time, create_time desc` Supported fields are: - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. - `name`: corresponds to the DiscoveryConfig's name. - `status`: corresponds to DiscoveryConfig's status.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page, can be limited by the server. If zero server returns a page of max size 100.", + // "description": "Size of the page, can be limited by a server.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token to continue retrieval. Comes from previous call to `ListDeidentifyTemplates`.", + // "description": "Page token to continue retrieval. Comes from previous call to ListDiscoveryConfigs. `order_by` field must not change for subsequent calls.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/dlp/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + // "description": "Required. Parent resource name. The format of this value is as follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/deidentifyTemplates", + // "path": "v2/{+parent}/discoveryConfigs", // "response": { - // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" + // "$ref": "GooglePrivacyDlpV2ListDiscoveryConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22078,7 +24444,7 @@ func (c *ProjectsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi.Call // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDeidentifyTemplatesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDeidentifyTemplatesResponse) error) error { +func (c *ProjectsLocationsDiscoveryConfigsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDiscoveryConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -22096,36 +24462,32 @@ func (c *ProjectsLocationsDeidentifyTemplatesListCall) Pages(ctx context.Context } } -// method id "dlp.projects.locations.deidentifyTemplates.patch": +// method id "dlp.projects.locations.discoveryConfigs.patch": -type ProjectsLocationsDeidentifyTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDiscoveryConfigsPatchCall struct { + s *Service + name string + googleprivacydlpv2updatediscoveryconfigrequest *GooglePrivacyDlpV2UpdateDiscoveryConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// Patch: Updates a Discovery configuration. // -// - name: Resource name of organization and deidentify template to be -// updated, for example -// `organizations/433245324/deidentifyTemplates/432452342` or -// projects/project-id/deidentifyTemplates/432452342. -func (r *ProjectsLocationsDeidentifyTemplatesService) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *ProjectsLocationsDeidentifyTemplatesPatchCall { - c := &ProjectsLocationsDeidentifyTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the project and the configuration, for +// example `projects/dlp-test-project/discoveryConfigs/53234423`. +func (r *ProjectsLocationsDiscoveryConfigsService) Patch(name string, googleprivacydlpv2updatediscoveryconfigrequest *GooglePrivacyDlpV2UpdateDiscoveryConfigRequest) *ProjectsLocationsDiscoveryConfigsPatchCall { + c := &ProjectsLocationsDiscoveryConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleprivacydlpv2updatedeidentifytemplaterequest = googleprivacydlpv2updatedeidentifytemplaterequest + c.googleprivacydlpv2updatediscoveryconfigrequest = googleprivacydlpv2updatediscoveryconfigrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeidentifyTemplatesPatchCall { +func (c *ProjectsLocationsDiscoveryConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveryConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22133,21 +24495,21 @@ func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsDeidentifyTemplatesPatchCall { +func (c *ProjectsLocationsDiscoveryConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDiscoveryConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Header() http.Header { +func (c *ProjectsLocationsDiscoveryConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDiscoveryConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22155,7 +24517,7 @@ func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatedeidentifytemplaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatediscoveryconfigrequest) if err != nil { return nil, err } @@ -22175,15 +24537,15 @@ func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.deidentifyTemplates.patch" call. -// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be +// Do executes the "dlp.projects.locations.discoveryConfigs.patch" call. +// Exactly one of *GooglePrivacyDlpV2DiscoveryConfig or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or +// either *GooglePrivacyDlpV2DiscoveryConfig.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { +func (c *ProjectsLocationsDiscoveryConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DiscoveryConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22202,7 +24564,7 @@ func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ret := &GooglePrivacyDlpV2DiscoveryConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22214,28 +24576,28 @@ func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "description": "Updates a Discovery configuration.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", // "httpMethod": "PATCH", - // "id": "dlp.projects.locations.deidentifyTemplates.patch", + // "id": "dlp.projects.locations.discoveryConfigs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of organization and deidentify template to be updated, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", + // "description": "Required. Resource name of the project and the configuration, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" + // "$ref": "GooglePrivacyDlpV2UpdateDiscoveryConfigRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/healthcare/v1/healthcare-api.json b/healthcare/v1/healthcare-api.json index d5afb836f98..5660cf7af41 100644 --- a/healthcare/v1/healthcare-api.json +++ b/healthcare/v1/healthcare-api.json @@ -3582,7 +3582,7 @@ ] }, "search": { - "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](http://hl7.org/implement/standards/fhir/STU3/search.html), [R4](http://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](http://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changes and when the change is reflected in search results. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", + "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](http://hl7.org/implement/standards/fhir/STU3/search.html), [R4](http://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](http://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changed, and the time when the change reflects in search results. The only exception is resource identifier data, which is indexed synchronously as a special index. As a result, searching using resource identifier is not subject to indexing delay. To use the special synchronous index, the search term for identifier should be in the pattern `identifier=[system]|[value]` or `identifier=[value]`, and any of the following search result parameters can be used: * `_count` * `_include` * `_revinclude` * `_summary` * `_elements` If your query contains any other search parameters, the standard asynchronous index will be used instead. Note that searching against the special index is optimized for resolving a small number of matches. The search isn't optimized if your identifier search criteria matches a large number (i.e. more than 2,000) of resources. For a search query that will match a large number of resources, you can avoiding using the special synchronous index by including an additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you want to keep the default sorting order. Note: The special synchronous identifier index are currently disabled for DocumentReference and DocumentManifest searches. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/_search", "httpMethod": "POST", "id": "healthcare.projects.locations.datasets.fhirStores.fhir.search", @@ -3611,7 +3611,7 @@ ] }, "search-type": { - "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](http://hl7.org/implement/standards/fhir/STU3/search.html), [R4](http://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](http://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changes and when the change is reflected in search results. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", + "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](http://hl7.org/implement/standards/fhir/STU3/search.html), [R4](http://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](http://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changed, and the time when the change reflects in search results. The only exception is resource identifier data, which is indexed synchronously as a special index. As a result, searching using resource identifier is not subject to indexing delay. To use the special synchronous index, the search term for identifier should be in the pattern `identifier=[system]|[value]` or `identifier=[value]`, and any of the following search result parameters can be used: * `_count` * `_include` * `_revinclude` * `_summary` * `_elements` If your query contains any other search parameters, the standard asynchronous index will be used instead. Note that searching against the special index is optimized for resolving a small number of matches. The search isn't optimized if your identifier search criteria matches a large number (i.e. more than 2,000) of resources. For a search query that will match a large number of resources, you can avoiding using the special synchronous index by including an additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you want to keep the default sorting order. Note: The special synchronous identifier index are currently disabled for DocumentReference and DocumentManifest searches. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{resourceType}/_search", "httpMethod": "POST", "id": "healthcare.projects.locations.datasets.fhirStores.fhir.search-type", @@ -4431,7 +4431,7 @@ } } }, - "revision": "20231003", + "revision": "20231017", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -5409,7 +5409,7 @@ "type": "string" }, "filter": { - "description": "Restricts messages exported to those matching a filter, only applicable to PubsubDestination and GcsDestination. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in the `yyyy-mm-dd` format. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, and is just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. The following fields and functions are available for filtering: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the `yyyy-mm-dd` date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date \u003c \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time \u003c \"2017-01-02T00:00:00-05:00\"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time \u003c \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. Note: The filter will be applied to every message in the HL7v2 store whose `send_time` lies in the range defined by the `start_time` and the `end_time`. Even if the filter only matches a small set of messages, the export operation can still take a long time to finish when a lot of messages are between the specified `start_time` and `end_time` range.", + "description": "Restricts messages exported to those matching a filter, only applicable to PubsubDestination. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in the `yyyy-mm-dd` format. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, and is just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. The following fields and functions are available for filtering: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the `yyyy-mm-dd` date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date \u003c \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time \u003c \"2017-01-02T00:00:00-05:00\"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time \u003c \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. Note: The filter will be applied to every message in the HL7v2 store whose `send_time` lies in the range defined by the `start_time` and the `end_time`. Even if the filter only matches a small set of messages, the export operation can still take a long time to finish when a lot of messages are between the specified `start_time` and `end_time` range.", "type": "string" }, "gcsDestination": { diff --git a/healthcare/v1/healthcare-gen.go b/healthcare/v1/healthcare-gen.go index ac2af363187..47749d1a6c3 100644 --- a/healthcare/v1/healthcare-gen.go +++ b/healthcare/v1/healthcare-gen.go @@ -2260,29 +2260,29 @@ type ExportMessagesRequest struct { EndTime string `json:"endTime,omitempty"` // Filter: Restricts messages exported to those matching a filter, only - // applicable to PubsubDestination and GcsDestination. The following - // syntax is available: * A string field value can be written as text - // inside quotation marks, for example "query text". The only valid - // relational operation for text fields is equality (`=`), where text is - // searched within the field, rather than having the field be equal to - // the text. For example, "Comment = great" returns messages with - // `great` in the comment field. * A number field value can be written - // as an integer, a decimal, or an exponential. The valid relational - // operators for number fields are the equality operator (`=`), along - // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). - // Note that there is no inequality (`!=`) operator. You can prepend the - // `NOT` operator to an expression to negate it. * A date field value - // must be written in the `yyyy-mm-dd` format. Fields with date and time - // use the RFC3339 time format. Leading zeros are required for one-digit - // months and days. The valid relational operators for date fields are - // the equality operator (`=`) , along with the less than/greater than - // operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality - // (`!=`) operator. You can prepend the `NOT` operator to an expression - // to negate it. * Multiple field query expressions can be combined in - // one query by adding `AND` or `OR` operators between the expressions. - // If a boolean operator appears within a quoted string, it is not - // treated as special, and is just another part of the character string - // to be matched. You can prepend the `NOT` operator to an expression to + // applicable to PubsubDestination. The following syntax is available: * + // A string field value can be written as text inside quotation marks, + // for example "query text". The only valid relational operation for + // text fields is equality (`=`), where text is searched within the + // field, rather than having the field be equal to the text. For + // example, "Comment = great" returns messages with `great` in the + // comment field. * A number field value can be written as an integer, a + // decimal, or an exponential. The valid relational operators for number + // fields are the equality operator (`=`), along with the less + // than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there + // is no inequality (`!=`) operator. You can prepend the `NOT` operator + // to an expression to negate it. * A date field value must be written + // in the `yyyy-mm-dd` format. Fields with date and time use the RFC3339 + // time format. Leading zeros are required for one-digit months and + // days. The valid relational operators for date fields are the equality + // operator (`=`) , along with the less than/greater than operators + // (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) + // operator. You can prepend the `NOT` operator to an expression to + // negate it. * Multiple field query expressions can be combined in one + // query by adding `AND` or `OR` operators between the expressions. If a + // boolean operator appears within a quoted string, it is not treated as + // special, and is just another part of the character string to be + // matched. You can prepend the `NOT` operator to an expression to // negate it. The following fields and functions are available for // filtering: * `message_type`, from the MSH-9.1 field. For example, // `NOT message_type = "ADT". * `send_date` or `sendDate`, the @@ -23303,8 +23303,26 @@ type ProjectsLocationsDatasetsFhirStoresFhirSearchCall struct { // searchable as the server might trim its generated search index in // those cases. Note: FHIR resources are indexed asynchronously, so // there might be a slight delay between the time a resource is created -// or changes and when the change is reflected in search results. For -// samples and detailed information, see Searching for FHIR resources +// or changed, and the time when the change reflects in search results. +// The only exception is resource identifier data, which is indexed +// synchronously as a special index. As a result, searching using +// resource identifier is not subject to indexing delay. To use the +// special synchronous index, the search term for identifier should be +// in the pattern `identifier=[system]|[value]` or `identifier=[value]`, +// and any of the following search result parameters can be used: * +// `_count` * `_include` * `_revinclude` * `_summary` * `_elements` If +// your query contains any other search parameters, the standard +// asynchronous index will be used instead. Note that searching against +// the special index is optimized for resolving a small number of +// matches. The search isn't optimized if your identifier search +// criteria matches a large number (i.e. more than 2,000) of resources. +// For a search query that will match a large number of resources, you +// can avoiding using the special synchronous index by including an +// additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` +// if you want to keep the default sorting order. Note: The special +// synchronous identifier index are currently disabled for +// DocumentReference and DocumentManifest searches. For samples and +// detailed information, see Searching for FHIR resources // (https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and // Advanced FHIR search features // (https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search). @@ -23375,7 +23393,7 @@ func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Do(opts ...googleapi gensupport.SetOptions(c.urlParams_, opts...) return c.doRequest("") // { - // "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](http://hl7.org/implement/standards/fhir/STU3/search.html), [R4](http://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](http://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changes and when the change is reflected in search results. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", + // "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](http://hl7.org/implement/standards/fhir/STU3/search.html), [R4](http://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](http://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changed, and the time when the change reflects in search results. The only exception is resource identifier data, which is indexed synchronously as a special index. As a result, searching using resource identifier is not subject to indexing delay. To use the special synchronous index, the search term for identifier should be in the pattern `identifier=[system]|[value]` or `identifier=[value]`, and any of the following search result parameters can be used: * `_count` * `_include` * `_revinclude` * `_summary` * `_elements` If your query contains any other search parameters, the standard asynchronous index will be used instead. Note that searching against the special index is optimized for resolving a small number of matches. The search isn't optimized if your identifier search criteria matches a large number (i.e. more than 2,000) of resources. For a search query that will match a large number of resources, you can avoiding using the special synchronous index by including an additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you want to keep the default sorting order. Note: The special synchronous identifier index are currently disabled for DocumentReference and DocumentManifest searches. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/_search", // "httpMethod": "POST", // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.search", @@ -23467,8 +23485,26 @@ type ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall struct { // searchable as the server might trim its generated search index in // those cases. Note: FHIR resources are indexed asynchronously, so // there might be a slight delay between the time a resource is created -// or changes and when the change is reflected in search results. For -// samples and detailed information, see Searching for FHIR resources +// or changed, and the time when the change reflects in search results. +// The only exception is resource identifier data, which is indexed +// synchronously as a special index. As a result, searching using +// resource identifier is not subject to indexing delay. To use the +// special synchronous index, the search term for identifier should be +// in the pattern `identifier=[system]|[value]` or `identifier=[value]`, +// and any of the following search result parameters can be used: * +// `_count` * `_include` * `_revinclude` * `_summary` * `_elements` If +// your query contains any other search parameters, the standard +// asynchronous index will be used instead. Note that searching against +// the special index is optimized for resolving a small number of +// matches. The search isn't optimized if your identifier search +// criteria matches a large number (i.e. more than 2,000) of resources. +// For a search query that will match a large number of resources, you +// can avoiding using the special synchronous index by including an +// additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` +// if you want to keep the default sorting order. Note: The special +// synchronous identifier index are currently disabled for +// DocumentReference and DocumentManifest searches. For samples and +// detailed information, see Searching for FHIR resources // (https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and // Advanced FHIR search features // (https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search). @@ -23548,7 +23584,7 @@ func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Do(opts ...googl gensupport.SetOptions(c.urlParams_, opts...) return c.doRequest("") // { - // "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](http://hl7.org/implement/standards/fhir/STU3/search.html), [R4](http://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](http://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changes and when the change is reflected in search results. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", + // "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](http://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](http://hl7.org/implement/standards/fhir/STU3/search.html), [R4](http://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](http://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](http://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changed, and the time when the change reflects in search results. The only exception is resource identifier data, which is indexed synchronously as a special index. As a result, searching using resource identifier is not subject to indexing delay. To use the special synchronous index, the search term for identifier should be in the pattern `identifier=[system]|[value]` or `identifier=[value]`, and any of the following search result parameters can be used: * `_count` * `_include` * `_revinclude` * `_summary` * `_elements` If your query contains any other search parameters, the standard asynchronous index will be used instead. Note that searching against the special index is optimized for resolving a small number of matches. The search isn't optimized if your identifier search criteria matches a large number (i.e. more than 2,000) of resources. For a search query that will match a large number of resources, you can avoiding using the special synchronous index by including an additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you want to keep the default sorting order. Note: The special synchronous identifier index are currently disabled for DocumentReference and DocumentManifest searches. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{resourceType}/_search", // "httpMethod": "POST", // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.search-type", diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index f7d0a58c2d1..944af865e5a 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -3676,6 +3676,35 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "rollback": { + "description": "Rolls back resources from the FHIR store to the specified time. This method returns an Operation that can be used to track the status of the rollback by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when the operation finishes, a detailed response of type RollbackFhirResourcesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:rollback", + "httpMethod": "POST", + "id": "healthcare.projects.locations.datasets.fhirStores.rollback", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the FHIR store to rollback, in the format of \"projects/{project_id}/locations/{location_id}/datasets/{dataset_id} /fhirStores/{fhir_store_id}\".", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:rollback", + "request": { + "$ref": "RollbackFhirResourcesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-healthcare", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:setIamPolicy", @@ -4430,7 +4459,7 @@ ] }, "search": { - "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](https://hl7.org/implement/standards/fhir/STU3/search.html), [R4](https://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](https://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](https://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changes and when the change is reflected in search results. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", + "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](https://hl7.org/implement/standards/fhir/STU3/search.html), [R4](https://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](https://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](https://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changed, and the time when the change reflects in search results. The only exception is resource identifier data, which is indexed synchronously as a special index. As a result, searching using resource identifier is not subject to indexing delay. To use the special synchronous index, the search term for identifier should be in the pattern `identifier=[system]|[value]` or `identifier=[value]`, and any of the following search result parameters can be used: * `_count` * `_include` * `_revinclude` * `_summary` * `_elements` If your query contains any other search parameters, the standard asynchronous index will be used instead. Note that searching against the special index is optimized for resolving a small number of matches. The search isn't optimized if your identifier search criteria matches a large number (i.e. more than 2,000) of resources. For a search query that will match a large number of resources, you can avoiding using the special synchronous index by including an additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you want to keep the default sorting order. Note: The special synchronous identifier index are currently disabled for DocumentReference and DocumentManifest searches. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/_search", "httpMethod": "POST", "id": "healthcare.projects.locations.datasets.fhirStores.fhir.search", @@ -4459,7 +4488,7 @@ ] }, "search-type": { - "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](https://hl7.org/implement/standards/fhir/STU3/search.html), [R4](https://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](https://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](https://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changes and when the change is reflected in search results. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", + "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](https://hl7.org/implement/standards/fhir/STU3/search.html), [R4](https://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](https://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](https://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changed, and the time when the change reflects in search results. The only exception is resource identifier data, which is indexed synchronously as a special index. As a result, searching using resource identifier is not subject to indexing delay. To use the special synchronous index, the search term for identifier should be in the pattern `identifier=[system]|[value]` or `identifier=[value]`, and any of the following search result parameters can be used: * `_count` * `_include` * `_revinclude` * `_summary` * `_elements` If your query contains any other search parameters, the standard asynchronous index will be used instead. Note that searching against the special index is optimized for resolving a small number of matches. The search isn't optimized if your identifier search criteria matches a large number (i.e. more than 2,000) of resources. For a search query that will match a large number of resources, you can avoiding using the special synchronous index by including an additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you want to keep the default sorting order. Note: The special synchronous identifier index are currently disabled for DocumentReference and DocumentManifest searches. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{resourceType}/_search", "httpMethod": "POST", "id": "healthcare.projects.locations.datasets.fhirStores.fhir.search-type", @@ -5332,7 +5361,7 @@ } } }, - "revision": "20231003", + "revision": "20231017", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { @@ -6871,7 +6900,7 @@ "type": "string" }, "filter": { - "description": "Restricts messages exported to those matching a filter, only applicable to PubsubDestination and GcsDestination. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in the `yyyy-mm-dd` format. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, and is just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. The following fields and functions are available for filtering: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date \u003c \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time \u003c \"2017-01-02T00:00:00-05:00\"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time \u003c \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. Note: The filter will be applied to every message in the HL7v2 store whose `send_time` lies in the range defined by the `start_time` and the `end_time`. Even if the filter only matches a small set of messages, the export operation can still take a long time to finish when a lot of messages are between the specified `start_time` and `end_time` range.", + "description": "Restricts messages exported to those matching a filter, only applicable to PubsubDestination. The following syntax is available: * A string field value can be written as text inside quotation marks, for example `\"query text\"`. The only valid relational operation for text fields is equality (`=`), where text is searched within the field, rather than having the field be equal to the text. For example, `\"Comment = great\"` returns messages with `great` in the comment field. * A number field value can be written as an integer, a decimal, or an exponential. The valid relational operators for number fields are the equality operator (`=`), along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * A date field value must be written in the `yyyy-mm-dd` format. Fields with date and time use the RFC3339 time format. Leading zeros are required for one-digit months and days. The valid relational operators for date fields are the equality operator (`=`) , along with the less than/greater than operators (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`). Note that there is no inequality (`!=`) operator. You can prepend the `NOT` operator to an expression to negate it. * Multiple field query expressions can be combined in one query by adding `AND` or `OR` operators between the expressions. If a boolean operator appears within a quoted string, it is not treated as special, and is just another part of the character string to be matched. You can prepend the `NOT` operator to an expression to negate it. The following fields and functions are available for filtering: * `message_type`, from the MSH-9.1 field. For example, `NOT message_type = \"ADT\"`. * `send_date` or `sendDate`, the YYYY-MM-DD date the message was sent in the dataset's time_zone, from the MSH-7 segment. For example, `send_date \u003c \"2017-01-02\"`. * `send_time`, the timestamp when the message was sent, using the RFC3339 time format for comparisons, from the MSH-7 segment. For example, `send_time \u003c \"2017-01-02T00:00:00-05:00\"`. * `create_time`, the timestamp when the message was created in the HL7v2 store. Use the RFC3339 time format for comparisons. For example, `create_time \u003c \"2017-01-02T00:00:00-05:00\"`. * `send_facility`, the care center that the message came from, from the MSH-4 segment. For example, `send_facility = \"ABC\"`. Note: The filter will be applied to every message in the HL7v2 store whose `send_time` lies in the range defined by the `start_time` and the `end_time`. Even if the filter only matches a small set of messages, the export operation can still take a long time to finish when a lot of messages are between the specified `start_time` and `end_time` range.", "type": "string" }, "gcsDestination": { @@ -8863,6 +8892,93 @@ }, "type": "object" }, + "RollbackFhirResourceFilteringFields": { + "description": "Filters to select resources that need to be rolled back.", + "id": "RollbackFhirResourceFilteringFields", + "properties": { + "metadataFilter": { + "description": "Optional. A string to use for filtering resource metadata. Complies with AIP-160 except without the has operator. Additionally, supports 2 functions: hastag(\"system\") = \"code\" for tag filtering and extension_ts_value(\"uri\") = timestamp for filtering extensions with timestamp, which is given as a unix timestamp. extension_ts_url can be used with \u003e, \u003c, \u003c=, \u003e=, != comparisons as well.", + "type": "string" + }, + "operationIds": { + "description": "Optional. A list of operation IDs to roll back. Only changes made by these operations will be rolled back.", + "items": { + "format": "uint64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RollbackFhirResourcesRequest": { + "description": "Request to roll back resources.", + "id": "RollbackFhirResourcesRequest", + "properties": { + "changeType": { + "description": "Optional. CREATE/UPDATE/DELETE/ALL for reverting all txns of a certain type.", + "enum": [ + "CHANGE_TYPE_UNSPECIFIED", + "ALL", + "CREATE", + "UPDATE", + "DELETE" + ], + "enumDescriptions": [ + "When unspecified, revert all transactions", + "All transactions", + "Revert only CREATE transactions", + "Revert only Update transactions", + "Revert only Delete transactions" + ], + "type": "string" + }, + "excludeRollbacks": { + "description": "Optional. Specifies whether to exclude earlier rollbacks.", + "type": "boolean" + }, + "filteringFields": { + "$ref": "RollbackFhirResourceFilteringFields", + "description": "Optional. Tag represents fields that HDE needs to identify resources that will be reverted. Parameters for filtering resources" + }, + "force": { + "description": "Optional. When enabled, changes will be reverted without explicit confirmation", + "type": "boolean" + }, + "inputGcsObject": { + "description": "Optional. Cloud Storage object containing list of {resourceType}/{resourceId} lines, identifying resources to be reverted", + "type": "string" + }, + "resultGcsBucket": { + "description": "Required. Bucket to deposit result", + "type": "string" + }, + "rollbackTime": { + "description": "Required. Time point to rollback to.", + "format": "google-datetime", + "type": "string" + }, + "type": { + "description": "Optional. If specified, revert only resources of these types", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RollbackFhirResourcesResponse": { + "description": "Final response of rollback FIHR resources request.", + "id": "RollbackFhirResourcesResponse", + "properties": { + "fhirStore": { + "description": "The name of the FHIR store to rollback, in the format of \"projects/{project_id}/locations/{location_id}/datasets/{dataset_id} /fhirStores/{fhir_store_id}\".", + "type": "string" + } + }, + "type": "object" + }, "SchemaConfig": { "description": "Configuration for the FHIR BigQuery schema. Determines how the server generates the schema.", "id": "SchemaConfig", diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index fdf73ce78a6..baebac18c5d 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -3370,29 +3370,29 @@ type ExportMessagesRequest struct { EndTime string `json:"endTime,omitempty"` // Filter: Restricts messages exported to those matching a filter, only - // applicable to PubsubDestination and GcsDestination. The following - // syntax is available: * A string field value can be written as text - // inside quotation marks, for example "query text". The only valid - // relational operation for text fields is equality (`=`), where text is - // searched within the field, rather than having the field be equal to - // the text. For example, "Comment = great" returns messages with - // `great` in the comment field. * A number field value can be written - // as an integer, a decimal, or an exponential. The valid relational - // operators for number fields are the equality operator (`=`), along - // with the less than/greater than operators (`<`, `<=`, `>`, `>=`). - // Note that there is no inequality (`!=`) operator. You can prepend the - // `NOT` operator to an expression to negate it. * A date field value - // must be written in the `yyyy-mm-dd` format. Fields with date and time - // use the RFC3339 time format. Leading zeros are required for one-digit - // months and days. The valid relational operators for date fields are - // the equality operator (`=`) , along with the less than/greater than - // operators (`<`, `<=`, `>`, `>=`). Note that there is no inequality - // (`!=`) operator. You can prepend the `NOT` operator to an expression - // to negate it. * Multiple field query expressions can be combined in - // one query by adding `AND` or `OR` operators between the expressions. - // If a boolean operator appears within a quoted string, it is not - // treated as special, and is just another part of the character string - // to be matched. You can prepend the `NOT` operator to an expression to + // applicable to PubsubDestination. The following syntax is available: * + // A string field value can be written as text inside quotation marks, + // for example "query text". The only valid relational operation for + // text fields is equality (`=`), where text is searched within the + // field, rather than having the field be equal to the text. For + // example, "Comment = great" returns messages with `great` in the + // comment field. * A number field value can be written as an integer, a + // decimal, or an exponential. The valid relational operators for number + // fields are the equality operator (`=`), along with the less + // than/greater than operators (`<`, `<=`, `>`, `>=`). Note that there + // is no inequality (`!=`) operator. You can prepend the `NOT` operator + // to an expression to negate it. * A date field value must be written + // in the `yyyy-mm-dd` format. Fields with date and time use the RFC3339 + // time format. Leading zeros are required for one-digit months and + // days. The valid relational operators for date fields are the equality + // operator (`=`) , along with the less than/greater than operators + // (`<`, `<=`, `>`, `>=`). Note that there is no inequality (`!=`) + // operator. You can prepend the `NOT` operator to an expression to + // negate it. * Multiple field query expressions can be combined in one + // query by adding `AND` or `OR` operators between the expressions. If a + // boolean operator appears within a quoted string, it is not treated as + // special, and is just another part of the character string to be + // matched. You can prepend the `NOT` operator to an expression to // negate it. The following fields and functions are available for // filtering: * `message_type`, from the MSH-9.1 field. For example, // `NOT message_type = "ADT". * `send_date` or `sendDate`, the @@ -7507,6 +7507,141 @@ func (s *RevokeConsentRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// RollbackFhirResourceFilteringFields: Filters to select resources that +// need to be rolled back. +type RollbackFhirResourceFilteringFields struct { + // MetadataFilter: Optional. A string to use for filtering resource + // metadata. Complies with AIP-160 except without the has operator. + // Additionally, supports 2 functions: hastag("system") = "code" for tag + // filtering and extension_ts_value("uri") = timestamp for filtering + // extensions with timestamp, which is given as a unix timestamp. + // extension_ts_url can be used with >, <, <=, >=, != comparisons as + // well. + MetadataFilter string `json:"metadataFilter,omitempty"` + + // OperationIds: Optional. A list of operation IDs to roll back. Only + // changes made by these operations will be rolled back. + OperationIds googleapi.Uint64s `json:"operationIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MetadataFilter") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MetadataFilter") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RollbackFhirResourceFilteringFields) MarshalJSON() ([]byte, error) { + type NoMethod RollbackFhirResourceFilteringFields + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RollbackFhirResourcesRequest: Request to roll back resources. +type RollbackFhirResourcesRequest struct { + // ChangeType: Optional. CREATE/UPDATE/DELETE/ALL for reverting all txns + // of a certain type. + // + // Possible values: + // "CHANGE_TYPE_UNSPECIFIED" - When unspecified, revert all + // transactions + // "ALL" - All transactions + // "CREATE" - Revert only CREATE transactions + // "UPDATE" - Revert only Update transactions + // "DELETE" - Revert only Delete transactions + ChangeType string `json:"changeType,omitempty"` + + // ExcludeRollbacks: Optional. Specifies whether to exclude earlier + // rollbacks. + ExcludeRollbacks bool `json:"excludeRollbacks,omitempty"` + + // FilteringFields: Optional. Tag represents fields that HDE needs to + // identify resources that will be reverted. Parameters for filtering + // resources + FilteringFields *RollbackFhirResourceFilteringFields `json:"filteringFields,omitempty"` + + // Force: Optional. When enabled, changes will be reverted without + // explicit confirmation + Force bool `json:"force,omitempty"` + + // InputGcsObject: Optional. Cloud Storage object containing list of + // {resourceType}/{resourceId} lines, identifying resources to be + // reverted + InputGcsObject string `json:"inputGcsObject,omitempty"` + + // ResultGcsBucket: Required. Bucket to deposit result + ResultGcsBucket string `json:"resultGcsBucket,omitempty"` + + // RollbackTime: Required. Time point to rollback to. + RollbackTime string `json:"rollbackTime,omitempty"` + + // Type: Optional. If specified, revert only resources of these types + Type []string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChangeType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ChangeType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RollbackFhirResourcesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RollbackFhirResourcesRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RollbackFhirResourcesResponse: Final response of rollback FIHR +// resources request. +type RollbackFhirResourcesResponse struct { + // FhirStore: The name of the FHIR store to rollback, in the format of + // "projects/{project_id}/locations/{location_id}/datasets/{dataset_id} + // /fhirStores/{fhir_store_id}". + FhirStore string `json:"fhirStore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FhirStore") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FhirStore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RollbackFhirResourcesResponse) MarshalJSON() ([]byte, error) { + type NoMethod RollbackFhirResourcesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SchemaConfig: Configuration for the FHIR BigQuery schema. Determines // how the server generates the schema. type SchemaConfig struct { @@ -26222,6 +26357,159 @@ func (c *ProjectsLocationsDatasetsFhirStoresPatchCall) Do(opts ...googleapi.Call } +// method id "healthcare.projects.locations.datasets.fhirStores.rollback": + +type ProjectsLocationsDatasetsFhirStoresRollbackCall struct { + s *Service + name string + rollbackfhirresourcesrequest *RollbackFhirResourcesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Rollback: Rolls back resources from the FHIR store to the specified +// time. This method returns an Operation that can be used to track the +// status of the rollback by calling GetOperation. Immediate fatal +// errors appear in the error field, errors are also logged to Cloud +// Logging (see Viewing error logs in Cloud Logging +// (https://cloud.google.com/healthcare/docs/how-tos/logging)). +// Otherwise, when the operation finishes, a detailed response of type +// RollbackFhirResourcesResponse is returned in the response field. The +// metadata field type for this operation is OperationMetadata. +// +// - name: The name of the FHIR store to rollback, in the format of +// "projects/{project_id}/locations/{location_id}/datasets/{dataset_id} +// /fhirStores/{fhir_store_id}". +func (r *ProjectsLocationsDatasetsFhirStoresService) Rollback(name string, rollbackfhirresourcesrequest *RollbackFhirResourcesRequest) *ProjectsLocationsDatasetsFhirStoresRollbackCall { + c := &ProjectsLocationsDatasetsFhirStoresRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rollbackfhirresourcesrequest = rollbackfhirresourcesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresRollbackCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresRollbackCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackfhirresourcesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rollback") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "healthcare.projects.locations.datasets.fhirStores.rollback" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDatasetsFhirStoresRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Rolls back resources from the FHIR store to the specified time. This method returns an Operation that can be used to track the status of the rollback by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when the operation finishes, a detailed response of type RollbackFhirResourcesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:rollback", + // "httpMethod": "POST", + // "id": "healthcare.projects.locations.datasets.fhirStores.rollback", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the FHIR store to rollback, in the format of \"projects/{project_id}/locations/{location_id}/datasets/{dataset_id} /fhirStores/{fhir_store_id}\".", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:rollback", + // "request": { + // "$ref": "RollbackFhirResourcesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-healthcare", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "healthcare.projects.locations.datasets.fhirStores.setIamPolicy": type ProjectsLocationsDatasetsFhirStoresSetIamPolicyCall struct { @@ -29546,8 +29834,26 @@ type ProjectsLocationsDatasetsFhirStoresFhirSearchCall struct { // searchable as the server might trim its generated search index in // those cases. Note: FHIR resources are indexed asynchronously, so // there might be a slight delay between the time a resource is created -// or changes and when the change is reflected in search results. For -// samples and detailed information, see Searching for FHIR resources +// or changed, and the time when the change reflects in search results. +// The only exception is resource identifier data, which is indexed +// synchronously as a special index. As a result, searching using +// resource identifier is not subject to indexing delay. To use the +// special synchronous index, the search term for identifier should be +// in the pattern `identifier=[system]|[value]` or `identifier=[value]`, +// and any of the following search result parameters can be used: * +// `_count` * `_include` * `_revinclude` * `_summary` * `_elements` If +// your query contains any other search parameters, the standard +// asynchronous index will be used instead. Note that searching against +// the special index is optimized for resolving a small number of +// matches. The search isn't optimized if your identifier search +// criteria matches a large number (i.e. more than 2,000) of resources. +// For a search query that will match a large number of resources, you +// can avoiding using the special synchronous index by including an +// additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` +// if you want to keep the default sorting order. Note: The special +// synchronous identifier index are currently disabled for +// DocumentReference and DocumentManifest searches. For samples and +// detailed information, see Searching for FHIR resources // (https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and // Advanced FHIR search features // (https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search). @@ -29618,7 +29924,7 @@ func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchCall) Do(opts ...googleapi gensupport.SetOptions(c.urlParams_, opts...) return c.doRequest("") // { - // "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](https://hl7.org/implement/standards/fhir/STU3/search.html), [R4](https://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](https://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](https://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changes and when the change is reflected in search results. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", + // "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](https://hl7.org/implement/standards/fhir/STU3/search.html), [R4](https://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](https://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](https://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changed, and the time when the change reflects in search results. The only exception is resource identifier data, which is indexed synchronously as a special index. As a result, searching using resource identifier is not subject to indexing delay. To use the special synchronous index, the search term for identifier should be in the pattern `identifier=[system]|[value]` or `identifier=[value]`, and any of the following search result parameters can be used: * `_count` * `_include` * `_revinclude` * `_summary` * `_elements` If your query contains any other search parameters, the standard asynchronous index will be used instead. Note that searching against the special index is optimized for resolving a small number of matches. The search isn't optimized if your identifier search criteria matches a large number (i.e. more than 2,000) of resources. For a search query that will match a large number of resources, you can avoiding using the special synchronous index by including an additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you want to keep the default sorting order. Note: The special synchronous identifier index are currently disabled for DocumentReference and DocumentManifest searches. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/_search", // "httpMethod": "POST", // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.search", @@ -29711,8 +30017,26 @@ type ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall struct { // searchable as the server might trim its generated search index in // those cases. Note: FHIR resources are indexed asynchronously, so // there might be a slight delay between the time a resource is created -// or changes and when the change is reflected in search results. For -// samples and detailed information, see Searching for FHIR resources +// or changed, and the time when the change reflects in search results. +// The only exception is resource identifier data, which is indexed +// synchronously as a special index. As a result, searching using +// resource identifier is not subject to indexing delay. To use the +// special synchronous index, the search term for identifier should be +// in the pattern `identifier=[system]|[value]` or `identifier=[value]`, +// and any of the following search result parameters can be used: * +// `_count` * `_include` * `_revinclude` * `_summary` * `_elements` If +// your query contains any other search parameters, the standard +// asynchronous index will be used instead. Note that searching against +// the special index is optimized for resolving a small number of +// matches. The search isn't optimized if your identifier search +// criteria matches a large number (i.e. more than 2,000) of resources. +// For a search query that will match a large number of resources, you +// can avoiding using the special synchronous index by including an +// additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` +// if you want to keep the default sorting order. Note: The special +// synchronous identifier index are currently disabled for +// DocumentReference and DocumentManifest searches. For samples and +// detailed information, see Searching for FHIR resources // (https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and // Advanced FHIR search features // (https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search). @@ -29793,7 +30117,7 @@ func (c *ProjectsLocationsDatasetsFhirStoresFhirSearchTypeCall) Do(opts ...googl gensupport.SetOptions(c.urlParams_, opts...) return c.doRequest("") // { - // "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](https://hl7.org/implement/standards/fhir/STU3/search.html), [R4](https://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](https://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](https://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changes and when the change is reflected in search results. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", + // "description": "Searches for resources in the given FHIR store according to criteria specified as query parameters. Implements the FHIR standard search interaction ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#search), [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#search), [R4](https://hl7.org/implement/standards/fhir/R4/http.html#search)) using the search semantics described in the FHIR Search specification ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/search.html), [STU3](https://hl7.org/implement/standards/fhir/STU3/search.html), [R4](https://hl7.org/implement/standards/fhir/R4/search.html)). Supports four methods of search defined by the specification: * `GET [base]?[parameters]` to search across all resources. * `GET [base]/[type]?[parameters]` to search resources of a specified type. * `POST [base]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method across all resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form having the same semantics as the `GET` method for the specified type. The `GET` and `POST` methods do not support compartment searches. The `POST` method does not support `application/x-www-form-urlencoded` search parameters. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the search. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The server's capability statement, retrieved through capabilities, indicates what search parameters are supported on each FHIR resource. A list of all search parameters defined by the specification can be found in the FHIR Search Parameter Registry ([STU3](https://hl7.org/implement/standards/fhir/STU3/searchparameter-registry.html), [R4](https://hl7.org/implement/standards/fhir/R4/searchparameter-registry.html)). FHIR search parameters for DSTU2 can be found on each resource's definition page. Supported search modifiers: `:missing`, `:exact`, `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`, `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search result parameters: `_sort`, `_count`, `_include`, `_revinclude`, `_summary=text`, `_summary=data`, and `_elements`. The maximum number of search results returned defaults to 100, which can be overridden by the `_count` parameter up to a maximum limit of 1000. The server might return fewer resources than requested to prevent excessively large responses. If there are additional results, the returned `Bundle` contains a link of `relation` \"next\", which has a `_page_token` parameter for an opaque pagination token that can be used to retrieve the next page. Resources with a total size larger than 5MB or a field count larger than 50,000 might not be fully searchable as the server might trim its generated search index in those cases. Note: FHIR resources are indexed asynchronously, so there might be a slight delay between the time a resource is created or changed, and the time when the change reflects in search results. The only exception is resource identifier data, which is indexed synchronously as a special index. As a result, searching using resource identifier is not subject to indexing delay. To use the special synchronous index, the search term for identifier should be in the pattern `identifier=[system]|[value]` or `identifier=[value]`, and any of the following search result parameters can be used: * `_count` * `_include` * `_revinclude` * `_summary` * `_elements` If your query contains any other search parameters, the standard asynchronous index will be used instead. Note that searching against the special index is optimized for resolving a small number of matches. The search isn't optimized if your identifier search criteria matches a large number (i.e. more than 2,000) of resources. For a search query that will match a large number of resources, you can avoiding using the special synchronous index by including an additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you want to keep the default sorting order. Note: The special synchronous identifier index are currently disabled for DocumentReference and DocumentManifest searches. For samples and detailed information, see [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-search) and [Advanced FHIR search features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-search).", // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/{resourceType}/_search", // "httpMethod": "POST", // "id": "healthcare.projects.locations.datasets.fhirStores.fhir.search-type", diff --git a/monitoring/v1/monitoring-api.json b/monitoring/v1/monitoring-api.json index f8b38def73f..6cada868980 100644 --- a/monitoring/v1/monitoring-api.json +++ b/monitoring/v1/monitoring-api.json @@ -753,7 +753,7 @@ } } }, - "revision": "20230924", + "revision": "20231016", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -1269,6 +1269,34 @@ "properties": {}, "type": "object" }, + "ErrorReportingPanel": { + "description": "A widget that displays a list of error groups.", + "id": "ErrorReportingPanel", + "properties": { + "projectNames": { + "description": "The resource name of the Google Cloud Platform project. Written as projects/{projectID} or projects/{projectNumber}, where {projectID} and {projectNumber} can be found in the Google Cloud console (https://support.google.com/cloud/answer/6158840).Examples: projects/my-project-123, projects/5551234.", + "items": { + "type": "string" + }, + "type": "array" + }, + "services": { + "description": "An identifier of the service, such as the name of the executable, job, or Google App Engine service name. This field is expected to have a low number of values that are relatively stable over time, as opposed to version, which can be changed whenever new code is deployed.Contains the service name for error reports extracted from Google App Engine logs or default if the App Engine default service is used.", + "items": { + "type": "string" + }, + "type": "array" + }, + "versions": { + "description": "Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. For App Engine standard environment, the version is set to the version of the app.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Field": { "description": "A single field of a message type.", "id": "Field", @@ -1800,15 +1828,6 @@ "showLabels": { "description": "Optional. Indicates whether or not the pie chart should show slices' labels", "type": "boolean" - }, - "showTotal": { - "description": "Optional. Indicates whether or not donut chart should show the total in the middle", - "type": "boolean" - }, - "sliceAggregatedThreshold": { - "description": "Optional. If slices's values are smaller than this value, they will be combined into other category", - "format": "float", - "type": "number" } }, "type": "object" @@ -2583,6 +2602,14 @@ "$ref": "CollapsibleGroup", "description": "A widget that groups the other widgets. All widgets that are within the area spanned by the grouping widget are considered member widgets." }, + "errorReportingPanel": { + "$ref": "ErrorReportingPanel", + "description": "A widget that displays a list of error groups." + }, + "id": { + "description": "Optional. The widget id. Ids may be made up of alphanumerics, dashes and underscores. Widget ids are optional.", + "type": "string" + }, "incidentList": { "$ref": "IncidentList", "description": "A widget that shows list of incidents." diff --git a/monitoring/v1/monitoring-gen.go b/monitoring/v1/monitoring-gen.go index 20834478362..6b243625f1e 100644 --- a/monitoring/v1/monitoring-gen.go +++ b/monitoring/v1/monitoring-gen.go @@ -1269,6 +1269,53 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// ErrorReportingPanel: A widget that displays a list of error groups. +type ErrorReportingPanel struct { + // ProjectNames: The resource name of the Google Cloud Platform project. + // Written as projects/{projectID} or projects/{projectNumber}, where + // {projectID} and {projectNumber} can be found in the Google Cloud + // console (https://support.google.com/cloud/answer/6158840).Examples: + // projects/my-project-123, projects/5551234. + ProjectNames []string `json:"projectNames,omitempty"` + + // Services: An identifier of the service, such as the name of the + // executable, job, or Google App Engine service name. This field is + // expected to have a low number of values that are relatively stable + // over time, as opposed to version, which can be changed whenever new + // code is deployed.Contains the service name for error reports + // extracted from Google App Engine logs or default if the App Engine + // default service is used. + Services []string `json:"services,omitempty"` + + // Versions: Represents the source code version that the developer + // provided, which could represent a version label or a Git SHA-1 hash, + // for example. For App Engine standard environment, the version is set + // to the version of the app. + Versions []string `json:"versions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ProjectNames") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ProjectNames") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ErrorReportingPanel) MarshalJSON() ([]byte, error) { + type NoMethod ErrorReportingPanel + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Field: A single field of a message type. type Field struct { // Cardinality: The field cardinality. @@ -2160,14 +2207,6 @@ type PieChart struct { // show slices' labels ShowLabels bool `json:"showLabels,omitempty"` - // ShowTotal: Optional. Indicates whether or not donut chart should show - // the total in the middle - ShowTotal bool `json:"showTotal,omitempty"` - - // SliceAggregatedThreshold: Optional. If slices's values are smaller - // than this value, they will be combined into other category - SliceAggregatedThreshold float64 `json:"sliceAggregatedThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChartType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2191,20 +2230,6 @@ func (s *PieChart) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *PieChart) UnmarshalJSON(data []byte) error { - type NoMethod PieChart - var s1 struct { - SliceAggregatedThreshold gensupport.JSONFloat64 `json:"sliceAggregatedThreshold"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SliceAggregatedThreshold = float64(s1.SliceAggregatedThreshold) - return nil -} - // PieChartDataSet: Groups a time series query definition. type PieChartDataSet struct { // MinAlignmentPeriod: Optional. The lower bound on data point frequency @@ -3423,6 +3448,13 @@ type Widget struct { // considered member widgets. CollapsibleGroup *CollapsibleGroup `json:"collapsibleGroup,omitempty"` + // ErrorReportingPanel: A widget that displays a list of error groups. + ErrorReportingPanel *ErrorReportingPanel `json:"errorReportingPanel,omitempty"` + + // Id: Optional. The widget id. Ids may be made up of alphanumerics, + // dashes and underscores. Widget ids are optional. + Id string `json:"id,omitempty"` + // IncidentList: A widget that shows list of incidents. IncidentList *IncidentList `json:"incidentList,omitempty"` diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json index 77b03f39203..3fae61591a7 100644 --- a/monitoring/v3/monitoring-api.json +++ b/monitoring/v3/monitoring-api.json @@ -2498,7 +2498,7 @@ "type": "string" }, "serviceLevelObjectiveId": { - "description": "Optional. The ServiceLevelObjective id to use for this ServiceLevelObjective. If omitted, an id will be generated instead. Must match the pattern [a-z0-9\\-]+", + "description": "Optional. The ServiceLevelObjective id to use for this ServiceLevelObjective. If omitted, an id will be generated instead. Must match the pattern ^[a-zA-Z0-9-_:.]+$", "location": "query", "type": "string" } @@ -2714,7 +2714,7 @@ } } }, - "revision": "20230806", + "revision": "20231016", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { diff --git a/monitoring/v3/monitoring-gen.go b/monitoring/v3/monitoring-gen.go index 21797c76548..00431a978f0 100644 --- a/monitoring/v3/monitoring-gen.go +++ b/monitoring/v3/monitoring-gen.go @@ -17672,7 +17672,7 @@ func (r *ServicesServiceLevelObjectivesService) Create(parent string, servicelev // ServiceLevelObjectiveId sets the optional parameter // "serviceLevelObjectiveId": The ServiceLevelObjective id to use for // this ServiceLevelObjective. If omitted, an id will be generated -// instead. Must match the pattern [a-z0-9\-]+ +// instead. Must match the pattern ^[a-zA-Z0-9-_:.]+$ func (c *ServicesServiceLevelObjectivesCreateCall) ServiceLevelObjectiveId(serviceLevelObjectiveId string) *ServicesServiceLevelObjectivesCreateCall { c.urlParams_.Set("serviceLevelObjectiveId", serviceLevelObjectiveId) return c @@ -17785,7 +17785,7 @@ func (c *ServicesServiceLevelObjectivesCreateCall) Do(opts ...googleapi.CallOpti // "type": "string" // }, // "serviceLevelObjectiveId": { - // "description": "Optional. The ServiceLevelObjective id to use for this ServiceLevelObjective. If omitted, an id will be generated instead. Must match the pattern [a-z0-9\\-]+", + // "description": "Optional. The ServiceLevelObjective id to use for this ServiceLevelObjective. If omitted, an id will be generated instead. Must match the pattern ^[a-zA-Z0-9-_:.]+$", // "location": "query", // "type": "string" // } diff --git a/ondemandscanning/v1/ondemandscanning-api.json b/ondemandscanning/v1/ondemandscanning-api.json index 64a0cd9c322..46b2093b4a6 100644 --- a/ondemandscanning/v1/ondemandscanning-api.json +++ b/ondemandscanning/v1/ondemandscanning-api.json @@ -339,7 +339,7 @@ } } }, - "revision": "20231002", + "revision": "20231016", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { @@ -1874,6 +1874,13 @@ "description": "HashDigest stores the SHA512 hash digest of the jar file if the package is of type Maven. This field will be unset for non Maven packages.", "type": "string" }, + "licenses": { + "description": "The list of licenses found that are related to a given package. Note that licenses may also be stored on the BinarySourceInfo. If there is no BinarySourceInfo (because there's no concept of source vs binary), then it will be stored here, while if there are BinarySourceInfos, it will be stored there, as one source can have multiple binaries with different licenses.", + "items": { + "type": "string" + }, + "type": "array" + }, "maintainer": { "$ref": "Maintainer", "description": "The maintainer of the package." @@ -2056,6 +2063,13 @@ "PackageVersion": { "id": "PackageVersion", "properties": { + "licenses": { + "description": "The licenses associated with this package. Note that this has to go on the PackageVersion level, because we can have cases with images with the same source having different licences. E.g. in Alpine, musl and musl-utils both have the same origin musl, but have different sets of licenses.", + "items": { + "type": "string" + }, + "type": "array" + }, "name": { "type": "string" }, diff --git a/ondemandscanning/v1/ondemandscanning-gen.go b/ondemandscanning/v1/ondemandscanning-gen.go index bf2b4361a78..ec621268f93 100644 --- a/ondemandscanning/v1/ondemandscanning-gen.go +++ b/ondemandscanning/v1/ondemandscanning-gen.go @@ -2588,6 +2588,14 @@ type PackageData struct { // Maven packages. HashDigest string `json:"hashDigest,omitempty"` + // Licenses: The list of licenses found that are related to a given + // package. Note that licenses may also be stored on the + // BinarySourceInfo. If there is no BinarySourceInfo (because there's no + // concept of source vs binary), then it will be stored here, while if + // there are BinarySourceInfos, it will be stored there, as one source + // can have multiple binaries with different licenses. + Licenses []string `json:"licenses,omitempty"` + // Maintainer: The maintainer of the package. Maintainer *Maintainer `json:"maintainer,omitempty"` @@ -2787,11 +2795,18 @@ func (s *PackageOccurrence) MarshalJSON() ([]byte, error) { } type PackageVersion struct { + // Licenses: The licenses associated with this package. Note that this + // has to go on the PackageVersion level, because we can have cases with + // images with the same source having different licences. E.g. in + // Alpine, musl and musl-utils both have the same origin musl, but have + // different sets of licenses. + Licenses []string `json:"licenses,omitempty"` + Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // ForceSendFields is a list of field names (e.g. "Licenses") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2799,8 +2814,8 @@ type PackageVersion struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Licenses") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. diff --git a/ondemandscanning/v1beta1/ondemandscanning-api.json b/ondemandscanning/v1beta1/ondemandscanning-api.json index a0509c50fb8..d875565aea8 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-api.json +++ b/ondemandscanning/v1beta1/ondemandscanning-api.json @@ -339,7 +339,7 @@ } } }, - "revision": "20231002", + "revision": "20231016", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { @@ -1869,6 +1869,13 @@ "description": "HashDigest stores the SHA512 hash digest of the jar file if the package is of type Maven. This field will be unset for non Maven packages.", "type": "string" }, + "licenses": { + "description": "The list of licenses found that are related to a given package. Note that licenses may also be stored on the BinarySourceInfo. If there is no BinarySourceInfo (because there's no concept of source vs binary), then it will be stored here, while if there are BinarySourceInfos, it will be stored there, as one source can have multiple binaries with different licenses.", + "items": { + "type": "string" + }, + "type": "array" + }, "maintainer": { "$ref": "Maintainer", "description": "The maintainer of the package." @@ -2051,6 +2058,13 @@ "PackageVersion": { "id": "PackageVersion", "properties": { + "licenses": { + "description": "The licenses associated with this package. Note that this has to go on the PackageVersion level, because we can have cases with images with the same source having different licences. E.g. in Alpine, musl and musl-utils both have the same origin musl, but have different sets of licenses.", + "items": { + "type": "string" + }, + "type": "array" + }, "name": { "type": "string" }, diff --git a/ondemandscanning/v1beta1/ondemandscanning-gen.go b/ondemandscanning/v1beta1/ondemandscanning-gen.go index e0dd40d6d3f..d1460a9568a 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-gen.go +++ b/ondemandscanning/v1beta1/ondemandscanning-gen.go @@ -2582,6 +2582,14 @@ type PackageData struct { // Maven packages. HashDigest string `json:"hashDigest,omitempty"` + // Licenses: The list of licenses found that are related to a given + // package. Note that licenses may also be stored on the + // BinarySourceInfo. If there is no BinarySourceInfo (because there's no + // concept of source vs binary), then it will be stored here, while if + // there are BinarySourceInfos, it will be stored there, as one source + // can have multiple binaries with different licenses. + Licenses []string `json:"licenses,omitempty"` + // Maintainer: The maintainer of the package. Maintainer *Maintainer `json:"maintainer,omitempty"` @@ -2781,11 +2789,18 @@ func (s *PackageOccurrence) MarshalJSON() ([]byte, error) { } type PackageVersion struct { + // Licenses: The licenses associated with this package. Note that this + // has to go on the PackageVersion level, because we can have cases with + // images with the same source having different licences. E.g. in + // Alpine, musl and musl-utils both have the same origin musl, but have + // different sets of licenses. + Licenses []string `json:"licenses,omitempty"` + Name string `json:"name,omitempty"` Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // ForceSendFields is a list of field names (e.g. "Licenses") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2793,8 +2808,8 @@ type PackageVersion struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Licenses") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. diff --git a/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index 97ecf8fcef5..d820810c175 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -666,7 +666,7 @@ } } }, - "revision": "20231008", + "revision": "20231015", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -807,7 +807,7 @@ "type": "string" }, "reasons": { - "description": "Optional. Optional reasons for the annotation that will be assigned to the Event.", + "description": "Optional. Reasons for the annotation that are assigned to the event.", "items": { "enum": [ "REASON_UNSPECIFIED", diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index 952357e0007..b9a32d0f5a6 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -414,8 +414,8 @@ type GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest struct { // that the identifier is hashed using hmac-sha256 with stable secret. HashedAccountId string `json:"hashedAccountId,omitempty"` - // Reasons: Optional. Optional reasons for the annotation that will be - // assigned to the Event. + // Reasons: Optional. Reasons for the annotation that are assigned to + // the event. // // Possible values: // "REASON_UNSPECIFIED" - Default unspecified reason.