From ced0c099be7b1bfa2802567f2a6e57b69b29285e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 29 Feb 2024 00:22:15 -0800 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2443) --- admin/directory/v1/admin-api.json | 16 +- admin/directory/v1/admin-gen.go | 31 +- .../v1/androidmanagement-api.json | 4 +- androidmanagement/v1/androidmanagement-gen.go | 8 +- bigtableadmin/v2/bigtableadmin-api.json | 12 +- bigtableadmin/v2/bigtableadmin-gen.go | 11 - chromemanagement/v1/chromemanagement-api.json | 42 +- chromemanagement/v1/chromemanagement-gen.go | 56 + container/v1/container-api.json | 32 +- container/v1/container-gen.go | 41 + container/v1beta1/container-api.json | 32 +- container/v1beta1/container-gen.go | 41 + dataflow/v1b3/dataflow-api.json | 7 +- .../v1alpha/discoveryengine-api.json | 379 +- .../v1alpha/discoveryengine-gen.go | 1346 +- .../v1beta/discoveryengine-api.json | 241 +- discoveryengine/v1beta/discoveryengine-gen.go | 506 +- dlp/v2/dlp-api.json | 913 +- dlp/v2/dlp-gen.go | 13957 +++++++++------- dns/v1/dns-api.json | 7 +- dns/v1/dns-gen.go | 4 + dns/v1beta2/dns-api.json | 7 +- dns/v1beta2/dns-gen.go | 4 + firestore/v1/firestore-api.json | 25 +- firestore/v1/firestore-gen.go | 51 - logging/v2/logging-api.json | 33 +- logging/v2/logging-gen.go | 48 +- pubsub/v1/pubsub-api.json | 14 +- pubsub/v1/pubsub-gen.go | 4 +- pubsub/v1beta1a/pubsub-api.json | 12 +- pubsub/v1beta2/pubsub-api.json | 12 +- runtimeconfig/v1beta1/runtimeconfig-api.json | 4 +- runtimeconfig/v1beta1/runtimeconfig-gen.go | 6 +- 33 files changed, 11670 insertions(+), 6236 deletions(-) diff --git a/admin/directory/v1/admin-api.json b/admin/directory/v1/admin-api.json index 71d50fbee8b..a40758604fa 100644 --- a/admin/directory/v1/admin-api.json +++ b/admin/directory/v1/admin-api.json @@ -4671,7 +4671,7 @@ } } }, - "revision": "20240220", + "revision": "20240227", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Alias": { @@ -6083,7 +6083,8 @@ "WIPE_USERS", "REMOTE_POWERWASH", "DEVICE_START_CRD_SESSION", - "CAPTURE_LOGS" + "CAPTURE_LOGS", + "FETCH_SUPPORT_PACKET" ], "enumDescriptions": [ "The command type was unspecified.", @@ -6093,7 +6094,8 @@ "Wipe all the users off of the device. Executing this command in the device will remove all user profile data, but it will keep device policy and enrollment.", "Wipes the device by performing a power wash. Executing this command in the device will remove all data including user policies, device policies and enrollment policies. Warning: This will revert the device back to a factory state with no enrollment unless the device is subject to forced or auto enrollment. Use with caution, as this is an irreversible action!", "Starts a Chrome Remote Desktop session.", - "Capture the system logs of a kiosk device. The logs can be downloaded from the downloadUrl link present in `deviceFiles` field of [chromeosdevices](https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices)" + "Capture the system logs of a kiosk device. The logs can be downloaded from the downloadUrl link present in `deviceFiles` field of [chromeosdevices](https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices)", + "Fetch support packet from a device remotely. Support packet is a zip archive that contains various system logs and debug data from a ChromeOS device. The support packet can be downloaded from the downloadURL link present in the `deviceFiles` field of [`chromeosdevices`](https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices)" ], "type": "string" } @@ -6150,7 +6152,8 @@ "WIPE_USERS", "REMOTE_POWERWASH", "DEVICE_START_CRD_SESSION", - "CAPTURE_LOGS" + "CAPTURE_LOGS", + "FETCH_SUPPORT_PACKET" ], "enumDescriptions": [ "The command type was unspecified.", @@ -6160,12 +6163,13 @@ "Wipe all the users off of the device. Executing this command in the device will remove all user profile data, but it will keep device policy and enrollment.", "Wipes the device by performing a power wash. Executing this command in the device will remove all data including user policies, device policies and enrollment policies. Warning: This will revert the device back to a factory state with no enrollment unless the device is subject to forced or auto enrollment. Use with caution, as this is an irreversible action!", "Starts a Chrome Remote Desktop session.", - "Capture the system logs of a kiosk device. The logs can be downloaded from the downloadUrl link present in `deviceFiles` field of [chromeosdevices](https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices)" + "Capture the system logs of a kiosk device. The logs can be downloaded from the downloadUrl link present in `deviceFiles` field of [chromeosdevices](https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices)", + "Fetch support packet from a device remotely. Support packet is a zip archive that contains various system logs and debug data from a ChromeOS device. The support packet can be downloaded from the downloadURL link present in the `deviceFiles` field of [`chromeosdevices`](https://developers.google.com/admin-sdk/directory/reference/rest/v1/chromeosdevices)" ], "type": "string" }, "payload": { - "description": "The payload for the command, provide it only if command supports it. The following commands support adding payload: * `SET_VOLUME`: Payload is a stringified JSON object in the form: { \"volume\": 50 }. The volume has to be an integer in the range [0,100]. * `DEVICE_START_CRD_SESSION`: Payload is optionally a stringified JSON object in the form: { \"ackedUserPresence\": true }. `ackedUserPresence` is a boolean. By default, `ackedUserPresence` is set to `false`. To start a Chrome Remote Desktop session for an active device, set `ackedUserPresence` to `true`. * `REBOOT`: Payload is a stringified JSON object in the form: { \"user_session_delay_seconds\": 300 }. The delay has to be in the range [0, 300].", + "description": "The payload for the command, provide it only if command supports it. The following commands support adding payload: * `SET_VOLUME`: Payload is a stringified JSON object in the form: { \"volume\": 50 }. The volume has to be an integer in the range [0,100]. * `DEVICE_START_CRD_SESSION`: Payload is optionally a stringified JSON object in the form: { \"ackedUserPresence\": true }. `ackedUserPresence` is a boolean. By default, `ackedUserPresence` is set to `false`. To start a Chrome Remote Desktop session for an active device, set `ackedUserPresence` to `true`. * `REBOOT`: Payload is a stringified JSON object in the form: { \"user_session_delay_seconds\": 300 }. The delay has to be in the range [0, 300]. * `FETCH_SUPPORT_PACKET`: Payload is optionally a stringified JSON object in the form: {\"supportPacketDetails\":{ \"issueCaseId\": optional_support_case_id_string, \"issueDescription\": optional_issue_description_string, \"requestedDataCollectors\": []}} The list of available `data_collector_enums` are as following: Chrome System Information (1), Crash IDs (2), Memory Details (3), UI Hierarchy (4), Additional ChromeOS Platform Logs (5), Device Event (6), Intel WiFi NICs Debug Dump (7), Touch Events (8), Lacros (9), Lacros System Information (10), ChromeOS Flex Logs (11), DBus Details (12), ChromeOS Network Routes (13), ChromeOS Shill (Connection Manager) Logs (14), Policies (15), ChromeOS System State and Logs (16), ChromeOS System Logs (17), ChromeOS Chrome User Logs (18), ChromeOS Bluetooth (19), ChromeOS Connected Input Devices (20), ChromeOS Traffic Counters (21), ChromeOS Virtual Keyboard (22), ChromeOS Network Health (23). See more details in [help article](https://support.google.com/chrome/a?p=remote-log).", "type": "string" } }, diff --git a/admin/directory/v1/admin-gen.go b/admin/directory/v1/admin-gen.go index 4756b6a2e1a..78d0ec03780 100644 --- a/admin/directory/v1/admin-gen.go +++ b/admin/directory/v1/admin-gen.go @@ -2817,6 +2817,13 @@ type DirectoryChromeosdevicesCommand struct { // `deviceFiles` field of // [chromeosdevices](https://developers.google.com/admin-sdk/directory/re // ference/rest/v1/chromeosdevices) + // "FETCH_SUPPORT_PACKET" - Fetch support packet from a device + // remotely. Support packet is a zip archive that contains various + // system logs and debug data from a ChromeOS device. The support packet + // can be downloaded from the downloadURL link present in the + // `deviceFiles` field of + // [`chromeosdevices`](https://developers.google.com/admin-sdk/directory/ + // reference/rest/v1/chromeosdevices) Type string `json:"type,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2929,6 +2936,13 @@ type DirectoryChromeosdevicesIssueCommandRequest struct { // `deviceFiles` field of // [chromeosdevices](https://developers.google.com/admin-sdk/directory/re // ference/rest/v1/chromeosdevices) + // "FETCH_SUPPORT_PACKET" - Fetch support packet from a device + // remotely. Support packet is a zip archive that contains various + // system logs and debug data from a ChromeOS device. The support packet + // can be downloaded from the downloadURL link present in the + // `deviceFiles` field of + // [`chromeosdevices`](https://developers.google.com/admin-sdk/directory/ + // reference/rest/v1/chromeosdevices) CommandType string `json:"commandType,omitempty"` // Payload: The payload for the command, provide it only if command @@ -2942,7 +2956,22 @@ type DirectoryChromeosdevicesIssueCommandRequest struct { // active device, set `ackedUserPresence` to `true`. * `REBOOT`: Payload // is a stringified JSON object in the form: { // "user_session_delay_seconds": 300 }. The delay has to be in the range - // [0, 300]. + // [0, 300]. * `FETCH_SUPPORT_PACKET`: Payload is optionally a + // stringified JSON object in the form: {"supportPacketDetails":{ + // "issueCaseId": optional_support_case_id_string, "issueDescription": + // optional_issue_description_string, "requestedDataCollectors": []}} + // The list of available `data_collector_enums` are as following: Chrome + // System Information (1), Crash IDs (2), Memory Details (3), UI + // Hierarchy (4), Additional ChromeOS Platform Logs (5), Device Event + // (6), Intel WiFi NICs Debug Dump (7), Touch Events (8), Lacros (9), + // Lacros System Information (10), ChromeOS Flex Logs (11), DBus Details + // (12), ChromeOS Network Routes (13), ChromeOS Shill (Connection + // Manager) Logs (14), Policies (15), ChromeOS System State and Logs + // (16), ChromeOS System Logs (17), ChromeOS Chrome User Logs (18), + // ChromeOS Bluetooth (19), ChromeOS Connected Input Devices (20), + // ChromeOS Traffic Counters (21), ChromeOS Virtual Keyboard (22), + // ChromeOS Network Health (23). See more details in help article + // (https://support.google.com/chrome/a?p=remote-log). Payload string `json:"payload,omitempty"` // ForceSendFields is a list of field names (e.g. "CommandType") to diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 7084ad21aca..22bdd98fca5 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -148,7 +148,7 @@ ] }, "delete": { - "description": "Deletes an enterprise. Only available for EMM-managed enterprises.", + "description": "Permanently deletes an enterprise and all accounts and data associated with it. Warning: this will result in a cascaded deletion of all AM API devices associated with the deleted enterprise. Only available for EMM-managed enterprises.", "flatPath": "v1/enterprises/{enterprisesId}", "httpMethod": "DELETE", "id": "androidmanagement.enterprises.delete", @@ -1163,7 +1163,7 @@ } } }, - "revision": "20240213", + "revision": "20240221", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index bcf294a7573..401586193e8 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -8121,8 +8121,10 @@ type EnterprisesDeleteCall struct { header_ http.Header } -// Delete: Deletes an enterprise. Only available for EMM-managed -// enterprises. +// Delete: Permanently deletes an enterprise and all accounts and data +// associated with it. Warning: this will result in a cascaded deletion +// of all AM API devices associated with the deleted enterprise. Only +// available for EMM-managed enterprises. // // - name: The name of the enterprise in the form // enterprises/{enterpriseId}. @@ -8218,7 +8220,7 @@ func (c *EnterprisesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) } return ret, nil // { - // "description": "Deletes an enterprise. Only available for EMM-managed enterprises.", + // "description": "Permanently deletes an enterprise and all accounts and data associated with it. Warning: this will result in a cascaded deletion of all AM API devices associated with the deleted enterprise. Only available for EMM-managed enterprises.", // "flatPath": "v1/enterprises/{enterprisesId}", // "httpMethod": "DELETE", // "id": "androidmanagement.enterprises.delete", diff --git a/bigtableadmin/v2/bigtableadmin-api.json b/bigtableadmin/v2/bigtableadmin-api.json index 923977214f8..aeebee2bb03 100644 --- a/bigtableadmin/v2/bigtableadmin-api.json +++ b/bigtableadmin/v2/bigtableadmin-api.json @@ -1875,7 +1875,7 @@ } } }, - "revision": "20240126", + "revision": "20240221", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { @@ -2146,10 +2146,6 @@ "consistencyToken": { "description": "Required. The token created using GenerateConsistencyToken for the Table.", "type": "string" - }, - "standardReadRemoteWrites": { - "$ref": "StandardReadRemoteWrites", - "description": "Checks that reads using an app profile with `StandardIsolation` can see all writes committed before the token was created, even if the read and write target different clusters." } }, "type": "object" @@ -3324,12 +3320,6 @@ }, "type": "object" }, - "StandardReadRemoteWrites": { - "description": "Checks that all writes before the consistency token was generated is replicated in every cluster and readable.", - "id": "StandardReadRemoteWrites", - "properties": {}, - "type": "object" - }, "Status": { "description": "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).", "id": "Status", diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index f6680a19823..0cbff33e836 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -845,11 +845,6 @@ type CheckConsistencyRequest struct { // GenerateConsistencyToken for the Table. ConsistencyToken string `json:"consistencyToken,omitempty"` - // StandardReadRemoteWrites: Checks that reads using an app profile with - // `StandardIsolation` can see all writes committed before the token was - // created, even if the read and write target different clusters. - StandardReadRemoteWrites *StandardReadRemoteWrites `json:"standardReadRemoteWrites,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsistencyToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3193,12 +3188,6 @@ func (s *StandardIsolation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// StandardReadRemoteWrites: Checks that all writes before the -// consistency token was generated is replicated in every cluster and -// readable. -type StandardReadRemoteWrites struct { -} - // Status: 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 diff --git a/chromemanagement/v1/chromemanagement-api.json b/chromemanagement/v1/chromemanagement-api.json index 29c14154d79..b789c19d219 100644 --- a/chromemanagement/v1/chromemanagement-api.json +++ b/chromemanagement/v1/chromemanagement-api.json @@ -1040,7 +1040,7 @@ } } }, - "revision": "20240221", + "revision": "20240227", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1AndroidAppInfo": { @@ -3113,6 +3113,38 @@ }, "type": "object" }, + "GoogleChromeManagementV1RuntimeCountersReport": { + "description": "Runtime counters retrieved from CPU. Currently the runtime counters telemetry is only supported by Intel vPro PSR on Gen 14+.", + "id": "GoogleChromeManagementV1RuntimeCountersReport", + "properties": { + "enterHibernationCount": { + "description": "Number of times that the device has entered into the hibernation state. Currently obtained via the PSR, count from S0-\u003eS4.", + "format": "int64", + "type": "string" + }, + "enterPoweroffCount": { + "description": "Number of times that the device has entered into the power-off state. Currently obtained via the PSR, count from S0-\u003eS5.", + "format": "int64", + "type": "string" + }, + "enterSleepCount": { + "description": "Number of times that the device has entered into the sleep state. Currently obtained via the PSR, count from S0-\u003eS3.", + "format": "int64", + "type": "string" + }, + "reportTime": { + "description": "Timestamp when the report was collected.", + "format": "google-datetime", + "type": "string" + }, + "uptimeRuntimeDuration": { + "description": "Total lifetime runtime. Currently always S0 runtime from Intel vPro PSR.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "GoogleChromeManagementV1StorageInfo": { "description": "Status data for storage. * This field is telemetry information and this will change over time as the device is utilized. * Data for this field is controlled via policy: [ReportDeviceStorageStatus](https://chromeenterprise.google/policies/#ReportDeviceStorageStatus) * Data Collection Frequency: Only at Upload * Default Data Reporting Frequency: 3 hours - Policy Controlled: Yes * Cache: If the device is offline, the collected data is stored locally, and will be reported when the device is next online: No * Reported for affiliated users only: N/A * Granular permission needed: TELEMETRY_API_STORAGE_INFO", "id": "GoogleChromeManagementV1StorageInfo", @@ -3344,6 +3376,14 @@ "readOnly": true, "type": "array" }, + "runtimeCountersReport": { + "description": "Output only. Runtime counters reports collected device lifetime runtime, as well as the counts of S0-\u003eS3, S0-\u003eS4, and S0-\u003eS5 transitions, meaning entering into sleep, hibernation, and power-off states", + "items": { + "$ref": "GoogleChromeManagementV1RuntimeCountersReport" + }, + "readOnly": true, + "type": "array" + }, "serialNumber": { "description": "Output only. Device serial number. This value is the same as the Admin Console's Serial Number in the ChromeOS Devices tab.", "readOnly": true, diff --git a/chromemanagement/v1/chromemanagement-gen.go b/chromemanagement/v1/chromemanagement-gen.go index 17d8b9c9857..7160d7c97c4 100644 --- a/chromemanagement/v1/chromemanagement-gen.go +++ b/chromemanagement/v1/chromemanagement-gen.go @@ -3094,6 +3094,56 @@ func (s *GoogleChromeManagementV1PrinterReport) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromeManagementV1RuntimeCountersReport: Runtime counters +// retrieved from CPU. Currently the runtime counters telemetry is only +// supported by Intel vPro PSR on Gen 14+. +type GoogleChromeManagementV1RuntimeCountersReport struct { + // EnterHibernationCount: Number of times that the device has entered + // into the hibernation state. Currently obtained via the PSR, count + // from S0->S4. + EnterHibernationCount int64 `json:"enterHibernationCount,omitempty,string"` + + // EnterPoweroffCount: Number of times that the device has entered into + // the power-off state. Currently obtained via the PSR, count from + // S0->S5. + EnterPoweroffCount int64 `json:"enterPoweroffCount,omitempty,string"` + + // EnterSleepCount: Number of times that the device has entered into the + // sleep state. Currently obtained via the PSR, count from S0->S3. + EnterSleepCount int64 `json:"enterSleepCount,omitempty,string"` + + // ReportTime: Timestamp when the report was collected. + ReportTime string `json:"reportTime,omitempty"` + + // UptimeRuntimeDuration: Total lifetime runtime. Currently always S0 + // runtime from Intel vPro PSR. + UptimeRuntimeDuration string `json:"uptimeRuntimeDuration,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnterHibernationCount") 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. "EnterHibernationCount") to + // include in API requests with the JSON null value. By default, 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 *GoogleChromeManagementV1RuntimeCountersReport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1RuntimeCountersReport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChromeManagementV1StorageInfo: Status data for storage. * This // field is telemetry information and this will change over time as the // device is utilized. * Data for this field is controlled via policy: @@ -3314,6 +3364,12 @@ type GoogleChromeManagementV1TelemetryDevice struct { // periodically sorted in a decreasing order of report_time. PeripheralsReport []*GoogleChromeManagementV1PeripheralsReport `json:"peripheralsReport,omitempty"` + // RuntimeCountersReport: Output only. Runtime counters reports + // collected device lifetime runtime, as well as the counts of S0->S3, + // S0->S4, and S0->S5 transitions, meaning entering into sleep, + // hibernation, and power-off states + RuntimeCountersReport []*GoogleChromeManagementV1RuntimeCountersReport `json:"runtimeCountersReport,omitempty"` + // SerialNumber: Output only. Device serial number. This value is the // same as the Admin Console's Serial Number in the ChromeOS Devices // tab. diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 7824cdf89b5..02b6a16ee82 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2540,7 +2540,7 @@ } } }, - "revision": "20240206", + "revision": "20240214", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -5266,6 +5266,13 @@ "$ref": "SandboxConfig", "description": "Sandbox configuration for this node." }, + "secondaryBootDisks": { + "description": "List of secondary boot disks attached to the nodes.", + "items": { + "$ref": "SecondaryBootDisk" + }, + "type": "array" + }, "serviceAccount": { "description": "The Google Cloud Platform Service Account to be used by the node VMs. Specify the email address of the Service Account; otherwise, if no Service Account is specified, the \"default\" service account is used.", "type": "string" @@ -6279,6 +6286,29 @@ }, "type": "object" }, + "SecondaryBootDisk": { + "description": "SecondaryBootDisk represents a persistent disk attached to a node with special configurations based on its mode.", + "id": "SecondaryBootDisk", + "properties": { + "diskImage": { + "description": "Fully-qualified resource ID for an existing disk image.", + "type": "string" + }, + "mode": { + "description": "Disk mode (container image cache, etc.)", + "enum": [ + "MODE_UNSPECIFIED", + "CONTAINER_IMAGE_CACHE" + ], + "enumDescriptions": [ + "MODE_UNSPECIFIED is when mode is not set.", + "CONTAINER_IMAGE_CACHE is for using the secondary boot disk as a container image cache." + ], + "type": "string" + } + }, + "type": "object" + }, "SecurityBulletinEvent": { "description": "SecurityBulletinEvent is a notification sent to customers when a security bulletin has been posted that they are vulnerable to.", "id": "SecurityBulletinEvent", diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 3884f153550..941c64d438e 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -4792,6 +4792,10 @@ type NodeConfig struct { // SandboxConfig: Sandbox configuration for this node. SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + // SecondaryBootDisks: List of secondary boot disks attached to the + // nodes. + SecondaryBootDisks []*SecondaryBootDisk `json:"secondaryBootDisks,omitempty"` + // ServiceAccount: The Google Cloud Platform Service Account to be used // by the node VMs. Specify the email address of the Service Account; // otherwise, if no Service Account is specified, the "default" service @@ -6505,6 +6509,43 @@ func (s *SandboxConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SecondaryBootDisk: SecondaryBootDisk represents a persistent disk +// attached to a node with special configurations based on its mode. +type SecondaryBootDisk struct { + // DiskImage: Fully-qualified resource ID for an existing disk image. + DiskImage string `json:"diskImage,omitempty"` + + // Mode: Disk mode (container image cache, etc.) + // + // Possible values: + // "MODE_UNSPECIFIED" - MODE_UNSPECIFIED is when mode is not set. + // "CONTAINER_IMAGE_CACHE" - CONTAINER_IMAGE_CACHE is for using the + // secondary boot disk as a container image cache. + Mode string `json:"mode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskImage") 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. "DiskImage") to include in + // API requests with the JSON null value. By default, 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 *SecondaryBootDisk) MarshalJSON() ([]byte, error) { + type NoMethod SecondaryBootDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SecurityBulletinEvent: SecurityBulletinEvent is a notification sent // to customers when a security bulletin has been posted that they are // vulnerable to. diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index 30344ba7341..98955cf567e 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2565,7 +2565,7 @@ } } }, - "revision": "20240206", + "revision": "20240214", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -5654,6 +5654,13 @@ "$ref": "SandboxConfig", "description": "Sandbox configuration for this node." }, + "secondaryBootDisks": { + "description": "List of secondary boot disks attached to the nodes.", + "items": { + "$ref": "SecondaryBootDisk" + }, + "type": "array" + }, "serviceAccount": { "description": "The Google Cloud Platform Service Account to be used by the node VMs. Specify the email address of the Service Account; otherwise, if no Service Account is specified, the \"default\" service account is used.", "type": "string" @@ -6753,6 +6760,29 @@ }, "type": "object" }, + "SecondaryBootDisk": { + "description": "SecondaryBootDisk represents a persistent disk attached to a node with special configurations based on its mode.", + "id": "SecondaryBootDisk", + "properties": { + "diskImage": { + "description": "Fully-qualified resource ID for an existing disk image.", + "type": "string" + }, + "mode": { + "description": "Disk mode (container image cache, etc.)", + "enum": [ + "MODE_UNSPECIFIED", + "CONTAINER_IMAGE_CACHE" + ], + "enumDescriptions": [ + "MODE_UNSPECIFIED is when mode is not set.", + "CONTAINER_IMAGE_CACHE is for using the secondary boot disk as a container image cache." + ], + "type": "string" + } + }, + "type": "object" + }, "SecurityBulletinEvent": { "description": "SecurityBulletinEvent is a notification sent to customers when a security bulletin has been posted that they are vulnerable to.", "id": "SecurityBulletinEvent", diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index e5ccb3b5ca6..0c47f1b62eb 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -5339,6 +5339,10 @@ type NodeConfig struct { // SandboxConfig: Sandbox configuration for this node. SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"` + // SecondaryBootDisks: List of secondary boot disks attached to the + // nodes. + SecondaryBootDisks []*SecondaryBootDisk `json:"secondaryBootDisks,omitempty"` + // ServiceAccount: The Google Cloud Platform Service Account to be used // by the node VMs. Specify the email address of the Service Account; // otherwise, if no Service Account is specified, the "default" service @@ -7207,6 +7211,43 @@ func (s *SandboxConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SecondaryBootDisk: SecondaryBootDisk represents a persistent disk +// attached to a node with special configurations based on its mode. +type SecondaryBootDisk struct { + // DiskImage: Fully-qualified resource ID for an existing disk image. + DiskImage string `json:"diskImage,omitempty"` + + // Mode: Disk mode (container image cache, etc.) + // + // Possible values: + // "MODE_UNSPECIFIED" - MODE_UNSPECIFIED is when mode is not set. + // "CONTAINER_IMAGE_CACHE" - CONTAINER_IMAGE_CACHE is for using the + // secondary boot disk as a container image cache. + Mode string `json:"mode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskImage") 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. "DiskImage") to include in + // API requests with the JSON null value. By default, 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 *SecondaryBootDisk) MarshalJSON() ([]byte, error) { + type NoMethod SecondaryBootDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SecurityBulletinEvent: SecurityBulletinEvent is a notification sent // to customers when a security bulletin has been posted that they are // vulnerable to. diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index 8b0e2e2e371..0556dc40913 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -26,6 +26,11 @@ "description": "Regional Endpoint", "endpointUrl": "https://dataflow.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://dataflow.europe-west3.rep.googleapis.com/", + "location": "europe-west3" } ], "fullyEncodeReservedExpansion": true, @@ -2177,7 +2182,7 @@ } } }, - "revision": "20240218", + "revision": "20240225", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 8f9d4480074..bda296f9b29 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -252,6 +252,59 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "getAclConfig": { + "description": "Gets the AclConfig.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/aclConfig", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.getAclConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of AclConfig, such as `projects/*/locations/*/aclConfig`. If the caller does not have permission to access the AclConfig, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/aclConfig$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAclConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateAclConfig": { + "description": "Default Acl Configuration for use in a location of a customer's project. Updates will only reflect to new data stores. Existing data stores will still use the old value.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/aclConfig", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.updateAclConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/aclConfig$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAclConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAclConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -826,6 +879,12 @@ "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", "required": true, "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided imported 'document' to update. If not set, will by default update all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" } }, "path": "v1alpha/{+name}", @@ -3521,6 +3580,12 @@ "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", "required": true, "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided imported 'document' to update. If not set, will by default update all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" } }, "path": "v1alpha/{+name}", @@ -4881,7 +4946,7 @@ } } }, - "revision": "20240213", + "revision": "20240227", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -5164,6 +5229,10 @@ "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." + }, "industryVertical": { "description": "Immutable. The industry vertical that the data store registers.", "enum": [ @@ -5200,6 +5269,10 @@ "type": "string" }, "type": "array" + }, + "startingSchema": { + "$ref": "GoogleCloudDiscoveryengineV1Schema", + "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." } }, "type": "object" @@ -5272,6 +5345,12 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1DigitalParsingConfig": { + "description": "The digital parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1DigitalParsingConfig", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata", @@ -5295,6 +5374,43 @@ "properties": {}, "type": "object" }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfig": { + "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfig", + "properties": { + "defaultParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig", + "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + }, + "name": { + "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "type": "string" + }, + "parsingConfigOverrides": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig" + }, + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig": { + "description": "Related configurations applied to a specific type of document parser.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig", + "properties": { + "digitalParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DigitalParsingConfig", + "description": "Configurations applied to digital parser." + }, + "ocrParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1OcrParsingConfig", + "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata", @@ -5647,6 +5763,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1OcrParsingConfig": { + "description": "The OCR parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1OcrParsingConfig", + "properties": { + "enhancedDocumentElements": { + "description": "Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model.", + "items": { + "type": "string" + }, + "type": "array" + }, + "useNativeText": { + "description": "If true, will use native text instead of OCR text on pages containing native text.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata": { "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata", @@ -5661,6 +5795,11 @@ "format": "int64", "type": "string" }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, "successCount": { "description": "Count of entries that were deleted successfully.", "format": "int64", @@ -5911,6 +6050,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAclConfig": { + "description": "Access Control Configuration.", + "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", + "properties": { + "idpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "description": "Identity provider config." + }, + "name": { + "description": "Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAdditionalParams": { "description": "AdditionalParams message for WidgetService methods for security and privacy enhancement.", "id": "GoogleCloudDiscoveryengineV1alphaAdditionalParams", @@ -6174,6 +6328,10 @@ "description": "Request message for ConversationalSearchService.ConverseConversation method.", "id": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest", "properties": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Boost specification to boost certain documents in search results which may affect the converse response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)" + }, "conversation": { "$ref": "GoogleCloudDiscoveryengineV1alphaConversation", "description": "The conversation to be used by auto session only. The name field will be ignored as we automatically assign new name for the conversation in auto session." @@ -6361,6 +6519,10 @@ "description": "DataStore captures global settings and configs at the DataStore level.", "id": "GoogleCloudDiscoveryengineV1alphaDataStore", "properties": { + "aclEnabled": { + "description": "Immutable. Whether data in the DataStore has ACL information. If set to `true`, the source data must have ACL. ACL will be ingested when data is ingested by DocumentService.ImportDocuments methods. When ACL is enabled for the DataStore, Document can't be accessed by calling DocumentService.GetDocument or DocumentService.ListDocuments. Currently ACL is only supported in `GENERIC` industry vertical with non-`PUBLIC_WEBSITE` content config.", + "type": "boolean" + }, "contentConfig": { "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", "enum": [ @@ -6392,6 +6554,15 @@ "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." + }, + "idpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "description": "Output only. Data store level identity provider config.", + "readOnly": true + }, "industryVertical": { "description": "Immutable. The industry vertical that the data store registers.", "enum": [ @@ -6428,6 +6599,10 @@ "type": "string" }, "type": "array" + }, + "startingSchema": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSchema", + "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." } }, "type": "object" @@ -6539,6 +6714,10 @@ "description": "Document captures all raw metadata information of items to be recommended or searched.", "id": "GoogleCloudDiscoveryengineV1alphaDocument", "properties": { + "aclInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentAclInfo", + "description": "Access control information for the document." + }, "content": { "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentContent", "description": "The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store." @@ -6556,6 +6735,12 @@ "description": "Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", "type": "string" }, + "indexTime": { + "description": "Output only. The last time the document was indexed. If this field is set, the document could be returned in search results. This field is OUTPUT_ONLY. If this field is not populated, it means the document has never been indexed.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, "jsonData": { "description": "The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown.", "type": "string" @@ -6583,6 +6768,33 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaDocumentAclInfo": { + "description": "ACL Information of the Document.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentAclInfo", + "properties": { + "readers": { + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction": { + "description": "AclRestriction to model complex inheritance restrictions. Example: Modeling a \"Both Permit\" inheritance, where to access a child document, user needs to have access to parent document. Document Hierarchy - Space_S --\u003e Page_P. Readers: Space_S: group_1, user_1 Page_P: group_2, group_3, user_2 Space_S ACL Restriction - { \"acl_info\": { \"readers\": [ { \"principals\": [ { \"group_id\": \"group_1\" }, { \"user_id\": \"user_1\" } ] } ] } } Page_P ACL Restriction. { \"acl_info\": { \"readers\": [ { \"principals\": [ { \"group_id\": \"group_2\" }, { \"group_id\": \"group_3\" }, { \"user_id\": \"user_2\" } ], }, { \"principals\": [ { \"group_id\": \"group_1\" }, { \"user_id\": \"user_1\" } ], } ] } }", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction", + "properties": { + "principals": { + "description": "List of principals.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaPrincipal" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaDocumentContent": { "description": "Unstructured data linked to this document.", "id": "GoogleCloudDiscoveryengineV1alphaDocumentContent", @@ -6655,7 +6867,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", "type": "object" } }, @@ -6739,6 +6951,10 @@ "description": "Metadata that describes the training and serving parameters of an Engine.", "id": "GoogleCloudDiscoveryengineV1alphaEngine", "properties": { + "allowMultipleDataStoresSearchEngine": { + "description": "Whether the search engine can associate with multiple data stores. If true, the generic search engine can associate with one or more data stores. This is an input-only field.", + "type": "boolean" + }, "chatEngineConfig": { "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." @@ -7308,6 +7524,42 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaIdpConfig": { + "description": "Identity Provider Config.", + "id": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "properties": { + "externalIdpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", + "description": "External Identity provider config." + }, + "idpType": { + "description": "Identity provider type configured.", + "enum": [ + "IDP_TYPE_UNSPECIFIED", + "GSUITE", + "THIRD_PARTY" + ], + "enumDescriptions": [ + "Default value. ACL search not enabled.", + "Google 1P provider.", + "Third party provider." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig": { + "description": "Third party IDP Config.", + "id": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", + "properties": { + "workforcePoolName": { + "description": "Workforce pool name. Example: \"locations/global/workforcePools/pool_id\"", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata": { "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata", @@ -7883,6 +8135,21 @@ "properties": {}, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaPrincipal": { + "description": "Principal identifier of a user or a group.", + "id": "GoogleCloudDiscoveryengineV1alphaPrincipal", + "properties": { + "groupId": { + "description": "Group identifier. For Google Workspace user account, group_id should be the google workspace group email. For non-google identity provider user account, group_id is the mapped group identifier configured during the workforcepool config.", + "type": "string" + }, + "userId": { + "description": "User identifier. For Google Workspace user account, user_id should be the google workspace user email. For non-google identity provider user account, user_id is the mapped user identifier configured during the workforcepool config.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata": { "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata", @@ -7897,6 +8164,11 @@ "format": "int64", "type": "string" }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, "successCount": { "description": "Count of entries that were deleted successfully.", "format": "int64", @@ -7914,6 +8186,10 @@ "description": "Request message for DocumentService.PurgeDocuments method.", "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest", "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig", + "description": "The desired location of errors incurred during the purge." + }, "filter": { "description": "Required. Filter matching documents to purge. Only currently supported value is `*` (all items).", "type": "string" @@ -7921,6 +8197,10 @@ "force": { "description": "Actually performs the purge. If `force` is set to false, return the expected purge count without deleting any documents.", "type": "boolean" + }, + "gcsSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", + "description": "Cloud Storage location for the input content. Supported `data_schema`: * `document_id`: One valid Document.id per line." } }, "type": "object" @@ -7944,6 +8224,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig": { + "description": "Configuration of destination for Purge related errors.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig", + "properties": { + "gcsPrefix": { + "description": "Cloud Storage prefix for purge errors. This must be an empty, existing Cloud Storage directory. Purge errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata": { "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata", @@ -8378,6 +8669,10 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", "description": "A specification for configuring the behavior of content search." }, + "customFineTuningSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", + "description": "Custom fine tuning configs." + }, "embeddingSpec": { "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec", "description": "Uses the provided embedding to do additional semantic document retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embedding that is provided in SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it will use ServingConfig.EmbeddingConfig.field_path." @@ -8488,7 +8783,7 @@ "type": "number" }, "condition": { - "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": * (id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\",\"Blue\"))", + "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": * (document_id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\", \"Blue\"))", "type": "string" } }, @@ -9896,6 +10191,10 @@ "description": "Turn on or off summarization for the search response.", "type": "boolean" }, + "enableWebApp": { + "description": "Whether to enable standalone web app.", + "type": "boolean" + }, "facetField": { "description": "The configuration and appearance of facets in the end user view.", "items": { @@ -10235,6 +10534,10 @@ "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." + }, "industryVertical": { "description": "Immutable. The industry vertical that the data store registers.", "enum": [ @@ -10271,6 +10574,10 @@ "type": "string" }, "type": "array" + }, + "startingSchema": { + "$ref": "GoogleCloudDiscoveryengineV1betaSchema", + "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." } }, "type": "object" @@ -10343,6 +10650,12 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaDigitalParsingConfig": { + "description": "The digital parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1betaDigitalParsingConfig", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata", @@ -10366,6 +10679,43 @@ "properties": {}, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig": { + "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig", + "properties": { + "defaultParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig", + "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + }, + "name": { + "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "type": "string" + }, + "parsingConfigOverrides": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig" + }, + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig": { + "description": "Related configurations applied to a specific type of document parser.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig", + "properties": { + "digitalParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDigitalParsingConfig", + "description": "Configurations applied to digital parser." + }, + "ocrParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaOcrParsingConfig", + "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata", @@ -10718,6 +11068,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaOcrParsingConfig": { + "description": "The OCR parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1betaOcrParsingConfig", + "properties": { + "enhancedDocumentElements": { + "description": "Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model.", + "items": { + "type": "string" + }, + "type": "array" + }, + "useNativeText": { + "description": "If true, will use native text instead of OCR text on pages containing native text.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata": { "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata", @@ -10732,6 +11100,11 @@ "format": "int64", "type": "string" }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, "successCount": { "description": "Count of entries that were deleted successfully.", "format": "int64", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 8b9c33083ea..509dcf000ad 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -1207,6 +1207,10 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // Otherwise, an INVALID_ARGUMENT error is returned. DisplayName string `json:"displayName,omitempty"` + // DocumentProcessingConfig: Configuration for Document understanding + // and enrichment. + DocumentProcessingConfig *GoogleCloudDiscoveryengineV1DocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` + // IndustryVertical: Immutable. The industry vertical that the data // store registers. // @@ -1237,6 +1241,17 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // AI agent. SolutionTypes []string `json:"solutionTypes,omitempty"` + // StartingSchema: The start schema to use for this DataStore when + // provisioning it. If unset, a default vertical specialized schema will + // be used. This field is only used by CreateDataStore API, and will be + // ignored if used in other APIs. This field will be omitted from all + // API responses including CreateDataStore API. To retrieve a schema of + // a DataStore, use SchemaService.GetSchema API instead. The provided + // schema will be validated against certain rules on schema. Learn more + // from this doc + // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + StartingSchema *GoogleCloudDiscoveryengineV1Schema `json:"startingSchema,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1397,6 +1412,11 @@ func (s *GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1DigitalParsingConfig: The digital parsing +// configurations for documents. +type GoogleCloudDiscoveryengineV1DigitalParsingConfig struct { +} + // GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata: // Metadata related to the progress of the // SiteSearchEngineService.DisableAdvancedSiteSearch operation. This @@ -1438,6 +1458,93 @@ func (s *GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata) MarshalJ type GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse struct { } +// GoogleCloudDiscoveryengineV1DocumentProcessingConfig: A singleton +// resource of DataStore. It's empty when DataStore is created, which +// defaults to digital parser. The first call to +// DataStoreService.UpdateDocumentProcessingConfig method will +// initialize the config. +type GoogleCloudDiscoveryengineV1DocumentProcessingConfig struct { + // DefaultParsingConfig: Configurations for default Document parser. If + // not specified, we will configure it as default DigitalParsingConfig, + // and the default parsing config will be applied to all file types for + // Document parsing. + DefaultParsingConfig *GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` + + // Name: The full resource name of the Document Processing Config. + // Format: + // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingC + // onfig`. + Name string `json:"name,omitempty"` + + // ParsingConfigOverrides: Map from file type to override the default + // parsing configuration based on the file type. Supported keys: * + // `pdf`: Override parsing config for PDF files, either digital parsing, + // ocr parsing or layout parsing is supported. * `html`: Override + // parsing config for HTML files, only digital parsing and or layout + // parsing are supported. * `docx`: Override parsing config for DOCX + // files, only digital parsing and or layout parsing are supported. + ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DefaultParsingConfig") 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. "DefaultParsingConfig") to + // include in API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1DocumentProcessingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1DocumentProcessingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig: +// Related configurations applied to a specific type of document parser. +type GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig struct { + // DigitalParsingConfig: Configurations applied to digital parser. + DigitalParsingConfig *GoogleCloudDiscoveryengineV1DigitalParsingConfig `json:"digitalParsingConfig,omitempty"` + + // OcrParsingConfig: Configurations applied to OCR parser. Currently it + // only applies to PDFs. + OcrParsingConfig *GoogleCloudDiscoveryengineV1OcrParsingConfig `json:"ocrParsingConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DigitalParsingConfig") 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. "DigitalParsingConfig") to + // include in API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata: // Metadata related to the progress of the // SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will @@ -2052,6 +2159,43 @@ func (s *GoogleCloudDiscoveryengineV1ImportUserEventsResponse) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1OcrParsingConfig: The OCR parsing +// configurations for documents. +type GoogleCloudDiscoveryengineV1OcrParsingConfig struct { + // EnhancedDocumentElements: Apply additional enhanced OCR processing to + // a list of document elements. Supported values: * `table`: advanced + // table parsing model. + EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` + + // UseNativeText: If true, will use native text instead of OCR text on + // pages containing native text. + UseNativeText bool `json:"useNativeText,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnhancedDocumentElements") 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. "EnhancedDocumentElements") + // to include in API requests with the JSON null value. By default, + // 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 *GoogleCloudDiscoveryengineV1OcrParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1OcrParsingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata: Metadata related // to the progress of the PurgeDocuments operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -2063,6 +2207,10 @@ type GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata struct { // processing. FailureCount int64 `json:"failureCount,omitempty,string"` + // IgnoredCount: Count of entries that were ignored as entries were not + // found. + IgnoredCount int64 `json:"ignoredCount,omitempty,string"` + // SuccessCount: Count of entries that were deleted successfully. SuccessCount int64 `json:"successCount,omitempty,string"` @@ -2493,6 +2641,45 @@ func (s *GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAclConfig: Access Control +// Configuration. +type GoogleCloudDiscoveryengineV1alphaAclConfig struct { + // IdpConfig: Identity provider config. + IdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfig `json:"idpConfig,omitempty"` + + // Name: Immutable. The full resource name of the acl configuration. + // Format: `projects/{project}/locations/{location}/aclConfig`. This + // field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + 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. "IdpConfig") 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. "IdpConfig") to include in + // API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1alphaAclConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAclConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAdditionalParams: AdditionalParams // message for WidgetService methods for security and privacy // enhancement. @@ -2997,6 +3184,12 @@ func (s *GoogleCloudDiscoveryengineV1alphaConversationMessage) MarshalJSON() ([] // GoogleCloudDiscoveryengineV1alphaConverseConversationRequest: Request // message for ConversationalSearchService.ConverseConversation method. type GoogleCloudDiscoveryengineV1alphaConverseConversationRequest struct { + // BoostSpec: Boost specification to boost certain documents in search + // results which may affect the converse response. For more information + // on boosting, see Boosting + // (https://cloud.google.com/retail/docs/boosting#boost) + BoostSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` + // Conversation: The conversation to be used by auto session only. The // name field will be ignored as we automatically assign new name for // the conversation in auto session. @@ -3060,7 +3253,7 @@ type GoogleCloudDiscoveryengineV1alphaConverseConversationRequest struct { // for more details. UserLabels map[string]string `json:"userLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "Conversation") to + // ForceSendFields is a list of field names (e.g. "BoostSpec") 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 @@ -3068,10 +3261,10 @@ type GoogleCloudDiscoveryengineV1alphaConverseConversationRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Conversation") to include - // in API requests with the JSON null value. By default, 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. "BoostSpec") to include in + // API requests with the JSON null value. By default, 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:"-"` @@ -3388,6 +3581,16 @@ func (s *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec) MarshalJSON() ([ // GoogleCloudDiscoveryengineV1alphaDataStore: DataStore captures global // settings and configs at the DataStore level. type GoogleCloudDiscoveryengineV1alphaDataStore struct { + // AclEnabled: Immutable. Whether data in the DataStore has ACL + // information. If set to `true`, the source data must have ACL. ACL + // will be ingested when data is ingested by + // DocumentService.ImportDocuments methods. When ACL is enabled for the + // DataStore, Document can't be accessed by calling + // DocumentService.GetDocument or DocumentService.ListDocuments. + // Currently ACL is only supported in `GENERIC` industry vertical with + // non-`PUBLIC_WEBSITE` content config. + AclEnabled bool `json:"aclEnabled,omitempty"` + // ContentConfig: Immutable. The content config of the data store. If // this field is unset, the server behavior defaults to // ContentConfig.NO_CONTENT. @@ -3413,6 +3616,13 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // Otherwise, an INVALID_ARGUMENT error is returned. DisplayName string `json:"displayName,omitempty"` + // DocumentProcessingConfig: Configuration for Document understanding + // and enrichment. + DocumentProcessingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` + + // IdpConfig: Output only. Data store level identity provider config. + IdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfig `json:"idpConfig,omitempty"` + // IndustryVertical: Immutable. The industry vertical that the data // store registers. // @@ -3443,11 +3653,22 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // AI agent. SolutionTypes []string `json:"solutionTypes,omitempty"` + // StartingSchema: The start schema to use for this DataStore when + // provisioning it. If unset, a default vertical specialized schema will + // be used. This field is only used by CreateDataStore API, and will be + // ignored if used in other APIs. This field will be omitted from all + // API responses including CreateDataStore API. To retrieve a schema of + // a DataStore, use SchemaService.GetSchema API instead. The provided + // schema will be validated against certain rules on schema. Learn more + // from this doc + // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + StartingSchema *GoogleCloudDiscoveryengineV1alphaSchema `json:"startingSchema,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ContentConfig") to + // ForceSendFields is a list of field names (e.g. "AclEnabled") 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 @@ -3455,10 +3676,10 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentConfig") to include - // in API requests with the JSON null value. By default, 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. "AclEnabled") to include in + // API requests with the JSON null value. By default, 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:"-"` @@ -3663,6 +3884,9 @@ type GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse struct { // GoogleCloudDiscoveryengineV1alphaDocument: Document captures all raw // metadata information of items to be recommended or searched. type GoogleCloudDiscoveryengineV1alphaDocument struct { + // AclInfo: Access control information for the document. + AclInfo *GoogleCloudDiscoveryengineV1alphaDocumentAclInfo `json:"aclInfo,omitempty"` + // Content: The unstructured data linked to this document. Content must // be set if this document is under a `CONTENT_REQUIRED` data store. Content *GoogleCloudDiscoveryengineV1alphaDocumentContent `json:"content,omitempty"` @@ -3676,6 +3900,12 @@ type GoogleCloudDiscoveryengineV1alphaDocument struct { // limit of 63 characters. Id string `json:"id,omitempty"` + // IndexTime: Output only. The last time the document was indexed. If + // this field is set, the document could be returned in search results. + // This field is OUTPUT_ONLY. If this field is not populated, it means + // the document has never been indexed. + IndexTime string `json:"indexTime,omitempty"` + // JsonData: The JSON string representation of the document. It should // conform to the registered Schema or an `INVALID_ARGUMENT` error is // thrown. @@ -3707,7 +3937,7 @@ type GoogleCloudDiscoveryengineV1alphaDocument struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Content") to + // ForceSendFields is a list of field names (e.g. "AclInfo") 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 @@ -3715,7 +3945,7 @@ type GoogleCloudDiscoveryengineV1alphaDocument struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in + // NullFields is a list of field names (e.g. "AclInfo") to include in // API requests with the JSON null value. By default, 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 @@ -3730,6 +3960,73 @@ func (s *GoogleCloudDiscoveryengineV1alphaDocument) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaDocumentAclInfo: ACL Information of +// the Document. +type GoogleCloudDiscoveryengineV1alphaDocumentAclInfo struct { + Readers []*GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction `json:"readers,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Readers") 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. "Readers") to include in + // API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1alphaDocumentAclInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentAclInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction: +// AclRestriction to model complex inheritance restrictions. Example: +// Modeling a "Both Permit" inheritance, where to access a child +// document, user needs to have access to parent document. Document +// Hierarchy - Space_S --> Page_P. Readers: Space_S: group_1, user_1 +// Page_P: group_2, group_3, user_2 Space_S ACL Restriction - { +// "acl_info": { "readers": [ { "principals": [ { "group_id": "group_1" +// }, { "user_id": "user_1" } ] } ] } } Page_P ACL Restriction. { +// "acl_info": { "readers": [ { "principals": [ { "group_id": "group_2" +// }, { "group_id": "group_3" }, { "user_id": "user_2" } ], }, { +// "principals": [ { "group_id": "group_1" }, { "user_id": "user_1" } ], +// } ] } } +type GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction struct { + // Principals: List of principals. + Principals []*GoogleCloudDiscoveryengineV1alphaPrincipal `json:"principals,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Principals") 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. "Principals") to include in + // API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDocumentContent: Unstructured data // linked to this document. type GoogleCloudDiscoveryengineV1alphaDocumentContent struct { @@ -3857,7 +4154,8 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { // `pdf`: Override parsing config for PDF files, either digital parsing, // ocr parsing or layout parsing is supported. * `html`: Override // parsing config for HTML files, only digital parsing and or layout - // parsing are supported. + // parsing are supported. * `docx`: Override parsing config for DOCX + // files, only digital parsing and or layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -4052,6 +4350,12 @@ type GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse struct { // GoogleCloudDiscoveryengineV1alphaEngine: Metadata that describes the // training and serving parameters of an Engine. type GoogleCloudDiscoveryengineV1alphaEngine struct { + // AllowMultipleDataStoresSearchEngine: Whether the search engine can + // associate with multiple data stores. If true, the generic search + // engine can associate with one or more data stores. This is an + // input-only field. + AllowMultipleDataStoresSearchEngine bool `json:"allowMultipleDataStoresSearchEngine,omitempty"` + // ChatEngineConfig: Configurations for the Chat Engine. Only applicable // if solution_type is SOLUTION_TYPE_CHAT. ChatEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` @@ -4138,21 +4442,22 @@ type GoogleCloudDiscoveryengineV1alphaEngine struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ChatEngineConfig") 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. + // "AllowMultipleDataStoresSearchEngine") 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. "ChatEngineConfig") to - // include in API requests with the JSON null value. By default, 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. + // "AllowMultipleDataStoresSearchEngine") to include in API requests + // with the JSON null value. By default, 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:"-"` } @@ -5057,49 +5362,117 @@ func (s *GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata: Metadata -// related to the progress of the ImportDocuments operation. This is -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaIdpConfig: Identity Provider Config. +type GoogleCloudDiscoveryengineV1alphaIdpConfig struct { + // ExternalIdpConfig: External Identity provider config. + ExternalIdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig `json:"externalIdpConfig,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // IdpType: Identity provider type configured. + // + // Possible values: + // "IDP_TYPE_UNSPECIFIED" - Default value. ACL search not enabled. + // "GSUITE" - Google 1P provider. + // "THIRD_PARTY" - Third party provider. + IdpType string `json:"idpType,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExternalIdpConfig") + // 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. "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. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ExternalIdpConfig") to + // include in API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaIdpConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaIdpConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest: Request -// message for Import methods. +// GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig: Third +// party IDP Config. +type GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig struct { + // WorkforcePoolName: Workforce pool name. Example: + // "locations/global/workforcePools/pool_id" + WorkforcePoolName string `json:"workforcePoolName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "WorkforcePoolName") + // 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. "WorkforcePoolName") to + // include in API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata: Metadata +// related to the progress of the ImportDocuments operation. This is +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,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 + // 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. "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. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest: Request +// message for Import methods. type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest struct { // AutoGenerateIds: Whether to automatically generate IDs for the // documents if absent. If set to `true`, Document.ids are automatically @@ -6208,6 +6581,44 @@ func (s *GoogleCloudDiscoveryengineV1alphaPanelInfo) MarshalJSON() ([]byte, erro type GoogleCloudDiscoveryengineV1alphaPauseEngineRequest struct { } +// GoogleCloudDiscoveryengineV1alphaPrincipal: Principal identifier of a +// user or a group. +type GoogleCloudDiscoveryengineV1alphaPrincipal struct { + // GroupId: Group identifier. For Google Workspace user account, + // group_id should be the google workspace group email. For non-google + // identity provider user account, group_id is the mapped group + // identifier configured during the workforcepool config. + GroupId string `json:"groupId,omitempty"` + + // UserId: User identifier. For Google Workspace user account, user_id + // should be the google workspace user email. For non-google identity + // provider user account, user_id is the mapped user identifier + // configured during the workforcepool config. + UserId string `json:"userId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GroupId") 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. "GroupId") to include in + // API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1alphaPrincipal) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPrincipal + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata: Metadata // related to the progress of the PurgeDocuments operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -6219,6 +6630,10 @@ type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata struct { // processing. FailureCount int64 `json:"failureCount,omitempty,string"` + // IgnoredCount: Count of entries that were ignored as entries were not + // found. + IgnoredCount int64 `json:"ignoredCount,omitempty,string"` + // SuccessCount: Count of entries that were deleted successfully. SuccessCount int64 `json:"successCount,omitempty,string"` @@ -6252,6 +6667,10 @@ func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata) MarshalJSON() // GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest: Request // message for DocumentService.PurgeDocuments method. type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest struct { + // ErrorConfig: The desired location of errors incurred during the + // purge. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig `json:"errorConfig,omitempty"` + // Filter: Required. Filter matching documents to purge. Only currently // supported value is `*` (all items). Filter string `json:"filter,omitempty"` @@ -6260,7 +6679,11 @@ type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest struct { // return the expected purge count without deleting any documents. Force bool `json:"force,omitempty"` - // ForceSendFields is a list of field names (e.g. "Filter") to + // GcsSource: Cloud Storage location for the input content. Supported + // `data_schema`: * `document_id`: One valid Document.id per line. + GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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 @@ -6268,10 +6691,10 @@ type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Filter") to include in API - // requests with the JSON null value. By default, 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. "ErrorConfig") to include + // in API requests with the JSON null value. By default, 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:"-"` @@ -6320,6 +6743,38 @@ func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig: Configuration of +// destination for Purge related errors. +type GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig struct { + // GcsPrefix: Cloud Storage prefix for purge errors. This must be an + // empty, existing Cloud Storage directory. Purge errors are written to + // sharded files in this directory, one per line, as a JSON-encoded + // `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPrefix") 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. "GcsPrefix") to include in + // API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadat // a: Metadata related to the progress of the // PurgeSuggestionDenyListEntries operation. This is returned by the @@ -7104,6 +7559,9 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { // content search. ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + // CustomFineTuningSpec: Custom fine tuning configs. + CustomFineTuningSpec *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec `json:"customFineTuningSpec,omitempty"` + // EmbeddingSpec: Uses the provided embedding to do additional semantic // document retrieval. The retrieval is based on the dot product of // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document @@ -7325,8 +7783,8 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec s // syntax and supported fields are the same as a filter expression. See // SearchRequest.filter for detail syntax and limitations. Examples: * // To boost documents with document ID "doc_1" or "doc_2", and color - // "Red" or "Blue": * (id: ANY("doc_1", "doc_2")) AND (color: - // ANY("Red","Blue")) + // "Red" or "Blue": * (document_id: ANY("doc_1", "doc_2")) AND (color: + // ANY("Red", "Blue")) Condition string `json:"condition,omitempty"` // ForceSendFields is a list of field names (e.g. "Boost") to @@ -9937,6 +10395,9 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfig struct { // response. EnableSummarization bool `json:"enableSummarization,omitempty"` + // EnableWebApp: Whether to enable standalone web app. + EnableWebApp bool `json:"enableWebApp,omitempty"` + // FacetField: The configuration and appearance of facets in the end // user view. FacetField []*GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField `json:"facetField,omitempty"` @@ -10497,6 +10958,10 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // Otherwise, an INVALID_ARGUMENT error is returned. DisplayName string `json:"displayName,omitempty"` + // DocumentProcessingConfig: Configuration for Document understanding + // and enrichment. + DocumentProcessingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` + // IndustryVertical: Immutable. The industry vertical that the data // store registers. // @@ -10527,6 +10992,17 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // AI agent. SolutionTypes []string `json:"solutionTypes,omitempty"` + // StartingSchema: The start schema to use for this DataStore when + // provisioning it. If unset, a default vertical specialized schema will + // be used. This field is only used by CreateDataStore API, and will be + // ignored if used in other APIs. This field will be omitted from all + // API responses including CreateDataStore API. To retrieve a schema of + // a DataStore, use SchemaService.GetSchema API instead. The provided + // schema will be validated against certain rules on schema. Learn more + // from this doc + // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -10688,6 +11164,11 @@ func (s *GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaDigitalParsingConfig: The digital +// parsing configurations for documents. +type GoogleCloudDiscoveryengineV1betaDigitalParsingConfig struct { +} + // GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata: // Metadata related to the progress of the // SiteSearchEngineService.DisableAdvancedSiteSearch operation. This @@ -10729,6 +11210,96 @@ func (s *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata) Mars type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse struct { } +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig: A singleton +// resource of DataStore. It's empty when DataStore is created, which +// defaults to digital parser. The first call to +// DataStoreService.UpdateDocumentProcessingConfig method will +// initialize the config. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { + // DefaultParsingConfig: Configurations for default Document parser. If + // not specified, we will configure it as default DigitalParsingConfig, + // and the default parsing config will be applied to all file types for + // Document parsing. + DefaultParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` + + // Name: The full resource name of the Document Processing Config. + // Format: + // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingC + // onfig`. + Name string `json:"name,omitempty"` + + // ParsingConfigOverrides: Map from file type to override the default + // parsing configuration based on the file type. Supported keys: * + // `pdf`: Override parsing config for PDF files, either digital parsing, + // ocr parsing or layout parsing is supported. * `html`: Override + // parsing config for HTML files, only digital parsing and or layout + // parsing are supported. * `docx`: Override parsing config for DOCX + // files, only digital parsing and or layout parsing are supported. + ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DefaultParsingConfig") 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. "DefaultParsingConfig") to + // include in API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig: +// +// Related configurations applied to a specific type of document +// +// parser. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig struct { + // DigitalParsingConfig: Configurations applied to digital parser. + DigitalParsingConfig *GoogleCloudDiscoveryengineV1betaDigitalParsingConfig `json:"digitalParsingConfig,omitempty"` + + // OcrParsingConfig: Configurations applied to OCR parser. Currently it + // only applies to PDFs. + OcrParsingConfig *GoogleCloudDiscoveryengineV1betaOcrParsingConfig `json:"ocrParsingConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DigitalParsingConfig") 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. "DigitalParsingConfig") to + // include in API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata: // Metadata related to the progress of the // SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will @@ -11341,6 +11912,43 @@ func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaOcrParsingConfig: The OCR parsing +// configurations for documents. +type GoogleCloudDiscoveryengineV1betaOcrParsingConfig struct { + // EnhancedDocumentElements: Apply additional enhanced OCR processing to + // a list of document elements. Supported values: * `table`: advanced + // table parsing model. + EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` + + // UseNativeText: If true, will use native text instead of OCR text on + // pages containing native text. + UseNativeText bool `json:"useNativeText,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnhancedDocumentElements") 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. "EnhancedDocumentElements") + // to include in API requests with the JSON null value. By default, + // 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 *GoogleCloudDiscoveryengineV1betaOcrParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaOcrParsingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata // related to the progress of the PurgeDocuments operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -11352,6 +11960,10 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { // processing. FailureCount int64 `json:"failureCount,omitempty,string"` + // IgnoredCount: Count of entries that were ignored as entries were not + // found. + IgnoredCount int64 `json:"ignoredCount,omitempty,string"` + // SuccessCount: Count of entries that were deleted successfully. SuccessCount int64 `json:"successCount,omitempty,string"` @@ -12217,7 +12829,300 @@ func (c *LocationsWidgetCompleteQueryCall) doRequest(alt string) (*http.Response // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse, error) { +func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse, 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 := &GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse{ + 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": "Performs a user input completion with keyword suggestion. Similar to the CompletionService.CompleteQuery method, but a widget version that allows CompleteQuery without API Key. It supports CompleteQuery with or without JWT token.", + // "flatPath": "v1alpha/locations/{locationsId}/widgetCompleteQuery", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.widgetCompleteQuery", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where widget complete query will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/widgetCompleteQuery", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.locations.widgetConverseConversation": + +type LocationsWidgetConverseConversationCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// WidgetConverseConversation: Converse a conversation with Widget. +// +// - location: The location resource where widget converse conversation +// will be performed. Format: `locations/{location}`. +func (r *LocationsService) WidgetConverseConversation(location string, googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest) *LocationsWidgetConverseConversationCall { + c := &LocationsWidgetConverseConversationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest = googleclouddiscoveryenginev1alphawidgetconverseconversationrequest + 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 *LocationsWidgetConverseConversationCall) Fields(s ...googleapi.Field) *LocationsWidgetConverseConversationCall { + 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 *LocationsWidgetConverseConversationCall) Context(ctx context.Context) *LocationsWidgetConverseConversationCall { + 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 *LocationsWidgetConverseConversationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsWidgetConverseConversationCall) 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.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest) + 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, "v1alpha/{+location}/widgetConverseConversation") + 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{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.widgetConverseConversation" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse.S +// erverResponse.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 *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse, 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 := &GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse{ + 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": "Converse a conversation with Widget.", + // "flatPath": "v1alpha/locations/{locationsId}/widgetConverseConversation", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.widgetConverseConversation", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where widget converse conversation will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/widgetConverseConversation", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.locations.widgetSearch": + +type LocationsWidgetSearchCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// WidgetSearch: Performs a search. Similar to the SearchService.Search +// method, but a widget version that allows search without API Key. It +// supports search with or without JWT token. +// +// - location: The location resource where widget search will be +// performed. Format: `locations/{location}`. +func (r *LocationsService) WidgetSearch(location string, googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest) *LocationsWidgetSearchCall { + c := &LocationsWidgetSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphawidgetsearchrequest = googleclouddiscoveryenginev1alphawidgetsearchrequest + 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 *LocationsWidgetSearchCall) Fields(s ...googleapi.Field) *LocationsWidgetSearchCall { + 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 *LocationsWidgetSearchCall) Context(ctx context.Context) *LocationsWidgetSearchCall { + 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 *LocationsWidgetSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsWidgetSearchCall) 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.googleclouddiscoveryenginev1alphawidgetsearchrequest) + 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, "v1alpha/{+location}/widgetSearch") + 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{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.widgetSearch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse.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 *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12236,7 +13141,7 @@ func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12248,28 +13153,28 @@ func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Performs a user input completion with keyword suggestion. Similar to the CompletionService.CompleteQuery method, but a widget version that allows CompleteQuery without API Key. It supports CompleteQuery with or without JWT token.", - // "flatPath": "v1alpha/locations/{locationsId}/widgetCompleteQuery", + // "description": "Performs a search. Similar to the SearchService.Search method, but a widget version that allows search without API Key. It supports search with or without JWT token.", + // "flatPath": "v1alpha/locations/{locationsId}/widgetSearch", // "httpMethod": "POST", - // "id": "discoveryengine.locations.widgetCompleteQuery", + // "id": "discoveryengine.locations.widgetSearch", // "parameterOrder": [ // "location" // ], // "parameters": { // "location": { - // "description": "Required. The location resource where widget complete query will be performed. Format: `locations/{location}`", + // "description": "Required. The location resource where widget search will be performed. Format: `locations/{location}`", // "location": "path", // "pattern": "^locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+location}/widgetCompleteQuery", + // "path": "v1alpha/{+location}/widgetSearch", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12278,32 +13183,32 @@ func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "discoveryengine.locations.widgetConverseConversation": +// method id "discoveryengine.projects.locations.estimateDataSize": -type LocationsWidgetConverseConversationCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEstimateDataSizeCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphaestimatedatasizerequest *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// WidgetConverseConversation: Converse a conversation with Widget. +// EstimateDataSize: Estimates the data size to be used by a customer. // -// - location: The location resource where widget converse conversation -// will be performed. Format: `locations/{location}`. -func (r *LocationsService) WidgetConverseConversation(location string, googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest) *LocationsWidgetConverseConversationCall { - c := &LocationsWidgetConverseConversationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - location: Full resource name of the location, such as +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) EstimateDataSize(location string, googleclouddiscoveryenginev1alphaestimatedatasizerequest *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest) *ProjectsLocationsEstimateDataSizeCall { + c := &ProjectsLocationsEstimateDataSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.location = location - c.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest = googleclouddiscoveryenginev1alphawidgetconverseconversationrequest + c.googleclouddiscoveryenginev1alphaestimatedatasizerequest = googleclouddiscoveryenginev1alphaestimatedatasizerequest 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 *LocationsWidgetConverseConversationCall) Fields(s ...googleapi.Field) *LocationsWidgetConverseConversationCall { +func (c *ProjectsLocationsEstimateDataSizeCall) Fields(s ...googleapi.Field) *ProjectsLocationsEstimateDataSizeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12311,21 +13216,21 @@ func (c *LocationsWidgetConverseConversationCall) 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 *LocationsWidgetConverseConversationCall) Context(ctx context.Context) *LocationsWidgetConverseConversationCall { +func (c *ProjectsLocationsEstimateDataSizeCall) Context(ctx context.Context) *ProjectsLocationsEstimateDataSizeCall { 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 *LocationsWidgetConverseConversationCall) Header() http.Header { +func (c *ProjectsLocationsEstimateDataSizeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsWidgetConverseConversationCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEstimateDataSizeCall) 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_ { @@ -12333,14 +13238,14 @@ func (c *LocationsWidgetConverseConversationCall) doRequest(alt string) (*http.R } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaestimatedatasizerequest) 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, "v1alpha/{+location}/widgetConverseConversation") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}:estimateDataSize") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12353,17 +13258,14 @@ func (c *LocationsWidgetConverseConversationCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.locations.widgetConverseConversation" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse.S -// erverResponse.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 *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse, error) { +// Do executes the "discoveryengine.projects.locations.estimateDataSize" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.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 *ProjectsLocationsEstimateDataSizeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12382,7 +13284,7 @@ func (c *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12394,28 +13296,28 @@ func (c *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Converse a conversation with Widget.", - // "flatPath": "v1alpha/locations/{locationsId}/widgetConverseConversation", + // "description": "Estimates the data size to be used by a customer.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}:estimateDataSize", // "httpMethod": "POST", - // "id": "discoveryengine.locations.widgetConverseConversation", + // "id": "discoveryengine.projects.locations.estimateDataSize", // "parameterOrder": [ // "location" // ], // "parameters": { // "location": { - // "description": "Required. The location resource where widget converse conversation will be performed. Format: `locations/{location}`", + // "description": "Required. Full resource name of the location, such as `projects/{project}/locations/{location}`.", // "location": "path", - // "pattern": "^locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+location}/widgetConverseConversation", + // "path": "v1alpha/{+location}:estimateDataSize", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12424,93 +13326,100 @@ func (c *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOptio } -// method id "discoveryengine.locations.widgetSearch": +// method id "discoveryengine.projects.locations.getAclConfig": -type LocationsWidgetSearchCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGetAclConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// WidgetSearch: Performs a search. Similar to the SearchService.Search -// method, but a widget version that allows search without API Key. It -// supports search with or without JWT token. +// GetAclConfig: Gets the AclConfig. // -// - location: The location resource where widget search will be -// performed. Format: `locations/{location}`. -func (r *LocationsService) WidgetSearch(location string, googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest) *LocationsWidgetSearchCall { - c := &LocationsWidgetSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphawidgetsearchrequest = googleclouddiscoveryenginev1alphawidgetsearchrequest +// - name: Resource name of AclConfig, such as +// `projects/*/locations/*/aclConfig`. If the caller does not have +// permission to access the AclConfig, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsService) GetAclConfig(name string) *ProjectsLocationsGetAclConfigCall { + c := &ProjectsLocationsGetAclConfigCall{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 *LocationsWidgetSearchCall) Fields(s ...googleapi.Field) *LocationsWidgetSearchCall { +func (c *ProjectsLocationsGetAclConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetAclConfigCall { 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 *ProjectsLocationsGetAclConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetAclConfigCall { + 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 *LocationsWidgetSearchCall) Context(ctx context.Context) *LocationsWidgetSearchCall { +func (c *ProjectsLocationsGetAclConfigCall) Context(ctx context.Context) *ProjectsLocationsGetAclConfigCall { 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 *LocationsWidgetSearchCall) Header() http.Header { +func (c *ProjectsLocationsGetAclConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsWidgetSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGetAclConfigCall) 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.googleclouddiscoveryenginev1alphawidgetsearchrequest) - 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, "v1alpha/{+location}/widgetSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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{ - "location": c.location, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.locations.widgetSearch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse.ServerResponse. -// Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.getAclConfig" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaAclConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaAclConfig.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 *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse, error) { +func (c *ProjectsLocationsGetAclConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAclConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12529,7 +13438,7 @@ func (c *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaAclConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12541,28 +13450,25 @@ func (c *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleClo } return ret, nil // { - // "description": "Performs a search. Similar to the SearchService.Search method, but a widget version that allows search without API Key. It supports search with or without JWT token.", - // "flatPath": "v1alpha/locations/{locationsId}/widgetSearch", - // "httpMethod": "POST", - // "id": "discoveryengine.locations.widgetSearch", + // "description": "Gets the AclConfig.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/aclConfig", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.getAclConfig", // "parameterOrder": [ - // "location" + // "name" // ], // "parameters": { - // "location": { - // "description": "Required. The location resource where widget search will be performed. Format: `locations/{location}`", + // "name": { + // "description": "Required. Resource name of AclConfig, such as `projects/*/locations/*/aclConfig`. If the caller does not have permission to access the AclConfig, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", // "location": "path", - // "pattern": "^locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/aclConfig$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+location}/widgetSearch", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaAclConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12571,32 +13477,36 @@ func (c *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleClo } -// method id "discoveryengine.projects.locations.estimateDataSize": +// method id "discoveryengine.projects.locations.updateAclConfig": -type ProjectsLocationsEstimateDataSizeCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphaestimatedatasizerequest *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsUpdateAclConfigCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaaclconfig *GoogleCloudDiscoveryengineV1alphaAclConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EstimateDataSize: Estimates the data size to be used by a customer. +// UpdateAclConfig: Default Acl Configuration for use in a location of a +// customer's project. Updates will only reflect to new data stores. +// Existing data stores will still use the old value. // -// - location: Full resource name of the location, such as -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) EstimateDataSize(location string, googleclouddiscoveryenginev1alphaestimatedatasizerequest *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest) *ProjectsLocationsEstimateDataSizeCall { - c := &ProjectsLocationsEstimateDataSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphaestimatedatasizerequest = googleclouddiscoveryenginev1alphaestimatedatasizerequest +// - name: Immutable. The full resource name of the acl configuration. +// Format: `projects/{project}/locations/{location}/aclConfig`. This +// field must be a UTF-8 encoded string with a length limit of 1024 +// characters. +func (r *ProjectsLocationsService) UpdateAclConfig(name string, googleclouddiscoveryenginev1alphaaclconfig *GoogleCloudDiscoveryengineV1alphaAclConfig) *ProjectsLocationsUpdateAclConfigCall { + c := &ProjectsLocationsUpdateAclConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaaclconfig = googleclouddiscoveryenginev1alphaaclconfig 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 *ProjectsLocationsEstimateDataSizeCall) Fields(s ...googleapi.Field) *ProjectsLocationsEstimateDataSizeCall { +func (c *ProjectsLocationsUpdateAclConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateAclConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12604,21 +13514,21 @@ func (c *ProjectsLocationsEstimateDataSizeCall) 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 *ProjectsLocationsEstimateDataSizeCall) Context(ctx context.Context) *ProjectsLocationsEstimateDataSizeCall { +func (c *ProjectsLocationsUpdateAclConfigCall) Context(ctx context.Context) *ProjectsLocationsUpdateAclConfigCall { 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 *ProjectsLocationsEstimateDataSizeCall) Header() http.Header { +func (c *ProjectsLocationsUpdateAclConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEstimateDataSizeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsUpdateAclConfigCall) 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_ { @@ -12626,34 +13536,36 @@ func (c *ProjectsLocationsEstimateDataSizeCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaestimatedatasizerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaaclconfig) 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, "v1alpha/{+location}:estimateDataSize") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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{ - "location": c.location, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.estimateDataSize" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.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 *ProjectsLocationsEstimateDataSizeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.updateAclConfig" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaAclConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaAclConfig.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 *ProjectsLocationsUpdateAclConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAclConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12672,7 +13584,7 @@ func (c *ProjectsLocationsEstimateDataSizeCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaAclConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12684,28 +13596,28 @@ func (c *ProjectsLocationsEstimateDataSizeCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Estimates the data size to be used by a customer.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}:estimateDataSize", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.estimateDataSize", + // "description": "Default Acl Configuration for use in a location of a customer's project. Updates will only reflect to new data stores. Existing data stores will still use the old value.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/aclConfig", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.updateAclConfig", // "parameterOrder": [ - // "location" + // "name" // ], // "parameters": { - // "location": { - // "description": "Required. Full resource name of the location, such as `projects/{project}/locations/{location}`.", + // "name": { + // "description": "Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/aclConfig$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+location}:estimateDataSize", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaAclConfig" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaAclConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15593,6 +16505,14 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Allow return c } +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided imported 'document' to update. If not set, +// will by default update all fields. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -15705,6 +16625,12 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided imported 'document' to update. If not set, will by default update all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", @@ -29427,6 +30353,14 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(all return c } +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided imported 'document' to update. If not set, +// will by default update all fields. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -29539,6 +30473,12 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided imported 'document' to update. If not set, will by default update all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 12aea16c8e0..5d6c69ab24e 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -4449,7 +4449,7 @@ } } }, - "revision": "20240213", + "revision": "20240227", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4732,6 +4732,10 @@ "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." + }, "industryVertical": { "description": "Immutable. The industry vertical that the data store registers.", "enum": [ @@ -4768,6 +4772,10 @@ "type": "string" }, "type": "array" + }, + "startingSchema": { + "$ref": "GoogleCloudDiscoveryengineV1Schema", + "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." } }, "type": "object" @@ -4840,6 +4848,12 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1DigitalParsingConfig": { + "description": "The digital parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1DigitalParsingConfig", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata", @@ -4863,6 +4877,43 @@ "properties": {}, "type": "object" }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfig": { + "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfig", + "properties": { + "defaultParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig", + "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + }, + "name": { + "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "type": "string" + }, + "parsingConfigOverrides": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig" + }, + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig": { + "description": "Related configurations applied to a specific type of document parser.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig", + "properties": { + "digitalParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DigitalParsingConfig", + "description": "Configurations applied to digital parser." + }, + "ocrParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1OcrParsingConfig", + "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata", @@ -5215,6 +5266,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1OcrParsingConfig": { + "description": "The OCR parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1OcrParsingConfig", + "properties": { + "enhancedDocumentElements": { + "description": "Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model.", + "items": { + "type": "string" + }, + "type": "array" + }, + "useNativeText": { + "description": "If true, will use native text instead of OCR text on pages containing native text.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata": { "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata", @@ -5229,6 +5298,11 @@ "format": "int64", "type": "string" }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, "successCount": { "description": "Count of entries that were deleted successfully.", "format": "int64", @@ -5479,6 +5553,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAclConfig": { + "description": "Access Control Configuration.", + "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", + "properties": { + "idpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "description": "Identity provider config." + }, + "name": { + "description": "Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata", @@ -5582,6 +5671,10 @@ "description": "DataStore captures global settings and configs at the DataStore level.", "id": "GoogleCloudDiscoveryengineV1alphaDataStore", "properties": { + "aclEnabled": { + "description": "Immutable. Whether data in the DataStore has ACL information. If set to `true`, the source data must have ACL. ACL will be ingested when data is ingested by DocumentService.ImportDocuments methods. When ACL is enabled for the DataStore, Document can't be accessed by calling DocumentService.GetDocument or DocumentService.ListDocuments. Currently ACL is only supported in `GENERIC` industry vertical with non-`PUBLIC_WEBSITE` content config.", + "type": "boolean" + }, "contentConfig": { "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", "enum": [ @@ -5613,6 +5706,15 @@ "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." + }, + "idpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "description": "Output only. Data store level identity provider config.", + "readOnly": true + }, "industryVertical": { "description": "Immutable. The industry vertical that the data store registers.", "enum": [ @@ -5649,6 +5751,10 @@ "type": "string" }, "type": "array" + }, + "startingSchema": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSchema", + "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." } }, "type": "object" @@ -5771,7 +5877,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", "type": "object" } }, @@ -5823,6 +5929,10 @@ "description": "Metadata that describes the training and serving parameters of an Engine.", "id": "GoogleCloudDiscoveryengineV1alphaEngine", "properties": { + "allowMultipleDataStoresSearchEngine": { + "description": "Whether the search engine can associate with multiple data stores. If true, the generic search engine can associate with one or more data stores. This is an input-only field.", + "type": "boolean" + }, "chatEngineConfig": { "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." @@ -6268,6 +6378,42 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaIdpConfig": { + "description": "Identity Provider Config.", + "id": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "properties": { + "externalIdpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", + "description": "External Identity provider config." + }, + "idpType": { + "description": "Identity provider type configured.", + "enum": [ + "IDP_TYPE_UNSPECIFIED", + "GSUITE", + "THIRD_PARTY" + ], + "enumDescriptions": [ + "Default value. ACL search not enabled.", + "Google 1P provider.", + "Third party provider." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig": { + "description": "Third party IDP Config.", + "id": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", + "properties": { + "workforcePoolName": { + "description": "Workforce pool name. Example: \"locations/global/workforcePools/pool_id\"", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata": { "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata", @@ -6481,6 +6627,11 @@ "format": "int64", "type": "string" }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, "successCount": { "description": "Count of entries that were deleted successfully.", "format": "int64", @@ -7167,6 +7318,10 @@ "description": "Request message for ConversationalSearchService.ConverseConversation method.", "id": "GoogleCloudDiscoveryengineV1betaConverseConversationRequest", "properties": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec", + "description": "Boost specification to boost certain documents in search results which may affect the converse response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)" + }, "conversation": { "$ref": "GoogleCloudDiscoveryengineV1betaConversation", "description": "The conversation to be used by auto session only. The name field will be ignored as we automatically assign new name for the conversation in auto session." @@ -7370,6 +7525,10 @@ "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." + }, "industryVertical": { "description": "Immutable. The industry vertical that the data store registers.", "enum": [ @@ -7406,6 +7565,10 @@ "type": "string" }, "type": "array" + }, + "startingSchema": { + "$ref": "GoogleCloudDiscoveryengineV1betaSchema", + "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." } }, "type": "object" @@ -7478,6 +7641,12 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaDigitalParsingConfig": { + "description": "The digital parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1betaDigitalParsingConfig", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata", @@ -7528,6 +7697,12 @@ "description": "Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", "type": "string" }, + "indexTime": { + "description": "Output only. The last time the document was indexed. If this field is set, the document could be returned in search results. This field is OUTPUT_ONLY. If this field is not populated, it means the document has never been indexed.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, "jsonData": { "description": "The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown.", "type": "string" @@ -7606,6 +7781,43 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig": { + "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig", + "properties": { + "defaultParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig", + "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + }, + "name": { + "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "type": "string" + }, + "parsingConfigOverrides": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig" + }, + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig": { + "description": "Related configurations applied to a specific type of document parser.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig", + "properties": { + "digitalParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDigitalParsingConfig", + "description": "Configurations applied to digital parser." + }, + "ocrParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaOcrParsingConfig", + "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaDoubleList": { "description": "Double list.", "id": "GoogleCloudDiscoveryengineV1betaDoubleList", @@ -8331,6 +8543,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaOcrParsingConfig": { + "description": "The OCR parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1betaOcrParsingConfig", + "properties": { + "enhancedDocumentElements": { + "description": "Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model.", + "items": { + "type": "string" + }, + "type": "array" + }, + "useNativeText": { + "description": "If true, will use native text instead of OCR text on pages containing native text.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaPageInfo": { "description": "Detailed page information.", "id": "GoogleCloudDiscoveryengineV1betaPageInfo", @@ -8393,6 +8623,11 @@ "format": "int64", "type": "string" }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, "successCount": { "description": "Count of entries that were deleted successfully.", "format": "int64", @@ -8804,7 +9039,7 @@ "type": "number" }, "condition": { - "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": * (id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\",\"Blue\"))", + "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": * (document_id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\", \"Blue\"))", "type": "string" } }, diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 76c46480d8d..2631b9ac0ac 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -1195,6 +1195,10 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // Otherwise, an INVALID_ARGUMENT error is returned. DisplayName string `json:"displayName,omitempty"` + // DocumentProcessingConfig: Configuration for Document understanding + // and enrichment. + DocumentProcessingConfig *GoogleCloudDiscoveryengineV1DocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` + // IndustryVertical: Immutable. The industry vertical that the data // store registers. // @@ -1225,6 +1229,17 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // AI agent. SolutionTypes []string `json:"solutionTypes,omitempty"` + // StartingSchema: The start schema to use for this DataStore when + // provisioning it. If unset, a default vertical specialized schema will + // be used. This field is only used by CreateDataStore API, and will be + // ignored if used in other APIs. This field will be omitted from all + // API responses including CreateDataStore API. To retrieve a schema of + // a DataStore, use SchemaService.GetSchema API instead. The provided + // schema will be validated against certain rules on schema. Learn more + // from this doc + // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + StartingSchema *GoogleCloudDiscoveryengineV1Schema `json:"startingSchema,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1385,6 +1400,11 @@ func (s *GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1DigitalParsingConfig: The digital parsing +// configurations for documents. +type GoogleCloudDiscoveryengineV1DigitalParsingConfig struct { +} + // GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata: // Metadata related to the progress of the // SiteSearchEngineService.DisableAdvancedSiteSearch operation. This @@ -1426,6 +1446,93 @@ func (s *GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata) MarshalJ type GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse struct { } +// GoogleCloudDiscoveryengineV1DocumentProcessingConfig: A singleton +// resource of DataStore. It's empty when DataStore is created, which +// defaults to digital parser. The first call to +// DataStoreService.UpdateDocumentProcessingConfig method will +// initialize the config. +type GoogleCloudDiscoveryengineV1DocumentProcessingConfig struct { + // DefaultParsingConfig: Configurations for default Document parser. If + // not specified, we will configure it as default DigitalParsingConfig, + // and the default parsing config will be applied to all file types for + // Document parsing. + DefaultParsingConfig *GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` + + // Name: The full resource name of the Document Processing Config. + // Format: + // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingC + // onfig`. + Name string `json:"name,omitempty"` + + // ParsingConfigOverrides: Map from file type to override the default + // parsing configuration based on the file type. Supported keys: * + // `pdf`: Override parsing config for PDF files, either digital parsing, + // ocr parsing or layout parsing is supported. * `html`: Override + // parsing config for HTML files, only digital parsing and or layout + // parsing are supported. * `docx`: Override parsing config for DOCX + // files, only digital parsing and or layout parsing are supported. + ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DefaultParsingConfig") 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. "DefaultParsingConfig") to + // include in API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1DocumentProcessingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1DocumentProcessingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig: +// Related configurations applied to a specific type of document parser. +type GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig struct { + // DigitalParsingConfig: Configurations applied to digital parser. + DigitalParsingConfig *GoogleCloudDiscoveryengineV1DigitalParsingConfig `json:"digitalParsingConfig,omitempty"` + + // OcrParsingConfig: Configurations applied to OCR parser. Currently it + // only applies to PDFs. + OcrParsingConfig *GoogleCloudDiscoveryengineV1OcrParsingConfig `json:"ocrParsingConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DigitalParsingConfig") 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. "DigitalParsingConfig") to + // include in API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata: // Metadata related to the progress of the // SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will @@ -2040,6 +2147,43 @@ func (s *GoogleCloudDiscoveryengineV1ImportUserEventsResponse) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1OcrParsingConfig: The OCR parsing +// configurations for documents. +type GoogleCloudDiscoveryengineV1OcrParsingConfig struct { + // EnhancedDocumentElements: Apply additional enhanced OCR processing to + // a list of document elements. Supported values: * `table`: advanced + // table parsing model. + EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` + + // UseNativeText: If true, will use native text instead of OCR text on + // pages containing native text. + UseNativeText bool `json:"useNativeText,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnhancedDocumentElements") 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. "EnhancedDocumentElements") + // to include in API requests with the JSON null value. By default, + // 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 *GoogleCloudDiscoveryengineV1OcrParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1OcrParsingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata: Metadata related // to the progress of the PurgeDocuments operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -2051,6 +2195,10 @@ type GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata struct { // processing. FailureCount int64 `json:"failureCount,omitempty,string"` + // IgnoredCount: Count of entries that were ignored as entries were not + // found. + IgnoredCount int64 `json:"ignoredCount,omitempty,string"` + // SuccessCount: Count of entries that were deleted successfully. SuccessCount int64 `json:"successCount,omitempty,string"` @@ -2481,6 +2629,41 @@ func (s *GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAclConfig: Access Control +// Configuration. +type GoogleCloudDiscoveryengineV1alphaAclConfig struct { + // IdpConfig: Identity provider config. + IdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfig `json:"idpConfig,omitempty"` + + // Name: Immutable. The full resource name of the acl configuration. + // Format: `projects/{project}/locations/{location}/aclConfig`. This + // field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IdpConfig") 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. "IdpConfig") to include in + // API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1alphaAclConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAclConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata: // Metadata related to the progress of the // SiteSearchEngineService.BatchCreateTargetSites operation. This will @@ -2687,6 +2870,16 @@ func (s *GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata) MarshalJSON( // GoogleCloudDiscoveryengineV1alphaDataStore: DataStore captures global // settings and configs at the DataStore level. type GoogleCloudDiscoveryengineV1alphaDataStore struct { + // AclEnabled: Immutable. Whether data in the DataStore has ACL + // information. If set to `true`, the source data must have ACL. ACL + // will be ingested when data is ingested by + // DocumentService.ImportDocuments methods. When ACL is enabled for the + // DataStore, Document can't be accessed by calling + // DocumentService.GetDocument or DocumentService.ListDocuments. + // Currently ACL is only supported in `GENERIC` industry vertical with + // non-`PUBLIC_WEBSITE` content config. + AclEnabled bool `json:"aclEnabled,omitempty"` + // ContentConfig: Immutable. The content config of the data store. If // this field is unset, the server behavior defaults to // ContentConfig.NO_CONTENT. @@ -2712,6 +2905,13 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // Otherwise, an INVALID_ARGUMENT error is returned. DisplayName string `json:"displayName,omitempty"` + // DocumentProcessingConfig: Configuration for Document understanding + // and enrichment. + DocumentProcessingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` + + // IdpConfig: Output only. Data store level identity provider config. + IdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfig `json:"idpConfig,omitempty"` + // IndustryVertical: Immutable. The industry vertical that the data // store registers. // @@ -2742,7 +2942,18 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // AI agent. SolutionTypes []string `json:"solutionTypes,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentConfig") to + // StartingSchema: The start schema to use for this DataStore when + // provisioning it. If unset, a default vertical specialized schema will + // be used. This field is only used by CreateDataStore API, and will be + // ignored if used in other APIs. This field will be omitted from all + // API responses including CreateDataStore API. To retrieve a schema of + // a DataStore, use SchemaService.GetSchema API instead. The provided + // schema will be validated against certain rules on schema. Learn more + // from this doc + // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + StartingSchema *GoogleCloudDiscoveryengineV1alphaSchema `json:"startingSchema,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AclEnabled") 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 @@ -2750,10 +2961,10 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentConfig") to include - // in API requests with the JSON null value. By default, 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. "AclEnabled") to include in + // API requests with the JSON null value. By default, 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:"-"` @@ -2978,7 +3189,8 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { // `pdf`: Override parsing config for PDF files, either digital parsing, // ocr parsing or layout parsing is supported. * `html`: Override // parsing config for HTML files, only digital parsing and or layout - // parsing are supported. + // parsing are supported. * `docx`: Override parsing config for DOCX + // files, only digital parsing and or layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -3089,6 +3301,12 @@ type GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse struct { // GoogleCloudDiscoveryengineV1alphaEngine: Metadata that describes the // training and serving parameters of an Engine. type GoogleCloudDiscoveryengineV1alphaEngine struct { + // AllowMultipleDataStoresSearchEngine: Whether the search engine can + // associate with multiple data stores. If true, the generic search + // engine can associate with one or more data stores. This is an + // input-only field. + AllowMultipleDataStoresSearchEngine bool `json:"allowMultipleDataStoresSearchEngine,omitempty"` + // ChatEngineConfig: Configurations for the Chat Engine. Only applicable // if solution_type is SOLUTION_TYPE_CHAT. ChatEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` @@ -3171,21 +3389,22 @@ type GoogleCloudDiscoveryengineV1alphaEngine struct { // updated. UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChatEngineConfig") 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. + // "AllowMultipleDataStoresSearchEngine") 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. "ChatEngineConfig") to - // include in API requests with the JSON null value. By default, 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. + // "AllowMultipleDataStoresSearchEngine") to include in API requests + // with the JSON null value. By default, 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:"-"` } @@ -3817,6 +4036,74 @@ func (s *GoogleCloudDiscoveryengineV1alphaFieldConfig) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaIdpConfig: Identity Provider Config. +type GoogleCloudDiscoveryengineV1alphaIdpConfig struct { + // ExternalIdpConfig: External Identity provider config. + ExternalIdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig `json:"externalIdpConfig,omitempty"` + + // IdpType: Identity provider type configured. + // + // Possible values: + // "IDP_TYPE_UNSPECIFIED" - Default value. ACL search not enabled. + // "GSUITE" - Google 1P provider. + // "THIRD_PARTY" - Third party provider. + IdpType string `json:"idpType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExternalIdpConfig") + // 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. "ExternalIdpConfig") to + // include in API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1alphaIdpConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaIdpConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig: Third +// party IDP Config. +type GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig struct { + // WorkforcePoolName: Workforce pool name. Example: + // "locations/global/workforcePools/pool_id" + WorkforcePoolName string `json:"workforcePoolName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "WorkforcePoolName") + // 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. "WorkforcePoolName") to + // include in API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata: Metadata // related to the progress of the ImportDocuments operation. This is // returned by the google.longrunning.Operation.metadata field. @@ -4180,6 +4467,10 @@ type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata struct { // processing. FailureCount int64 `json:"failureCount,omitempty,string"` + // IgnoredCount: Count of entries that were ignored as entries were not + // found. + IgnoredCount int64 `json:"ignoredCount,omitempty,string"` + // SuccessCount: Count of entries that were deleted successfully. SuccessCount int64 `json:"successCount,omitempty,string"` @@ -5367,6 +5658,12 @@ func (s *GoogleCloudDiscoveryengineV1betaConversationMessage) MarshalJSON() ([]b // GoogleCloudDiscoveryengineV1betaConverseConversationRequest: Request // message for ConversationalSearchService.ConverseConversation method. type GoogleCloudDiscoveryengineV1betaConverseConversationRequest struct { + // BoostSpec: Boost specification to boost certain documents in search + // results which may affect the converse response. For more information + // on boosting, see Boosting + // (https://cloud.google.com/retail/docs/boosting#boost) + BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` + // Conversation: The conversation to be used by auto session only. The // name field will be ignored as we automatically assign new name for // the conversation in auto session. @@ -5420,7 +5717,7 @@ type GoogleCloudDiscoveryengineV1betaConverseConversationRequest struct { // for more details. UserLabels map[string]string `json:"userLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "Conversation") to + // ForceSendFields is a list of field names (e.g. "BoostSpec") 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 @@ -5428,10 +5725,10 @@ type GoogleCloudDiscoveryengineV1betaConverseConversationRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Conversation") to include - // in API requests with the JSON null value. By default, 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. "BoostSpec") to include in + // API requests with the JSON null value. By default, 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:"-"` @@ -5742,6 +6039,10 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // Otherwise, an INVALID_ARGUMENT error is returned. DisplayName string `json:"displayName,omitempty"` + // DocumentProcessingConfig: Configuration for Document understanding + // and enrichment. + DocumentProcessingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` + // IndustryVertical: Immutable. The industry vertical that the data // store registers. // @@ -5772,6 +6073,17 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // AI agent. SolutionTypes []string `json:"solutionTypes,omitempty"` + // StartingSchema: The start schema to use for this DataStore when + // provisioning it. If unset, a default vertical specialized schema will + // be used. This field is only used by CreateDataStore API, and will be + // ignored if used in other APIs. This field will be omitted from all + // API responses including CreateDataStore API. To retrieve a schema of + // a DataStore, use SchemaService.GetSchema API instead. The provided + // schema will be validated against certain rules on schema. Learn more + // from this doc + // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -5937,6 +6249,11 @@ func (s *GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaDigitalParsingConfig: The digital +// parsing configurations for documents. +type GoogleCloudDiscoveryengineV1betaDigitalParsingConfig struct { +} + // GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata: // Metadata related to the progress of the // SiteSearchEngineService.DisableAdvancedSiteSearch operation. This @@ -6000,6 +6317,12 @@ type GoogleCloudDiscoveryengineV1betaDocument struct { // limit of 63 characters. Id string `json:"id,omitempty"` + // IndexTime: Output only. The last time the document was indexed. If + // this field is set, the document could be returned in search results. + // This field is OUTPUT_ONLY. If this field is not populated, it means + // the document has never been indexed. + IndexTime string `json:"indexTime,omitempty"` + // JsonData: The JSON string representation of the document. It should // conform to the registered Schema or an `INVALID_ARGUMENT` error is // thrown. @@ -6152,6 +6475,96 @@ func (s *GoogleCloudDiscoveryengineV1betaDocumentInfo) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig: A singleton +// resource of DataStore. It's empty when DataStore is created, which +// defaults to digital parser. The first call to +// DataStoreService.UpdateDocumentProcessingConfig method will +// initialize the config. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { + // DefaultParsingConfig: Configurations for default Document parser. If + // not specified, we will configure it as default DigitalParsingConfig, + // and the default parsing config will be applied to all file types for + // Document parsing. + DefaultParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` + + // Name: The full resource name of the Document Processing Config. + // Format: + // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingC + // onfig`. + Name string `json:"name,omitempty"` + + // ParsingConfigOverrides: Map from file type to override the default + // parsing configuration based on the file type. Supported keys: * + // `pdf`: Override parsing config for PDF files, either digital parsing, + // ocr parsing or layout parsing is supported. * `html`: Override + // parsing config for HTML files, only digital parsing and or layout + // parsing are supported. * `docx`: Override parsing config for DOCX + // files, only digital parsing and or layout parsing are supported. + ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DefaultParsingConfig") 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. "DefaultParsingConfig") to + // include in API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig: +// +// Related configurations applied to a specific type of document +// +// parser. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig struct { + // DigitalParsingConfig: Configurations applied to digital parser. + DigitalParsingConfig *GoogleCloudDiscoveryengineV1betaDigitalParsingConfig `json:"digitalParsingConfig,omitempty"` + + // OcrParsingConfig: Configurations applied to OCR parser. Currently it + // only applies to PDFs. + OcrParsingConfig *GoogleCloudDiscoveryengineV1betaOcrParsingConfig `json:"ocrParsingConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DigitalParsingConfig") 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. "DigitalParsingConfig") to + // include in API requests with the JSON null value. By default, 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 *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaDoubleList: Double list. type GoogleCloudDiscoveryengineV1betaDoubleList struct { // Values: Double values. @@ -7573,6 +7986,43 @@ func (s *GoogleCloudDiscoveryengineV1betaMediaInfo) UnmarshalJSON(data []byte) e return nil } +// GoogleCloudDiscoveryengineV1betaOcrParsingConfig: The OCR parsing +// configurations for documents. +type GoogleCloudDiscoveryengineV1betaOcrParsingConfig struct { + // EnhancedDocumentElements: Apply additional enhanced OCR processing to + // a list of document elements. Supported values: * `table`: advanced + // table parsing model. + EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` + + // UseNativeText: If true, will use native text instead of OCR text on + // pages containing native text. + UseNativeText bool `json:"useNativeText,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnhancedDocumentElements") 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. "EnhancedDocumentElements") + // to include in API requests with the JSON null value. By default, + // 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 *GoogleCloudDiscoveryengineV1betaOcrParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaOcrParsingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaPageInfo: Detailed page information. type GoogleCloudDiscoveryengineV1betaPageInfo struct { // PageCategory: The most specific category associated with a category @@ -7682,6 +8132,10 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { // processing. FailureCount int64 `json:"failureCount,omitempty,string"` + // IgnoredCount: Count of entries that were ignored as entries were not + // found. + IgnoredCount int64 `json:"ignoredCount,omitempty,string"` + // SuccessCount: Count of entries that were deleted successfully. SuccessCount int64 `json:"successCount,omitempty,string"` @@ -8491,8 +8945,8 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec st // syntax and supported fields are the same as a filter expression. See // SearchRequest.filter for detail syntax and limitations. Examples: * // To boost documents with document ID "doc_1" or "doc_2", and color - // "Red" or "Blue": * (id: ANY("doc_1", "doc_2")) AND (color: - // ANY("Red","Blue")) + // "Red" or "Blue": * (document_id: ANY("doc_1", "doc_2")) AND (color: + // ANY("Red", "Blue")) Condition string `json:"condition,omitempty"` // ForceSendFields is a list of field names (e.g. "Boost") to diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index e41e5f3baa1..60987e793c8 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -14,7 +14,7 @@ "canonicalName": "DLP", "description": "Discover and protect your sensitive data. A fully managed service designed to help you discover, classify, and protect your valuable data assets with ease.", "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/dlp/docs/", + "documentationLink": "https://cloud.google.com/sensitive-data-protection/docs/", "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -108,7 +108,7 @@ "infoTypes": { "methods": { "list": { - "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.", + "description": "Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more.", "flatPath": "v2/infoTypes", "httpMethod": "GET", "id": "dlp.infoTypes.list", @@ -150,7 +150,7 @@ "infoTypes": { "methods": { "list": { - "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.", + "description": "Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more.", "flatPath": "v2/locations/{locationsId}/infoTypes", "httpMethod": "GET", "id": "dlp.locations.infoTypes.list", @@ -198,7 +198,7 @@ "deidentifyTemplates": { "methods": { "create": { - "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.", + "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", "httpMethod": "POST", "id": "dlp.organizations.deidentifyTemplates.create", @@ -207,7 +207,7 @@ ], "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -226,7 +226,7 @@ ] }, "delete": { - "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", "httpMethod": "DELETE", "id": "dlp.organizations.deidentifyTemplates.delete", @@ -251,7 +251,7 @@ ] }, "get": { - "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", "httpMethod": "GET", "id": "dlp.organizations.deidentifyTemplates.get", @@ -276,7 +276,7 @@ ] }, "list": { - "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", "httpMethod": "GET", "id": "dlp.organizations.deidentifyTemplates.list", @@ -306,7 +306,7 @@ "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -322,7 +322,7 @@ ] }, "patch": { - "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", "httpMethod": "PATCH", "id": "dlp.organizations.deidentifyTemplates.patch", @@ -354,7 +354,7 @@ "inspectTemplates": { "methods": { "create": { - "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.", + "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", "httpMethod": "POST", "id": "dlp.organizations.inspectTemplates.create", @@ -363,7 +363,7 @@ ], "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -382,7 +382,7 @@ ] }, "delete": { - "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", "httpMethod": "DELETE", "id": "dlp.organizations.inspectTemplates.delete", @@ -407,7 +407,7 @@ ] }, "get": { - "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", "httpMethod": "GET", "id": "dlp.organizations.inspectTemplates.get", @@ -432,7 +432,7 @@ ] }, "list": { - "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", "httpMethod": "GET", "id": "dlp.organizations.inspectTemplates.list", @@ -462,7 +462,7 @@ "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -478,7 +478,7 @@ ] }, "patch": { - "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", "httpMethod": "PATCH", "id": "dlp.organizations.inspectTemplates.patch", @@ -509,10 +509,85 @@ }, "locations": { "resources": { + "columnDataProfiles": { + "methods": { + "get": { + "description": "Gets a column data profile.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/columnDataProfiles/{columnDataProfilesId}", + "httpMethod": "GET", + "id": "dlp.organizations.locations.columnDataProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name, for example `organizations/12345/locations/us/columnDataProfiles/53234423`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/columnDataProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GooglePrivacyDlpV2ColumnDataProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists data profiles for an organization.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/columnDataProfiles", + "httpMethod": "GET", + "id": "dlp.organizations.locations.columnDataProfiles.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: - `table_data_profile_name` - The name of the related table data profile. - `project_id` - The Google Cloud project ID. (REQUIRED) - `dataset_id` - The BigQuery dataset ID. (REQUIRED) - `table_id` - The BigQuery table ID. (REQUIRED) - `field_id` - The ID of the BigQuery field. - `info_type` - The infotype detected in the resource. - `sensitivity_level` - HIGH|MEDIUM|LOW - `data_risk_level`: How much risk is associated with this data. - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` for project_id, dataset_id, and table_id. Other filters also support `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * project_id = 12345 AND info_type = STREET_ADDRESS The length of this field should be no more than 500 characters.", + "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. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id asc` * `table_id` * `sensitivity_level desc` Supported fields are: - `project_id`: The Google Cloud project ID. - `dataset_id`: The ID of a BigQuery dataset. - `table_id`: The ID of a BigQuery table. - `sensitivity_level`: How sensitive the data in a column is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Size of the page. This value 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource name of the organization or project, for example `organizations/433245324/locations/europe` or projects/project-id/locations/asia.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/columnDataProfiles", + "response": { + "$ref": "GooglePrivacyDlpV2ListColumnDataProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "deidentifyTemplates": { "methods": { "create": { - "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.", + "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", "httpMethod": "POST", "id": "dlp.organizations.locations.deidentifyTemplates.create", @@ -521,7 +596,7 @@ ], "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -540,7 +615,7 @@ ] }, "delete": { - "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", "httpMethod": "DELETE", "id": "dlp.organizations.locations.deidentifyTemplates.delete", @@ -565,7 +640,7 @@ ] }, "get": { - "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", "httpMethod": "GET", "id": "dlp.organizations.locations.deidentifyTemplates.get", @@ -590,7 +665,7 @@ ] }, "list": { - "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", "httpMethod": "GET", "id": "dlp.organizations.locations.deidentifyTemplates.list", @@ -620,7 +695,7 @@ "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -636,7 +711,7 @@ ] }, "patch": { - "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", "httpMethod": "PATCH", "id": "dlp.organizations.locations.deidentifyTemplates.patch", @@ -819,7 +894,7 @@ "dlpJobs": { "methods": { "list": { - "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.", + "description": "Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/dlpJobs", "httpMethod": "GET", "id": "dlp.organizations.locations.dlpJobs.list", @@ -854,7 +929,7 @@ "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -889,7 +964,7 @@ "inspectTemplates": { "methods": { "create": { - "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.", + "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", "httpMethod": "POST", "id": "dlp.organizations.locations.inspectTemplates.create", @@ -898,7 +973,7 @@ ], "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -917,7 +992,7 @@ ] }, "delete": { - "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", "httpMethod": "DELETE", "id": "dlp.organizations.locations.inspectTemplates.delete", @@ -942,7 +1017,7 @@ ] }, "get": { - "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", "httpMethod": "GET", "id": "dlp.organizations.locations.inspectTemplates.get", @@ -967,7 +1042,7 @@ ] }, "list": { - "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", "httpMethod": "GET", "id": "dlp.organizations.locations.inspectTemplates.list", @@ -997,7 +1072,7 @@ "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1013,7 +1088,7 @@ ] }, "patch": { - "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", "httpMethod": "PATCH", "id": "dlp.organizations.locations.inspectTemplates.patch", @@ -1045,7 +1120,7 @@ "jobTriggers": { "methods": { "create": { - "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.", + "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/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers", "httpMethod": "POST", "id": "dlp.organizations.locations.jobTriggers.create", @@ -1054,7 +1129,7 @@ ], "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1073,7 +1148,7 @@ ] }, "delete": { - "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "description": "Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", "httpMethod": "DELETE", "id": "dlp.organizations.locations.jobTriggers.delete", @@ -1098,7 +1173,7 @@ ] }, "get": { - "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "description": "Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", "httpMethod": "GET", "id": "dlp.organizations.locations.jobTriggers.get", @@ -1123,7 +1198,7 @@ ] }, "list": { - "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "description": "Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers", "httpMethod": "GET", "id": "dlp.organizations.locations.jobTriggers.list", @@ -1158,7 +1233,7 @@ "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1189,7 +1264,7 @@ ] }, "patch": { - "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "description": "Updates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", "httpMethod": "PATCH", "id": "dlp.organizations.locations.jobTriggers.patch", @@ -1218,10 +1293,85 @@ } } }, + "projectDataProfiles": { + "methods": { + "get": { + "description": "Gets a project data profile.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/projectDataProfiles/{projectDataProfilesId}", + "httpMethod": "GET", + "id": "dlp.organizations.locations.projectDataProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name, for example `organizations/12345/locations/us/projectDataProfiles/53234423`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/projectDataProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GooglePrivacyDlpV2ProjectDataProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists data profiles for an organization.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/projectDataProfiles", + "httpMethod": "GET", + "id": "dlp.organizations.locations.projectDataProfiles.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: - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH The length of this field should be no more than 500 characters.", + "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. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id` * `sensitivity_level desc` Supported fields are: - `project_id`: GCP project ID - `sensitivity_level`: How sensitive the data in a project is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Size of the page. This value 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. organizations/{org_id}/locations/{loc_id}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/projectDataProfiles", + "response": { + "$ref": "GooglePrivacyDlpV2ListProjectDataProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "storedInfoTypes": { "methods": { "create": { - "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.", + "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", "httpMethod": "POST", "id": "dlp.organizations.locations.storedInfoTypes.create", @@ -1230,7 +1380,7 @@ ], "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1249,7 +1399,7 @@ ] }, "delete": { - "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "description": "Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", "httpMethod": "DELETE", "id": "dlp.organizations.locations.storedInfoTypes.delete", @@ -1274,7 +1424,7 @@ ] }, "get": { - "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "description": "Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", "httpMethod": "GET", "id": "dlp.organizations.locations.storedInfoTypes.get", @@ -1299,7 +1449,7 @@ ] }, "list": { - "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "description": "Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", "httpMethod": "GET", "id": "dlp.organizations.locations.storedInfoTypes.list", @@ -1329,7 +1479,7 @@ "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", + "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/sensitive-data-protection/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, @@ -1345,7 +1495,7 @@ ] }, "patch": { - "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.", + "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/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", "httpMethod": "PATCH", "id": "dlp.organizations.locations.storedInfoTypes.patch", @@ -1373,13 +1523,88 @@ ] } } + }, + "tableDataProfiles": { + "methods": { + "get": { + "description": "Gets a table data profile.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/tableDataProfiles/{tableDataProfilesId}", + "httpMethod": "GET", + "id": "dlp.organizations.locations.tableDataProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name, for example `organizations/12345/locations/us/tableDataProfiles/53234423`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GooglePrivacyDlpV2TableDataProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists data profiles for an organization.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/tableDataProfiles", + "httpMethod": "GET", + "id": "dlp.organizations.locations.tableDataProfiles.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: - `project_id` - The GCP project ID. - `dataset_id` - The BigQuery dataset ID. - `table_id` - The ID of the BigQuery table. - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * project_id = 12345 AND resource_visibility = PUBLIC The length of this field should be no more than 500 characters.", + "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. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id asc` * `table_id` * `sensitivity_level desc` Supported fields are: - `project_id`: The GCP project ID. - `dataset_id`: The ID of a BigQuery dataset. - `table_id`: The ID of a BigQuery table. - `sensitivity_level`: How sensitive the data in a table is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds. - `last_modified`: The last time the resource was modified. - `resource_visibility`: Visibility restriction for this resource. - `row_count`: Number of rows in this resource.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Size of the page. This value 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource name of the organization or project, for example `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/tableDataProfiles", + "response": { + "$ref": "GooglePrivacyDlpV2ListTableDataProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } }, "storedInfoTypes": { "methods": { "create": { - "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.", + "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", "httpMethod": "POST", "id": "dlp.organizations.storedInfoTypes.create", @@ -1388,7 +1613,7 @@ ], "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1407,7 +1632,7 @@ ] }, "delete": { - "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "description": "Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", "httpMethod": "DELETE", "id": "dlp.organizations.storedInfoTypes.delete", @@ -1432,7 +1657,7 @@ ] }, "get": { - "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "description": "Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", "httpMethod": "GET", "id": "dlp.organizations.storedInfoTypes.get", @@ -1457,7 +1682,7 @@ ] }, "list": { - "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "description": "Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", "httpMethod": "GET", "id": "dlp.organizations.storedInfoTypes.list", @@ -1487,7 +1712,7 @@ "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", + "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/sensitive-data-protection/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/[^/]+$", "required": true, @@ -1503,7 +1728,7 @@ ] }, "patch": { - "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.", + "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/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", "httpMethod": "PATCH", "id": "dlp.organizations.storedInfoTypes.patch", @@ -1539,7 +1764,7 @@ "content": { "methods": { "deidentify": { - "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.", + "description": "De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/sensitive-data-protection/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", @@ -1548,7 +1773,7 @@ ], "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", + "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1567,7 +1792,7 @@ ] }, "inspect": { - "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,", + "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/sensitive-data-protection/docs/inspecting-images and https://cloud.google.com/sensitive-data-protection/docs/inspecting-text,", "flatPath": "v2/projects/{projectsId}/content:inspect", "httpMethod": "POST", "id": "dlp.projects.content.inspect", @@ -1576,7 +1801,7 @@ ], "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", + "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1595,7 +1820,7 @@ ] }, "reidentify": { - "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.", + "description": "Re-identifies content that has been de-identified. See https://cloud.google.com/sensitive-data-protection/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", @@ -1604,7 +1829,7 @@ ], "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1627,7 +1852,7 @@ "deidentifyTemplates": { "methods": { "create": { - "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.", + "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", "httpMethod": "POST", "id": "dlp.projects.deidentifyTemplates.create", @@ -1636,7 +1861,7 @@ ], "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1655,7 +1880,7 @@ ] }, "delete": { - "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", "httpMethod": "DELETE", "id": "dlp.projects.deidentifyTemplates.delete", @@ -1680,7 +1905,7 @@ ] }, "get": { - "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", "httpMethod": "GET", "id": "dlp.projects.deidentifyTemplates.get", @@ -1705,7 +1930,7 @@ ] }, "list": { - "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/projects/{projectsId}/deidentifyTemplates", "httpMethod": "GET", "id": "dlp.projects.deidentifyTemplates.list", @@ -1735,7 +1960,7 @@ "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1751,7 +1976,7 @@ ] }, "patch": { - "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", "httpMethod": "PATCH", "id": "dlp.projects.deidentifyTemplates.patch", @@ -1783,7 +2008,7 @@ "dlpJobs": { "methods": { "cancel": { - "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.", + "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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}:cancel", "httpMethod": "POST", "id": "dlp.projects.dlpJobs.cancel", @@ -1811,7 +2036,7 @@ ] }, "create": { - "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.", + "description": "Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/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", @@ -1820,7 +2045,7 @@ ], "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1839,7 +2064,7 @@ ] }, "delete": { - "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.", + "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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", "httpMethod": "DELETE", "id": "dlp.projects.dlpJobs.delete", @@ -1864,7 +2089,7 @@ ] }, "get": { - "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.", + "description": "Gets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", "flatPath": "v2/projects/{projectsId}/dlpJobs/{dlpJobsId}", "httpMethod": "GET", "id": "dlp.projects.dlpJobs.get", @@ -1889,7 +2114,7 @@ ] }, "list": { - "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.", + "description": "Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", "flatPath": "v2/projects/{projectsId}/dlpJobs", "httpMethod": "GET", "id": "dlp.projects.dlpJobs.list", @@ -1924,7 +2149,7 @@ "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1959,7 +2184,7 @@ "image": { "methods": { "redact": { - "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.", + "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/sensitive-data-protection/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", @@ -1968,7 +2193,7 @@ ], "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", + "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -1991,7 +2216,7 @@ "inspectTemplates": { "methods": { "create": { - "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.", + "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/projects/{projectsId}/inspectTemplates", "httpMethod": "POST", "id": "dlp.projects.inspectTemplates.create", @@ -2000,7 +2225,7 @@ ], "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -2019,7 +2244,7 @@ ] }, "delete": { - "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", "httpMethod": "DELETE", "id": "dlp.projects.inspectTemplates.delete", @@ -2044,7 +2269,7 @@ ] }, "get": { - "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", "httpMethod": "GET", "id": "dlp.projects.inspectTemplates.get", @@ -2069,7 +2294,7 @@ ] }, "list": { - "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/projects/{projectsId}/inspectTemplates", "httpMethod": "GET", "id": "dlp.projects.inspectTemplates.list", @@ -2099,7 +2324,7 @@ "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -2115,7 +2340,7 @@ ] }, "patch": { - "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/projects/{projectsId}/inspectTemplates/{inspectTemplatesId}", "httpMethod": "PATCH", "id": "dlp.projects.inspectTemplates.patch", @@ -2175,7 +2400,7 @@ ] }, "create": { - "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.", + "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/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/projects/{projectsId}/jobTriggers", "httpMethod": "POST", "id": "dlp.projects.jobTriggers.create", @@ -2184,7 +2409,7 @@ ], "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -2203,7 +2428,7 @@ ] }, "delete": { - "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "description": "Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", "httpMethod": "DELETE", "id": "dlp.projects.jobTriggers.delete", @@ -2228,7 +2453,7 @@ ] }, "get": { - "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "description": "Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", "httpMethod": "GET", "id": "dlp.projects.jobTriggers.get", @@ -2253,7 +2478,7 @@ ] }, "list": { - "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "description": "Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/projects/{projectsId}/jobTriggers", "httpMethod": "GET", "id": "dlp.projects.jobTriggers.list", @@ -2288,7 +2513,7 @@ "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -2319,7 +2544,7 @@ ] }, "patch": { - "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "description": "Updates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/projects/{projectsId}/jobTriggers/{jobTriggersId}", "httpMethod": "PATCH", "id": "dlp.projects.jobTriggers.patch", @@ -2350,10 +2575,85 @@ }, "locations": { "resources": { + "columnDataProfiles": { + "methods": { + "get": { + "description": "Gets a column data profile.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/columnDataProfiles/{columnDataProfilesId}", + "httpMethod": "GET", + "id": "dlp.projects.locations.columnDataProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name, for example `organizations/12345/locations/us/columnDataProfiles/53234423`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/columnDataProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GooglePrivacyDlpV2ColumnDataProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists data profiles for an organization.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/columnDataProfiles", + "httpMethod": "GET", + "id": "dlp.projects.locations.columnDataProfiles.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: - `table_data_profile_name` - The name of the related table data profile. - `project_id` - The Google Cloud project ID. (REQUIRED) - `dataset_id` - The BigQuery dataset ID. (REQUIRED) - `table_id` - The BigQuery table ID. (REQUIRED) - `field_id` - The ID of the BigQuery field. - `info_type` - The infotype detected in the resource. - `sensitivity_level` - HIGH|MEDIUM|LOW - `data_risk_level`: How much risk is associated with this data. - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` for project_id, dataset_id, and table_id. Other filters also support `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * project_id = 12345 AND info_type = STREET_ADDRESS The length of this field should be no more than 500 characters.", + "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. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id asc` * `table_id` * `sensitivity_level desc` Supported fields are: - `project_id`: The Google Cloud project ID. - `dataset_id`: The ID of a BigQuery dataset. - `table_id`: The ID of a BigQuery table. - `sensitivity_level`: How sensitive the data in a column is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Size of the page. This value 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource name of the organization or project, for example `organizations/433245324/locations/europe` or projects/project-id/locations/asia.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/columnDataProfiles", + "response": { + "$ref": "GooglePrivacyDlpV2ListColumnDataProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "content": { "methods": { "deidentify": { - "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.", + "description": "De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/sensitive-data-protection/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", @@ -2362,7 +2662,7 @@ ], "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", + "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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/[^/]+/locations/[^/]+$", "required": true, @@ -2381,7 +2681,7 @@ ] }, "inspect": { - "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,", + "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/sensitive-data-protection/docs/inspecting-images and https://cloud.google.com/sensitive-data-protection/docs/inspecting-text,", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/content:inspect", "httpMethod": "POST", "id": "dlp.projects.locations.content.inspect", @@ -2390,7 +2690,7 @@ ], "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", + "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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/[^/]+/locations/[^/]+$", "required": true, @@ -2409,7 +2709,7 @@ ] }, "reidentify": { - "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.", + "description": "Re-identifies content that has been de-identified. See https://cloud.google.com/sensitive-data-protection/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", @@ -2418,7 +2718,7 @@ ], "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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/[^/]+/locations/[^/]+$", "required": true, @@ -2441,7 +2741,7 @@ "deidentifyTemplates": { "methods": { "create": { - "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.", + "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", "httpMethod": "POST", "id": "dlp.projects.locations.deidentifyTemplates.create", @@ -2450,7 +2750,7 @@ ], "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -2469,7 +2769,7 @@ ] }, "delete": { - "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", "httpMethod": "DELETE", "id": "dlp.projects.locations.deidentifyTemplates.delete", @@ -2494,7 +2794,7 @@ ] }, "get": { - "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", "httpMethod": "GET", "id": "dlp.projects.locations.deidentifyTemplates.get", @@ -2519,7 +2819,7 @@ ] }, "list": { - "description": "Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates", "httpMethod": "GET", "id": "dlp.projects.locations.deidentifyTemplates.list", @@ -2549,7 +2849,7 @@ "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -2565,7 +2865,7 @@ ] }, "patch": { - "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to learn more.", + "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", "httpMethod": "PATCH", "id": "dlp.projects.locations.deidentifyTemplates.patch", @@ -2748,7 +3048,7 @@ "dlpJobs": { "methods": { "cancel": { - "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.", + "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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:cancel", "httpMethod": "POST", "id": "dlp.projects.locations.dlpJobs.cancel", @@ -2776,7 +3076,7 @@ ] }, "create": { - "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.", + "description": "Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/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}/locations/{locationsId}/dlpJobs", "httpMethod": "POST", "id": "dlp.projects.locations.dlpJobs.create", @@ -2785,7 +3085,7 @@ ], "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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/[^/]+/locations/[^/]+$", "required": true, @@ -2804,7 +3104,7 @@ ] }, "delete": { - "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.", + "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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}", "httpMethod": "DELETE", "id": "dlp.projects.locations.dlpJobs.delete", @@ -2857,7 +3157,7 @@ ] }, "get": { - "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.", + "description": "Gets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}", "httpMethod": "GET", "id": "dlp.projects.locations.dlpJobs.get", @@ -2910,7 +3210,7 @@ ] }, "list": { - "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.", + "description": "Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs", "httpMethod": "GET", "id": "dlp.projects.locations.dlpJobs.list", @@ -2945,7 +3245,7 @@ "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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/[^/]+/locations/[^/]+$", "required": true, @@ -2980,7 +3280,7 @@ "image": { "methods": { "redact": { - "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.", + "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/sensitive-data-protection/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}/locations/{locationsId}/image:redact", "httpMethod": "POST", "id": "dlp.projects.locations.image.redact", @@ -2989,7 +3289,7 @@ ], "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", + "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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/[^/]+/locations/[^/]+$", "required": true, @@ -3012,7 +3312,7 @@ "inspectTemplates": { "methods": { "create": { - "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.", + "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", "httpMethod": "POST", "id": "dlp.projects.locations.inspectTemplates.create", @@ -3021,7 +3321,7 @@ ], "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -3040,7 +3340,7 @@ ] }, "delete": { - "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", "httpMethod": "DELETE", "id": "dlp.projects.locations.inspectTemplates.delete", @@ -3065,7 +3365,7 @@ ] }, "get": { - "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", "httpMethod": "GET", "id": "dlp.projects.locations.inspectTemplates.get", @@ -3090,7 +3390,7 @@ ] }, "list": { - "description": "Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", "httpMethod": "GET", "id": "dlp.projects.locations.inspectTemplates.list", @@ -3120,7 +3420,7 @@ "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -3136,7 +3436,7 @@ ] }, "patch": { - "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", + "description": "Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", "httpMethod": "PATCH", "id": "dlp.projects.locations.inspectTemplates.patch", @@ -3196,7 +3496,7 @@ ] }, "create": { - "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.", + "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/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers", "httpMethod": "POST", "id": "dlp.projects.locations.jobTriggers.create", @@ -3205,7 +3505,7 @@ ], "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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/[^/]+/locations/[^/]+$", "required": true, @@ -3224,7 +3524,7 @@ ] }, "delete": { - "description": "Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "description": "Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", "httpMethod": "DELETE", "id": "dlp.projects.locations.jobTriggers.delete", @@ -3249,7 +3549,7 @@ ] }, "get": { - "description": "Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "description": "Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", "httpMethod": "GET", "id": "dlp.projects.locations.jobTriggers.get", @@ -3302,7 +3602,7 @@ ] }, "list": { - "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "description": "Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers", "httpMethod": "GET", "id": "dlp.projects.locations.jobTriggers.list", @@ -3337,7 +3637,7 @@ "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 whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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/[^/]+/locations/[^/]+$", "required": true, @@ -3368,7 +3668,7 @@ ] }, "patch": { - "description": "Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", + "description": "Updates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", "httpMethod": "PATCH", "id": "dlp.projects.locations.jobTriggers.patch", @@ -3397,10 +3697,85 @@ } } }, + "projectDataProfiles": { + "methods": { + "get": { + "description": "Gets a project data profile.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/projectDataProfiles/{projectDataProfilesId}", + "httpMethod": "GET", + "id": "dlp.projects.locations.projectDataProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name, for example `organizations/12345/locations/us/projectDataProfiles/53234423`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/projectDataProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GooglePrivacyDlpV2ProjectDataProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists data profiles for an organization.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/projectDataProfiles", + "httpMethod": "GET", + "id": "dlp.projects.locations.projectDataProfiles.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: - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH The length of this field should be no more than 500 characters.", + "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. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id` * `sensitivity_level desc` Supported fields are: - `project_id`: GCP project ID - `sensitivity_level`: How sensitive the data in a project is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Size of the page. This value 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. organizations/{org_id}/locations/{loc_id}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/projectDataProfiles", + "response": { + "$ref": "GooglePrivacyDlpV2ListProjectDataProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "storedInfoTypes": { "methods": { "create": { - "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.", + "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes", "httpMethod": "POST", "id": "dlp.projects.locations.storedInfoTypes.create", @@ -3409,7 +3784,7 @@ ], "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -3428,7 +3803,7 @@ ] }, "delete": { - "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "description": "Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", "httpMethod": "DELETE", "id": "dlp.projects.locations.storedInfoTypes.delete", @@ -3453,7 +3828,7 @@ ] }, "get": { - "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "description": "Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", "httpMethod": "GET", "id": "dlp.projects.locations.storedInfoTypes.get", @@ -3478,7 +3853,7 @@ ] }, "list": { - "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "description": "Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes", "httpMethod": "GET", "id": "dlp.projects.locations.storedInfoTypes.list", @@ -3508,7 +3883,7 @@ "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", + "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/sensitive-data-protection/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/[^/]+/locations/[^/]+$", "required": true, @@ -3524,7 +3899,7 @@ ] }, "patch": { - "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.", + "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/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", "httpMethod": "PATCH", "id": "dlp.projects.locations.storedInfoTypes.patch", @@ -3552,13 +3927,88 @@ ] } } + }, + "tableDataProfiles": { + "methods": { + "get": { + "description": "Gets a table data profile.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/tableDataProfiles/{tableDataProfilesId}", + "httpMethod": "GET", + "id": "dlp.projects.locations.tableDataProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name, for example `organizations/12345/locations/us/tableDataProfiles/53234423`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GooglePrivacyDlpV2TableDataProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists data profiles for an organization.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/tableDataProfiles", + "httpMethod": "GET", + "id": "dlp.projects.locations.tableDataProfiles.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: - `project_id` - The GCP project ID. - `dataset_id` - The BigQuery dataset ID. - `table_id` - The ID of the BigQuery table. - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * project_id = 12345 AND resource_visibility = PUBLIC The length of this field should be no more than 500 characters.", + "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. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id asc` * `table_id` * `sensitivity_level desc` Supported fields are: - `project_id`: The GCP project ID. - `dataset_id`: The ID of a BigQuery dataset. - `table_id`: The ID of a BigQuery table. - `sensitivity_level`: How sensitive the data in a table is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds. - `last_modified`: The last time the resource was modified. - `resource_visibility`: Visibility restriction for this resource. - `row_count`: Number of rows in this resource.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Size of the page. This value 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.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Resource name of the organization or project, for example `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/tableDataProfiles", + "response": { + "$ref": "GooglePrivacyDlpV2ListTableDataProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } }, "storedInfoTypes": { "methods": { "create": { - "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.", + "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/projects/{projectsId}/storedInfoTypes", "httpMethod": "POST", "id": "dlp.projects.storedInfoTypes.create", @@ -3567,7 +4017,7 @@ ], "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -3586,7 +4036,7 @@ ] }, "delete": { - "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "description": "Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", "httpMethod": "DELETE", "id": "dlp.projects.storedInfoTypes.delete", @@ -3611,7 +4061,7 @@ ] }, "get": { - "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "description": "Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", "httpMethod": "GET", "id": "dlp.projects.storedInfoTypes.get", @@ -3636,7 +4086,7 @@ ] }, "list": { - "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + "description": "Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/projects/{projectsId}/storedInfoTypes", "httpMethod": "GET", "id": "dlp.projects.storedInfoTypes.list", @@ -3666,7 +4116,7 @@ "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", + "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/sensitive-data-protection/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, @@ -3682,7 +4132,7 @@ ] }, "patch": { - "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.", + "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/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", "httpMethod": "PATCH", "id": "dlp.projects.storedInfoTypes.patch", @@ -3714,11 +4164,11 @@ } } }, - "revision": "20240204", + "revision": "20240225", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { - "description": "A task to execute on the completion of a job. See https://cloud.google.com/dlp/docs/concepts-actions to learn more.", + "description": "A task to execute on the completion of a job. See https://cloud.google.com/sensitive-data-protection/docs/concepts-actions to learn more.", "id": "GooglePrivacyDlpV2Action", "properties": { "deidentify": { @@ -3937,7 +4387,7 @@ "type": "string" }, "rowsLimitPercent": { - "description": "Max percentage of rows to scan. The rest are omitted. The number of rows scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of rows_limit and rows_limit_percent can be specified. Cannot be used in conjunction with TimespanConfig. Caution: A [known issue](https://cloud.google.com/dlp/docs/known-issues#bq-sampling) is causing the `rowsLimitPercent` field to behave unexpectedly. We recommend using `rowsLimit` instead.", + "description": "Max percentage of rows to scan. The rest are omitted. The number of rows scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of rows_limit and rows_limit_percent can be specified. Cannot be used in conjunction with TimespanConfig. Caution: A [known issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-sampling) is causing the `rowsLimitPercent` field to behave unexpectedly. We recommend using `rowsLimit` instead.", "format": "int32", "type": "integer" }, @@ -4096,7 +4546,7 @@ "type": "object" }, "GooglePrivacyDlpV2BucketingConfig": { - "description": "Generalization function that buckets values based on ranges. The ranges and replacement values are dynamically provided by the user for custom behavior, such as 1-30 -\u003e LOW 31-65 -\u003e MEDIUM 66-100 -\u003e HIGH This can be used on data of type: number, long, string, timestamp. 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.", + "description": "Generalization function that buckets values based on ranges. The ranges and replacement values are dynamically provided by the user for custom behavior, such as 1-30 -\u003e LOW 31-65 -\u003e MEDIUM 66-100 -\u003e HIGH This can be used on data of type: number, long, string, timestamp. 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/sensitive-data-protection/docs/concepts-bucketing to learn more.", "id": "GooglePrivacyDlpV2BucketingConfig", "properties": { "buckets": { @@ -4296,12 +4746,12 @@ "id": "GooglePrivacyDlpV2CloudStorageOptions", "properties": { "bytesLimitPerFile": { - "description": "Max number of bytes to scan from a file. If a scanned file's size is bigger than this value then the rest of the bytes are omitted. Only one of `bytes_limit_per_file` and `bytes_limit_per_file_percent` can be specified. This field can't be set if de-identification is requested. For certain file types, setting this field has no effect. For more information, see [Limits on bytes scanned per file](https://cloud.google.com/dlp/docs/supported-file-types#max-byte-size-per-file).", + "description": "Max number of bytes to scan from a file. If a scanned file's size is bigger than this value then the rest of the bytes are omitted. Only one of `bytes_limit_per_file` and `bytes_limit_per_file_percent` can be specified. This field can't be set if de-identification is requested. For certain file types, setting this field has no effect. For more information, see [Limits on bytes scanned per file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).", "format": "int64", "type": "string" }, "bytesLimitPerFilePercent": { - "description": "Max percentage of bytes to scan from a file. The rest are omitted. The number of bytes scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of bytes_limit_per_file and bytes_limit_per_file_percent can be specified. This field can't be set if de-identification is requested. For certain file types, setting this field has no effect. For more information, see [Limits on bytes scanned per file](https://cloud.google.com/dlp/docs/supported-file-types#max-byte-size-per-file).", + "description": "Max percentage of bytes to scan from a file. The rest are omitted. The number of bytes scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of bytes_limit_per_file and bytes_limit_per_file_percent can be specified. This field can't be set if de-identification is requested. For certain file types, setting this field has no effect. For more information, see [Limits on bytes scanned per file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file).", "format": "int32", "type": "integer" }, @@ -4369,7 +4819,7 @@ "id": "GooglePrivacyDlpV2CloudStoragePath", "properties": { "path": { - "description": "A url representing a file or path (no wildcards) in Cloud Storage. Example: gs://[BUCKET_NAME]/dictionary.txt", + "description": "A URL representing a file or path (no wildcards) in Cloud Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt`", "type": "string" } }, @@ -4485,7 +4935,7 @@ "type": "string" }, "datasetProjectId": { - "description": "The Google Cloud project ID that owns the BigQuery dataset.", + "description": "The Google Cloud project ID that owns the profiled resource.", "type": "string" }, "estimatedNullPercentage": { @@ -4582,7 +5032,7 @@ "type": "string" }, "tableFullResource": { - "description": "The resource name of the table this column is within.", + "description": "The resource name of the resource this column is within.", "type": "string" }, "tableId": { @@ -4691,7 +5141,7 @@ }, "table": { "$ref": "GooglePrivacyDlpV2Table", - "description": "Structured content for inspection. See https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to learn more." + "description": "Structured content for inspection. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-text#inspecting_a_table to learn more." }, "value": { "description": "String data to inspect or redact.", @@ -4870,7 +5320,7 @@ "type": "object" }, "GooglePrivacyDlpV2CryptoHashConfig": { - "description": "Pseudonymization method that generates surrogates via cryptographic hashing. Uses SHA-256. The key size must be either 32 or 64 bytes. Outputs a base64 encoded representation of the hashed output (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Currently, only string and integer values can be hashed. See https://cloud.google.com/dlp/docs/pseudonymization to learn more.", + "description": "Pseudonymization method that generates surrogates via cryptographic hashing. Uses SHA-256. The key size must be either 32 or 64 bytes. Outputs a base64 encoded representation of the hashed output (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Currently, only string and integer values can be hashed. See https://cloud.google.com/sensitive-data-protection/docs/pseudonymization to learn more.", "id": "GooglePrivacyDlpV2CryptoHashConfig", "properties": { "cryptoKey": { @@ -4900,7 +5350,7 @@ "type": "object" }, "GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig": { - "description": "Replaces an identifier with a surrogate using Format Preserving Encryption (FPE) with the FFX mode of operation; however when used in the `ReidentifyContent` API method, it serves the opposite function by reversing the surrogate back into the original identifier. The identifier must be encoded as ASCII. For a given crypto key and context, the same identifier will be replaced with the same surrogate. Identifiers must be at least two characters long. In the case that the identifier is the empty string, it will be skipped. See https://cloud.google.com/dlp/docs/pseudonymization to learn more. Note: We recommend using CryptoDeterministicConfig for all use cases which do not require preserving the input alphabet space and size, plus warrant referential integrity.", + "description": "Replaces an identifier with a surrogate using Format Preserving Encryption (FPE) with the FFX mode of operation; however when used in the `ReidentifyContent` API method, it serves the opposite function by reversing the surrogate back into the original identifier. The identifier must be encoded as ASCII. For a given crypto key and context, the same identifier will be replaced with the same surrogate. Identifiers must be at least two characters long. In the case that the identifier is the empty string, it will be skipped. See https://cloud.google.com/sensitive-data-protection/docs/pseudonymization to learn more. Note: We recommend using CryptoDeterministicConfig for all use cases which do not require preserving the input alphabet space and size, plus warrant referential integrity.", "id": "GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig", "properties": { "commonAlphabet": { @@ -4940,7 +5390,7 @@ }, "surrogateInfoType": { "$ref": "GooglePrivacyDlpV2InfoType", - "description": "The custom infoType to annotate the surrogate with. This annotation will be applied to the surrogate by prefixing it with the name of the custom infoType followed by the number of characters comprising the surrogate. The following scheme defines the format: info_type_name(surrogate_character_count):surrogate For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom infoType [`SurrogateType`](https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype). This facilitates reversal of the surrogate when it occurs in free text. In order for inspection to work properly, the name of this infoType must not occur naturally anywhere in your data; otherwise, inspection may find a surrogate that does not correspond to an actual identifier. Therefore, choose your custom infoType name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY_TOKEN_TYPE" + "description": "The custom infoType to annotate the surrogate with. This annotation will be applied to the surrogate by prefixing it with the name of the custom infoType followed by the number of characters comprising the surrogate. The following scheme defines the format: info_type_name(surrogate_character_count):surrogate For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and the surrogate is 'abc', the full replacement value will be: 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate when inspecting content using the custom infoType [`SurrogateType`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/InspectConfig#surrogatetype). This facilitates reversal of the surrogate when it occurs in free text. In order for inspection to work properly, the name of this infoType must not occur naturally anywhere in your data; otherwise, inspection may find a surrogate that does not correspond to an actual identifier. Therefore, choose your custom infoType name carefully after considering what your data looks like. One way to select a name that has a high chance of yielding reliable detection is to include one or more unicode characters that are highly improbable to exist in your data. For example, assuming your data is entered from a regular ASCII keyboard, the symbol with the hex code point 29DD might be used like so: ⧝MY_TOKEN_TYPE" } }, "type": "object" @@ -5061,12 +5511,21 @@ "inspectConfig": { "$ref": "GooglePrivacyDlpV2InspectConfig", "description": "A copy of the inspection config used to generate this profile. This is a copy of the inspect_template specified in `DataProfileJobConfig`." + }, + "inspectTemplateModifiedTime": { + "description": "Timestamp when the template was modified", + "format": "google-datetime", + "type": "string" + }, + "inspectTemplateName": { + "description": "Name of the inspection template used to generate this profile", + "type": "string" } }, "type": "object" }, "GooglePrivacyDlpV2DataProfileJobConfig": { - "description": "Configuration for setting up a job to scan resources for profile generation. Only one data profile 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).", + "description": "Configuration for setting up a job to scan resources for profile generation. Only one data profile configuration may exist per organization, folder, or project. The generated data profiles are retained according to the [data retention policy] (https://cloud.google.com/sensitive-data-protection/docs/data-profiles#retention).", "id": "GooglePrivacyDlpV2DataProfileJobConfig", "properties": { "dataProfileActions": { @@ -5077,7 +5536,7 @@ "type": "array" }, "inspectTemplates": { - "description": "Detection logic for profile generation. Not all template features are used by profiles. FindingLimits, include_quote and exclude_info_types have no impact on data profiling. 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.", + "description": "Detection logic for profile generation. Not all template features are used by profiles. FindingLimits, include_quote and exclude_info_types have no impact on data profiling. 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/sensitive-data-protection/docs/data-profiles#data-residency.", "items": { "type": "string" }, @@ -5213,7 +5672,7 @@ "type": "object" }, "GooglePrivacyDlpV2DateShiftConfig": { - "description": "Shifts dates by random number of days, with option to be consistent for the same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting to learn more.", + "description": "Shifts dates by random number of days, with option to be consistent for the same context. See https://cloud.google.com/sensitive-data-protection/docs/concepts-date-shifting to learn more.", "id": "GooglePrivacyDlpV2DateShiftConfig", "properties": { "context": { @@ -5439,7 +5898,7 @@ "type": "object" }, "GooglePrivacyDlpV2DeidentifyTemplate": { - "description": "DeidentifyTemplates contains instructions on how to de-identify content. See https://cloud.google.com/dlp/docs/concepts-templates to learn more.", + "description": "DeidentifyTemplates contains instructions on how to de-identify content. See https://cloud.google.com/sensitive-data-protection/docs/concepts-templates to learn more.", "id": "GooglePrivacyDlpV2DeidentifyTemplate", "properties": { "createTime": { @@ -5578,7 +6037,7 @@ "type": "object" }, "GooglePrivacyDlpV2Dictionary": { - "description": "Custom information type based on a dictionary of words or phrases. This can be used to match sensitive information specific to the data, such as a list of employee IDs or job titles. Dictionary words are case-insensitive and all characters other than letters and digits in the unicode [Basic Multilingual Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) will be replaced with whitespace when scanning for matches, so the dictionary phrase \"Sam Johnson\" will match all three phrases \"sam johnson\", \"Sam, Johnson\", and \"Sam (Johnson)\". Additionally, the characters surrounding any match must be of a different type than the adjacent characters within the word, so letters must be next to non-letters and digits next to non-digits. For example, the dictionary word \"jen\" will match the first three letters of the text \"jen123\" but will return no matches for \"jennifer\". Dictionary words containing a large number of characters that are not letters or digits may result in unexpected findings because such characters are treated as whitespace. The [limits](https://cloud.google.com/dlp/limits) page contains details about the size limits of dictionaries. For dictionaries that do not fit within these constraints, consider using `LargeCustomDictionaryConfig` in the `StoredInfoType` API.", + "description": "Custom information type based on a dictionary of words or phrases. This can be used to match sensitive information specific to the data, such as a list of employee IDs or job titles. Dictionary words are case-insensitive and all characters other than letters and digits in the unicode [Basic Multilingual Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) will be replaced with whitespace when scanning for matches, so the dictionary phrase \"Sam Johnson\" will match all three phrases \"sam johnson\", \"Sam, Johnson\", and \"Sam (Johnson)\". Additionally, the characters surrounding any match must be of a different type than the adjacent characters within the word, so letters must be next to non-letters and digits next to non-digits. For example, the dictionary word \"jen\" will match the first three letters of the text \"jen123\" but will return no matches for \"jennifer\". Dictionary words containing a large number of characters that are not letters or digits may result in unexpected findings because such characters are treated as whitespace. The [limits](https://cloud.google.com/sensitive-data-protection/limits) page contains details about the size limits of dictionaries. For dictionaries that do not fit within these constraints, consider using `LargeCustomDictionaryConfig` in the `StoredInfoType` API.", "id": "GooglePrivacyDlpV2Dictionary", "properties": { "cloudStoragePath": { @@ -5648,7 +6107,7 @@ "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).", + "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/sensitive-data-protection/docs/data-profiles#retention).", "id": "GooglePrivacyDlpV2DiscoveryConfig", "properties": { "actions": { @@ -5677,7 +6136,7 @@ "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.", + "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/sensitive-data-protection/docs/data-profiles#data-residency.", "items": { "type": "string" }, @@ -6248,7 +6707,7 @@ "type": "object" }, "GooglePrivacyDlpV2FixedSizeBucketingConfig": { - "description": "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.", + "description": "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/sensitive-data-protection/docs/concepts-bucketing to learn more.", "id": "GooglePrivacyDlpV2FixedSizeBucketingConfig", "properties": { "bucketSize": { @@ -6281,7 +6740,7 @@ }, "proximity": { "$ref": "GooglePrivacyDlpV2Proximity", - "description": "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)." + "description": "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/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values)." } }, "type": "object" @@ -6487,7 +6946,7 @@ "id": "GooglePrivacyDlpV2InfoType", "properties": { "name": { - "description": "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}`.", + "description": "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/sensitive-data-protection/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}`.", "type": "string" }, "sensitivityScore": { @@ -6832,7 +7291,7 @@ "type": "array" }, "customInfoTypes": { - "description": "CustomInfoTypes provided by the user. See https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.", + "description": "CustomInfoTypes provided by the user. See https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes to learn more.", "items": { "$ref": "GooglePrivacyDlpV2CustomInfoType" }, @@ -6847,7 +7306,7 @@ "type": "boolean" }, "infoTypes": { - "description": "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 a default list of detectors to run, which may change over time. 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.", + "description": "Restricts what info_types to look for. The values must correspond to InfoType values returned by ListInfoTypes or listed at https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference. When no InfoTypes or CustomInfoTypes are specified in a request, the system may automatically choose a default list of detectors to run, which may change over time. 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.", "items": { "$ref": "GooglePrivacyDlpV2InfoType" }, @@ -6858,7 +7317,7 @@ "description": "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." }, "minLikelihood": { - "description": "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).", + "description": "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/sensitive-data-protection/docs/likelihood).", "enum": [ "LIKELIHOOD_UNSPECIFIED", "VERY_UNLIKELY", @@ -6988,7 +7447,7 @@ "type": "object" }, "GooglePrivacyDlpV2InspectTemplate": { - "description": "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.", + "description": "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/sensitive-data-protection/docs/concepts-templates to learn more.", "id": "GooglePrivacyDlpV2InspectTemplate", "properties": { "createTime": { @@ -7066,7 +7525,7 @@ "type": "object" }, "GooglePrivacyDlpV2JobTrigger": { - "description": "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.", + "description": "Contains a configuration to make dlp api calls on a repeating basis. See https://cloud.google.com/sensitive-data-protection/docs/concepts-job-triggers to learn more.", "id": "GooglePrivacyDlpV2JobTrigger", "properties": { "createTime": { @@ -7344,7 +7803,7 @@ "type": "object" }, "GooglePrivacyDlpV2KmsWrappedCryptoKey": { - "description": "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).", + "description": "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/sensitive-data-protection/docs/create-wrapped-key). Note: When you use Cloud KMS for cryptographic operations, [charges apply](https://cloud.google.com/kms/pricing).", "id": "GooglePrivacyDlpV2KmsWrappedCryptoKey", "properties": { "cryptoKeyName": { @@ -7457,7 +7916,7 @@ "type": "object" }, "GooglePrivacyDlpV2LargeCustomDictionaryConfig": { - "description": "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.", + "description": "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/sensitive-data-protection/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.", "id": "GooglePrivacyDlpV2LargeCustomDictionaryConfig", "properties": { "bigQueryField": { @@ -7525,6 +7984,24 @@ }, "type": "object" }, + "GooglePrivacyDlpV2ListColumnDataProfilesResponse": { + "description": "List of profiles generated for a given organization or project.", + "id": "GooglePrivacyDlpV2ListColumnDataProfilesResponse", + "properties": { + "columnDataProfiles": { + "description": "List of data profiles.", + "items": { + "$ref": "GooglePrivacyDlpV2ColumnDataProfile" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The next page token.", + "type": "string" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse": { "description": "Response message for ListDeidentifyTemplates.", "id": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse", @@ -7629,6 +8106,24 @@ }, "type": "object" }, + "GooglePrivacyDlpV2ListProjectDataProfilesResponse": { + "description": "List of profiles generated for a given organization or project.", + "id": "GooglePrivacyDlpV2ListProjectDataProfilesResponse", + "properties": { + "nextPageToken": { + "description": "The next page token.", + "type": "string" + }, + "projectDataProfiles": { + "description": "List of data profiles.", + "items": { + "$ref": "GooglePrivacyDlpV2ProjectDataProfile" + }, + "type": "array" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2ListStoredInfoTypesResponse": { "description": "Response message for ListStoredInfoTypes.", "id": "GooglePrivacyDlpV2ListStoredInfoTypesResponse", @@ -7647,6 +8142,24 @@ }, "type": "object" }, + "GooglePrivacyDlpV2ListTableDataProfilesResponse": { + "description": "List of profiles generated for a given organization or project.", + "id": "GooglePrivacyDlpV2ListTableDataProfilesResponse", + "properties": { + "nextPageToken": { + "description": "The next page token.", + "type": "string" + }, + "tableDataProfiles": { + "description": "List of data profiles.", + "items": { + "$ref": "GooglePrivacyDlpV2TableDataProfile" + }, + "type": "array" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2Location": { "description": "Specifies the location of the finding.", "id": "GooglePrivacyDlpV2Location", @@ -7955,6 +8468,38 @@ }, "type": "object" }, + "GooglePrivacyDlpV2ProjectDataProfile": { + "description": "An aggregated profile for this project, based on the resources profiled within it.", + "id": "GooglePrivacyDlpV2ProjectDataProfile", + "properties": { + "dataRiskLevel": { + "$ref": "GooglePrivacyDlpV2DataRiskLevel", + "description": "The data risk level of this project." + }, + "name": { + "description": "The resource name of the profile.", + "type": "string" + }, + "profileLastGenerated": { + "description": "The last time the profile was generated.", + "format": "google-datetime", + "type": "string" + }, + "profileStatus": { + "$ref": "GooglePrivacyDlpV2ProfileStatus", + "description": "Success or error status of the last attempt to profile the project." + }, + "projectId": { + "description": "Project ID that was profiled.", + "type": "string" + }, + "sensitivityScore": { + "$ref": "GooglePrivacyDlpV2SensitivityScore", + "description": "The sensitivity score of this project." + } + }, + "type": "object" + }, "GooglePrivacyDlpV2Proximity": { "description": "Message for specifying a window around a finding to apply a detection rule.", "id": "GooglePrivacyDlpV2Proximity", @@ -7965,7 +8510,7 @@ "type": "integer" }, "windowBefore": { - "description": "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).", + "description": "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/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).", "format": "int32", "type": "integer" } @@ -8095,7 +8640,7 @@ "type": "object" }, "GooglePrivacyDlpV2PublishToPubSub": { - "description": "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", + "description": "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/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob). Compatible with: Inspect, Risk", "id": "GooglePrivacyDlpV2PublishToPubSub", "properties": { "topic": { @@ -8213,7 +8758,7 @@ }, "datastoreKey": { "$ref": "GooglePrivacyDlpV2DatastoreKey", - "description": "Bigquery key" + "description": "BigQuery key" }, "idValues": { "description": "Values of identifying columns in the given row. Order of values matches the order of `identifying_fields` specified in the scanning request.", @@ -8423,7 +8968,7 @@ "properties": { "wordList": { "$ref": "GooglePrivacyDlpV2WordList", - "description": "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." + "description": "A list of words to select from for random replacement. The [limits](https://cloud.google.com/sensitive-data-protection/limits) page contains details about the size limits of dictionaries." } }, "type": "object" @@ -8519,7 +9064,7 @@ "type": "object" }, "GooglePrivacyDlpV2RiskAnalysisJobConfig": { - "description": "Configuration for a risk analysis job. See https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more.", + "description": "Configuration for a risk analysis job. See https://cloud.google.com/sensitive-data-protection/docs/concepts-risk-analysis to learn more.", "id": "GooglePrivacyDlpV2RiskAnalysisJobConfig", "properties": { "actions": { @@ -8697,7 +9242,7 @@ "type": "object" }, "GooglePrivacyDlpV2StoredInfoTypeConfig": { - "description": "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.", + "description": "Configuration for stored infoTypes. All fields and subfield are provided by the user. For more information, see https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes.", "id": "GooglePrivacyDlpV2StoredInfoTypeConfig", "properties": { "description": { @@ -8826,13 +9371,13 @@ "type": "object" }, "GooglePrivacyDlpV2SurrogateType": { - "description": "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`.", + "description": "Message for detecting output from deidentification transformations such as [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/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`.", "id": "GooglePrivacyDlpV2SurrogateType", "properties": {}, "type": "object" }, "GooglePrivacyDlpV2Table": { - "description": "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.", + "description": "Structured content to inspect. Up to 50,000 `Value`s per request allowed. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-structured-text#inspecting_a_table to learn more.", "id": "GooglePrivacyDlpV2Table", "properties": { "headers": { @@ -8874,15 +9419,15 @@ "description": "The resource type that was profiled." }, "datasetId": { - "description": "The BigQuery dataset ID.", + "description": "If the resource is BigQuery, the dataset ID.", "type": "string" }, "datasetLocation": { - "description": "The BigQuery location where the dataset's data is stored. See https://cloud.google.com/bigquery/docs/locations for supported locations.", + "description": "If supported, the location where the dataset's data is stored. See https://cloud.google.com/bigquery/docs/locations for supported locations.", "type": "string" }, "datasetProjectId": { - "description": "The Google Cloud project ID that owns the BigQuery dataset.", + "description": "The Google Cloud project ID that owns the resource.", "type": "string" }, "encryptionStatus": { @@ -8910,7 +9455,7 @@ "type": "string" }, "fullResource": { - "description": "The resource name of the table. https://cloud.google.com/apis/design/resource_names#full_resource_name", + "description": "The resource name of the resource profiled. https://cloud.google.com/apis/design/resource_names#full_resource_name", "type": "string" }, "lastModifiedTime": { @@ -8999,7 +9544,7 @@ "type": "string" }, "tableId": { - "description": "The BigQuery table ID.", + "description": "If the resource is BigQuery, the BigQuery table ID.", "type": "string" }, "tableSizeBytes": { @@ -9126,7 +9671,7 @@ }, "timestampField": { "$ref": "GooglePrivacyDlpV2FieldId", - "description": "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." + "description": "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/sensitive-data-protection/docs/known-issues#bq-timespan) related to this operation." } }, "type": "object" diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 04eb44376c7..106141622d6 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -8,7 +8,7 @@ // // This package is DEPRECATED. Use package cloud.google.com/go/dlp/apiv2 instead. // -// For product documentation, see: https://cloud.google.com/dlp/docs/ +// For product documentation, see: https://cloud.google.com/sensitive-data-protection/docs/ // // # Library status // @@ -237,18 +237,23 @@ type OrganizationsInspectTemplatesService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} + rs.ColumnDataProfiles = NewOrganizationsLocationsColumnDataProfilesService(s) rs.DeidentifyTemplates = NewOrganizationsLocationsDeidentifyTemplatesService(s) rs.DiscoveryConfigs = NewOrganizationsLocationsDiscoveryConfigsService(s) rs.DlpJobs = NewOrganizationsLocationsDlpJobsService(s) rs.InspectTemplates = NewOrganizationsLocationsInspectTemplatesService(s) rs.JobTriggers = NewOrganizationsLocationsJobTriggersService(s) + rs.ProjectDataProfiles = NewOrganizationsLocationsProjectDataProfilesService(s) rs.StoredInfoTypes = NewOrganizationsLocationsStoredInfoTypesService(s) + rs.TableDataProfiles = NewOrganizationsLocationsTableDataProfilesService(s) return rs } type OrganizationsLocationsService struct { s *Service + ColumnDataProfiles *OrganizationsLocationsColumnDataProfilesService + DeidentifyTemplates *OrganizationsLocationsDeidentifyTemplatesService DiscoveryConfigs *OrganizationsLocationsDiscoveryConfigsService @@ -259,7 +264,20 @@ type OrganizationsLocationsService struct { JobTriggers *OrganizationsLocationsJobTriggersService + ProjectDataProfiles *OrganizationsLocationsProjectDataProfilesService + StoredInfoTypes *OrganizationsLocationsStoredInfoTypesService + + TableDataProfiles *OrganizationsLocationsTableDataProfilesService +} + +func NewOrganizationsLocationsColumnDataProfilesService(s *Service) *OrganizationsLocationsColumnDataProfilesService { + rs := &OrganizationsLocationsColumnDataProfilesService{s: s} + return rs +} + +type OrganizationsLocationsColumnDataProfilesService struct { + s *Service } func NewOrganizationsLocationsDeidentifyTemplatesService(s *Service) *OrganizationsLocationsDeidentifyTemplatesService { @@ -307,6 +325,15 @@ type OrganizationsLocationsJobTriggersService struct { s *Service } +func NewOrganizationsLocationsProjectDataProfilesService(s *Service) *OrganizationsLocationsProjectDataProfilesService { + rs := &OrganizationsLocationsProjectDataProfilesService{s: s} + return rs +} + +type OrganizationsLocationsProjectDataProfilesService struct { + s *Service +} + func NewOrganizationsLocationsStoredInfoTypesService(s *Service) *OrganizationsLocationsStoredInfoTypesService { rs := &OrganizationsLocationsStoredInfoTypesService{s: s} return rs @@ -316,6 +343,15 @@ type OrganizationsLocationsStoredInfoTypesService struct { s *Service } +func NewOrganizationsLocationsTableDataProfilesService(s *Service) *OrganizationsLocationsTableDataProfilesService { + rs := &OrganizationsLocationsTableDataProfilesService{s: s} + return rs +} + +type OrganizationsLocationsTableDataProfilesService struct { + s *Service +} + func NewOrganizationsStoredInfoTypesService(s *Service) *OrganizationsStoredInfoTypesService { rs := &OrganizationsStoredInfoTypesService{s: s} return rs @@ -414,6 +450,7 @@ type ProjectsJobTriggersService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.ColumnDataProfiles = NewProjectsLocationsColumnDataProfilesService(s) rs.Content = NewProjectsLocationsContentService(s) rs.DeidentifyTemplates = NewProjectsLocationsDeidentifyTemplatesService(s) rs.DiscoveryConfigs = NewProjectsLocationsDiscoveryConfigsService(s) @@ -421,13 +458,17 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Image = NewProjectsLocationsImageService(s) rs.InspectTemplates = NewProjectsLocationsInspectTemplatesService(s) rs.JobTriggers = NewProjectsLocationsJobTriggersService(s) + rs.ProjectDataProfiles = NewProjectsLocationsProjectDataProfilesService(s) rs.StoredInfoTypes = NewProjectsLocationsStoredInfoTypesService(s) + rs.TableDataProfiles = NewProjectsLocationsTableDataProfilesService(s) return rs } type ProjectsLocationsService struct { s *Service + ColumnDataProfiles *ProjectsLocationsColumnDataProfilesService + Content *ProjectsLocationsContentService DeidentifyTemplates *ProjectsLocationsDeidentifyTemplatesService @@ -442,7 +483,20 @@ type ProjectsLocationsService struct { JobTriggers *ProjectsLocationsJobTriggersService + ProjectDataProfiles *ProjectsLocationsProjectDataProfilesService + StoredInfoTypes *ProjectsLocationsStoredInfoTypesService + + TableDataProfiles *ProjectsLocationsTableDataProfilesService +} + +func NewProjectsLocationsColumnDataProfilesService(s *Service) *ProjectsLocationsColumnDataProfilesService { + rs := &ProjectsLocationsColumnDataProfilesService{s: s} + return rs +} + +type ProjectsLocationsColumnDataProfilesService struct { + s *Service } func NewProjectsLocationsContentService(s *Service) *ProjectsLocationsContentService { @@ -508,6 +562,15 @@ type ProjectsLocationsJobTriggersService struct { s *Service } +func NewProjectsLocationsProjectDataProfilesService(s *Service) *ProjectsLocationsProjectDataProfilesService { + rs := &ProjectsLocationsProjectDataProfilesService{s: s} + return rs +} + +type ProjectsLocationsProjectDataProfilesService struct { + s *Service +} + func NewProjectsLocationsStoredInfoTypesService(s *Service) *ProjectsLocationsStoredInfoTypesService { rs := &ProjectsLocationsStoredInfoTypesService{s: s} return rs @@ -517,6 +580,15 @@ type ProjectsLocationsStoredInfoTypesService struct { s *Service } +func NewProjectsLocationsTableDataProfilesService(s *Service) *ProjectsLocationsTableDataProfilesService { + rs := &ProjectsLocationsTableDataProfilesService{s: s} + return rs +} + +type ProjectsLocationsTableDataProfilesService struct { + s *Service +} + func NewProjectsStoredInfoTypesService(s *Service) *ProjectsStoredInfoTypesService { rs := &ProjectsStoredInfoTypesService{s: s} return rs @@ -527,8 +599,9 @@ type ProjectsStoredInfoTypesService struct { } // GooglePrivacyDlpV2Action: A task to execute on the completion of a -// job. See https://cloud.google.com/dlp/docs/concepts-actions to learn -// more. +// job. See +// https://cloud.google.com/sensitive-data-protection/docs/concepts-actions +// to learn more. type GooglePrivacyDlpV2Action struct { // Deidentify: Create a de-identified copy of the input data. Deidentify *GooglePrivacyDlpV2Deidentify `json:"deidentify,omitempty"` @@ -872,8 +945,9 @@ type GooglePrivacyDlpV2BigQueryOptions struct { // 0 and 100, inclusively. Both 0 and 100 means no limit. Defaults to 0. // Only one of rows_limit and rows_limit_percent can be specified. // Cannot be used in conjunction with TimespanConfig. Caution: A known - // issue (https://cloud.google.com/dlp/docs/known-issues#bq-sampling) is - // causing the `rowsLimitPercent` field to behave unexpectedly. We + // issue + // (https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-sampling) + // is causing the `rowsLimitPercent` field to behave unexpectedly. We // recommend using `rowsLimit` instead. RowsLimitPercent int64 `json:"rowsLimitPercent,omitempty"` @@ -1173,7 +1247,8 @@ func (s *GooglePrivacyDlpV2Bucket) MarshalJSON() ([]byte, error) { // 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. +// https://cloud.google.com/sensitive-data-protection/docs/concepts-bucketing +// to learn more. type GooglePrivacyDlpV2BucketingConfig struct { // Buckets: Set of buckets. Ranges must be non-overlapping. Buckets []*GooglePrivacyDlpV2Bucket `json:"buckets,omitempty"` @@ -1514,7 +1589,7 @@ type GooglePrivacyDlpV2CloudStorageOptions struct { // set if de-identification is requested. For certain file types, // setting this field has no effect. For more information, see Limits on // bytes scanned per file - // (https://cloud.google.com/dlp/docs/supported-file-types#max-byte-size-per-file). + // (https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file). BytesLimitPerFile int64 `json:"bytesLimitPerFile,omitempty,string"` // BytesLimitPerFilePercent: Max percentage of bytes to scan from a @@ -1525,7 +1600,7 @@ type GooglePrivacyDlpV2CloudStorageOptions struct { // set if de-identification is requested. For certain file types, // setting this field has no effect. For more information, see Limits on // bytes scanned per file - // (https://cloud.google.com/dlp/docs/supported-file-types#max-byte-size-per-file). + // (https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file). BytesLimitPerFilePercent int64 `json:"bytesLimitPerFilePercent,omitempty"` // FileSet: The set of one or more files to scan. @@ -1620,8 +1695,8 @@ func (s *GooglePrivacyDlpV2CloudStorageOptions) MarshalJSON() ([]byte, error) { // GooglePrivacyDlpV2CloudStoragePath: Message representing a single // file or path in Cloud Storage. type GooglePrivacyDlpV2CloudStoragePath struct { - // Path: A url representing a file or path (no wildcards) in Cloud - // Storage. Example: gs://[BUCKET_NAME]/dictionary.txt + // Path: A URL representing a file or path (no wildcards) in Cloud + // Storage. Example: `gs://[BUCKET_NAME]/dictionary.txt` Path string `json:"path,omitempty"` // ForceSendFields is a list of field names (e.g. "Path") to @@ -1819,8 +1894,8 @@ type GooglePrivacyDlpV2ColumnDataProfile struct { // supported locations. DatasetLocation string `json:"datasetLocation,omitempty"` - // DatasetProjectId: The Google Cloud project ID that owns the BigQuery - // dataset. + // DatasetProjectId: The Google Cloud project ID that owns the profiled + // resource. DatasetProjectId string `json:"datasetProjectId,omitempty"` // EstimatedNullPercentage: Approximate percentage of entries being null @@ -1891,13 +1966,17 @@ type GooglePrivacyDlpV2ColumnDataProfile struct { // TableDataProfile: The resource name of the table data profile. TableDataProfile string `json:"tableDataProfile,omitempty"` - // TableFullResource: The resource name of the table this column is + // TableFullResource: The resource name of the resource this column is // within. TableFullResource string `json:"tableFullResource,omitempty"` // TableId: The BigQuery table ID. TableId string `json:"tableId,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Column") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2094,7 +2173,7 @@ type GooglePrivacyDlpV2ContentItem struct { ByteItem *GooglePrivacyDlpV2ByteContentItem `json:"byteItem,omitempty"` // Table: Structured content for inspection. See - // https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table + // https://cloud.google.com/sensitive-data-protection/docs/inspecting-text#inspecting_a_table // to learn more. Table *GooglePrivacyDlpV2Table `json:"table,omitempty"` @@ -2496,7 +2575,8 @@ func (s *GooglePrivacyDlpV2CryptoDeterministicConfig) MarshalJSON() ([]byte, err // representation of the hashed output (for example, // L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Currently, only string // and integer values can be hashed. See -// https://cloud.google.com/dlp/docs/pseudonymization to learn more. +// https://cloud.google.com/sensitive-data-protection/docs/pseudonymization +// to learn more. type GooglePrivacyDlpV2CryptoHashConfig struct { // CryptoKey: The key used by the hash function. CryptoKey *GooglePrivacyDlpV2CryptoKey `json:"cryptoKey,omitempty"` @@ -2571,10 +2651,10 @@ func (s *GooglePrivacyDlpV2CryptoKey) MarshalJSON() ([]byte, error) { // identifier will be replaced with the same surrogate. Identifiers must // be at least two characters long. In the case that the identifier is // the empty string, it will be skipped. See -// https://cloud.google.com/dlp/docs/pseudonymization to learn more. -// Note: We recommend using CryptoDeterministicConfig for all use cases -// which do not require preserving the input alphabet space and size, -// plus warrant referential integrity. +// https://cloud.google.com/sensitive-data-protection/docs/pseudonymization +// to learn more. Note: We recommend using CryptoDeterministicConfig for +// all use cases which do not require preserving the input alphabet +// space and size, plus warrant referential integrity. type GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig struct { // CommonAlphabet: Common alphabets. // @@ -2627,7 +2707,7 @@ type GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig struct { // the surrogate is 'abc', the full replacement value will be: // 'MY_TOKEN_INFO_TYPE(3):abc' This annotation identifies the surrogate // when inspecting content using the custom infoType `SurrogateType` - // (https://cloud.google.com/dlp/docs/reference/rest/v2/InspectConfig#surrogatetype). + // (https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/InspectConfig#surrogatetype). // This facilitates reversal of the surrogate when it occurs in free // text. In order for inspection to work properly, the name of this // infoType must not occur naturally anywhere in your data; otherwise, @@ -2838,6 +2918,13 @@ type GooglePrivacyDlpV2DataProfileConfigSnapshot struct { // `DataProfileJobConfig`. InspectConfig *GooglePrivacyDlpV2InspectConfig `json:"inspectConfig,omitempty"` + // InspectTemplateModifiedTime: Timestamp when the template was modified + InspectTemplateModifiedTime string `json:"inspectTemplateModifiedTime,omitempty"` + + // InspectTemplateName: Name of the inspection template used to generate + // this profile + InspectTemplateName string `json:"inspectTemplateName,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataProfileJob") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -2866,7 +2953,8 @@ func (s *GooglePrivacyDlpV2DataProfileConfigSnapshot) MarshalJSON() ([]byte, err // a job to scan resources for profile generation. Only one data profile // 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). +// policy] +// (https://cloud.google.com/sensitive-data-protection/docs/data-profiles#retention). type GooglePrivacyDlpV2DataProfileJobConfig struct { // DataProfileActions: Actions to execute at the completion of the job. DataProfileActions []*GooglePrivacyDlpV2DataProfileAction `json:"dataProfileActions,omitempty"` @@ -2881,7 +2969,8 @@ type GooglePrivacyDlpV2DataProfileJobConfig struct { // 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. + // see + // https://cloud.google.com/sensitive-data-protection/docs/data-profiles#data-residency. InspectTemplates []string `json:"inspectTemplates,omitempty"` // Location: The data to scan. @@ -3163,8 +3252,8 @@ func (s *GooglePrivacyDlpV2DatastoreOptions) MarshalJSON() ([]byte, error) { // GooglePrivacyDlpV2DateShiftConfig: Shifts dates by random number of // days, with option to be consistent for the same context. See -// https://cloud.google.com/dlp/docs/concepts-date-shifting to learn -// more. +// https://cloud.google.com/sensitive-data-protection/docs/concepts-date-shifting +// to learn more. type GooglePrivacyDlpV2DateShiftConfig struct { // Context: Points to the field that contains the context, for example, // an entity id. If set, must also set cryptoKey. If set, shift will be @@ -3578,7 +3667,8 @@ func (s *GooglePrivacyDlpV2DeidentifyDataSourceStats) MarshalJSON() ([]byte, err // GooglePrivacyDlpV2DeidentifyTemplate: DeidentifyTemplates contains // instructions on how to de-identify content. See -// https://cloud.google.com/dlp/docs/concepts-templates to learn more. +// https://cloud.google.com/sensitive-data-protection/docs/concepts-templates +// to learn more. type GooglePrivacyDlpV2DeidentifyTemplate struct { // CreateTime: Output only. The creation timestamp of an // inspectTemplate. @@ -3881,10 +3971,10 @@ func (s *GooglePrivacyDlpV2DetectionRule) MarshalJSON() ([]byte, error) { // containing a large number of characters that are not letters or // digits may result in unexpected findings because such characters are // treated as whitespace. The limits -// (https://cloud.google.com/dlp/limits) page contains details about the -// size limits of dictionaries. For dictionaries that do not fit within -// these constraints, consider using `LargeCustomDictionaryConfig` in -// the `StoredInfoType` API. +// (https://cloud.google.com/sensitive-data-protection/limits) page +// contains details about the size limits of dictionaries. For +// dictionaries that do not fit within these constraints, consider using +// `LargeCustomDictionaryConfig` in the `StoredInfoType` API. type GooglePrivacyDlpV2Dictionary struct { // CloudStoragePath: Newline-delimited file of words in Cloud Storage. // Only a single file is accepted. @@ -4022,7 +4112,8 @@ func (s *GooglePrivacyDlpV2DiscoveryBigQueryFilter) MarshalJSON() ([]byte, error // 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). +// policy] +// (https://cloud.google.com/sensitive-data-protection/docs/data-profiles#retention). type GooglePrivacyDlpV2DiscoveryConfig struct { // Actions: Actions to execute at the completion of scanning. Actions []*GooglePrivacyDlpV2DataProfileAction `json:"actions,omitempty"` @@ -4049,7 +4140,8 @@ type GooglePrivacyDlpV2DiscoveryConfig struct { // 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. + // see + // https://cloud.google.com/sensitive-data-protection/docs/data-profiles#data-residency. InspectTemplates []string `json:"inspectTemplates,omitempty"` // LastRunTime: Output only. The timestamp of the last time this config @@ -4975,7 +5067,8 @@ type GooglePrivacyDlpV2FinishDlpJobRequest struct { // 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. +// https://cloud.google.com/sensitive-data-protection/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 @@ -5054,7 +5147,7 @@ type GooglePrivacyDlpV2HotwordRule struct { // 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). + // (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values). Proximity *GooglePrivacyDlpV2Proximity `json:"proximity,omitempty"` // ForceSendFields is a list of field names (e.g. "HotwordRegex") to @@ -5483,9 +5576,10 @@ func (s *GooglePrivacyDlpV2ImageTransformations) MarshalJSON() ([]byte, error) { 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}`. + // https://cloud.google.com/sensitive-data-protection/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"` // SensitivityScore: Optional custom sensitivity for this InfoType. This @@ -5916,8 +6010,8 @@ type GooglePrivacyDlpV2InspectConfig struct { ContentOptions []string `json:"contentOptions,omitempty"` // CustomInfoTypes: CustomInfoTypes provided by the user. See - // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn - // more. + // https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes + // to learn more. CustomInfoTypes []*GooglePrivacyDlpV2CustomInfoType `json:"customInfoTypes,omitempty"` // ExcludeInfoTypes: When true, excludes type information of the @@ -5931,13 +6025,13 @@ type GooglePrivacyDlpV2InspectConfig struct { // 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 a default list of detectors to run, which - // may change over time. 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. + // https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference. + // When no InfoTypes or CustomInfoTypes are specified in a request, the + // system may automatically choose a default list of detectors to run, + // which may change over time. 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. @@ -5956,7 +6050,8 @@ type GooglePrivacyDlpV2InspectConfig struct { // 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). + // likelihood + // (https://cloud.google.com/sensitive-data-protection/docs/likelihood). // // Possible values: // "LIKELIHOOD_UNSPECIFIED" - Default value; same as POSSIBLE. @@ -6194,7 +6289,8 @@ func (s *GooglePrivacyDlpV2InspectResult) MarshalJSON() ([]byte, error) { // 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. +// https://cloud.google.com/sensitive-data-protection/docs/concepts-templates +// to learn more. type GooglePrivacyDlpV2InspectTemplate struct { // CreateTime: Output only. The creation timestamp of an // inspectTemplate. @@ -6322,8 +6418,8 @@ 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. +// https://cloud.google.com/sensitive-data-protection/docs/concepts-job-triggers +// to learn more. type GooglePrivacyDlpV2JobTrigger struct { // CreateTime: Output only. The creation timestamp of a triggeredJob. CreateTime string `json:"createTime,omitempty"` @@ -6800,9 +6896,9 @@ func (s *GooglePrivacyDlpV2KindExpression) MarshalJSON() ([]byte, error) { // 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). +// (https://cloud.google.com/sensitive-data-protection/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. @@ -6991,10 +7087,10 @@ func (s *GooglePrivacyDlpV2LDiversityResult) MarshalJSON() ([]byte, error) { // 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. +// (https://cloud.google.com/sensitive-data-protection/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. @@ -7122,6 +7218,43 @@ func (s *GooglePrivacyDlpV2LikelihoodAdjustment) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2ListColumnDataProfilesResponse: List of profiles +// generated for a given organization or project. +type GooglePrivacyDlpV2ListColumnDataProfilesResponse struct { + // ColumnDataProfiles: List of data profiles. + ColumnDataProfiles []*GooglePrivacyDlpV2ColumnDataProfile `json:"columnDataProfiles,omitempty"` + + // NextPageToken: The next page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ColumnDataProfiles") + // 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. "ColumnDataProfiles") to + // include in API requests with the JSON null value. By default, 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 *GooglePrivacyDlpV2ListColumnDataProfilesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ListColumnDataProfilesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2ListDeidentifyTemplatesResponse: Response message // for ListDeidentifyTemplates. type GooglePrivacyDlpV2ListDeidentifyTemplatesResponse struct { @@ -7348,6 +7481,42 @@ func (s *GooglePrivacyDlpV2ListJobTriggersResponse) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2ListProjectDataProfilesResponse: List of profiles +// generated for a given organization or project. +type GooglePrivacyDlpV2ListProjectDataProfilesResponse struct { + // NextPageToken: The next page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ProjectDataProfiles: List of data profiles. + ProjectDataProfiles []*GooglePrivacyDlpV2ProjectDataProfile `json:"projectDataProfiles,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. "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 *GooglePrivacyDlpV2ListProjectDataProfilesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ListProjectDataProfilesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2ListStoredInfoTypesResponse: Response message for // ListStoredInfoTypes. type GooglePrivacyDlpV2ListStoredInfoTypesResponse struct { @@ -7386,6 +7555,42 @@ func (s *GooglePrivacyDlpV2ListStoredInfoTypesResponse) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2ListTableDataProfilesResponse: List of profiles +// generated for a given organization or project. +type GooglePrivacyDlpV2ListTableDataProfilesResponse struct { + // NextPageToken: The next page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // TableDataProfiles: List of data profiles. + TableDataProfiles []*GooglePrivacyDlpV2TableDataProfile `json:"tableDataProfiles,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. "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 *GooglePrivacyDlpV2ListTableDataProfilesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ListTableDataProfilesResponse + 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 @@ -7928,6 +8133,55 @@ func (s *GooglePrivacyDlpV2ProfileStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2ProjectDataProfile: An aggregated profile for this +// project, based on the resources profiled within it. +type GooglePrivacyDlpV2ProjectDataProfile struct { + // DataRiskLevel: The data risk level of this project. + DataRiskLevel *GooglePrivacyDlpV2DataRiskLevel `json:"dataRiskLevel,omitempty"` + + // Name: The resource name of the profile. + Name string `json:"name,omitempty"` + + // ProfileLastGenerated: The last time the profile was generated. + ProfileLastGenerated string `json:"profileLastGenerated,omitempty"` + + // ProfileStatus: Success or error status of the last attempt to profile + // the project. + ProfileStatus *GooglePrivacyDlpV2ProfileStatus `json:"profileStatus,omitempty"` + + // ProjectId: Project ID that was profiled. + ProjectId string `json:"projectId,omitempty"` + + // SensitivityScore: The sensitivity score of this project. + SensitivityScore *GooglePrivacyDlpV2SensitivityScore `json:"sensitivityScore,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DataRiskLevel") 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. "DataRiskLevel") to include + // in API requests with the JSON null value. By default, 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 *GooglePrivacyDlpV2ProjectDataProfile) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2ProjectDataProfile + 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 { @@ -7938,7 +8192,7 @@ type GooglePrivacyDlpV2Proximity struct { // 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). + // (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values). WindowBefore int64 `json:"windowBefore,omitempty"` // ForceSendFields is a list of field names (e.g. "WindowAfter") to @@ -8145,7 +8399,7 @@ type GooglePrivacyDlpV2PublishSummaryToCscc struct { // 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). +// (https://cloud.google.com/sensitive-data-protection/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 @@ -8392,7 +8646,7 @@ type GooglePrivacyDlpV2RecordKey struct { // BigQueryKey: Datastore key BigQueryKey *GooglePrivacyDlpV2BigQueryKey `json:"bigQueryKey,omitempty"` - // DatastoreKey: Bigquery key + // DatastoreKey: BigQuery key DatastoreKey *GooglePrivacyDlpV2DatastoreKey `json:"datastoreKey,omitempty"` // IdValues: Values of identifying columns in the given row. Order of @@ -8795,8 +9049,8 @@ func (s *GooglePrivacyDlpV2ReidentifyContentResponse) MarshalJSON() ([]byte, err // 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. + // limits (https://cloud.google.com/sensitive-data-protection/limits) + // page contains details about the size limits of dictionaries. WordList *GooglePrivacyDlpV2WordList `json:"wordList,omitempty"` // ForceSendFields is a list of field names (e.g. "WordList") to @@ -9002,8 +9256,8 @@ func (s *GooglePrivacyDlpV2Result) MarshalJSON() ([]byte, error) { // GooglePrivacyDlpV2RiskAnalysisJobConfig: Configuration for a risk // analysis job. See -// https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn -// more. +// https://cloud.google.com/sensitive-data-protection/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. @@ -9365,7 +9619,7 @@ func (s *GooglePrivacyDlpV2StoredInfoType) MarshalJSON() ([]byte, error) { // 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. +// https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes. type GooglePrivacyDlpV2StoredInfoTypeConfig struct { // Description: Description of the StoredInfoType (max 256 characters). Description string `json:"description,omitempty"` @@ -9583,7 +9837,7 @@ func (s *GooglePrivacyDlpV2SummaryResult) MarshalJSON() ([]byte, error) { // GooglePrivacyDlpV2SurrogateType: Message for detecting output from // deidentification transformations such as `CryptoReplaceFfxFpeConfig` -// (https://cloud.google.com/dlp/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). +// (https://cloud.google.com/sensitive-data-protection/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 @@ -9594,7 +9848,7 @@ type GooglePrivacyDlpV2SurrogateType struct { // 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 +// https://cloud.google.com/sensitive-data-protection/docs/inspecting-structured-text#inspecting_a_table // to learn more. type GooglePrivacyDlpV2Table struct { // Headers: Headers of the table. @@ -9641,16 +9895,15 @@ type GooglePrivacyDlpV2TableDataProfile struct { // DataSourceType: The resource type that was profiled. DataSourceType *GooglePrivacyDlpV2DataSourceType `json:"dataSourceType,omitempty"` - // DatasetId: The BigQuery dataset ID. + // DatasetId: If the resource is BigQuery, the 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 + // DatasetLocation: If supported, the 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: The Google Cloud project ID that owns the resource. DatasetProjectId string `json:"datasetProjectId,omitempty"` // EncryptionStatus: How the table is encrypted. @@ -9669,7 +9922,7 @@ type GooglePrivacyDlpV2TableDataProfile struct { // of an error. FailedColumnCount int64 `json:"failedColumnCount,omitempty,string"` - // FullResource: The resource name of the table. + // FullResource: The resource name of the resource profiled. // https://cloud.google.com/apis/design/resource_names#full_resource_name FullResource string `json:"fullResource,omitempty"` @@ -9730,12 +9983,16 @@ type GooglePrivacyDlpV2TableDataProfile struct { // failed. State string `json:"state,omitempty"` - // TableId: The BigQuery table ID. + // TableId: If the resource is BigQuery, 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"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + // 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 @@ -9982,8 +10239,8 @@ type GooglePrivacyDlpV2TimespanConfig struct { // 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. + // (https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-timespan) + // related to this operation. TimestampField *GooglePrivacyDlpV2FieldId `json:"timestampField,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -11037,7 +11294,8 @@ type InfoTypesListCall struct { } // List: Returns a list of the sensitive information types that DLP API -// supports. See https://cloud.google.com/dlp/docs/infotypes-reference +// supports. See +// https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference // to learn more. func (r *InfoTypesService) List() *InfoTypesListCall { c := &InfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -11172,7 +11430,7 @@ 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.", + // "description": "Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more.", // "flatPath": "v2/infoTypes", // "httpMethod": "GET", // "id": "dlp.infoTypes.list", @@ -11222,7 +11480,8 @@ type LocationsInfoTypesListCall struct { } // List: Returns a list of the sensitive information types that DLP API -// supports. See https://cloud.google.com/dlp/docs/infotypes-reference +// supports. See +// https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference // to learn more. // // - parent: The parent resource name. The format of this value is as @@ -11357,7 +11616,7 @@ 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.", + // "description": "Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference to learn more.", // "flatPath": "v2/locations/{locationsId}/infoTypes", // "httpMethod": "GET", // "id": "dlp.locations.infoTypes.list", @@ -11412,14 +11671,14 @@ type OrganizationsDeidentifyTemplatesCreateCall struct { // 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. +// https://cloud.google.com/sensitive-data-protection/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: +// (https://cloud.google.com/sensitive-data-protection/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: @@ -11528,7 +11787,7 @@ 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.", + // "description": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", // "httpMethod": "POST", // "id": "dlp.organizations.deidentifyTemplates.create", @@ -11537,7 +11796,7 @@ func (c *OrganizationsDeidentifyTemplatesCreateCall) Do(opts ...googleapi.CallOp // ], // "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -11569,8 +11828,8 @@ type OrganizationsDeidentifyTemplatesDeleteCall struct { } // Delete: Deletes a DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid +// to learn more. // // - name: Resource name of the organization and deidentify template to // be deleted, for example @@ -11668,7 +11927,7 @@ 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.", + // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", // "httpMethod": "DELETE", // "id": "dlp.organizations.deidentifyTemplates.delete", @@ -11707,8 +11966,8 @@ type OrganizationsDeidentifyTemplatesGetCall struct { } // Get: Gets a DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid +// to learn more. // // - name: Resource name of the organization and deidentify template to // be read, for example @@ -11820,7 +12079,7 @@ 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.", + // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", // "httpMethod": "GET", // "id": "dlp.organizations.deidentifyTemplates.get", @@ -11859,14 +12118,14 @@ type OrganizationsDeidentifyTemplatesListCall struct { } // List: Lists DeidentifyTemplates. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// https://cloud.google.com/sensitive-data-protection/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: +// (https://cloud.google.com/sensitive-data-protection/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: @@ -12020,7 +12279,7 @@ 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.", + // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates", // "httpMethod": "GET", // "id": "dlp.organizations.deidentifyTemplates.list", @@ -12050,7 +12309,7 @@ func (c *OrganizationsDeidentifyTemplatesListCall) Do(opts ...googleapi.CallOpti // "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -12101,8 +12360,8 @@ type OrganizationsDeidentifyTemplatesPatchCall struct { } // Patch: Updates the DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid +// to learn more. // // - name: Resource name of organization and deidentify template to be // updated, for example @@ -12207,7 +12466,7 @@ 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.", + // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", // "flatPath": "v2/organizations/{organizationsId}/deidentifyTemplates/{deidentifyTemplatesId}", // "httpMethod": "PATCH", // "id": "dlp.organizations.deidentifyTemplates.patch", @@ -12250,13 +12509,14 @@ type OrganizationsInspectTemplatesCreateCall struct { // 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. +// https://cloud.google.com/sensitive-data-protection/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: +// (https://cloud.google.com/sensitive-data-protection/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: @@ -12365,7 +12625,7 @@ 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.", + // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", // "httpMethod": "POST", // "id": "dlp.organizations.inspectTemplates.create", @@ -12374,7 +12634,7 @@ func (c *OrganizationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOptio // ], // "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -12406,7 +12666,8 @@ type OrganizationsInspectTemplatesDeleteCall struct { } // Delete: Deletes an InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates +// to learn more. // // - name: Resource name of the organization and inspectTemplate to be // deleted, for example @@ -12504,7 +12765,7 @@ 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.", + // "description": "Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", // "httpMethod": "DELETE", // "id": "dlp.organizations.inspectTemplates.delete", @@ -12543,7 +12804,8 @@ type OrganizationsInspectTemplatesGetCall struct { } // Get: Gets an InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates +// to learn more. // // - name: Resource name of the organization and inspectTemplate to be // read, for example @@ -12655,7 +12917,7 @@ 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.", + // "description": "Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", // "httpMethod": "GET", // "id": "dlp.organizations.inspectTemplates.get", @@ -12694,13 +12956,14 @@ type OrganizationsInspectTemplatesListCall struct { } // List: Lists InspectTemplates. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// https://cloud.google.com/sensitive-data-protection/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: +// (https://cloud.google.com/sensitive-data-protection/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: @@ -12854,7 +13117,7 @@ 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.", + // "description": "Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates", // "httpMethod": "GET", // "id": "dlp.organizations.inspectTemplates.list", @@ -12884,7 +13147,7 @@ func (c *OrganizationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) // "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -12935,7 +13198,8 @@ type OrganizationsInspectTemplatesPatchCall struct { } // Patch: Updates the InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates +// to learn more. // // - name: Resource name of organization and inspectTemplate to be // updated, for example @@ -13040,7 +13304,7 @@ 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.", + // "description": "Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", // "flatPath": "v2/organizations/{organizationsId}/inspectTemplates/{inspectTemplatesId}", // "httpMethod": "PATCH", // "id": "dlp.organizations.inspectTemplates.patch", @@ -13070,105 +13334,97 @@ func (c *OrganizationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption } -// method id "dlp.organizations.locations.deidentifyTemplates.create": +// method id "dlp.organizations.locations.columnDataProfiles.get": -type OrganizationsLocationsDeidentifyTemplatesCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsColumnDataProfilesGetCall struct { + s *Service + name 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 -// more. +// Get: Gets a column data profile. // -// - 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) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesCreateCall { - c := &OrganizationsLocationsDeidentifyTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - c.googleprivacydlpv2createdeidentifytemplaterequest = googleprivacydlpv2createdeidentifytemplaterequest +// - name: Resource name, for example +// `organizations/12345/locations/us/columnDataProfiles/53234423`. +func (r *OrganizationsLocationsColumnDataProfilesService) Get(name string) *OrganizationsLocationsColumnDataProfilesGetCall { + c := &OrganizationsLocationsColumnDataProfilesGetCall{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 *OrganizationsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesCreateCall { +func (c *OrganizationsLocationsColumnDataProfilesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsColumnDataProfilesGetCall { 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 *OrganizationsLocationsColumnDataProfilesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsColumnDataProfilesGetCall { + 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 *OrganizationsLocationsColumnDataProfilesGetCall) Context(ctx context.Context) *OrganizationsLocationsColumnDataProfilesGetCall { 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 *OrganizationsLocationsColumnDataProfilesGetCall) 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 *OrganizationsLocationsColumnDataProfilesGetCall) 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/{+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.organizations.locations.deidentifyTemplates.create" call. -// Exactly one of *GooglePrivacyDlpV2DeidentifyTemplate or error will be +// Do executes the "dlp.organizations.locations.columnDataProfiles.get" call. +// Exactly one of *GooglePrivacyDlpV2ColumnDataProfile or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2DeidentifyTemplate.ServerResponse.Header or +// either *GooglePrivacyDlpV2ColumnDataProfile.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) { +func (c *OrganizationsLocationsColumnDataProfilesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ColumnDataProfile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13187,7 +13443,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DeidentifyTemplate{ + ret := &GooglePrivacyDlpV2ColumnDataProfile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13199,28 +13455,25 @@ 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": "Gets a column data profile.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/columnDataProfiles/{columnDataProfilesId}", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.columnDataProfiles.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "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", + // "name": { + // "description": "Required. Resource name, for example `organizations/12345/locations/us/columnDataProfiles/53234423`.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/columnDataProfiles/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/deidentifyTemplates", - // "request": { - // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" - // }, + // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" + // "$ref": "GooglePrivacyDlpV2ColumnDataProfile" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13229,86 +13482,155 @@ func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Do(opts ...googlea } -// method id "dlp.organizations.locations.deidentifyTemplates.delete": +// method id "dlp.organizations.locations.columnDataProfiles.list": -type OrganizationsLocationsDeidentifyTemplatesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsColumnDataProfilesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// List: Lists data profiles for an organization. // -// - 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: Resource name of the organization or project, for example +// `organizations/433245324/locations/europe` or +// projects/project-id/locations/asia. +func (r *OrganizationsLocationsColumnDataProfilesService) List(parent string) *OrganizationsLocationsColumnDataProfilesListCall { + c := &OrganizationsLocationsColumnDataProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + 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: - `table_data_profile_name` - The name of the related +// table data profile. - `project_id` - The Google Cloud project ID. +// (REQUIRED) - `dataset_id` - The BigQuery dataset ID. (REQUIRED) - +// `table_id` - The BigQuery table ID. (REQUIRED) - `field_id` - The ID +// of the BigQuery field. - `info_type` - The infotype detected in the +// resource. - `sensitivity_level` - HIGH|MEDIUM|LOW - +// `data_risk_level`: How much risk is associated with this data. - +// `status_code` - an RPC status code as defined in +// https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto +// * The operator must be `=` for project_id, dataset_id, and table_id. +// Other filters also support `!=`. Examples: * project_id = 12345 AND +// status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * +// project_id = 12345 AND info_type = STREET_ADDRESS The length of this +// field should be no more than 500 characters. +func (c *OrganizationsLocationsColumnDataProfilesListCall) Filter(filter string) *OrganizationsLocationsColumnDataProfilesListCall { + c.urlParams_.Set("filter", filter) + 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. The default sorting order is ascending. +// Redundant space characters are insignificant. Only one order field at +// a time is allowed. Examples: * `project_id asc` * `table_id` * +// `sensitivity_level desc` Supported fields are: - `project_id`: The +// Google Cloud project ID. - `dataset_id`: The ID of a BigQuery +// dataset. - `table_id`: The ID of a BigQuery table. - +// `sensitivity_level`: How sensitive the data in a column is, at most. +// - `data_risk_level`: How much risk is associated with this data. - +// `profile_last_generated`: When the profile was last updated in epoch +// seconds. +func (c *OrganizationsLocationsColumnDataProfilesListCall) OrderBy(orderBy string) *OrganizationsLocationsColumnDataProfilesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Size of the page. +// This value can be limited by the server. If zero, server returns a +// page of max size 100. +func (c *OrganizationsLocationsColumnDataProfilesListCall) PageSize(pageSize int64) *OrganizationsLocationsColumnDataProfilesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. +func (c *OrganizationsLocationsColumnDataProfilesListCall) PageToken(pageToken string) *OrganizationsLocationsColumnDataProfilesListCall { + 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 *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { +func (c *OrganizationsLocationsColumnDataProfilesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsColumnDataProfilesListCall { 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 *OrganizationsLocationsColumnDataProfilesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsColumnDataProfilesListCall { + 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 *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { +func (c *OrganizationsLocationsColumnDataProfilesListCall) Context(ctx context.Context) *OrganizationsLocationsColumnDataProfilesListCall { 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 *OrganizationsLocationsColumnDataProfilesListCall) 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 *OrganizationsLocationsColumnDataProfilesListCall) 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 := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/columnDataProfiles") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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.parent, }) 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.columnDataProfiles.list" call. +// Exactly one of *GooglePrivacyDlpV2ListColumnDataProfilesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ListColumnDataProfilesResponse.ServerResponse.Heade +// r 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 *OrganizationsLocationsColumnDataProfilesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListColumnDataProfilesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13327,7 +13649,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2ListColumnDataProfilesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13339,25 +13661,46 @@ 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": "Lists data profiles for an organization.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/columnDataProfiles", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.columnDataProfiles.list", // "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.", + // "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: - `table_data_profile_name` - The name of the related table data profile. - `project_id` - The Google Cloud project ID. (REQUIRED) - `dataset_id` - The BigQuery dataset ID. (REQUIRED) - `table_id` - The BigQuery table ID. (REQUIRED) - `field_id` - The ID of the BigQuery field. - `info_type` - The infotype detected in the resource. - `sensitivity_level` - HIGH|MEDIUM|LOW - `data_risk_level`: How much risk is associated with this data. - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` for project_id, dataset_id, and table_id. Other filters also support `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * project_id = 12345 AND info_type = STREET_ADDRESS The length of this field should be no more than 500 characters.", + // "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. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id asc` * `table_id` * `sensitivity_level desc` Supported fields are: - `project_id`: The Google Cloud project ID. - `dataset_id`: The ID of a BigQuery dataset. - `table_id`: The ID of a BigQuery table. - `sensitivity_level`: How sensitive the data in a column is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Size of the page. This value 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the organization or project, for example `organizations/433245324/locations/europe` or projects/project-id/locations/asia.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/columnDataProfiles", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2ListColumnDataProfilesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13366,93 +13709,118 @@ func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Do(opts ...googlea } -// method id "dlp.organizations.locations.deidentifyTemplates.get": +// 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 *OrganizationsLocationsColumnDataProfilesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListColumnDataProfilesResponse) 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 OrganizationsLocationsDeidentifyTemplatesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "dlp.organizations.locations.deidentifyTemplates.create": + +type OrganizationsLocationsDeidentifyTemplatesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest + 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. +// Create: Creates a DeidentifyTemplate for reusing frequently used +// configuration for de-identifying content, images, and storage. See +// https://cloud.google.com/sensitive-data-protection/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 *OrganizationsLocationsDeidentifyTemplatesService) Get(name string) *OrganizationsLocationsDeidentifyTemplatesGetCall { - c := &OrganizationsLocationsDeidentifyTemplatesGetCall{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/sensitive-data-protection/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) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesCreateCall { + c := &OrganizationsLocationsDeidentifyTemplatesCreateCall{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 *OrganizationsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesGetCall { +func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesCreateCall { 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 *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 *OrganizationsLocationsDeidentifyTemplatesGetCall) Header() http.Header { +func (c *OrganizationsLocationsDeidentifyTemplatesCreateCall) 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 *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_ { 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.locations.deidentifyTemplates.get" 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 @@ -13460,7 +13828,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) doRequest(alt string) // 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) { +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 { @@ -13491,23 +13859,26 @@ 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": "Creates a DeidentifyTemplate for reusing frequently used configuration for de-identifying content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", + // "httpMethod": "POST", + // "id": "dlp.organizations.locations.deidentifyTemplates.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "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.", + // "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/sensitive-data-protection/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}/deidentifyTemplates", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateDeidentifyTemplateRequest" + // }, // "response": { // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" // }, @@ -13518,149 +13889,86 @@ func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi. } -// method id "dlp.organizations.locations.deidentifyTemplates.list": +// method id "dlp.organizations.locations.deidentifyTemplates.delete": -type OrganizationsLocationsDeidentifyTemplatesListCall struct { - s *Service - parentid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsDeidentifyTemplatesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists DeidentifyTemplates. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// Delete: Deletes a DeidentifyTemplate. See +// https://cloud.google.com/sensitive-data-protection/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 *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. The 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. -// This value 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 the previous call to -// `ListDeidentifyTemplates`. -func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsDeidentifyTemplatesListCall { - 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 *OrganizationsLocationsDeidentifyTemplatesService) Delete(name string) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { + c := &OrganizationsLocationsDeidentifyTemplatesDeleteCall{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 *OrganizationsLocationsDeidentifyTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesDeleteCall { 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 *OrganizationsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDeidentifyTemplatesListCall { - 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 *OrganizationsLocationsDeidentifyTemplatesListCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesListCall { +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 *OrganizationsLocationsDeidentifyTemplatesListCall) Header() http.Header { +func (c *OrganizationsLocationsDeidentifyTemplatesDeleteCall) 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 *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_ { 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 := 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.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 -// 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) { +// 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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13679,7 +13987,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13691,46 +13999,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", - // "httpMethod": "GET", - // "id": "dlp.organizations.locations.deidentifyTemplates.list", + // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "httpMethod": "DELETE", + // "id": "dlp.organizations.locations.deidentifyTemplates.delete", // "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. The 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. This value 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 the 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 deidentify template to be deleted, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/deidentifyTemplates", + // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13739,96 +14026,82 @@ 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.deidentifyTemplates.patch": +// method id "dlp.organizations.locations.deidentifyTemplates.get": -type OrganizationsLocationsDeidentifyTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsDeidentifyTemplatesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// Get: Gets a DeidentifyTemplate. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid +// to learn more. // -// - name: Resource name of organization and deidentify template to be -// updated, for example +// - 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) Patch(name string, googleprivacydlpv2updatedeidentifytemplaterequest *GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest) *OrganizationsLocationsDeidentifyTemplatesPatchCall { - c := &OrganizationsLocationsDeidentifyTemplatesPatchCall{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 - 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 *OrganizationsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesPatchCall { +func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesGetCall { 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 *OrganizationsLocationsDeidentifyTemplatesPatchCall) Context(ctx context.Context) *OrganizationsLocationsDeidentifyTemplatesPatchCall { +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 *OrganizationsLocationsDeidentifyTemplatesPatchCall) Header() http.Header { +func (c *OrganizationsLocationsDeidentifyTemplatesGetCall) 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 *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_ { 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 += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -13839,7 +14112,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.deidentifyTemplates.patch" 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 @@ -13847,7 +14120,7 @@ func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) doRequest(alt strin // 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 *OrganizationsLocationsDeidentifyTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DeidentifyTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13878,16 +14151,16 @@ 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.", + // "description": "Gets a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", - // "httpMethod": "PATCH", - // "id": "dlp.organizations.locations.deidentifyTemplates.patch", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.deidentifyTemplates.get", // "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 organization and deidentify template to be read, for example `organizations/433245324/deidentifyTemplates/432452342` or projects/project-id/deidentifyTemplates/432452342.", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", // "required": true, @@ -13895,9 +14168,6 @@ func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleap // } // }, // "path": "v2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" - // }, // "response": { // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" // }, @@ -13908,75 +14178,129 @@ func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleap } -// method id "dlp.organizations.locations.discoveryConfigs.create": +// method id "dlp.organizations.locations.deidentifyTemplates.list": -type OrganizationsLocationsDiscoveryConfigsCreateCall struct { - s *Service - parentid string - googleprivacydlpv2creatediscoveryconfigrequest *GooglePrivacyDlpV2CreateDiscoveryConfigRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsDeidentifyTemplatesListCall struct { + s *Service + parentid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a config for discovery to scan and profile storage. +// List: Lists DeidentifyTemplates. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid +// to learn more. // -// - 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: 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/sensitive-data-protection/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 *OrganizationsLocationsDiscoveryConfigsService) Create(parentid string, googleprivacydlpv2creatediscoveryconfigrequest *GooglePrivacyDlpV2CreateDiscoveryConfigRequest) *OrganizationsLocationsDiscoveryConfigsCreateCall { - c := &OrganizationsLocationsDiscoveryConfigsCreateCall{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 - c.googleprivacydlpv2creatediscoveryconfigrequest = googleprivacydlpv2creatediscoveryconfigrequest + 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. The 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. +// This value 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 the previous call to +// `ListDeidentifyTemplates`. +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsDeidentifyTemplatesListCall { + 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 *OrganizationsLocationsDiscoveryConfigsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsCreateCall { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesListCall { 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 *OrganizationsLocationsDeidentifyTemplatesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDeidentifyTemplatesListCall { + 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 *OrganizationsLocationsDiscoveryConfigsCreateCall) Context(ctx context.Context) *OrganizationsLocationsDiscoveryConfigsCreateCall { +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 *OrganizationsLocationsDiscoveryConfigsCreateCall) Header() http.Header { +func (c *OrganizationsLocationsDeidentifyTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) 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_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2creatediscoveryconfigrequest) - 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}/discoveryConfigs") + 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 } @@ -13987,15 +14311,16 @@ func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// 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 *GooglePrivacyDlpV2DiscoveryConfig.ServerResponse.Header or -// (if a response was returned at all) in +// 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 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DiscoveryConfig, 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 { @@ -14014,7 +14339,7 @@ func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DiscoveryConfig{ + ret := &GooglePrivacyDlpV2ListDeidentifyTemplatesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14026,28 +14351,46 @@ func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) Do(opts ...googleapi. } return ret, nil // { - // "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", + // "description": "Lists DeidentifyTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates", + // "httpMethod": "GET", + // "id": "dlp.organizations.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. The 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. This value 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 the previous call to `ListDeidentifyTemplates`.", + // "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", + // "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/sensitive-data-protection/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}/discoveryConfigs", - // "request": { - // "$ref": "GooglePrivacyDlpV2CreateDiscoveryConfigRequest" - // }, + // "path": "v2/{+parent}/deidentifyTemplates", // "response": { - // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" + // "$ref": "GooglePrivacyDlpV2ListDeidentifyTemplatesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14056,30 +14399,57 @@ func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) Do(opts ...googleapi. } -// method id "dlp.organizations.locations.discoveryConfigs.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 *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) + } +} -type OrganizationsLocationsDiscoveryConfigsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 } -// Delete: Deletes a discovery configuration. +// Patch: Updates the DeidentifyTemplate. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid +// to learn more. // -// - 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)} +// - 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 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 *OrganizationsLocationsDiscoveryConfigsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsDeleteCall { +func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDeidentifyTemplatesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14087,21 +14457,21 @@ func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) 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 *OrganizationsLocationsDiscoveryConfigsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsDiscoveryConfigsDeleteCall { +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 *OrganizationsLocationsDiscoveryConfigsDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsDeidentifyTemplatesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) 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_ { @@ -14109,11 +14479,16 @@ func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) doRequest(alt string) } 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("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -14124,14 +14499,15 @@ func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// 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 *OrganizationsLocationsDiscoveryConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// 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 +// 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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14150,7 +14526,7 @@ func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2DeidentifyTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14162,25 +14538,28 @@ func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Deletes a discovery configuration.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", - // "httpMethod": "DELETE", - // "id": "dlp.organizations.locations.discoveryConfigs.delete", + // "description": "Updates the DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "httpMethod": "PATCH", + // "id": "dlp.organizations.locations.deidentifyTemplates.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the project and the config, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", + // "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/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/deidentifyTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", + // "request": { + // "$ref": "GooglePrivacyDlpV2UpdateDeidentifyTemplateRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2DeidentifyTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14189,89 +14568,86 @@ func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) Do(opts ...googleapi. } -// method id "dlp.organizations.locations.discoveryConfigs.get": +// method id "dlp.organizations.locations.discoveryConfigs.create": -type OrganizationsLocationsDiscoveryConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsDiscoveryConfigsCreateCall struct { + s *Service + parentid string + googleprivacydlpv2creatediscoveryconfigrequest *GooglePrivacyDlpV2CreateDiscoveryConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a discovery configuration. +// Create: Creates a config for discovery to scan and profile storage. // -// - 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 +// - 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 *OrganizationsLocationsDiscoveryConfigsService) Create(parentid string, googleprivacydlpv2creatediscoveryconfigrequest *GooglePrivacyDlpV2CreateDiscoveryConfigRequest) *OrganizationsLocationsDiscoveryConfigsCreateCall { + c := &OrganizationsLocationsDiscoveryConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + 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 *OrganizationsLocationsDiscoveryConfigsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsGetCall { +func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsCreateCall { 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 *OrganizationsLocationsDiscoveryConfigsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDiscoveryConfigsGetCall { - 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 *OrganizationsLocationsDiscoveryConfigsGetCall) Context(ctx context.Context) *OrganizationsLocationsDiscoveryConfigsGetCall { +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 *OrganizationsLocationsDiscoveryConfigsGetCall) Header() http.Header { +func (c *OrganizationsLocationsDiscoveryConfigsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsDiscoveryConfigsGetCall) 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_ { 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.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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/discoveryConfigs") 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.locations.discoveryConfigs.get" call. +// 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 *GooglePrivacyDlpV2DiscoveryConfig.ServerResponse.Header or @@ -14279,7 +14655,7 @@ func (c *OrganizationsLocationsDiscoveryConfigsGetCall) doRequest(alt string) (* // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsDiscoveryConfigsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DiscoveryConfig, 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 { @@ -14310,23 +14686,26 @@ func (c *OrganizationsLocationsDiscoveryConfigsGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets a discovery configuration.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", - // "httpMethod": "GET", - // "id": "dlp.organizations.locations.discoveryConfigs.get", + // "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": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the project and the configuration, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", + // "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/[^/]+/discoveryConfigs/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/discoveryConfigs", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateDiscoveryConfigRequest" + // }, // "response": { // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" // }, @@ -14337,131 +14716,82 @@ func (c *OrganizationsLocationsDiscoveryConfigsGetCall) Do(opts ...googleapi.Cal } -// method id "dlp.organizations.locations.discoveryConfigs.list": +// method id "dlp.organizations.locations.discoveryConfigs.delete": -type OrganizationsLocationsDiscoveryConfigsListCall struct { - s *Service - parentid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsDiscoveryConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists discovery configurations. +// Delete: Deletes a discovery configuration. // -// - 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 *OrganizationsLocationsDiscoveryConfigsService) List(parentid string) *OrganizationsLocationsDiscoveryConfigsListCall { - c := &OrganizationsLocationsDiscoveryConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - return c -} - -// OrderBy sets the optional parameter "orderBy": Comma separated list -// of config fields to order by, followed by `asc` or `desc` postfix. -// This list is case insensitive. The 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. -// This value 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 the 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) +// - 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 } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsDiscoveryConfigsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsListCall { +func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsDeleteCall { 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 *OrganizationsLocationsDiscoveryConfigsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDiscoveryConfigsListCall { - 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 *OrganizationsLocationsDiscoveryConfigsListCall) Context(ctx context.Context) *OrganizationsLocationsDiscoveryConfigsListCall { +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 *OrganizationsLocationsDiscoveryConfigsListCall) Header() http.Header { +func (c *OrganizationsLocationsDiscoveryConfigsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsDiscoveryConfigsListCall) 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_ { 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}/discoveryConfigs") + 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.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 -// *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 *OrganizationsLocationsDiscoveryConfigsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDiscoveryConfigsResponse, error) { +// 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 *OrganizationsLocationsDiscoveryConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14480,7 +14810,7 @@ func (c *OrganizationsLocationsDiscoveryConfigsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListDiscoveryConfigsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14492,41 +14822,25 @@ func (c *OrganizationsLocationsDiscoveryConfigsListCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Lists discovery configurations.", - // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs", - // "httpMethod": "GET", - // "id": "dlp.organizations.locations.discoveryConfigs.list", + // "description": "Deletes a discovery configuration.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", + // "httpMethod": "DELETE", + // "id": "dlp.organizations.locations.discoveryConfigs.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "orderBy": { - // "description": "Comma separated list of config fields to order by, followed by `asc` or `desc` postfix. This list is case insensitive. The 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. This value can be limited by a server.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token to continue retrieval. Comes from the 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", + // "name": { + // "description": "Required. Resource name of the project and the config, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/discoveryConfigs", + // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2ListDiscoveryConfigsResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14535,92 +14849,78 @@ func (c *OrganizationsLocationsDiscoveryConfigsListCall) 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 *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 { - 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.discoveryConfigs.get": -// method id "dlp.organizations.locations.discoveryConfigs.patch": +type OrganizationsLocationsDiscoveryConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} -type OrganizationsLocationsDiscoveryConfigsPatchCall struct { - s *Service - name string - googleprivacydlpv2updatediscoveryconfigrequest *GooglePrivacyDlpV2UpdateDiscoveryConfigRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a discovery configuration. +// Get: Gets a discovery configuration. // // - 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)} +func (r *OrganizationsLocationsDiscoveryConfigsService) Get(name string) *OrganizationsLocationsDiscoveryConfigsGetCall { + c := &OrganizationsLocationsDiscoveryConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - 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 *OrganizationsLocationsDiscoveryConfigsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsPatchCall { +func (c *OrganizationsLocationsDiscoveryConfigsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsGetCall { 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 *OrganizationsLocationsDiscoveryConfigsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDiscoveryConfigsGetCall { + 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 *OrganizationsLocationsDiscoveryConfigsPatchCall) Context(ctx context.Context) *OrganizationsLocationsDiscoveryConfigsPatchCall { +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 *OrganizationsLocationsDiscoveryConfigsPatchCall) Header() http.Header { +func (c *OrganizationsLocationsDiscoveryConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) 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_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2updatediscoveryconfigrequest) - 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 } @@ -14631,7 +14931,7 @@ func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.discoveryConfigs.patch" call. +// 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 *GooglePrivacyDlpV2DiscoveryConfig.ServerResponse.Header or @@ -14639,7 +14939,7 @@ func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) doRequest(alt string) // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DiscoveryConfig, 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 { @@ -14670,10 +14970,10 @@ func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Updates a discovery configuration.", + // "description": "Gets a discovery configuration.", // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", - // "httpMethod": "PATCH", - // "id": "dlp.organizations.locations.discoveryConfigs.patch", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.discoveryConfigs.get", // "parameterOrder": [ // "name" // ], @@ -14687,9 +14987,6 @@ func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) Do(opts ...googleapi.C // } // }, // "path": "v2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateDiscoveryConfigRequest" - // }, // "response": { // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" // }, @@ -14700,9 +14997,9 @@ func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) Do(opts ...googleapi.C } -// method id "dlp.organizations.locations.dlpJobs.list": +// method id "dlp.organizations.locations.discoveryConfigs.list": -type OrganizationsLocationsDlpJobsListCall struct { +type OrganizationsLocationsDiscoveryConfigsListCall struct { s *Service parentid string urlParams_ gensupport.URLParams @@ -14711,102 +15008,53 @@ type OrganizationsLocationsDlpJobsListCall struct { 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. +// List: Lists discovery configurations. // -// - 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 +// - 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 *OrganizationsLocationsDlpJobsService) List(parentid string) *OrganizationsLocationsDlpJobsListCall { - c := &OrganizationsLocationsDlpJobsListCall{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 } -// 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. The 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 { +// of config fields to order by, followed by `asc` or `desc` postfix. +// This list is case insensitive. The 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": The standard list -// page size. -func (c *OrganizationsLocationsDlpJobsListCall) PageSize(pageSize int64) *OrganizationsLocationsDlpJobsListCall { +// PageSize sets the optional parameter "pageSize": Size of the page. +// This value 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": The standard list -// page token. -func (c *OrganizationsLocationsDlpJobsListCall) PageToken(pageToken string) *OrganizationsLocationsDlpJobsListCall { +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. Comes from the 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 } -// 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 *OrganizationsLocationsDlpJobsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDlpJobsListCall { +func (c *OrganizationsLocationsDiscoveryConfigsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14816,7 +15064,7 @@ func (c *OrganizationsLocationsDlpJobsListCall) 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 *OrganizationsLocationsDlpJobsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDlpJobsListCall { +func (c *OrganizationsLocationsDiscoveryConfigsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsDiscoveryConfigsListCall { c.ifNoneMatch_ = entityTag return c } @@ -14824,21 +15072,21 @@ func (c *OrganizationsLocationsDlpJobsListCall) 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 *OrganizationsLocationsDlpJobsListCall) Context(ctx context.Context) *OrganizationsLocationsDlpJobsListCall { +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 *OrganizationsLocationsDlpJobsListCall) Header() http.Header { +func (c *OrganizationsLocationsDiscoveryConfigsListCall) 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 *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_ { @@ -14851,7 +15099,7 @@ func (c *OrganizationsLocationsDlpJobsListCall) 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}/dlpJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/discoveryConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14864,15 +15112,16 @@ func (c *OrganizationsLocationsDlpJobsListCall) doRequest(alt string) (*http.Res 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.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 +// *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 *OrganizationsLocationsDiscoveryConfigsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDiscoveryConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14891,7 +15140,7 @@ func (c *OrganizationsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ + ret := &GooglePrivacyDlpV2ListDiscoveryConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14903,66 +15152,41 @@ 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", + // "description": "Lists discovery configurations.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs", // "httpMethod": "GET", - // "id": "dlp.organizations.locations.dlpJobs.list", + // "id": "dlp.organizations.locations.discoveryConfigs.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. The 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`", + // "description": "Comma separated list of config fields to order by, followed by `asc` or `desc` postfix. This list is case insensitive. The 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": "The standard list page size.", + // "description": "Size of the page. This value can be limited by a server.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "Page token to continue retrieval. Comes from the 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 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 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" - // }, - // "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/{+parent}/discoveryConfigs", // "response": { - // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" + // "$ref": "GooglePrivacyDlpV2ListDiscoveryConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14974,7 +15198,7 @@ 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 { +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 { @@ -14992,46 +15216,32 @@ func (c *OrganizationsLocationsDlpJobsListCall) Pages(ctx context.Context, f fun } } -// method id "dlp.organizations.locations.inspectTemplates.create": +// method id "dlp.organizations.locations.discoveryConfigs.patch": -type OrganizationsLocationsInspectTemplatesCreateCall struct { +type OrganizationsLocationsDiscoveryConfigsPatchCall struct { s *Service - parentid string - googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest + name string + googleprivacydlpv2updatediscoveryconfigrequest *GooglePrivacyDlpV2UpdateDiscoveryConfigRequest 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. +// Patch: Updates a discovery configuration. // -// - 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 +// - 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.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 *OrganizationsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesCreateCall { +func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsDiscoveryConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15039,21 +15249,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 *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 *OrganizationsLocationsInspectTemplatesCreateCall) Header() http.Header { +func (c *OrganizationsLocationsDiscoveryConfigsPatchCall) 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 *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_ { @@ -15061,35 +15271,35 @@ 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.googleprivacydlpv2updatediscoveryconfigrequest) 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/{+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.organizations.locations.inspectTemplates.create" 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 *OrganizationsLocationsInspectTemplatesCreateCall) 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 { @@ -15108,7 +15318,7 @@ func (c *OrganizationsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi. 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, @@ -15120,28 +15330,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", - // "httpMethod": "POST", - // "id": "dlp.organizations.locations.inspectTemplates.create", + // "description": "Updates a discovery configuration.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", + // "httpMethod": "PATCH", + // "id": "dlp.organizations.locations.discoveryConfigs.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "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", + // "name": { + // "description": "Required. Resource name of the project and the configuration, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/inspectTemplates", + // "path": "v2/{+name}", // "request": { - // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" + // "$ref": "GooglePrivacyDlpV2UpdateDiscoveryConfigRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15150,85 +15360,181 @@ func (c *OrganizationsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi. } -// method id "dlp.organizations.locations.inspectTemplates.delete": +// method id "dlp.organizations.locations.dlpJobs.list": -type OrganizationsLocationsInspectTemplatesDeleteCall struct { - s *Service - name string - 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 } -// Delete: Deletes an InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// List: Lists DlpJobs that match the specified filter in the request. +// See +// https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage +// and +// https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis +// 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)} - 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/sensitive-data-protection/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. The 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 *OrganizationsLocationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesDeleteCall { +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 *OrganizationsLocationsInspectTemplatesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesDeleteCall { +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 *OrganizationsLocationsInspectTemplatesDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsDlpJobsListCall) 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 *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()) + 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 := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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.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 +// 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 *OrganizationsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +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 { @@ -15247,7 +15553,7 @@ func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15259,25 +15565,66 @@ 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}", - // "httpMethod": "DELETE", - // "id": "dlp.organizations.locations.inspectTemplates.delete", + // "description": "Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/dlpJobs", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.dlpJobs.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "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.", + // "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. The 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/sensitive-data-protection/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/[^/]+/inspectTemplates/[^/]+$", + // "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/{+name}", + // "path": "v2/{+parent}/dlpJobs", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15286,92 +15633,118 @@ func (c *OrganizationsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi. } -// method id "dlp.organizations.locations.inspectTemplates.get": - -type OrganizationsLocationsInspectTemplatesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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) + } } -// Get: Gets an InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// 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 +} + +// Create: Creates an InspectTemplate for reusing frequently used +// configuration for inspecting content, images, and storage. See +// https://cloud.google.com/sensitive-data-protection/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 *OrganizationsLocationsInspectTemplatesService) Get(name string) *OrganizationsLocationsInspectTemplatesGetCall { - c := &OrganizationsLocationsInspectTemplatesGetCall{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/sensitive-data-protection/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 *OrganizationsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesGetCall { +func (c *OrganizationsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesCreateCall { 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 *OrganizationsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInspectTemplatesGetCall { - 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 *OrganizationsLocationsInspectTemplatesGetCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesGetCall { +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 *OrganizationsLocationsInspectTemplatesGetCall) Header() http.Header { +func (c *OrganizationsLocationsInspectTemplatesCreateCall) 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 *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_ { 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.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("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.locations.inspectTemplates.get" call. +// 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 @@ -15379,7 +15752,7 @@ func (c *OrganizationsLocationsInspectTemplatesGetCall) doRequest(alt string) (* // 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) { +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 { @@ -15410,23 +15783,26 @@ 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}", - // "httpMethod": "GET", - // "id": "dlp.organizations.locations.inspectTemplates.get", + // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/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 inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/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/sensitive-data-protection/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/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/inspectTemplates", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" + // }, // "response": { // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, @@ -15437,148 +15813,86 @@ func (c *OrganizationsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.Cal } -// method id "dlp.organizations.locations.inspectTemplates.list": +// method id "dlp.organizations.locations.inspectTemplates.delete": -type OrganizationsLocationsInspectTemplatesListCall struct { - s *Service - parentid 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 } -// List: Lists InspectTemplates. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Delete: Deletes an InspectTemplate. See +// https://cloud.google.com/sensitive-data-protection/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. The 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 -} - -// PageSize sets the optional parameter "pageSize": Size of the page. -// This value 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 -} - -// PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from the previous call to -// `ListInspectTemplates`. -func (c *OrganizationsLocationsInspectTemplatesListCall) PageToken(pageToken string) *OrganizationsLocationsInspectTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - 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 } // 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 *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 *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 *OrganizationsLocationsInspectTemplatesListCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesListCall { +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 *OrganizationsLocationsInspectTemplatesListCall) Header() http.Header { +func (c *OrganizationsLocationsInspectTemplatesDeleteCall) 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 *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/{+parent}/inspectTemplates") + 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.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 *OrganizationsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, 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 { @@ -15597,7 +15911,7 @@ func (c *OrganizationsLocationsInspectTemplatesListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15609,46 +15923,25 @@ 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", - // "httpMethod": "GET", - // "id": "dlp.organizations.locations.inspectTemplates.list", + // "description": "Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "DELETE", + // "id": "dlp.organizations.locations.inspectTemplates.delete", // "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. The 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. This value 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 the 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", + // "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/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/inspectTemplates", + // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15657,95 +15950,82 @@ 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 { - 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.patch": +// method id "dlp.organizations.locations.inspectTemplates.get": -type OrganizationsLocationsInspectTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsInspectTemplatesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Get: Gets an InspectTemplate. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates +// to learn more. // -// - name: Resource name of organization and inspectTemplate to be -// updated, for example +// - 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) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *OrganizationsLocationsInspectTemplatesPatchCall { - c := &OrganizationsLocationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OrganizationsLocationsInspectTemplatesService) Get(name string) *OrganizationsLocationsInspectTemplatesGetCall { + c := &OrganizationsLocationsInspectTemplatesGetCall{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 *OrganizationsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesPatchCall { +func (c *OrganizationsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesGetCall { 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 *OrganizationsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInspectTemplatesGetCall { + 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 *OrganizationsLocationsInspectTemplatesPatchCall) Context(ctx context.Context) *OrganizationsLocationsInspectTemplatesPatchCall { +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 *OrganizationsLocationsInspectTemplatesPatchCall) Header() http.Header { +func (c *OrganizationsLocationsInspectTemplatesGetCall) 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 *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_ { 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 + 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 } @@ -15756,7 +16036,7 @@ func (c *OrganizationsLocationsInspectTemplatesPatchCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.organizations.locations.inspectTemplates.patch" call. +// 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 @@ -15764,7 +16044,7 @@ func (c *OrganizationsLocationsInspectTemplatesPatchCall) doRequest(alt string) // 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) { +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 { @@ -15795,16 +16075,16 @@ 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.", + // "description": "Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", - // "httpMethod": "PATCH", - // "id": "dlp.organizations.locations.inspectTemplates.patch", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.inspectTemplates.get", // "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 organization and inspectTemplate to be read, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", // "location": "path", // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", // "required": true, @@ -15812,9 +16092,6 @@ func (c *OrganizationsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.C // } // }, // "path": "v2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" - // }, // "response": { // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, @@ -15825,82 +16102,129 @@ func (c *OrganizationsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.C } -// method id "dlp.organizations.locations.jobTriggers.create": +// method id "dlp.organizations.locations.inspectTemplates.list": -type OrganizationsLocationsJobTriggersCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsInspectTemplatesListCall struct { + s *Service + parentid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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. +// List: Lists InspectTemplates. See +// https://cloud.google.com/sensitive-data-protection/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: +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/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 *OrganizationsLocationsInspectTemplatesService) List(parentid string) *OrganizationsLocationsInspectTemplatesListCall { + c := &OrganizationsLocationsInspectTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest + 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. The 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 +} + +// PageSize sets the optional parameter "pageSize": Size of the page. +// This value 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 +} + +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. Comes from the 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 *OrganizationsLocationsJobTriggersCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersCreateCall { +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 *OrganizationsLocationsJobTriggersCreateCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersCreateCall { +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 *OrganizationsLocationsJobTriggersCreateCall) Header() http.Header { +func (c *OrganizationsLocationsInspectTemplatesListCall) 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 *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.googleprivacydlpv2createjobtriggerrequest) - 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}/jobTriggers") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -15911,14 +16235,16 @@ 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 -// 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 *OrganizationsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { +// 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 *OrganizationsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15937,7 +16263,7 @@ func (c *OrganizationsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2JobTrigger{ + ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15949,28 +16275,46 @@ 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", - // "httpMethod": "POST", - // "id": "dlp.organizations.locations.jobTriggers.create", + // "description": "Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.inspectTemplates.list", // "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", - // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", - // "required": true, + // "locationId": { + // "description": "Deprecated. This field has no effect.", + // "location": "query", // "type": "string" - // } - // }, - // "path": "v2/{+parent}/jobTriggers", - // "request": { - // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" + // }, + // "orderBy": { + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case insensitive. The 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. This value 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 the 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/sensitive-data-protection/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}/inspectTemplates", // "response": { - // "$ref": "GooglePrivacyDlpV2JobTrigger" + // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15979,32 +16323,57 @@ func (c *OrganizationsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallO } -// method id "dlp.organizations.locations.jobTriggers.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 *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) + } +} -type OrganizationsLocationsJobTriggersDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 } -// Delete: Deletes a job trigger. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn -// more. +// Patch: Updates the InspectTemplate. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates +// 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 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 *OrganizationsLocationsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersDeleteCall { +func (c *OrganizationsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInspectTemplatesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16012,21 +16381,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 *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 *OrganizationsLocationsJobTriggersDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsInspectTemplatesPatchCall) 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 *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_ { @@ -16034,11 +16403,16 @@ func (c *OrganizationsLocationsJobTriggersDeleteCall) doRequest(alt string) (*ht } 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("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -16049,14 +16423,15 @@ 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. -// 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) { +// 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 { @@ -16075,7 +16450,7 @@ func (c *OrganizationsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallO 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, @@ -16087,25 +16462,28 @@ 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}", - // "httpMethod": "DELETE", - // "id": "dlp.organizations.locations.jobTriggers.delete", + // "description": "Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "PATCH", + // "id": "dlp.organizations.locations.inspectTemplates.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 inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", + // "request": { + // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16114,98 +16492,100 @@ func (c *OrganizationsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallO } -// method id "dlp.organizations.locations.jobTriggers.get": +// method id "dlp.organizations.locations.jobTriggers.create": -type OrganizationsLocationsJobTriggersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsJobTriggersCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest + 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. +// 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/sensitive-data-protection/docs/creating-job-triggers +// 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)} - 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/sensitive-data-protection/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 *OrganizationsLocationsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *OrganizationsLocationsJobTriggersCreateCall { + c := &OrganizationsLocationsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + 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 *OrganizationsLocationsJobTriggersGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersGetCall { +func (c *OrganizationsLocationsJobTriggersCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersCreateCall { 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 *OrganizationsLocationsJobTriggersGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsJobTriggersGetCall { - 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 *OrganizationsLocationsJobTriggersGetCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersGetCall { +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 *OrganizationsLocationsJobTriggersGetCall) Header() http.Header { +func (c *OrganizationsLocationsJobTriggersCreateCall) 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 *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_ { 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.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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 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.locations.jobTriggers.get" call. +// 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 *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) { +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 { @@ -16236,23 +16616,26 @@ 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}", - // "httpMethod": "GET", - // "id": "dlp.organizations.locations.jobTriggers.get", + // "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/sensitive-data-protection/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers", + // "httpMethod": "POST", + // "id": "dlp.organizations.locations.jobTriggers.create", // "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/sensitive-data-protection/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/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/jobTriggers", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" + // }, // "response": { // "$ref": "GooglePrivacyDlpV2JobTrigger" // }, @@ -16263,181 +16646,84 @@ func (c *OrganizationsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOpti } -// method id "dlp.organizations.locations.jobTriggers.list": +// method id "dlp.organizations.locations.jobTriggers.delete": -type OrganizationsLocationsJobTriggersListCall struct { - s *Service - parentid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsJobTriggersDeleteCall struct { + s *Service + name string + 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 -// more. +// Delete: Deletes a job trigger. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers +// 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 *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 *OrganizationsLocationsJobTriggersListCall) LocationId(locationId string) *OrganizationsLocationsJobTriggersListCall { - 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. The 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. -// This value 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 the 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_) +// - 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 } // 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 *OrganizationsLocationsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersDeleteCall { 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 *OrganizationsLocationsJobTriggersListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsJobTriggersListCall { - 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 *OrganizationsLocationsJobTriggersListCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersListCall { +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 *OrganizationsLocationsJobTriggersListCall) Header() http.Header { +func (c *OrganizationsLocationsJobTriggersDeleteCall) 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 *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_ { 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}/jobTriggers") + 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.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 -// *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 *OrganizationsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { +// 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 *OrganizationsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16456,7 +16742,7 @@ func (c *OrganizationsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16468,66 +16754,25 @@ 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", - // "httpMethod": "GET", - // "id": "dlp.organizations.locations.jobTriggers.list", + // "description": "Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", + // "httpMethod": "DELETE", + // "id": "dlp.organizations.locations.jobTriggers.delete", // "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 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. The 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. This value can be limited by a server.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token to continue retrieval. Comes from the 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", + // "name": { + // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", // "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/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16536,94 +16781,80 @@ 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 { - 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.jobTriggers.patch": +// method id "dlp.organizations.locations.jobTriggers.get": -type OrganizationsLocationsJobTriggersPatchCall struct { - s *Service - name string - googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsJobTriggersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a job trigger. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn -// more. +// Get: Gets a job trigger. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers +// 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)} +func (r *OrganizationsLocationsJobTriggersService) Get(name string) *OrganizationsLocationsJobTriggersGetCall { + c := &OrganizationsLocationsJobTriggersGetCall{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 *OrganizationsLocationsJobTriggersPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersPatchCall { +func (c *OrganizationsLocationsJobTriggersGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersGetCall { 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 *OrganizationsLocationsJobTriggersGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsJobTriggersGetCall { + 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 *OrganizationsLocationsJobTriggersPatchCall) Context(ctx context.Context) *OrganizationsLocationsJobTriggersPatchCall { +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 *OrganizationsLocationsJobTriggersPatchCall) Header() http.Header { +func (c *OrganizationsLocationsJobTriggersGetCall) 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 *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_ { reqHeaders[k] = v } 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 + 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 } @@ -16634,14 +16865,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. +// 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 *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) { +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 { @@ -16672,10 +16903,10 @@ 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.", + // "description": "Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", - // "httpMethod": "PATCH", - // "id": "dlp.organizations.locations.jobTriggers.patch", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.jobTriggers.get", // "parameterOrder": [ // "name" // ], @@ -16689,11 +16920,2041 @@ func (c *OrganizationsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOp // } // }, // "path": "v2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" + // "response": { + // "$ref": "GooglePrivacyDlpV2JobTrigger" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.locations.jobTriggers.list": + +type OrganizationsLocationsJobTriggersListCall struct { + s *Service + parentid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists job triggers. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers +// 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/sensitive-data-protection/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 *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 *OrganizationsLocationsJobTriggersListCall) LocationId(locationId string) *OrganizationsLocationsJobTriggersListCall { + 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. The 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. +// This value 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 the 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 *OrganizationsLocationsJobTriggersListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersListCall { + 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 *OrganizationsLocationsJobTriggersListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsJobTriggersListCall { + 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 *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 *OrganizationsLocationsJobTriggersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + 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}/jobTriggers") + 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.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 +// *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 *OrganizationsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, 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 := &GooglePrivacyDlpV2ListJobTriggersResponse{ + 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 job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers", + // "httpMethod": "GET", + // "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 triggeredJob fields to order by, followed by `asc` or `desc` postfix. This list is case insensitive. The 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. This value can be limited by a server.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token to continue retrieval. Comes from the 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/sensitive-data-protection/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", + // "response": { + // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" + // }, + // "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 *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 { + 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.jobTriggers.patch": + +type OrganizationsLocationsJobTriggersPatchCall struct { + s *Service + name string + googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a job trigger. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers +// 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)} + 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 *OrganizationsLocationsJobTriggersPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsJobTriggersPatchCall { + 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 *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 *OrganizationsLocationsJobTriggersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + reqHeaders[k] = v + } + 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) + 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.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 *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 { + 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 := &GooglePrivacyDlpV2JobTrigger{ + 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 a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", + // "httpMethod": "PATCH", + // "id": "dlp.organizations.locations.jobTriggers.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" + // }, + // "response": { + // "$ref": "GooglePrivacyDlpV2JobTrigger" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.locations.projectDataProfiles.get": + +type OrganizationsLocationsProjectDataProfilesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a project data profile. +// +// - name: Resource name, for example +// `organizations/12345/locations/us/projectDataProfiles/53234423`. +func (r *OrganizationsLocationsProjectDataProfilesService) Get(name string) *OrganizationsLocationsProjectDataProfilesGetCall { + c := &OrganizationsLocationsProjectDataProfilesGetCall{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 *OrganizationsLocationsProjectDataProfilesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsProjectDataProfilesGetCall { + 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 *OrganizationsLocationsProjectDataProfilesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsProjectDataProfilesGetCall { + 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 *OrganizationsLocationsProjectDataProfilesGetCall) Context(ctx context.Context) *OrganizationsLocationsProjectDataProfilesGetCall { + 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 *OrganizationsLocationsProjectDataProfilesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsProjectDataProfilesGetCall) 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.locations.projectDataProfiles.get" call. +// Exactly one of *GooglePrivacyDlpV2ProjectDataProfile or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2ProjectDataProfile.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 *OrganizationsLocationsProjectDataProfilesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ProjectDataProfile, 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 := &GooglePrivacyDlpV2ProjectDataProfile{ + 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 project data profile.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/projectDataProfiles/{projectDataProfilesId}", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.projectDataProfiles.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name, for example `organizations/12345/locations/us/projectDataProfiles/53234423`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/projectDataProfiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GooglePrivacyDlpV2ProjectDataProfile" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.locations.projectDataProfiles.list": + +type OrganizationsLocationsProjectDataProfilesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists data profiles for an organization. +// +// - parent: organizations/{org_id}/locations/{loc_id}. +func (r *OrganizationsLocationsProjectDataProfilesService) List(parent string) *OrganizationsLocationsProjectDataProfilesListCall { + c := &OrganizationsLocationsProjectDataProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + 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: - `sensitivity_level` - HIGH|MODERATE|LOW - +// `data_risk_level` - HIGH|MODERATE|LOW - `status_code` - an RPC status +// code as defined in +// https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto +// * The operator must be `=` or `!=`. Examples: * project_id = 12345 +// AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH +// The length of this field should be no more than 500 characters. +func (c *OrganizationsLocationsProjectDataProfilesListCall) Filter(filter string) *OrganizationsLocationsProjectDataProfilesListCall { + c.urlParams_.Set("filter", filter) + 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. The default sorting order is ascending. +// Redundant space characters are insignificant. Only one order field at +// a time is allowed. Examples: * `project_id` * `sensitivity_level +// desc` Supported fields are: - `project_id`: GCP project ID - +// `sensitivity_level`: How sensitive the data in a project is, at most. +// - `data_risk_level`: How much risk is associated with this data. - +// `profile_last_generated`: When the profile was last updated in epoch +// seconds. +func (c *OrganizationsLocationsProjectDataProfilesListCall) OrderBy(orderBy string) *OrganizationsLocationsProjectDataProfilesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Size of the page. +// This value can be limited by the server. If zero, server returns a +// page of max size 100. +func (c *OrganizationsLocationsProjectDataProfilesListCall) PageSize(pageSize int64) *OrganizationsLocationsProjectDataProfilesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. +func (c *OrganizationsLocationsProjectDataProfilesListCall) PageToken(pageToken string) *OrganizationsLocationsProjectDataProfilesListCall { + 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 *OrganizationsLocationsProjectDataProfilesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsProjectDataProfilesListCall { + 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 *OrganizationsLocationsProjectDataProfilesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsProjectDataProfilesListCall { + 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 *OrganizationsLocationsProjectDataProfilesListCall) Context(ctx context.Context) *OrganizationsLocationsProjectDataProfilesListCall { + 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 *OrganizationsLocationsProjectDataProfilesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsProjectDataProfilesListCall) 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}/projectDataProfiles") + 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.organizations.locations.projectDataProfiles.list" call. +// Exactly one of *GooglePrivacyDlpV2ListProjectDataProfilesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ListProjectDataProfilesResponse.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 *OrganizationsLocationsProjectDataProfilesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListProjectDataProfilesResponse, 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 := &GooglePrivacyDlpV2ListProjectDataProfilesResponse{ + 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 data profiles for an organization.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/projectDataProfiles", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.projectDataProfiles.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: - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH The length of this field should be no more than 500 characters.", + // "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. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id` * `sensitivity_level desc` Supported fields are: - `project_id`: GCP project ID - `sensitivity_level`: How sensitive the data in a project is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Size of the page. This value 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. organizations/{org_id}/locations/{loc_id}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/projectDataProfiles", + // "response": { + // "$ref": "GooglePrivacyDlpV2ListProjectDataProfilesResponse" + // }, + // "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 *OrganizationsLocationsProjectDataProfilesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListProjectDataProfilesResponse) 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.storedInfoTypes.create": + +type OrganizationsLocationsStoredInfoTypesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest + 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/sensitive-data-protection/docs/creating-stored-infotypes +// 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/sensitive-data-protection/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 *OrganizationsLocationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *OrganizationsLocationsStoredInfoTypesCreateCall { + c := &OrganizationsLocationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + 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 *OrganizationsLocationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesCreateCall { + 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 *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 *OrganizationsLocationsStoredInfoTypesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + 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}/storedInfoTypes") + 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.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 *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) { + 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": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", + // "httpMethod": "POST", + // "id": "dlp.organizations.locations.storedInfoTypes.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/sensitive-data-protection/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}/storedInfoTypes", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" + // }, + // "response": { + // "$ref": "GooglePrivacyDlpV2StoredInfoType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.locations.storedInfoTypes.delete": + +type OrganizationsLocationsStoredInfoTypesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a stored infoType. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// 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 *OrganizationsLocationsStoredInfoTypesService) Delete(name string) *OrganizationsLocationsStoredInfoTypesDeleteCall { + c := &OrganizationsLocationsStoredInfoTypesDeleteCall{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 *OrganizationsLocationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesDeleteCall { + 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 *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 *OrganizationsLocationsStoredInfoTypesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + 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.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 *OrganizationsLocationsStoredInfoTypesDeleteCall) 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 stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", + // "httpMethod": "DELETE", + // "id": "dlp.organizations.locations.storedInfoTypes.delete", + // "parameterOrder": [ + // "name" + // ], + // "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.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.locations.storedInfoTypes.get": + +type OrganizationsLocationsStoredInfoTypesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a stored infoType. See +// https://cloud.google.com/sensitive-data-protection/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 *OrganizationsLocationsStoredInfoTypesService) Get(name string) *OrganizationsLocationsStoredInfoTypesGetCall { + c := &OrganizationsLocationsStoredInfoTypesGetCall{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 *OrganizationsLocationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesGetCall { + 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 *OrganizationsLocationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsStoredInfoTypesGetCall { + 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 *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 *OrganizationsLocationsStoredInfoTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + 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.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 *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) { + 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": "Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.storedInfoTypes.get", + // "parameterOrder": [ + // "name" + // ], + // "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.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GooglePrivacyDlpV2StoredInfoType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.locations.storedInfoTypes.list": + +type OrganizationsLocationsStoredInfoTypesListCall struct { + s *Service + parentid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists stored infoTypes. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// 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/sensitive-data-protection/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 *OrganizationsLocationsStoredInfoTypesService) List(parentid string) *OrganizationsLocationsStoredInfoTypesListCall { + c := &OrganizationsLocationsStoredInfoTypesListCall{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 { + 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. The 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. +// This value 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 the previous call to +// `ListStoredInfoTypes`. +func (c *OrganizationsLocationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsLocationsStoredInfoTypesListCall { + 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 *OrganizationsLocationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesListCall { + 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 *OrganizationsLocationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsStoredInfoTypesListCall { + 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 *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 *OrganizationsLocationsStoredInfoTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + 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 += "?" + 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.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 +// *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 *OrganizationsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, 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 := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ + 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/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.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. The 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. This value 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 the 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/sensitive-data-protection/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}/storedInfoTypes", + // "response": { + // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" + // }, + // "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 *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 { + 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.storedInfoTypes.patch": + +type OrganizationsLocationsStoredInfoTypesPatchCall struct { + s *Service + name string + googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest + urlParams_ gensupport.URLParams + 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/sensitive-data-protection/docs/creating-stored-infotypes +// 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 *OrganizationsLocationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *OrganizationsLocationsStoredInfoTypesPatchCall { + c := &OrganizationsLocationsStoredInfoTypesPatchCall{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 *OrganizationsLocationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsStoredInfoTypesPatchCall { + 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 *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 *OrganizationsLocationsStoredInfoTypesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + 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 + } + 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.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 *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) { + 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/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", + // "httpMethod": "PATCH", + // "id": "dlp.organizations.locations.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/[^/]+/locations/[^/]+/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.organizations.locations.tableDataProfiles.get": + +type OrganizationsLocationsTableDataProfilesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a table data profile. +// +// - name: Resource name, for example +// `organizations/12345/locations/us/tableDataProfiles/53234423`. +func (r *OrganizationsLocationsTableDataProfilesService) Get(name string) *OrganizationsLocationsTableDataProfilesGetCall { + c := &OrganizationsLocationsTableDataProfilesGetCall{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 *OrganizationsLocationsTableDataProfilesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsTableDataProfilesGetCall { + 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 *OrganizationsLocationsTableDataProfilesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsTableDataProfilesGetCall { + 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 *OrganizationsLocationsTableDataProfilesGetCall) Context(ctx context.Context) *OrganizationsLocationsTableDataProfilesGetCall { + 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 *OrganizationsLocationsTableDataProfilesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsTableDataProfilesGetCall) 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.locations.tableDataProfiles.get" call. +// Exactly one of *GooglePrivacyDlpV2TableDataProfile or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2TableDataProfile.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 *OrganizationsLocationsTableDataProfilesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2TableDataProfile, 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 := &GooglePrivacyDlpV2TableDataProfile{ + 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 table data profile.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/tableDataProfiles/{tableDataProfilesId}", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.tableDataProfiles.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name, for example `organizations/12345/locations/us/tableDataProfiles/53234423`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "GooglePrivacyDlpV2TableDataProfile" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.organizations.locations.tableDataProfiles.list": + +type OrganizationsLocationsTableDataProfilesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists data profiles for an organization. +// +// - parent: Resource name of the organization or project, for example +// `organizations/433245324/locations/europe` or +// `projects/project-id/locations/asia`. +func (r *OrganizationsLocationsTableDataProfilesService) List(parent string) *OrganizationsLocationsTableDataProfilesListCall { + c := &OrganizationsLocationsTableDataProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + 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: - `project_id` - The GCP project ID. - `dataset_id` - +// The BigQuery dataset ID. - `table_id` - The ID of the BigQuery table. +// - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - +// HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - +// `status_code` - an RPC status code as defined in +// https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto +// * The operator must be `=` or `!=`. Examples: * project_id = 12345 +// AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH +// * project_id = 12345 AND resource_visibility = PUBLIC The length of +// this field should be no more than 500 characters. +func (c *OrganizationsLocationsTableDataProfilesListCall) Filter(filter string) *OrganizationsLocationsTableDataProfilesListCall { + c.urlParams_.Set("filter", filter) + 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. The default sorting order is ascending. +// Redundant space characters are insignificant. Only one order field at +// a time is allowed. Examples: * `project_id asc` * `table_id` * +// `sensitivity_level desc` Supported fields are: - `project_id`: The +// GCP project ID. - `dataset_id`: The ID of a BigQuery dataset. - +// `table_id`: The ID of a BigQuery table. - `sensitivity_level`: How +// sensitive the data in a table is, at most. - `data_risk_level`: How +// much risk is associated with this data. - `profile_last_generated`: +// When the profile was last updated in epoch seconds. - +// `last_modified`: The last time the resource was modified. - +// `resource_visibility`: Visibility restriction for this resource. - +// `row_count`: Number of rows in this resource. +func (c *OrganizationsLocationsTableDataProfilesListCall) OrderBy(orderBy string) *OrganizationsLocationsTableDataProfilesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Size of the page. +// This value can be limited by the server. If zero, server returns a +// page of max size 100. +func (c *OrganizationsLocationsTableDataProfilesListCall) PageSize(pageSize int64) *OrganizationsLocationsTableDataProfilesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. +func (c *OrganizationsLocationsTableDataProfilesListCall) PageToken(pageToken string) *OrganizationsLocationsTableDataProfilesListCall { + 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 *OrganizationsLocationsTableDataProfilesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsTableDataProfilesListCall { + 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 *OrganizationsLocationsTableDataProfilesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsTableDataProfilesListCall { + 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 *OrganizationsLocationsTableDataProfilesListCall) Context(ctx context.Context) *OrganizationsLocationsTableDataProfilesListCall { + 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 *OrganizationsLocationsTableDataProfilesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsTableDataProfilesListCall) 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}/tableDataProfiles") + 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.organizations.locations.tableDataProfiles.list" call. +// Exactly one of *GooglePrivacyDlpV2ListTableDataProfilesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ListTableDataProfilesResponse.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 *OrganizationsLocationsTableDataProfilesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListTableDataProfilesResponse, 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 := &GooglePrivacyDlpV2ListTableDataProfilesResponse{ + 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 data profiles for an organization.", + // "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/tableDataProfiles", + // "httpMethod": "GET", + // "id": "dlp.organizations.locations.tableDataProfiles.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: - `project_id` - The GCP project ID. - `dataset_id` - The BigQuery dataset ID. - `table_id` - The ID of the BigQuery table. - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * project_id = 12345 AND resource_visibility = PUBLIC The length of this field should be no more than 500 characters.", + // "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. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id asc` * `table_id` * `sensitivity_level desc` Supported fields are: - `project_id`: The GCP project ID. - `dataset_id`: The ID of a BigQuery dataset. - `table_id`: The ID of a BigQuery table. - `sensitivity_level`: How sensitive the data in a table is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds. - `last_modified`: The last time the resource was modified. - `resource_visibility`: Visibility restriction for this resource. - `row_count`: Number of rows in this resource.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Size of the page. This value 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the organization or project, for example `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } // }, + // "path": "v2/{+parent}/tableDataProfiles", // "response": { - // "$ref": "GooglePrivacyDlpV2JobTrigger" + // "$ref": "GooglePrivacyDlpV2ListTableDataProfilesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16702,9 +18963,30 @@ func (c *OrganizationsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOp } -// method id "dlp.organizations.locations.storedInfoTypes.create": +// 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 *OrganizationsLocationsTableDataProfilesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListTableDataProfilesResponse) 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 OrganizationsLocationsStoredInfoTypesCreateCall struct { +// method id "dlp.organizations.storedInfoTypes.create": + +type OrganizationsStoredInfoTypesCreateCall struct { s *Service parentid string googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest @@ -16715,14 +18997,14 @@ type OrganizationsLocationsStoredInfoTypesCreateCall struct { // 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. +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// 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: +// (https://cloud.google.com/sensitive-data-protection/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: @@ -16732,8 +19014,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 @@ -16742,7 +19024,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 } @@ -16750,21 +19032,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_ { @@ -16792,14 +19074,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 { @@ -16830,18 +19112,18 @@ 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", + // "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", // "httpMethod": "POST", - // "id": "dlp.organizations.locations.storedInfoTypes.create", + // "id": "dlp.organizations.storedInfoTypes.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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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" // } @@ -16860,9 +19142,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 @@ -16871,15 +19153,15 @@ type OrganizationsLocationsStoredInfoTypesDeleteCall struct { } // Delete: Deletes a stored infoType. See -// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn -// more. +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// 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 *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 } @@ -16887,7 +19169,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 } @@ -16895,21 +19177,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_ { @@ -16932,14 +19214,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 { @@ -16970,10 +19252,10 @@ 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}", + // "description": "Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", // "httpMethod": "DELETE", - // "id": "dlp.organizations.locations.storedInfoTypes.delete", + // "id": "dlp.organizations.storedInfoTypes.delete", // "parameterOrder": [ // "name" // ], @@ -16981,7 +19263,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" // } @@ -16997,9 +19279,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 @@ -17009,15 +19291,15 @@ type OrganizationsLocationsStoredInfoTypesGetCall struct { } // Get: Gets a stored infoType. See -// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn -// more. +// https://cloud.google.com/sensitive-data-protection/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 *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 } @@ -17025,7 +19307,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 } @@ -17035,7 +19317,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 } @@ -17043,21 +19325,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_ { @@ -17083,14 +19365,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 { @@ -17121,10 +19403,10 @@ 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}", + // "description": "Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", // "httpMethod": "GET", - // "id": "dlp.organizations.locations.storedInfoTypes.get", + // "id": "dlp.organizations.storedInfoTypes.get", // "parameterOrder": [ // "name" // ], @@ -17132,7 +19414,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" // } @@ -17148,9 +19430,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 @@ -17160,29 +19442,29 @@ type OrganizationsLocationsStoredInfoTypesListCall struct { } // List: Lists stored infoTypes. See -// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn -// more. +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// 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: +// (https://cloud.google.com/sensitive-data-protection/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 *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 } @@ -17196,7 +19478,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) LocationId(locationId st // 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 { +func (c *OrganizationsStoredInfoTypesListCall) OrderBy(orderBy string) *OrganizationsStoredInfoTypesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -17204,7 +19486,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) // PageSize sets the optional parameter "pageSize": Size of the page. // This value 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 } @@ -17212,7 +19494,7 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) // PageToken sets the optional parameter "pageToken": Page token to // continue retrieval. Comes from the 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 } @@ -17220,7 +19502,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 } @@ -17230,7 +19512,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 } @@ -17238,21 +19520,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_ { @@ -17278,7 +19560,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 @@ -17287,7 +19569,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 { @@ -17318,10 +19600,10 @@ 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", + // "description": "Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes", // "httpMethod": "GET", - // "id": "dlp.organizations.locations.storedInfoTypes.list", + // "id": "dlp.organizations.storedInfoTypes.list", // "parameterOrder": [ // "parent" // ], @@ -17348,9 +19630,9 @@ func (c *OrganizationsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.Cal // "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", + // "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/sensitive-data-protection/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" // } @@ -17369,7 +19651,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 { @@ -17387,9 +19669,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 @@ -17401,15 +19683,15 @@ type OrganizationsLocationsStoredInfoTypesPatchCall struct { // 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. +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// 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 *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 @@ -17418,7 +19700,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 } @@ -17426,21 +19708,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_ { @@ -17468,14 +19750,14 @@ 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 { @@ -17506,10 +19788,10 @@ 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}", + // "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/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/organizations/{organizationsId}/storedInfoTypes/{storedInfoTypesId}", // "httpMethod": "PATCH", - // "id": "dlp.organizations.locations.storedInfoTypes.patch", + // "id": "dlp.organizations.storedInfoTypes.patch", // "parameterOrder": [ // "name" // ], @@ -17517,7 +19799,7 @@ func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.Ca // "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/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", + // "pattern": "^organizations/[^/]+/storedInfoTypes/[^/]+$", // "required": true, // "type": "string" // } @@ -17536,47 +19818,47 @@ func (c *OrganizationsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.Ca } -// method id "dlp.organizations.storedInfoTypes.create": +// method id "dlp.projects.content.deidentify": -type OrganizationsStoredInfoTypesCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsContentDeidentifyCall struct { + s *Service + parentid string + googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest + 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. +// Deidentify: De-identifies potentially sensitive info from a +// ContentItem. This method has limits on input size and output size. +// See +// https://cloud.google.com/sensitive-data-protection/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 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: +// depending on whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/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) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsContentDeidentifyCall { + c := &ProjectsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest + 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 *OrganizationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *OrganizationsStoredInfoTypesCreateCall { +func (c *ProjectsContentDeidentifyCall) Fields(s ...googleapi.Field) *ProjectsContentDeidentifyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17584,21 +19866,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 *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 *OrganizationsStoredInfoTypesCreateCall) Header() http.Header { +func (c *ProjectsContentDeidentifyCall) 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 *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_ { @@ -17606,14 +19888,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.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}/storedInfoTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/content:deidentify") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17626,14 +19908,177 @@ 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.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 { + 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 := &GooglePrivacyDlpV2DeidentifyContentResponse{ + 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": "De-identifies potentially sensitive info from a ContentItem. This method has limits on input size and output size. See https://cloud.google.com/sensitive-data-protection/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": [ + // "parent" + // ], + // "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/sensitive-data-protection/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}/content:deidentify", + // "request": { + // "$ref": "GooglePrivacyDlpV2DeidentifyContentRequest" + // }, + // "response": { + // "$ref": "GooglePrivacyDlpV2DeidentifyContentResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.projects.content.inspect": + +type ProjectsContentInspectCall struct { + s *Service + parentid string + googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest + 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/sensitive-data-protection/docs/inspecting-images +// and +// https://cloud.google.com/sensitive-data-protection/docs/inspecting-text, +// +// - parent: Parent resource name. The format of this value varies +// depending on whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/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 + 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 { + 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 *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 *ProjectsContentInspectCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + 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 + } + 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 += "?" + 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.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 { @@ -17652,7 +20097,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, @@ -17664,28 +20109,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/sensitive-data-protection/docs/inspecting-images and https://cloud.google.com/sensitive-data-protection/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/sensitive-data-protection/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" @@ -17694,34 +20139,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/sensitive-data-protection/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/sensitive-data-protection/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 } @@ -17729,21 +20182,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_ { @@ -17751,29 +20204,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 { @@ -17792,7 +20252,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, @@ -17804,25 +20264,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/sensitive-data-protection/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/sensitive-data-protection/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" @@ -17831,100 +20294,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. +// Create: Creates a DeidentifyTemplate for reusing frequently used +// configuration for de-identifying content, images, and storage. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid +// 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 +// - 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/sensitive-data-protection/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 { @@ -17943,7 +20411,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, @@ -17955,173 +20423,116 @@ 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/sensitive-data-protection/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/sensitive-data-protection/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" // ] - // } - -} - -// method id "dlp.organizations.storedInfoTypes.list": - -type OrganizationsStoredInfoTypesListCall struct { - s *Service - parentid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// 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 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. The 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 -} +// method id "dlp.projects.deidentifyTemplates.delete": -// PageSize sets the optional parameter "pageSize": Size of the page. -// This value 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 +type ProjectsDeidentifyTemplatesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from the previous call to -// `ListStoredInfoTypes`. -func (c *OrganizationsStoredInfoTypesListCall) PageToken(pageToken string) *OrganizationsStoredInfoTypesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Delete: Deletes a DeidentifyTemplate. See +// https://cloud.google.com/sensitive-data-protection/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 *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 { @@ -18140,7 +20551,7 @@ 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, @@ -18152,46 +20563,25 @@ func (c *OrganizationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) } 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", + // "description": "Deletes a DeidentifyTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid to learn more.", + // "flatPath": "v2/projects/{projectsId}/deidentifyTemplates/{deidentifyTemplatesId}", + // "httpMethod": "DELETE", + // "id": "dlp.projects.deidentifyTemplates.delete", // "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. The 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. This value 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 the 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", + // "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" @@ -18200,98 +20590,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 -// more. +// Get: Gets a DeidentifyTemplate. See +// https://cloud.google.com/sensitive-data-protection/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 } @@ -18302,14 +20676,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 { @@ -18328,7 +20703,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, @@ -18340,28 +20715,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/sensitive-data-protection/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" @@ -18370,85 +20742,129 @@ func (c *OrganizationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) } -// method id "dlp.projects.content.deidentify": - -type ProjectsContentDeidentifyCall struct { - s *Service - parentid string - googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "dlp.projects.deidentifyTemplates.list": + +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/sensitive-data-protection/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: +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/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. The 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. +// This value 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 the 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 } @@ -18459,16 +20875,16 @@ func (c *ProjectsContentDeidentifyCall) doRequest(alt string) (*http.Response, e 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 { @@ -18487,7 +20903,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, @@ -18499,28 +20915,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/sensitive-data-protection/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. The 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. This value 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 the 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/sensitive-data-protection/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" @@ -18529,47 +20963,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/sensitive-data-protection/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 } @@ -18577,21 +21021,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_ { @@ -18599,36 +21043,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 { @@ -18647,7 +21090,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, @@ -18659,28 +21102,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/sensitive-data-protection/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" @@ -18689,42 +21132,37 @@ 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 +// 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/sensitive-data-protection/docs/inspecting-storage +// and +// https://cloud.google.com/sensitive-data-protection/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 } @@ -18732,21 +21170,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_ { @@ -18754,14 +21192,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 { @@ -18769,21 +21207,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 { @@ -18802,7 +21238,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, @@ -18814,28 +21250,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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/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" @@ -18844,47 +21280,48 @@ 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/sensitive-data-protection/docs/inspecting-storage +// and +// https://cloud.google.com/sensitive-data-protection/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 -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: +// depending on whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/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 } @@ -18892,21 +21329,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_ { @@ -18914,14 +21351,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 { @@ -18934,15 +21371,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 { @@ -18961,7 +21397,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, @@ -18973,28 +21409,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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/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/sensitive-data-protection/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" @@ -19003,9 +21439,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 @@ -19013,16 +21449,17 @@ type ProjectsDeidentifyTemplatesDeleteCall struct { header_ http.Header } -// Delete: Deletes a DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// 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/sensitive-data-protection/docs/inspecting-storage +// and +// https://cloud.google.com/sensitive-data-protection/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 } @@ -19030,7 +21467,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 } @@ -19038,21 +21475,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_ { @@ -19075,14 +21512,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 { @@ -19113,18 +21550,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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/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" // } @@ -19140,9 +21577,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 @@ -19151,16 +21588,15 @@ type ProjectsDeidentifyTemplatesGetCall struct { header_ http.Header } -// Get: Gets a DeidentifyTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// Get: Gets the latest state of a long-running DlpJob. See +// https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage +// and +// https://cloud.google.com/sensitive-data-protection/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 } @@ -19168,7 +21604,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 } @@ -19178,7 +21614,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 } @@ -19186,21 +21622,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_ { @@ -19220,21 +21656,20 @@ func (c *ProjectsDeidentifyTemplatesGetCall) doRequest(alt string) (*http.Respon 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.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) { + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + 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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19253,7 +21688,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, @@ -19265,25 +21700,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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/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" @@ -19292,9 +21727,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 @@ -19303,33 +21738,56 @@ type ProjectsDeidentifyTemplatesListCall struct { header_ http.Header } -// List: Lists DeidentifyTemplates. See -// https://cloud.google.com/dlp/docs/creating-templates-deid to learn -// more. +// List: Lists DlpJobs that match the specified filter in the request. +// See +// https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage +// and +// https://cloud.google.com/sensitive-data-protection/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 -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: +// depending on whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/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 } @@ -19337,37 +21795,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. The 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 { +// 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 } -// PageSize sets the optional parameter "pageSize": Size of the page. -// This value 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 the 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 } @@ -19377,7 +21845,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 } @@ -19385,21 +21853,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_ { @@ -19412,7 +21880,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 { @@ -19425,16 +21893,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 { @@ -19453,7 +21920,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, @@ -19465,46 +21932,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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/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. The 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. The 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. This value 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 the 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/sensitive-data-protection/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" @@ -19516,7 +22003,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 { @@ -19534,36 +22021,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/sensitive-data-protection/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/sensitive-data-protection/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 } @@ -19571,21 +22068,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_ { @@ -19593,35 +22090,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) { + 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 +// 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 { @@ -19640,7 +22137,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, @@ -19652,28 +22149,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/sensitive-data-protection/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/sensitive-data-protection/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" @@ -19682,36 +22179,47 @@ 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/sensitive-data-protection/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/sensitive-data-protection/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 } @@ -19719,21 +22227,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_ { @@ -19741,14 +22249,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 { @@ -19756,19 +22264,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 { @@ -19787,7 +22296,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, @@ -19799,28 +22308,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/sensitive-data-protection/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/sensitive-data-protection/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" @@ -19829,46 +22338,34 @@ 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/sensitive-data-protection/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 } @@ -19876,21 +22373,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_ { @@ -19898,34 +22395,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 { @@ -19944,7 +22436,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, @@ -19956,28 +22448,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/sensitive-data-protection/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" @@ -19986,26 +22475,27 @@ 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/sensitive-data-protection/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 } @@ -20013,41 +22503,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 } @@ -20058,14 +22561,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 { @@ -20084,7 +22588,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, @@ -20096,25 +22600,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/sensitive-data-protection/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" @@ -20123,33 +22627,82 @@ 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/sensitive-data-protection/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/sensitive-data-protection/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. The 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. +// This value 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 the 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 } @@ -20159,7 +22712,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 } @@ -20167,21 +22720,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_ { @@ -20194,7 +22747,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 { @@ -20202,19 +22755,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 { @@ -20233,7 +22788,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, @@ -20245,25 +22800,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/sensitive-data-protection/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. The 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. This value 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 the 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/sensitive-data-protection/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" @@ -20272,179 +22848,115 @@ 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. The 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/sensitive-data-protection/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 { @@ -20463,7 +22975,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, @@ -20475,66 +22987,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/sensitive-data-protection/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. The 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" @@ -20543,67 +23017,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 } @@ -20611,21 +23051,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_ { @@ -20633,14 +23073,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 { @@ -20648,20 +23088,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 { @@ -20680,7 +23119,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, @@ -20692,28 +23131,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" @@ -20722,46 +23161,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/sensitive-data-protection/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 -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: +// depending on whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/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 } @@ -20769,21 +23205,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_ { @@ -20791,14 +23227,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 { @@ -20811,15 +23247,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 { @@ -20838,7 +23273,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, @@ -20850,28 +23285,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/sensitive-data-protection/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/sensitive-data-protection/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" @@ -20880,9 +23315,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 @@ -20890,15 +23325,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/sensitive-data-protection/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 } @@ -20906,7 +23340,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 } @@ -20914,21 +23348,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_ { @@ -20951,14 +23385,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 { @@ -20989,18 +23423,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/sensitive-data-protection/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" // } @@ -21016,9 +23450,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 @@ -21027,15 +23461,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/sensitive-data-protection/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 } @@ -21043,7 +23476,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 } @@ -21053,7 +23486,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 } @@ -21061,21 +23494,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_ { @@ -21101,15 +23534,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 { @@ -21128,7 +23560,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, @@ -21140,25 +23572,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/sensitive-data-protection/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" @@ -21167,9 +23599,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 @@ -21178,70 +23610,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/sensitive-data-protection/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 -// (https://cloud.google.com/dlp/docs/specifying-location): + Projects -// scope, location specified: +// depending on whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/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. The 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. The 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. -// This value can be limited by the server. If zero server returns a -// page of max size 100. -func (c *ProjectsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsInspectTemplatesListCall { +// This value 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 the previous call to -// `ListInspectTemplates`. -func (c *ProjectsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsInspectTemplatesListCall { +// continue retrieval. Comes from the 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 } @@ -21251,7 +23716,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 } @@ -21259,21 +23724,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_ { @@ -21286,7 +23751,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 { @@ -21299,16 +23764,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 { @@ -21327,7 +23792,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, @@ -21339,46 +23804,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/sensitive-data-protection/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. The 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. The 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. This value can be limited by the server. If zero server returns a page of max size 100.", + // "description": "Size of the page. This value can be limited by a server.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token to continue retrieval. Comes from the previous call to `ListInspectTemplates`.", + // "description": "Page token to continue retrieval. Comes from the 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/sensitive-data-protection/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" @@ -21390,7 +23875,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 { @@ -21408,74 +23893,223 @@ func (c *ProjectsInspectTemplatesListCall) Pages(ctx context.Context, f func(*Go } } -// method id "dlp.projects.inspectTemplates.patch": +// method id "dlp.projects.jobTriggers.patch": -type ProjectsInspectTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest - 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 } -// 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/sensitive-data-protection/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 *ProjectsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsInspectTemplatesPatchCall { - c := &ProjectsInspectTemplatesPatchCall{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.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 *ProjectsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsInspectTemplatesPatchCall { +func (c *ProjectsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersPatchCall { + 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 *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 *ProjectsJobTriggersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +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_ { + reqHeaders[k] = v + } + 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) + 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.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 *ProjectsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, 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 := &GooglePrivacyDlpV2JobTrigger{ + 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 a job trigger. See https://cloud.google.com/sensitive-data-protection/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 project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "location": "path", + // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "request": { + // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" + // }, + // "response": { + // "$ref": "GooglePrivacyDlpV2JobTrigger" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "dlp.projects.locations.columnDataProfiles.get": + +type ProjectsLocationsColumnDataProfilesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a column data profile. +// +// - name: Resource name, for example +// `organizations/12345/locations/us/columnDataProfiles/53234423`. +func (r *ProjectsLocationsColumnDataProfilesService) Get(name string) *ProjectsLocationsColumnDataProfilesGetCall { + c := &ProjectsLocationsColumnDataProfilesGetCall{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 *ProjectsLocationsColumnDataProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsColumnDataProfilesGetCall { 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 *ProjectsLocationsColumnDataProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsColumnDataProfilesGetCall { + 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 *ProjectsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsInspectTemplatesPatchCall { +func (c *ProjectsLocationsColumnDataProfilesGetCall) Context(ctx context.Context) *ProjectsLocationsColumnDataProfilesGetCall { 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 { +func (c *ProjectsLocationsColumnDataProfilesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsColumnDataProfilesGetCall) 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 + 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 } @@ -21486,15 +24120,15 @@ func (c *ProjectsInspectTemplatesPatchCall) doRequest(alt string) (*http.Respons 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 +// Do executes the "dlp.projects.locations.columnDataProfiles.get" call. +// Exactly one of *GooglePrivacyDlpV2ColumnDataProfile or error will be // non-nil. Any non-2xx status code is an error. Response headers are in -// either *GooglePrivacyDlpV2InspectTemplate.ServerResponse.Header or +// either *GooglePrivacyDlpV2ColumnDataProfile.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) { +func (c *ProjectsLocationsColumnDataProfilesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ColumnDataProfile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21513,7 +24147,7 @@ func (c *ProjectsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectTemplate{ + ret := &GooglePrivacyDlpV2ColumnDataProfile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21525,28 +24159,25 @@ func (c *ProjectsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*G } 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", + // "description": "Gets a column data profile.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/columnDataProfiles/{columnDataProfilesId}", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.columnDataProfiles.get", // "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, for example `organizations/12345/locations/us/columnDataProfiles/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/columnDataProfiles/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" - // }, // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GooglePrivacyDlpV2ColumnDataProfile" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21555,90 +24186,155 @@ func (c *ProjectsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*G } -// method id "dlp.projects.jobTriggers.activate": +// method id "dlp.projects.locations.columnDataProfiles.list": -type ProjectsJobTriggersActivateCall struct { - s *Service - name string - googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsColumnDataProfilesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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. +// List: Lists data profiles for an organization. // -// - 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 +// - parent: Resource name of the organization or project, for example +// `organizations/433245324/locations/europe` or +// projects/project-id/locations/asia. +func (r *ProjectsLocationsColumnDataProfilesService) List(parent string) *ProjectsLocationsColumnDataProfilesListCall { + c := &ProjectsLocationsColumnDataProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + 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: - `table_data_profile_name` - The name of the related +// table data profile. - `project_id` - The Google Cloud project ID. +// (REQUIRED) - `dataset_id` - The BigQuery dataset ID. (REQUIRED) - +// `table_id` - The BigQuery table ID. (REQUIRED) - `field_id` - The ID +// of the BigQuery field. - `info_type` - The infotype detected in the +// resource. - `sensitivity_level` - HIGH|MEDIUM|LOW - +// `data_risk_level`: How much risk is associated with this data. - +// `status_code` - an RPC status code as defined in +// https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto +// * The operator must be `=` for project_id, dataset_id, and table_id. +// Other filters also support `!=`. Examples: * project_id = 12345 AND +// status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * +// project_id = 12345 AND info_type = STREET_ADDRESS The length of this +// field should be no more than 500 characters. +func (c *ProjectsLocationsColumnDataProfilesListCall) Filter(filter string) *ProjectsLocationsColumnDataProfilesListCall { + c.urlParams_.Set("filter", filter) + 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. The default sorting order is ascending. +// Redundant space characters are insignificant. Only one order field at +// a time is allowed. Examples: * `project_id asc` * `table_id` * +// `sensitivity_level desc` Supported fields are: - `project_id`: The +// Google Cloud project ID. - `dataset_id`: The ID of a BigQuery +// dataset. - `table_id`: The ID of a BigQuery table. - +// `sensitivity_level`: How sensitive the data in a column is, at most. +// - `data_risk_level`: How much risk is associated with this data. - +// `profile_last_generated`: When the profile was last updated in epoch +// seconds. +func (c *ProjectsLocationsColumnDataProfilesListCall) OrderBy(orderBy string) *ProjectsLocationsColumnDataProfilesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Size of the page. +// This value can be limited by the server. If zero, server returns a +// page of max size 100. +func (c *ProjectsLocationsColumnDataProfilesListCall) PageSize(pageSize int64) *ProjectsLocationsColumnDataProfilesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. +func (c *ProjectsLocationsColumnDataProfilesListCall) PageToken(pageToken string) *ProjectsLocationsColumnDataProfilesListCall { + 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 *ProjectsJobTriggersActivateCall) Fields(s ...googleapi.Field) *ProjectsJobTriggersActivateCall { +func (c *ProjectsLocationsColumnDataProfilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsColumnDataProfilesListCall { 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 *ProjectsLocationsColumnDataProfilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsColumnDataProfilesListCall { + 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 *ProjectsJobTriggersActivateCall) Context(ctx context.Context) *ProjectsJobTriggersActivateCall { +func (c *ProjectsLocationsColumnDataProfilesListCall) Context(ctx context.Context) *ProjectsLocationsColumnDataProfilesListCall { 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 *ProjectsLocationsColumnDataProfilesListCall) 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 *ProjectsLocationsColumnDataProfilesListCall) 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.googleprivacydlpv2activatejobtriggerrequest) - 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}:activate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/columnDataProfiles") 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{ - "name": c.name, + "parent": c.parent, }) 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 -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { +// Do executes the "dlp.projects.locations.columnDataProfiles.list" call. +// Exactly one of *GooglePrivacyDlpV2ListColumnDataProfilesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ListColumnDataProfilesResponse.ServerResponse.Heade +// r 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 *ProjectsLocationsColumnDataProfilesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListColumnDataProfilesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21657,7 +24353,7 @@ func (c *ProjectsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DlpJob{ + ret := &GooglePrivacyDlpV2ListColumnDataProfilesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21669,28 +24365,46 @@ 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": "Lists data profiles for an organization.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/columnDataProfiles", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.columnDataProfiles.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the trigger to activate, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "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: - `table_data_profile_name` - The name of the related table data profile. - `project_id` - The Google Cloud project ID. (REQUIRED) - `dataset_id` - The BigQuery dataset ID. (REQUIRED) - `table_id` - The BigQuery table ID. (REQUIRED) - `field_id` - The ID of the BigQuery field. - `info_type` - The infotype detected in the resource. - `sensitivity_level` - HIGH|MEDIUM|LOW - `data_risk_level`: How much risk is associated with this data. - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` for project_id, dataset_id, and table_id. Other filters also support `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * project_id = 12345 AND info_type = STREET_ADDRESS The length of this field should be no more than 500 characters.", + // "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. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id asc` * `table_id` * `sensitivity_level desc` Supported fields are: - `project_id`: The Google Cloud project ID. - `dataset_id`: The ID of a BigQuery dataset. - `table_id`: The ID of a BigQuery table. - `sensitivity_level`: How sensitive the data in a column is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Size of the page. This value 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Resource name of the organization or project, for example `organizations/433245324/locations/europe` or projects/project-id/locations/asia.", // "location": "path", - // "pattern": "^projects/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}:activate", - // "request": { - // "$ref": "GooglePrivacyDlpV2ActivateJobTriggerRequest" - // }, + // "path": "v2/{+parent}/columnDataProfiles", // "response": { - // "$ref": "GooglePrivacyDlpV2DlpJob" + // "$ref": "GooglePrivacyDlpV2ListColumnDataProfilesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21699,43 +24413,68 @@ func (c *ProjectsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "dlp.projects.jobTriggers.create": +// 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 *ProjectsLocationsColumnDataProfilesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListColumnDataProfilesResponse) 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 ProjectsJobTriggersCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "dlp.projects.locations.content.deidentify": + +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/sensitive-data-protection/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: +// (https://cloud.google.com/sensitive-data-protection/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 *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 } @@ -21743,21 +24482,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_ { @@ -21765,14 +24504,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 { @@ -21785,14 +24524,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 { @@ -21811,7 +24552,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, @@ -21823,28 +24564,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/sensitive-data-protection/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/sensitive-data-protection/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" @@ -21853,32 +24594,48 @@ 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/sensitive-data-protection/docs/inspecting-images +// and +// https://cloud.google.com/sensitive-data-protection/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/sensitive-data-protection/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 } @@ -21886,21 +24643,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_ { @@ -21908,29 +24665,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 { @@ -21949,7 +24713,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, @@ -21961,25 +24725,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/sensitive-data-protection/docs/inspecting-images and https://cloud.google.com/sensitive-data-protection/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/sensitive-data-protection/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" @@ -21988,98 +24755,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/sensitive-data-protection/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/sensitive-data-protection/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 { @@ -22098,7 +24868,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, @@ -22110,188 +24880,116 @@ 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/sensitive-data-protection/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/sensitive-data-protection/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" - // ] - // } - -} - -// method id "dlp.projects.jobTriggers.list": - -type ProjectsJobTriggersListCall struct { - s *Service - parentid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// 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 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 *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 *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. The 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. -// This value can be limited by a server. -func (c *ProjectsJobTriggersListCall) PageSize(pageSize int64) *ProjectsJobTriggersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} +// method id "dlp.projects.locations.deidentifyTemplates.create": -// PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from the 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 ProjectsLocationsDeidentifyTemplatesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Type sets the optional parameter "type": The type of jobs. Will use -// `DlpJobType.INSPECT` if not set. -// -// Possible values: +// Create: Creates a DeidentifyTemplate for reusing frequently used +// configuration for de-identifying content, images, and storage. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid +// 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 *ProjectsJobTriggersListCall) Type(type_ string) *ProjectsJobTriggersListCall { - c.urlParams_.Set("type", type_) +// - 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/sensitive-data-protection/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 *ProjectsLocationsDeidentifyTemplatesService) Create(parentid string, googleprivacydlpv2createdeidentifytemplaterequest *GooglePrivacyDlpV2CreateDeidentifyTemplateRequest) *ProjectsLocationsDeidentifyTemplatesCreateCall { + c := &ProjectsLocationsDeidentifyTemplatesCreateCall{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 *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 } @@ -22302,16 +25000,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 { @@ -22330,7 +25027,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, @@ -22342,66 +25039,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/sensitive-data-protection/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. The 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. This value can be limited by a server.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token to continue retrieval. Comes from the 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/sensitive-data-protection/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" @@ -22410,55 +25069,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 -// more. +// Delete: Deletes a DeidentifyTemplate. See +// https://cloud.google.com/sensitive-data-protection/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 } @@ -22466,21 +25104,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_ { @@ -22488,16 +25126,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 } @@ -22508,14 +25141,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 { @@ -22534,7 +25167,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, @@ -22546,28 +25179,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/sensitive-data-protection/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" - // }, + // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2JobTrigger" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22576,105 +25206,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/sensitive-data-protection/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 { @@ -22693,7 +25319,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, @@ -22705,28 +25331,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/sensitive-data-protection/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", + // "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" @@ -22735,86 +25358,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/sensitive-data-protection/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: +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/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. The 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. +// This value 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 the 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 } @@ -22825,16 +25491,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 { @@ -22853,7 +25519,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, @@ -22865,28 +25531,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/sensitive-data-protection/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. The 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. This value 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 the 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/sensitive-data-protection/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" @@ -22895,42 +25579,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 +// Patch: Updates the DeidentifyTemplate. See +// https://cloud.google.com/sensitive-data-protection/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 } @@ -22938,21 +25637,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_ { @@ -22960,36 +25659,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 { @@ -23008,7 +25706,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, @@ -23020,28 +25718,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/sensitive-data-protection/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" @@ -23050,47 +25748,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 } @@ -23098,21 +25785,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_ { @@ -23120,14 +25807,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 { @@ -23140,15 +25827,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 { @@ -23167,7 +25854,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, @@ -23179,28 +25866,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" @@ -23209,9 +25896,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 @@ -23219,16 +25906,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 } @@ -23236,7 +25919,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 } @@ -23244,21 +25927,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_ { @@ -23281,14 +25964,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 { @@ -23319,18 +26002,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" // } @@ -23346,9 +26029,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 @@ -23357,16 +26040,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 } @@ -23374,7 +26053,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 } @@ -23384,7 +26063,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 } @@ -23392,21 +26071,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_ { @@ -23432,15 +26111,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 { @@ -23459,7 +26138,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, @@ -23471,25 +26150,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" @@ -23498,9 +26177,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 @@ -23509,63 +26188,45 @@ 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. The 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. The 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. -// This value can be limited by the server. If zero server returns a -// page of max size 100. -func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsDeidentifyTemplatesListCall { +// This value 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 the previous call to -// `ListDeidentifyTemplates`. -func (c *ProjectsLocationsDeidentifyTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsDeidentifyTemplatesListCall { +// ListDiscoveryConfigs. `order_by` field must not change for subsequent +// calls. +func (c *ProjectsLocationsDiscoveryConfigsListCall) PageToken(pageToken string) *ProjectsLocationsDiscoveryConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -23573,7 +26234,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 } @@ -23583,7 +26244,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 } @@ -23591,21 +26252,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_ { @@ -23618,7 +26279,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 { @@ -23631,16 +26292,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 { @@ -23659,7 +26320,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, @@ -23671,46 +26332,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. The 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. The 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. This value can be limited by the server. If zero server returns a page of max size 100.", + // "description": "Size of the page. This value can be limited by a server.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Page token to continue retrieval. Comes from the previous call to `ListDeidentifyTemplates`.", + // "description": "Page token to continue retrieval. Comes from the 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" @@ -23722,7 +26378,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 { @@ -23740,36 +26396,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 } @@ -23777,21 +26429,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_ { @@ -23799,7 +26451,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 } @@ -23819,15 +26471,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 { @@ -23846,7 +26498,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, @@ -23858,28 +26510,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" @@ -23888,36 +26540,37 @@ func (c *ProjectsLocationsDeidentifyTemplatesPatchCall) Do(opts ...googleapi.Cal } -// method id "dlp.projects.locations.discoveryConfigs.create": +// method id "dlp.projects.locations.dlpJobs.cancel": -type ProjectsLocationsDiscoveryConfigsCreateCall struct { - s *Service - parentid string - googleprivacydlpv2creatediscoveryconfigrequest *GooglePrivacyDlpV2CreateDiscoveryConfigRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDlpJobsCancelCall struct { + s *Service + name string + googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a config for discovery to scan and profile storage. +// 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/sensitive-data-protection/docs/inspecting-storage +// and +// https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis +// to learn more. // -// - 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 *ProjectsLocationsDiscoveryConfigsService) Create(parentid string, googleprivacydlpv2creatediscoveryconfigrequest *GooglePrivacyDlpV2CreateDiscoveryConfigRequest) *ProjectsLocationsDiscoveryConfigsCreateCall { - c := &ProjectsLocationsDiscoveryConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - c.googleprivacydlpv2creatediscoveryconfigrequest = googleprivacydlpv2creatediscoveryconfigrequest +// - name: The name of the DlpJob resource to be cancelled. +func (r *ProjectsLocationsDlpJobsService) Cancel(name string, googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest) *ProjectsLocationsDlpJobsCancelCall { + c := &ProjectsLocationsDlpJobsCancelCall{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 *ProjectsLocationsDiscoveryConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveryConfigsCreateCall { +func (c *ProjectsLocationsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23925,21 +26578,21 @@ func (c *ProjectsLocationsDiscoveryConfigsCreateCall) 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 *ProjectsLocationsDiscoveryConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsDiscoveryConfigsCreateCall { +func (c *ProjectsLocationsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsCancelCall { 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 *ProjectsLocationsDiscoveryConfigsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDlpJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDiscoveryConfigsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDlpJobsCancelCall) 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_ { @@ -23947,14 +26600,14 @@ func (c *ProjectsLocationsDiscoveryConfigsCreateCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2creatediscoveryconfigrequest) + 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}/discoveryConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23962,20 +26615,19 @@ func (c *ProjectsLocationsDiscoveryConfigsCreateCall) doRequest(alt string) (*ht } 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.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 *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 *ProjectsLocationsDiscoveryConfigsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DiscoveryConfig, error) { +// Do executes the "dlp.projects.locations.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 *ProjectsLocationsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23994,7 +26646,7 @@ func (c *ProjectsLocationsDiscoveryConfigsCreateCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DiscoveryConfig{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24006,28 +26658,28 @@ func (c *ProjectsLocationsDiscoveryConfigsCreateCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Creates a config for discovery to scan and profile storage.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs", + // "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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:cancel", // "httpMethod": "POST", - // "id": "dlp.projects.locations.discoveryConfigs.create", + // "id": "dlp.projects.locations.dlpJobs.cancel", // "parameterOrder": [ - // "parent" + // "name" // ], // "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", + // "name": { + // "description": "Required. The name of the DlpJob resource to be cancelled.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/discoveryConfigs", + // "path": "v2/{+name}:cancel", // "request": { - // "$ref": "GooglePrivacyDlpV2CreateDiscoveryConfigRequest" + // "$ref": "GooglePrivacyDlpV2CancelDlpJobRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24036,30 +26688,48 @@ func (c *ProjectsLocationsDiscoveryConfigsCreateCall) Do(opts ...googleapi.CallO } -// method id "dlp.projects.locations.discoveryConfigs.delete": +// method id "dlp.projects.locations.dlpJobs.create": -type ProjectsLocationsDiscoveryConfigsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDlpJobsCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a discovery configuration. +// Create: Creates a new job to inspect storage or calculate risk +// metrics. See +// https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage +// and +// https://cloud.google.com/sensitive-data-protection/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. // -// - 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 +// - parent: Parent resource name. The format of this value varies +// depending on whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/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 *ProjectsLocationsDlpJobsService) Create(parentid string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsLocationsDlpJobsCreateCall { + c := &ProjectsLocationsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + 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 *ProjectsLocationsDiscoveryConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveryConfigsDeleteCall { +func (c *ProjectsLocationsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24067,21 +26737,21 @@ func (c *ProjectsLocationsDiscoveryConfigsDeleteCall) 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 *ProjectsLocationsDiscoveryConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDiscoveryConfigsDeleteCall { +func (c *ProjectsLocationsDlpJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsCreateCall { 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 *ProjectsLocationsDiscoveryConfigsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDlpJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDiscoveryConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDlpJobsCreateCall) 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_ { @@ -24089,29 +26759,34 @@ func (c *ProjectsLocationsDiscoveryConfigsDeleteCall) doRequest(alt string) (*ht } 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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/dlpJobs") 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.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 +// Do executes the "dlp.projects.locations.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 *ProjectsLocationsDiscoveryConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24130,7 +26805,7 @@ func (c *ProjectsLocationsDiscoveryConfigsDeleteCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2DlpJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24142,25 +26817,28 @@ func (c *ProjectsLocationsDiscoveryConfigsDeleteCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Deletes a discovery configuration.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", - // "httpMethod": "DELETE", - // "id": "dlp.projects.locations.discoveryConfigs.delete", + // "description": "Creates a new job to inspect storage or calculate risk metrics. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/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}/locations/{locationsId}/dlpJobs", + // "httpMethod": "POST", + // "id": "dlp.projects.locations.dlpJobs.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the project and the config, for example `projects/dlp-test-project/discoveryConfigs/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/sensitive-data-protection/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/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/dlpJobs", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateDlpJobRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2DlpJob" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24169,23 +26847,27 @@ func (c *ProjectsLocationsDiscoveryConfigsDeleteCall) Do(opts ...googleapi.CallO } -// method id "dlp.projects.locations.discoveryConfigs.get": +// method id "dlp.projects.locations.dlpJobs.delete": -type ProjectsLocationsDiscoveryConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDlpJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a discovery configuration. +// 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/sensitive-data-protection/docs/inspecting-storage +// and +// https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis +// to learn more. // -// - 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)} +// - name: The name of the DlpJob resource to be deleted. +func (r *ProjectsLocationsDlpJobsService) Delete(name string) *ProjectsLocationsDlpJobsDeleteCall { + c := &ProjectsLocationsDlpJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24193,54 +26875,41 @@ func (r *ProjectsLocationsDiscoveryConfigsService) Get(name string) *ProjectsLoc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDiscoveryConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveryConfigsGetCall { +func (c *ProjectsLocationsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsDeleteCall { 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 *ProjectsLocationsDiscoveryConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveryConfigsGetCall { - 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 *ProjectsLocationsDiscoveryConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDiscoveryConfigsGetCall { +func (c *ProjectsLocationsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsDeleteCall { 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 *ProjectsLocationsDiscoveryConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsDlpJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDiscoveryConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDlpJobsDeleteCall) 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 } @@ -24251,15 +26920,14 @@ func (c *ProjectsLocationsDiscoveryConfigsGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// 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 *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 *ProjectsLocationsDiscoveryConfigsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DiscoveryConfig, error) { +// Do executes the "dlp.projects.locations.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 *ProjectsLocationsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24278,7 +26946,7 @@ func (c *ProjectsLocationsDiscoveryConfigsGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DiscoveryConfig{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24290,25 +26958,25 @@ func (c *ProjectsLocationsDiscoveryConfigsGetCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Gets a discovery configuration.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", - // "httpMethod": "GET", - // "id": "dlp.projects.locations.discoveryConfigs.get", + // "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/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}", + // "httpMethod": "DELETE", + // "id": "dlp.projects.locations.dlpJobs.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the project and the configuration, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", + // "description": "Required. The name of the DlpJob resource to be deleted.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24317,131 +26985,89 @@ func (c *ProjectsLocationsDiscoveryConfigsGetCall) Do(opts ...googleapi.CallOpti } -// method id "dlp.projects.locations.discoveryConfigs.list": +// method id "dlp.projects.locations.dlpJobs.finish": -type ProjectsLocationsDiscoveryConfigsListCall struct { - s *Service - parentid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDlpJobsFinishCall struct { + s *Service + name string + googleprivacydlpv2finishdlpjobrequest *GooglePrivacyDlpV2FinishDlpJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists discovery configurations. +// Finish: Finish a running hybrid DlpJob. Triggers the finalization +// steps and running of any enabled actions that have not yet run. // -// - 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 *ProjectsLocationsDiscoveryConfigsService) List(parentid string) *ProjectsLocationsDiscoveryConfigsListCall { - c := &ProjectsLocationsDiscoveryConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - return c -} - -// OrderBy sets the optional parameter "orderBy": Comma separated list -// of config fields to order by, followed by `asc` or `desc` postfix. -// This list is case insensitive. The 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. -// This value 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 the 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) +// - name: The name of the DlpJob resource to be finished. +func (r *ProjectsLocationsDlpJobsService) Finish(name string, googleprivacydlpv2finishdlpjobrequest *GooglePrivacyDlpV2FinishDlpJobRequest) *ProjectsLocationsDlpJobsFinishCall { + c := &ProjectsLocationsDlpJobsFinishCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleprivacydlpv2finishdlpjobrequest = googleprivacydlpv2finishdlpjobrequest 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 *ProjectsLocationsDiscoveryConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveryConfigsListCall { +func (c *ProjectsLocationsDlpJobsFinishCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsFinishCall { 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 *ProjectsLocationsDiscoveryConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDiscoveryConfigsListCall { - 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 *ProjectsLocationsDiscoveryConfigsListCall) Context(ctx context.Context) *ProjectsLocationsDiscoveryConfigsListCall { +func (c *ProjectsLocationsDlpJobsFinishCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsFinishCall { 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 *ProjectsLocationsDiscoveryConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsDlpJobsFinishCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDiscoveryConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDlpJobsFinishCall) 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.googleprivacydlpv2finishdlpjobrequest) + 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}/discoveryConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:finish") 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{ - "parent": c.parentid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// 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 -// *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 *ProjectsLocationsDiscoveryConfigsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDiscoveryConfigsResponse, error) { +// Do executes the "dlp.projects.locations.dlpJobs.finish" 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 *ProjectsLocationsDlpJobsFinishCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24460,7 +27086,7 @@ func (c *ProjectsLocationsDiscoveryConfigsListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListDiscoveryConfigsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24472,41 +27098,28 @@ func (c *ProjectsLocationsDiscoveryConfigsListCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Lists discovery configurations.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs", - // "httpMethod": "GET", - // "id": "dlp.projects.locations.discoveryConfigs.list", + // "description": "Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:finish", + // "httpMethod": "POST", + // "id": "dlp.projects.locations.dlpJobs.finish", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "orderBy": { - // "description": "Comma separated list of config fields to order by, followed by `asc` or `desc` postfix. This list is case insensitive. The 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. This value can be limited by a server.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token to continue retrieval. Comes from the 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", + // "name": { + // "description": "Required. The name of the DlpJob resource to be finished.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/discoveryConfigs", + // "path": "v2/{+name}:finish", + // "request": { + // "$ref": "GooglePrivacyDlpV2FinishDlpJobRequest" + // }, // "response": { - // "$ref": "GooglePrivacyDlpV2ListDiscoveryConfigsResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24515,92 +27128,81 @@ func (c *ProjectsLocationsDiscoveryConfigsListCall) 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 *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 { - 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.locations.discoveryConfigs.patch": +// method id "dlp.projects.locations.dlpJobs.get": -type ProjectsLocationsDiscoveryConfigsPatchCall struct { - s *Service - name string - googleprivacydlpv2updatediscoveryconfigrequest *GooglePrivacyDlpV2UpdateDiscoveryConfigRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDlpJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a discovery configuration. +// Get: Gets the latest state of a long-running DlpJob. See +// https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage +// and +// https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis +// to learn more. // -// - 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)} +// - name: The name of the DlpJob resource. +func (r *ProjectsLocationsDlpJobsService) Get(name string) *ProjectsLocationsDlpJobsGetCall { + c := &ProjectsLocationsDlpJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - 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 *ProjectsLocationsDiscoveryConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDiscoveryConfigsPatchCall { +func (c *ProjectsLocationsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsGetCall { 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 *ProjectsLocationsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDlpJobsGetCall { + 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 *ProjectsLocationsDiscoveryConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDiscoveryConfigsPatchCall { +func (c *ProjectsLocationsDlpJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsGetCall { 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 *ProjectsLocationsDiscoveryConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDlpJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDiscoveryConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDlpJobsGetCall) 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.googleprivacydlpv2updatediscoveryconfigrequest) - 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 } @@ -24611,15 +27213,14 @@ func (c *ProjectsLocationsDiscoveryConfigsPatchCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// 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 *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 *ProjectsLocationsDiscoveryConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DiscoveryConfig, error) { +// Do executes the "dlp.projects.locations.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 *ProjectsLocationsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24638,7 +27239,7 @@ func (c *ProjectsLocationsDiscoveryConfigsPatchCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DiscoveryConfig{ + ret := &GooglePrivacyDlpV2DlpJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24650,28 +27251,25 @@ func (c *ProjectsLocationsDiscoveryConfigsPatchCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Updates a discovery configuration.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/discoveryConfigs/{discoveryConfigsId}", - // "httpMethod": "PATCH", - // "id": "dlp.projects.locations.discoveryConfigs.patch", + // "description": "Gets the latest state of a long-running DlpJob. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.dlpJobs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the project and the configuration, for example `projects/dlp-test-project/discoveryConfigs/53234423`.", + // "description": "Required. The name of the DlpJob resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/discoveryConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateDiscoveryConfigRequest" - // }, // "response": { - // "$ref": "GooglePrivacyDlpV2DiscoveryConfig" + // "$ref": "GooglePrivacyDlpV2DlpJob" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24680,36 +27278,34 @@ func (c *ProjectsLocationsDiscoveryConfigsPatchCall) Do(opts ...googleapi.CallOp } -// method id "dlp.projects.locations.dlpJobs.cancel": +// method id "dlp.projects.locations.dlpJobs.hybridInspect": -type ProjectsLocationsDlpJobsCancelCall struct { - s *Service - name string - googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDlpJobsHybridInspectCall struct { + s *Service + name string + googleprivacydlpv2hybridinspectdlpjobrequest *GooglePrivacyDlpV2HybridInspectDlpJobRequest + 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. +// HybridInspect: Inspect hybrid content and store findings to a job. To +// review the findings, inspect the job. Inspection will occur +// asynchronously. // -// - name: The name of the DlpJob resource to be cancelled. -func (r *ProjectsLocationsDlpJobsService) Cancel(name string, googleprivacydlpv2canceldlpjobrequest *GooglePrivacyDlpV2CancelDlpJobRequest) *ProjectsLocationsDlpJobsCancelCall { - c := &ProjectsLocationsDlpJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the job to execute a hybrid inspect on, for +// example `projects/dlp-test-project/dlpJob/53234423`. +func (r *ProjectsLocationsDlpJobsService) HybridInspect(name string, googleprivacydlpv2hybridinspectdlpjobrequest *GooglePrivacyDlpV2HybridInspectDlpJobRequest) *ProjectsLocationsDlpJobsHybridInspectCall { + c := &ProjectsLocationsDlpJobsHybridInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleprivacydlpv2canceldlpjobrequest = googleprivacydlpv2canceldlpjobrequest + c.googleprivacydlpv2hybridinspectdlpjobrequest = googleprivacydlpv2hybridinspectdlpjobrequest 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 *ProjectsLocationsDlpJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsCancelCall { +func (c *ProjectsLocationsDlpJobsHybridInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsHybridInspectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24717,21 +27313,21 @@ func (c *ProjectsLocationsDlpJobsCancelCall) 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 *ProjectsLocationsDlpJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsCancelCall { +func (c *ProjectsLocationsDlpJobsHybridInspectCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsHybridInspectCall { 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 *ProjectsLocationsDlpJobsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDlpJobsHybridInspectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDlpJobsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDlpJobsHybridInspectCall) 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_ { @@ -24739,14 +27335,14 @@ func (c *ProjectsLocationsDlpJobsCancelCall) doRequest(alt string) (*http.Respon } 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.googleprivacydlpv2hybridinspectdlpjobrequest) 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/{+name}:hybridInspect") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -24754,19 +27350,20 @@ func (c *ProjectsLocationsDlpJobsCancelCall) doRequest(alt string) (*http.Respon } 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.locations.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 + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dlp.projects.locations.dlpJobs.hybridInspect" call. +// Exactly one of *GooglePrivacyDlpV2HybridInspectResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GooglePrivacyDlpV2HybridInspectResponse.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 *ProjectsLocationsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDlpJobsHybridInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2HybridInspectResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24785,7 +27382,7 @@ func (c *ProjectsLocationsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2HybridInspectResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24797,28 +27394,28 @@ func (c *ProjectsLocationsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (* } 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}/locations/{locationsId}/dlpJobs/{dlpJobsId}:cancel", + // "description": "Inspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:hybridInspect", // "httpMethod": "POST", - // "id": "dlp.projects.locations.dlpJobs.cancel", + // "id": "dlp.projects.locations.dlpJobs.hybridInspect", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the DlpJob resource to be cancelled.", + // "description": "Required. Resource name of the job to execute a hybrid inspect on, for example `projects/dlp-test-project/dlpJob/53234423`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}:cancel", + // "path": "v2/{+name}:hybridInspect", // "request": { - // "$ref": "GooglePrivacyDlpV2CancelDlpJobRequest" + // "$ref": "GooglePrivacyDlpV2HybridInspectDlpJobRequest" // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2HybridInspectResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24827,85 +27424,162 @@ func (c *ProjectsLocationsDlpJobsCancelCall) Do(opts ...googleapi.CallOption) (* } -// method id "dlp.projects.locations.dlpJobs.create": +// method id "dlp.projects.locations.dlpJobs.list": -type ProjectsLocationsDlpJobsCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDlpJobsListCall struct { + s *Service + parentid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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. +// List: Lists DlpJobs that match the specified filter in the request. +// See +// https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage +// and +// https://cloud.google.com/sensitive-data-protection/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: +// (https://cloud.google.com/sensitive-data-protection/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 *ProjectsLocationsDlpJobsService) Create(parentid string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsLocationsDlpJobsCreateCall { - c := &ProjectsLocationsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDlpJobsService) List(parentid string) *ProjectsLocationsDlpJobsListCall { + c := &ProjectsLocationsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createdlpjobrequest = googleprivacydlpv2createdlpjobrequest + 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 *ProjectsLocationsDlpJobsListCall) Filter(filter string) *ProjectsLocationsDlpJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// LocationId sets the optional parameter "locationId": Deprecated. This +// field has no effect. +func (c *ProjectsLocationsDlpJobsListCall) LocationId(locationId string) *ProjectsLocationsDlpJobsListCall { + 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. The 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 *ProjectsLocationsDlpJobsListCall) OrderBy(orderBy string) *ProjectsLocationsDlpJobsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDlpJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDlpJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDlpJobsListCall) PageToken(pageToken string) *ProjectsLocationsDlpJobsListCall { + 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 *ProjectsLocationsDlpJobsListCall) Type(type_ string) *ProjectsLocationsDlpJobsListCall { + 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 *ProjectsLocationsDlpJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsCreateCall { +func (c *ProjectsLocationsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsListCall { 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 *ProjectsLocationsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDlpJobsListCall { + 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 *ProjectsLocationsDlpJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsCreateCall { +func (c *ProjectsLocationsDlpJobsListCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsListCall { 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 *ProjectsLocationsDlpJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDlpJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDlpJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDlpJobsListCall) 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.googleprivacydlpv2createdlpjobrequest) - 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}/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 } @@ -24916,14 +27590,15 @@ func (c *ProjectsLocationsDlpJobsCreateCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.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 +// Do executes the "dlp.projects.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 *ProjectsLocationsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { +func (c *ProjectsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24942,7 +27617,7 @@ func (c *ProjectsLocationsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DlpJob{ + ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24954,28 +27629,66 @@ func (c *ProjectsLocationsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (* } 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.", + // "description": "Lists DlpJobs that match the specified filter in the request. See https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage and https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis to learn more.", // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs", - // "httpMethod": "POST", - // "id": "dlp.projects.locations.dlpJobs.create", + // "httpMethod": "GET", + // "id": "dlp.projects.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. The 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", + // "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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/[^/]+/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}/dlpJobs", - // "request": { - // "$ref": "GooglePrivacyDlpV2CreateDlpJobRequest" - // }, // "response": { - // "$ref": "GooglePrivacyDlpV2DlpJob" + // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24984,34 +27697,67 @@ func (c *ProjectsLocationsDlpJobsCreateCall) Do(opts ...googleapi.CallOption) (* } -// method id "dlp.projects.locations.dlpJobs.delete": - -type ProjectsLocationsDlpJobsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *ProjectsLocationsDlpJobsListCall) 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) + } } -// 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. +// method id "dlp.projects.locations.image.redact": + +type ProjectsLocationsImageRedactCall struct { + s *Service + parentid string + googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest + 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/sensitive-data-protection/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: The name of the DlpJob resource to be deleted. -func (r *ProjectsLocationsDlpJobsService) Delete(name string) *ProjectsLocationsDlpJobsDeleteCall { - c := &ProjectsLocationsDlpJobsDeleteCall{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/sensitive-data-protection/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 *ProjectsLocationsImageService) Redact(parentid string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsLocationsImageRedactCall { + c := &ProjectsLocationsImageRedactCall{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 *ProjectsLocationsDlpJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsDeleteCall { +func (c *ProjectsLocationsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageRedactCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25019,21 +27765,21 @@ func (c *ProjectsLocationsDlpJobsDeleteCall) 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 *ProjectsLocationsDlpJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsDeleteCall { +func (c *ProjectsLocationsImageRedactCall) Context(ctx context.Context) *ProjectsLocationsImageRedactCall { 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 *ProjectsLocationsDlpJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsImageRedactCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDlpJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsImageRedactCall) 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_ { @@ -25041,29 +27787,35 @@ func (c *ProjectsLocationsDlpJobsDeleteCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + 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("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.locations.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 +// Do executes the "dlp.projects.locations.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 *ProjectsLocationsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25082,7 +27834,7 @@ func (c *ProjectsLocationsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2RedactImageResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25094,25 +27846,28 @@ func (c *ProjectsLocationsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (* } 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}/locations/{locationsId}/dlpJobs/{dlpJobsId}", - // "httpMethod": "DELETE", - // "id": "dlp.projects.locations.dlpJobs.delete", + // "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/sensitive-data-protection/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}/locations/{locationsId}/image:redact", + // "httpMethod": "POST", + // "id": "dlp.projects.locations.image.redact", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the DlpJob resource to be deleted.", + // "parent": { + // "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/image:redact", + // "request": { + // "$ref": "GooglePrivacyDlpV2RedactImageRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2RedactImageResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25121,32 +27876,47 @@ func (c *ProjectsLocationsDlpJobsDeleteCall) Do(opts ...googleapi.CallOption) (* } -// method id "dlp.projects.locations.dlpJobs.finish": +// method id "dlp.projects.locations.inspectTemplates.create": -type ProjectsLocationsDlpJobsFinishCall struct { - s *Service - name string - googleprivacydlpv2finishdlpjobrequest *GooglePrivacyDlpV2FinishDlpJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInspectTemplatesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Finish: Finish a running hybrid DlpJob. Triggers the finalization -// steps and running of any enabled actions that have not yet run. +// Create: Creates an InspectTemplate for reusing frequently used +// configuration for inspecting content, images, and storage. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates +// to learn more. // -// - name: The name of the DlpJob resource to be finished. -func (r *ProjectsLocationsDlpJobsService) Finish(name string, googleprivacydlpv2finishdlpjobrequest *GooglePrivacyDlpV2FinishDlpJobRequest) *ProjectsLocationsDlpJobsFinishCall { - c := &ProjectsLocationsDlpJobsFinishCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2finishdlpjobrequest = googleprivacydlpv2finishdlpjobrequest +// - 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/sensitive-data-protection/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 *ProjectsLocationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *ProjectsLocationsInspectTemplatesCreateCall { + c := &ProjectsLocationsInspectTemplatesCreateCall{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 *ProjectsLocationsDlpJobsFinishCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsFinishCall { +func (c *ProjectsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25154,21 +27924,21 @@ func (c *ProjectsLocationsDlpJobsFinishCall) 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 *ProjectsLocationsDlpJobsFinishCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsFinishCall { +func (c *ProjectsLocationsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesCreateCall { 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 *ProjectsLocationsDlpJobsFinishCall) Header() http.Header { +func (c *ProjectsLocationsInspectTemplatesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDlpJobsFinishCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInspectTemplatesCreateCall) 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_ { @@ -25176,14 +27946,14 @@ func (c *ProjectsLocationsDlpJobsFinishCall) doRequest(alt string) (*http.Respon } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2finishdlpjobrequest) + 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}:finish") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25191,19 +27961,20 @@ func (c *ProjectsLocationsDlpJobsFinishCall) doRequest(alt string) (*http.Respon } 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.locations.dlpJobs.finish" 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 *ProjectsLocationsDlpJobsFinishCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "dlp.projects.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 *ProjectsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25222,7 +27993,7 @@ func (c *ProjectsLocationsDlpJobsFinishCall) Do(opts ...googleapi.CallOption) (* 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, @@ -25234,28 +28005,28 @@ func (c *ProjectsLocationsDlpJobsFinishCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Finish a running hybrid DlpJob. Triggers the finalization steps and running of any enabled actions that have not yet run.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:finish", + // "description": "Creates an InspectTemplate for reusing frequently used configuration for inspecting content, images, and storage. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", // "httpMethod": "POST", - // "id": "dlp.projects.locations.dlpJobs.finish", + // "id": "dlp.projects.locations.inspectTemplates.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the DlpJob resource to be finished.", + // "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/sensitive-data-protection/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/[^/]+/dlpJobs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}:finish", + // "path": "v2/{+parent}/inspectTemplates", // "request": { - // "$ref": "GooglePrivacyDlpV2FinishDlpJobRequest" + // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25264,25 +28035,26 @@ func (c *ProjectsLocationsDlpJobsFinishCall) Do(opts ...googleapi.CallOption) (* } -// method id "dlp.projects.locations.dlpJobs.get": +// method id "dlp.projects.locations.inspectTemplates.delete": -type ProjectsLocationsDlpJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInspectTemplatesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + 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. +// Delete: Deletes an InspectTemplate. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-templates +// to learn more. // -// - name: The name of the DlpJob resource. -func (r *ProjectsLocationsDlpJobsService) Get(name string) *ProjectsLocationsDlpJobsGetCall { - c := &ProjectsLocationsDlpJobsGetCall{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 *ProjectsLocationsInspectTemplatesService) Delete(name string) *ProjectsLocationsInspectTemplatesDeleteCall { + c := &ProjectsLocationsInspectTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -25290,54 +28062,41 @@ func (r *ProjectsLocationsDlpJobsService) Get(name string) *ProjectsLocationsDlp // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDlpJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsGetCall { +func (c *ProjectsLocationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesDeleteCall { 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 *ProjectsLocationsDlpJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDlpJobsGetCall { - 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 *ProjectsLocationsDlpJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsGetCall { +func (c *ProjectsLocationsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesDeleteCall { 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 *ProjectsLocationsDlpJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsInspectTemplatesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDlpJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInspectTemplatesDeleteCall) 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 } @@ -25348,14 +28107,14 @@ func (c *ProjectsLocationsDlpJobsGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.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 +// Do executes the "dlp.projects.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 *ProjectsLocationsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { +func (c *ProjectsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25374,7 +28133,7 @@ func (c *ProjectsLocationsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*Goo 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, @@ -25386,100 +28145,109 @@ func (c *ProjectsLocationsDlpJobsGetCall) Do(opts ...googleapi.CallOption) (*Goo } 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}/locations/{locationsId}/dlpJobs/{dlpJobsId}", - // "httpMethod": "GET", - // "id": "dlp.projects.locations.dlpJobs.get", + // "description": "Deletes an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "DELETE", + // "id": "dlp.projects.locations.inspectTemplates.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the DlpJob resource.", + // "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/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2DlpJob" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" // ] // } - -} - -// method id "dlp.projects.locations.dlpJobs.hybridInspect": - -type ProjectsLocationsDlpJobsHybridInspectCall struct { - s *Service - name string - googleprivacydlpv2hybridinspectdlpjobrequest *GooglePrivacyDlpV2HybridInspectDlpJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + } -// HybridInspect: Inspect hybrid content and store findings to a job. To -// review the findings, inspect the job. Inspection will occur -// asynchronously. +// method id "dlp.projects.locations.inspectTemplates.get": + +type ProjectsLocationsInspectTemplatesGetCall 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/sensitive-data-protection/docs/creating-templates +// to learn more. // -// - name: Resource name of the job to execute a hybrid inspect on, for -// example `projects/dlp-test-project/dlpJob/53234423`. -func (r *ProjectsLocationsDlpJobsService) HybridInspect(name string, googleprivacydlpv2hybridinspectdlpjobrequest *GooglePrivacyDlpV2HybridInspectDlpJobRequest) *ProjectsLocationsDlpJobsHybridInspectCall { - c := &ProjectsLocationsDlpJobsHybridInspectCall{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 *ProjectsLocationsInspectTemplatesService) Get(name string) *ProjectsLocationsInspectTemplatesGetCall { + c := &ProjectsLocationsInspectTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleprivacydlpv2hybridinspectdlpjobrequest = googleprivacydlpv2hybridinspectdlpjobrequest 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 *ProjectsLocationsDlpJobsHybridInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsHybridInspectCall { +func (c *ProjectsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesGetCall { 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 *ProjectsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInspectTemplatesGetCall { + 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 *ProjectsLocationsDlpJobsHybridInspectCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsHybridInspectCall { +func (c *ProjectsLocationsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesGetCall { 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 *ProjectsLocationsDlpJobsHybridInspectCall) Header() http.Header { +func (c *ProjectsLocationsInspectTemplatesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDlpJobsHybridInspectCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInspectTemplatesGetCall) 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.googleprivacydlpv2hybridinspectdlpjobrequest) - 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}:hybridInspect") + 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 } @@ -25490,15 +28258,15 @@ func (c *ProjectsLocationsDlpJobsHybridInspectCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.dlpJobs.hybridInspect" call. -// Exactly one of *GooglePrivacyDlpV2HybridInspectResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2HybridInspectResponse.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 *ProjectsLocationsDlpJobsHybridInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2HybridInspectResponse, error) { +// Do executes the "dlp.projects.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 *ProjectsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25517,7 +28285,7 @@ func (c *ProjectsLocationsDlpJobsHybridInspectCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2HybridInspectResponse{ + ret := &GooglePrivacyDlpV2InspectTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25529,28 +28297,25 @@ func (c *ProjectsLocationsDlpJobsHybridInspectCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Inspect hybrid content and store findings to a job. To review the findings, inspect the job. Inspection will occur asynchronously.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/dlpJobs/{dlpJobsId}:hybridInspect", - // "httpMethod": "POST", - // "id": "dlp.projects.locations.dlpJobs.hybridInspect", + // "description": "Gets an InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.inspectTemplates.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of the job to execute a hybrid inspect on, for example `projects/dlp-test-project/dlpJob/53234423`.", + // "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/[^/]+/locations/[^/]+/dlpJobs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}:hybridInspect", - // "request": { - // "$ref": "GooglePrivacyDlpV2HybridInspectDlpJobRequest" - // }, + // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2HybridInspectResponse" + // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25559,9 +28324,9 @@ func (c *ProjectsLocationsDlpJobsHybridInspectCall) Do(opts ...googleapi.CallOpt } -// method id "dlp.projects.locations.dlpJobs.list": +// method id "dlp.projects.locations.inspectTemplates.list": -type ProjectsLocationsDlpJobsListCall struct { +type ProjectsLocationsInspectTemplatesListCall struct { s *Service parentid string urlParams_ gensupport.URLParams @@ -25570,54 +28335,33 @@ type ProjectsLocationsDlpJobsListCall struct { 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. +// List: Lists InspectTemplates. See +// https://cloud.google.com/sensitive-data-protection/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: +// depending on the scope of the request (project or organization) and +// whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/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 *ProjectsLocationsDlpJobsService) List(parentid string) *ProjectsLocationsDlpJobsListCall { - c := &ProjectsLocationsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsInspectTemplatesService) List(parentid string) *ProjectsLocationsInspectTemplatesListCall { + c := &ProjectsLocationsInspectTemplatesListCall{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 *ProjectsLocationsDlpJobsListCall) Filter(filter string) *ProjectsLocationsDlpJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - // LocationId sets the optional parameter "locationId": Deprecated. This // field has no effect. -func (c *ProjectsLocationsDlpJobsListCall) LocationId(locationId string) *ProjectsLocationsDlpJobsListCall { +func (c *ProjectsLocationsInspectTemplatesListCall) LocationId(locationId string) *ProjectsLocationsInspectTemplatesListCall { c.urlParams_.Set("locationId", locationId) return c } @@ -25625,47 +28369,37 @@ func (c *ProjectsLocationsDlpJobsListCall) LocationId(locationId string) *Projec // 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. The 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 *ProjectsLocationsDlpJobsListCall) OrderBy(orderBy string) *ProjectsLocationsDlpJobsListCall { +// 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 *ProjectsLocationsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsInspectTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsDlpJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDlpJobsListCall { +// PageSize sets the optional parameter "pageSize": Size of the page. +// This value can be limited by the server. If zero server returns a +// page of max size 100. +func (c *ProjectsLocationsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsInspectTemplatesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsDlpJobsListCall) PageToken(pageToken string) *ProjectsLocationsDlpJobsListCall { +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. Comes from the previous call to +// `ListInspectTemplates`. +func (c *ProjectsLocationsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsInspectTemplatesListCall { 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 *ProjectsLocationsDlpJobsListCall) Type(type_ string) *ProjectsLocationsDlpJobsListCall { - 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 *ProjectsLocationsDlpJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDlpJobsListCall { +func (c *ProjectsLocationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25675,7 +28409,7 @@ func (c *ProjectsLocationsDlpJobsListCall) 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 *ProjectsLocationsDlpJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDlpJobsListCall { +func (c *ProjectsLocationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInspectTemplatesListCall { c.ifNoneMatch_ = entityTag return c } @@ -25683,21 +28417,21 @@ func (c *ProjectsLocationsDlpJobsListCall) 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 *ProjectsLocationsDlpJobsListCall) Context(ctx context.Context) *ProjectsLocationsDlpJobsListCall { +func (c *ProjectsLocationsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesListCall { 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 *ProjectsLocationsDlpJobsListCall) Header() http.Header { +func (c *ProjectsLocationsInspectTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDlpJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInspectTemplatesListCall) 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_ { @@ -25710,7 +28444,7 @@ func (c *ProjectsLocationsDlpJobsListCall) 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}/dlpJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/inspectTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -25723,15 +28457,16 @@ func (c *ProjectsLocationsDlpJobsListCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.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 *ProjectsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListDlpJobsResponse, error) { +// Do executes the "dlp.projects.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 *ProjectsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25750,7 +28485,7 @@ func (c *ProjectsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListDlpJobsResponse{ + ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25762,66 +28497,46 @@ func (c *ProjectsLocationsDlpJobsListCall) Do(opts ...googleapi.CallOption) (*Go } 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}/locations/{locationsId}/dlpJobs", + // "description": "Lists InspectTemplates. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", // "httpMethod": "GET", - // "id": "dlp.projects.locations.dlpJobs.list", + // "id": "dlp.projects.locations.inspectTemplates.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. The 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`", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case insensitive. The 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": "The standard list page size.", + // "description": "Size of the page. This value can be limited by the server. If zero server returns a page of max size 100.", // "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", - // "location": "path", - // "pattern": "^projects/[^/]+/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." - // ], + // "pageToken": { + // "description": "Page token to continue retrieval. Comes from the 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/sensitive-data-protection/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}/dlpJobs", + // "path": "v2/{+parent}/inspectTemplates", // "response": { - // "$ref": "GooglePrivacyDlpV2ListDlpJobsResponse" + // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25833,7 +28548,7 @@ func (c *ProjectsLocationsDlpJobsListCall) 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 *ProjectsLocationsDlpJobsListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListDlpJobsResponse) error) error { +func (c *ProjectsLocationsInspectTemplatesListCall) 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 { @@ -25851,46 +28566,36 @@ func (c *ProjectsLocationsDlpJobsListCall) Pages(ctx context.Context, f func(*Go } } -// method id "dlp.projects.locations.image.redact": +// method id "dlp.projects.locations.inspectTemplates.patch": -type ProjectsLocationsImageRedactCall struct { - s *Service - parentid string - googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInspectTemplatesPatchCall struct { + s *Service + name string + googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest + 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. +// Patch: Updates the InspectTemplate. See +// https://cloud.google.com/sensitive-data-protection/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 *ProjectsLocationsImageService) Redact(parentid string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsLocationsImageRedactCall { - c := &ProjectsLocationsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - c.googleprivacydlpv2redactimagerequest = googleprivacydlpv2redactimagerequest +// - name: Resource name of organization and inspectTemplate to be +// updated, for example +// `organizations/433245324/inspectTemplates/432452342` or +// projects/project-id/inspectTemplates/432452342. +func (r *ProjectsLocationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsLocationsInspectTemplatesPatchCall { + c := &ProjectsLocationsInspectTemplatesPatchCall{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 *ProjectsLocationsImageRedactCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageRedactCall { +func (c *ProjectsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25898,21 +28603,21 @@ func (c *ProjectsLocationsImageRedactCall) Fields(s ...googleapi.Field) *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 *ProjectsLocationsImageRedactCall) Context(ctx context.Context) *ProjectsLocationsImageRedactCall { +func (c *ProjectsLocationsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesPatchCall { 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 *ProjectsLocationsImageRedactCall) Header() http.Header { +func (c *ProjectsLocationsInspectTemplatesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsImageRedactCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInspectTemplatesPatchCall) 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_ { @@ -25920,35 +28625,35 @@ func (c *ProjectsLocationsImageRedactCall) doRequest(alt string) (*http.Response } 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.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}/image:redact") + 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.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 *ProjectsLocationsImageRedactCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2RedactImageResponse, error) { +// Do executes the "dlp.projects.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 *ProjectsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25967,7 +28672,7 @@ func (c *ProjectsLocationsImageRedactCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2RedactImageResponse{ + ret := &GooglePrivacyDlpV2InspectTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25979,28 +28684,28 @@ func (c *ProjectsLocationsImageRedactCall) Do(opts ...googleapi.CallOption) (*Go } 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}/locations/{locationsId}/image:redact", - // "httpMethod": "POST", - // "id": "dlp.projects.locations.image.redact", + // "description": "Updates the InspectTemplate. See https://cloud.google.com/sensitive-data-protection/docs/creating-templates to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", + // "httpMethod": "PATCH", + // "id": "dlp.projects.locations.inspectTemplates.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 inspectTemplate to be updated, for example `organizations/433245324/inspectTemplates/432452342` or projects/project-id/inspectTemplates/432452342.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/image:redact", + // "path": "v2/{+name}", // "request": { - // "$ref": "GooglePrivacyDlpV2RedactImageRequest" + // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2RedactImageResponse" + // "$ref": "GooglePrivacyDlpV2InspectTemplate" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26009,46 +28714,33 @@ func (c *ProjectsLocationsImageRedactCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "dlp.projects.locations.inspectTemplates.create": +// method id "dlp.projects.locations.jobTriggers.activate": -type ProjectsLocationsInspectTemplatesCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsJobTriggersActivateCall struct { + s *Service + name string + googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest + 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. +// 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 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 *ProjectsLocationsInspectTemplatesService) Create(parentid string, googleprivacydlpv2createinspecttemplaterequest *GooglePrivacyDlpV2CreateInspectTemplateRequest) *ProjectsLocationsInspectTemplatesCreateCall { - c := &ProjectsLocationsInspectTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - c.googleprivacydlpv2createinspecttemplaterequest = googleprivacydlpv2createinspecttemplaterequest +// - name: Resource name of the trigger to activate, for example +// `projects/dlp-test-project/jobTriggers/53234423`. +func (r *ProjectsLocationsJobTriggersService) Activate(name string, googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest) *ProjectsLocationsJobTriggersActivateCall { + c := &ProjectsLocationsJobTriggersActivateCall{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 *ProjectsLocationsInspectTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesCreateCall { +func (c *ProjectsLocationsJobTriggersActivateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersActivateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26056,21 +28748,21 @@ func (c *ProjectsLocationsInspectTemplatesCreateCall) 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 *ProjectsLocationsInspectTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesCreateCall { +func (c *ProjectsLocationsJobTriggersActivateCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersActivateCall { 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 *ProjectsLocationsInspectTemplatesCreateCall) Header() http.Header { +func (c *ProjectsLocationsJobTriggersActivateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInspectTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsJobTriggersActivateCall) 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_ { @@ -26078,14 +28770,14 @@ func (c *ProjectsLocationsInspectTemplatesCreateCall) doRequest(alt string) (*ht } 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.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}/inspectTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:activate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -26093,20 +28785,19 @@ func (c *ProjectsLocationsInspectTemplatesCreateCall) doRequest(alt string) (*ht } 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.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 *ProjectsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { +// Do executes the "dlp.projects.locations.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 *ProjectsLocationsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26125,7 +28816,7 @@ func (c *ProjectsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectTemplate{ + ret := &GooglePrivacyDlpV2DlpJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26137,28 +28828,28 @@ func (c *ProjectsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallO } 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}/locations/{locationsId}/inspectTemplates", + // "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}/locations/{locationsId}/jobTriggers/{jobTriggersId}:activate", // "httpMethod": "POST", - // "id": "dlp.projects.locations.inspectTemplates.create", + // "id": "dlp.projects.locations.jobTriggers.activate", // "parameterOrder": [ - // "parent" + // "name" // ], // "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", + // "name": { + // "description": "Required. Resource name of the trigger to activate, for example `projects/dlp-test-project/jobTriggers/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/inspectTemplates", + // "path": "v2/{+name}:activate", // "request": { - // "$ref": "GooglePrivacyDlpV2CreateInspectTemplateRequest" + // "$ref": "GooglePrivacyDlpV2ActivateJobTriggerRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GooglePrivacyDlpV2DlpJob" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26167,33 +28858,43 @@ func (c *ProjectsLocationsInspectTemplatesCreateCall) Do(opts ...googleapi.CallO } -// method id "dlp.projects.locations.inspectTemplates.delete": +// method id "dlp.projects.locations.jobTriggers.create": -type ProjectsLocationsInspectTemplatesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsJobTriggersCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest + 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. +// 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/sensitive-data-protection/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 *ProjectsLocationsInspectTemplatesService) Delete(name string) *ProjectsLocationsInspectTemplatesDeleteCall { - c := &ProjectsLocationsInspectTemplatesDeleteCall{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/sensitive-data-protection/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 *ProjectsLocationsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsLocationsJobTriggersCreateCall { + c := &ProjectsLocationsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + 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 *ProjectsLocationsInspectTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesDeleteCall { +func (c *ProjectsLocationsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26201,21 +28902,21 @@ func (c *ProjectsLocationsInspectTemplatesDeleteCall) 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 *ProjectsLocationsInspectTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesDeleteCall { +func (c *ProjectsLocationsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersCreateCall { 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 *ProjectsLocationsInspectTemplatesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsJobTriggersCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInspectTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsJobTriggersCreateCall) 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_ { @@ -26223,29 +28924,34 @@ func (c *ProjectsLocationsInspectTemplatesDeleteCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + 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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 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.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 +// Do executes the "dlp.projects.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 *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 *ProjectsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26264,7 +28970,7 @@ func (c *ProjectsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2JobTrigger{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26276,25 +28982,28 @@ func (c *ProjectsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", - // "httpMethod": "DELETE", - // "id": "dlp.projects.locations.inspectTemplates.delete", + // "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/sensitive-data-protection/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers", + // "httpMethod": "POST", + // "id": "dlp.projects.locations.jobTriggers.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "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.", + // "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/sensitive-data-protection/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/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/jobTriggers", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2JobTrigger" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26303,26 +29012,24 @@ func (c *ProjectsLocationsInspectTemplatesDeleteCall) Do(opts ...googleapi.CallO } -// method id "dlp.projects.locations.inspectTemplates.get": +// method id "dlp.projects.locations.jobTriggers.delete": -type ProjectsLocationsInspectTemplatesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsJobTriggersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets an InspectTemplate. See -// https://cloud.google.com/dlp/docs/creating-templates to learn more. +// Delete: Deletes a job trigger. See +// https://cloud.google.com/sensitive-data-protection/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 *ProjectsLocationsInspectTemplatesService) Get(name string) *ProjectsLocationsInspectTemplatesGetCall { - c := &ProjectsLocationsInspectTemplatesGetCall{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 *ProjectsLocationsJobTriggersService) Delete(name string) *ProjectsLocationsJobTriggersDeleteCall { + c := &ProjectsLocationsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -26330,54 +29037,41 @@ func (r *ProjectsLocationsInspectTemplatesService) Get(name string) *ProjectsLoc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsInspectTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesGetCall { +func (c *ProjectsLocationsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersDeleteCall { 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 *ProjectsLocationsInspectTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInspectTemplatesGetCall { - 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 *ProjectsLocationsInspectTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesGetCall { +func (c *ProjectsLocationsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersDeleteCall { 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 *ProjectsLocationsInspectTemplatesGetCall) Header() http.Header { +func (c *ProjectsLocationsJobTriggersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInspectTemplatesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsJobTriggersDeleteCall) 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 } @@ -26388,15 +29082,14 @@ func (c *ProjectsLocationsInspectTemplatesGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.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 *ProjectsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { +// Do executes the "dlp.projects.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 *ProjectsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26415,7 +29108,7 @@ func (c *ProjectsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectTemplate{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26427,25 +29120,25 @@ func (c *ProjectsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", - // "httpMethod": "GET", - // "id": "dlp.projects.locations.inspectTemplates.get", + // "description": "Deletes a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", + // "httpMethod": "DELETE", + // "id": "dlp.projects.locations.jobTriggers.delete", // "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/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26454,81 +29147,33 @@ func (c *ProjectsLocationsInspectTemplatesGetCall) Do(opts ...googleapi.CallOpti } -// method id "dlp.projects.locations.inspectTemplates.list": +// method id "dlp.projects.locations.jobTriggers.get": -type ProjectsLocationsInspectTemplatesListCall struct { +type ProjectsLocationsJobTriggersGetCall struct { s *Service - parentid string + name 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. +// Get: Gets a job trigger. See +// https://cloud.google.com/sensitive-data-protection/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 -// (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 *ProjectsLocationsInspectTemplatesService) List(parentid string) *ProjectsLocationsInspectTemplatesListCall { - c := &ProjectsLocationsInspectTemplatesListCall{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 *ProjectsLocationsInspectTemplatesListCall) LocationId(locationId string) *ProjectsLocationsInspectTemplatesListCall { - 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. The 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 *ProjectsLocationsInspectTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsInspectTemplatesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Size of the page. -// This value can be limited by the server. If zero server returns a -// page of max size 100. -func (c *ProjectsLocationsInspectTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsInspectTemplatesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from the previous call to -// `ListInspectTemplates`. -func (c *ProjectsLocationsInspectTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsInspectTemplatesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Resource name of the project and the triggeredJob, for +// example `projects/dlp-test-project/jobTriggers/53234423`. +func (r *ProjectsLocationsJobTriggersService) Get(name string) *ProjectsLocationsJobTriggersGetCall { + c := &ProjectsLocationsJobTriggersGetCall{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 *ProjectsLocationsInspectTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesListCall { +func (c *ProjectsLocationsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26538,7 +29183,7 @@ func (c *ProjectsLocationsInspectTemplatesListCall) 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 *ProjectsLocationsInspectTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInspectTemplatesListCall { +func (c *ProjectsLocationsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobTriggersGetCall { c.ifNoneMatch_ = entityTag return c } @@ -26546,21 +29191,21 @@ func (c *ProjectsLocationsInspectTemplatesListCall) 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 *ProjectsLocationsInspectTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesListCall { +func (c *ProjectsLocationsJobTriggersGetCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersGetCall { 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 *ProjectsLocationsInspectTemplatesListCall) Header() http.Header { +func (c *ProjectsLocationsJobTriggersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInspectTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsJobTriggersGetCall) 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_ { @@ -26573,7 +29218,7 @@ func (c *ProjectsLocationsInspectTemplatesListCall) 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}/inspectTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -26581,21 +29226,19 @@ func (c *ProjectsLocationsInspectTemplatesListCall) doRequest(alt string) (*http } 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.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 *ProjectsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListInspectTemplatesResponse, error) { +// Do executes the "dlp.projects.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 *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 *ProjectsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26614,58 +29257,37 @@ func (c *ProjectsLocationsInspectTemplatesListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListInspectTemplatesResponse{ + ret := &GooglePrivacyDlpV2JobTrigger{ 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 InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates", - // "httpMethod": "GET", - // "id": "dlp.projects.locations.inspectTemplates.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. The 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. This value 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 the 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", + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.jobTriggers.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/inspectTemplates", + // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2ListInspectTemplatesResponse" + // "$ref": "GooglePrivacyDlpV2JobTrigger" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26674,56 +29296,34 @@ func (c *ProjectsLocationsInspectTemplatesListCall) 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 *ProjectsLocationsInspectTemplatesListCall) 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) - } -} - -// method id "dlp.projects.locations.inspectTemplates.patch": +// method id "dlp.projects.locations.jobTriggers.hybridInspect": -type ProjectsLocationsInspectTemplatesPatchCall struct { - s *Service - name string - googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsJobTriggersHybridInspectCall struct { + s *Service + name string + googleprivacydlpv2hybridinspectjobtriggerrequest *GooglePrivacyDlpV2HybridInspectJobTriggerRequest + 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. +// HybridInspect: Inspect hybrid content and store findings to a +// trigger. The inspection will be processed asynchronously. To review +// the findings monitor the jobs within the trigger. // -// - name: Resource name of organization and inspectTemplate to be -// updated, for example -// `organizations/433245324/inspectTemplates/432452342` or -// projects/project-id/inspectTemplates/432452342. -func (r *ProjectsLocationsInspectTemplatesService) Patch(name string, googleprivacydlpv2updateinspecttemplaterequest *GooglePrivacyDlpV2UpdateInspectTemplateRequest) *ProjectsLocationsInspectTemplatesPatchCall { - c := &ProjectsLocationsInspectTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of the trigger to execute a hybrid inspect on, +// for example `projects/dlp-test-project/jobTriggers/53234423`. +func (r *ProjectsLocationsJobTriggersService) HybridInspect(name string, googleprivacydlpv2hybridinspectjobtriggerrequest *GooglePrivacyDlpV2HybridInspectJobTriggerRequest) *ProjectsLocationsJobTriggersHybridInspectCall { + c := &ProjectsLocationsJobTriggersHybridInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleprivacydlpv2updateinspecttemplaterequest = googleprivacydlpv2updateinspecttemplaterequest + c.googleprivacydlpv2hybridinspectjobtriggerrequest = googleprivacydlpv2hybridinspectjobtriggerrequest 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 *ProjectsLocationsInspectTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInspectTemplatesPatchCall { +func (c *ProjectsLocationsJobTriggersHybridInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersHybridInspectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26731,21 +29331,21 @@ func (c *ProjectsLocationsInspectTemplatesPatchCall) 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 *ProjectsLocationsInspectTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsInspectTemplatesPatchCall { +func (c *ProjectsLocationsJobTriggersHybridInspectCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersHybridInspectCall { 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 *ProjectsLocationsInspectTemplatesPatchCall) Header() http.Header { +func (c *ProjectsLocationsJobTriggersHybridInspectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInspectTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsJobTriggersHybridInspectCall) 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_ { @@ -26753,16 +29353,16 @@ func (c *ProjectsLocationsInspectTemplatesPatchCall) doRequest(alt string) (*htt } 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.googleprivacydlpv2hybridinspectjobtriggerrequest) 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/{+name}:hybridInspect") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -26773,15 +29373,15 @@ func (c *ProjectsLocationsInspectTemplatesPatchCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.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 *ProjectsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2InspectTemplate, error) { +// Do executes the "dlp.projects.locations.jobTriggers.hybridInspect" call. +// Exactly one of *GooglePrivacyDlpV2HybridInspectResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GooglePrivacyDlpV2HybridInspectResponse.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 *ProjectsLocationsJobTriggersHybridInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2HybridInspectResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26800,7 +29400,7 @@ func (c *ProjectsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2InspectTemplate{ + ret := &GooglePrivacyDlpV2HybridInspectResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26812,28 +29412,28 @@ func (c *ProjectsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/inspectTemplates/{inspectTemplatesId}", - // "httpMethod": "PATCH", - // "id": "dlp.projects.locations.inspectTemplates.patch", + // "description": "Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}:hybridInspect", + // "httpMethod": "POST", + // "id": "dlp.projects.locations.jobTriggers.hybridInspect", // "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 trigger to execute a hybrid inspect on, for example `projects/dlp-test-project/jobTriggers/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/inspectTemplates/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+name}:hybridInspect", // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateInspectTemplateRequest" + // "$ref": "GooglePrivacyDlpV2HybridInspectJobTriggerRequest" // }, // "response": { - // "$ref": "GooglePrivacyDlpV2InspectTemplate" + // "$ref": "GooglePrivacyDlpV2HybridInspectResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26842,90 +29442,181 @@ func (c *ProjectsLocationsInspectTemplatesPatchCall) Do(opts ...googleapi.CallOp } -// method id "dlp.projects.locations.jobTriggers.activate": +// method id "dlp.projects.locations.jobTriggers.list": -type ProjectsLocationsJobTriggersActivateCall struct { - s *Service - name string - googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsJobTriggersListCall struct { + s *Service + parentid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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. +// List: Lists job triggers. See +// https://cloud.google.com/sensitive-data-protection/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 *ProjectsLocationsJobTriggersService) Activate(name string, googleprivacydlpv2activatejobtriggerrequest *GooglePrivacyDlpV2ActivateJobTriggerRequest) *ProjectsLocationsJobTriggersActivateCall { - c := &ProjectsLocationsJobTriggersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2activatejobtriggerrequest = googleprivacydlpv2activatejobtriggerrequest +// - parent: Parent resource name. The format of this value varies +// depending on whether you have specified a processing location +// (https://cloud.google.com/sensitive-data-protection/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 *ProjectsLocationsJobTriggersService) List(parentid string) *ProjectsLocationsJobTriggersListCall { + c := &ProjectsLocationsJobTriggersListCall{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 *ProjectsLocationsJobTriggersListCall) Filter(filter string) *ProjectsLocationsJobTriggersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// LocationId sets the optional parameter "locationId": Deprecated. This +// field has no effect. +func (c *ProjectsLocationsJobTriggersListCall) LocationId(locationId string) *ProjectsLocationsJobTriggersListCall { + 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. The 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 *ProjectsLocationsJobTriggersListCall) OrderBy(orderBy string) *ProjectsLocationsJobTriggersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Size of the page. +// This value can be limited by a server. +func (c *ProjectsLocationsJobTriggersListCall) PageSize(pageSize int64) *ProjectsLocationsJobTriggersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. Comes from the previous call to ListJobTriggers. +// `order_by` field must not change for subsequent calls. +func (c *ProjectsLocationsJobTriggersListCall) PageToken(pageToken string) *ProjectsLocationsJobTriggersListCall { + 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 *ProjectsLocationsJobTriggersListCall) Type(type_ string) *ProjectsLocationsJobTriggersListCall { + 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 *ProjectsLocationsJobTriggersActivateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersActivateCall { +func (c *ProjectsLocationsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersListCall { 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 *ProjectsLocationsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobTriggersListCall { + 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 *ProjectsLocationsJobTriggersActivateCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersActivateCall { +func (c *ProjectsLocationsJobTriggersListCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersListCall { 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 *ProjectsLocationsJobTriggersActivateCall) Header() http.Header { +func (c *ProjectsLocationsJobTriggersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsJobTriggersActivateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsJobTriggersListCall) 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()) + 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.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/{+name}:activate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/jobTriggers") 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{ - "name": c.name, + "parent": c.parentid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.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 *ProjectsLocationsJobTriggersActivateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2DlpJob, error) { +// Do executes the "dlp.projects.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 +// *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 *ProjectsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26944,7 +29635,7 @@ func (c *ProjectsLocationsJobTriggersActivateCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2DlpJob{ + ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26956,28 +29647,66 @@ func (c *ProjectsLocationsJobTriggersActivateCall) Do(opts ...googleapi.CallOpti } 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}/locations/{locationsId}/jobTriggers/{jobTriggersId}:activate", - // "httpMethod": "POST", - // "id": "dlp.projects.locations.jobTriggers.activate", + // "description": "Lists job triggers. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.jobTriggers.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the trigger to activate, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "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. The 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. This value can be limited by a server.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token to continue retrieval. Comes from the 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/sensitive-data-protection/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/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", + // "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/{+name}:activate", - // "request": { - // "$ref": "GooglePrivacyDlpV2ActivateJobTriggerRequest" - // }, + // "path": "v2/{+parent}/jobTriggers", // "response": { - // "$ref": "GooglePrivacyDlpV2DlpJob" + // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26986,43 +29715,55 @@ func (c *ProjectsLocationsJobTriggersActivateCall) Do(opts ...googleapi.CallOpti } -// method id "dlp.projects.locations.jobTriggers.create": +// 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 *ProjectsLocationsJobTriggersListCall) 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) + } +} -type ProjectsLocationsJobTriggersCreateCall struct { +// method id "dlp.projects.locations.jobTriggers.patch": + +type ProjectsLocationsJobTriggersPatchCall struct { s *Service - parentid string - googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest + name string + googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest 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. +// Patch: Updates a job trigger. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers +// 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 *ProjectsLocationsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsLocationsJobTriggersCreateCall { - c := &ProjectsLocationsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid - c.googleprivacydlpv2createjobtriggerrequest = googleprivacydlpv2createjobtriggerrequest +// - name: Resource name of the project and the triggeredJob, for +// example `projects/dlp-test-project/jobTriggers/53234423`. +func (r *ProjectsLocationsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *ProjectsLocationsJobTriggersPatchCall { + c := &ProjectsLocationsJobTriggersPatchCall{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 *ProjectsLocationsJobTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersCreateCall { +func (c *ProjectsLocationsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27030,21 +29771,21 @@ func (c *ProjectsLocationsJobTriggersCreateCall) 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 *ProjectsLocationsJobTriggersCreateCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersCreateCall { +func (c *ProjectsLocationsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersPatchCall { 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 *ProjectsLocationsJobTriggersCreateCall) Header() http.Header { +func (c *ProjectsLocationsJobTriggersPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsJobTriggersCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsJobTriggersPatchCall) 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_ { @@ -27052,34 +29793,34 @@ func (c *ProjectsLocationsJobTriggersCreateCall) doRequest(alt string) (*http.Re } 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.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/{+parent}/jobTriggers") + 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.jobTriggers.create" call. +// Do executes the "dlp.projects.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 *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 *ProjectsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { +func (c *ProjectsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27110,25 +29851,25 @@ func (c *ProjectsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallOption } 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}/locations/{locationsId}/jobTriggers", - // "httpMethod": "POST", - // "id": "dlp.projects.locations.jobTriggers.create", + // "description": "Updates a job trigger. See https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}", + // "httpMethod": "PATCH", + // "id": "dlp.projects.locations.jobTriggers.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 the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/jobTriggers", + // "path": "v2/{+name}", // "request": { - // "$ref": "GooglePrivacyDlpV2CreateJobTriggerRequest" + // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" // }, // "response": { // "$ref": "GooglePrivacyDlpV2JobTrigger" @@ -27140,24 +29881,23 @@ func (c *ProjectsLocationsJobTriggersCreateCall) Do(opts ...googleapi.CallOption } -// method id "dlp.projects.locations.jobTriggers.delete": +// method id "dlp.projects.locations.projectDataProfiles.get": -type ProjectsLocationsJobTriggersDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsProjectDataProfilesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a job trigger. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn -// more. +// Get: Gets a project data profile. // -// - name: Resource name of the project and the triggeredJob, for -// example `projects/dlp-test-project/jobTriggers/53234423`. -func (r *ProjectsLocationsJobTriggersService) Delete(name string) *ProjectsLocationsJobTriggersDeleteCall { - c := &ProjectsLocationsJobTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name, for example +// `organizations/12345/locations/us/projectDataProfiles/53234423`. +func (r *ProjectsLocationsProjectDataProfilesService) Get(name string) *ProjectsLocationsProjectDataProfilesGetCall { + c := &ProjectsLocationsProjectDataProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -27165,41 +29905,54 @@ func (r *ProjectsLocationsJobTriggersService) Delete(name string) *ProjectsLocat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsJobTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersDeleteCall { +func (c *ProjectsLocationsProjectDataProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProjectDataProfilesGetCall { 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 *ProjectsLocationsProjectDataProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProjectDataProfilesGetCall { + 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 *ProjectsLocationsJobTriggersDeleteCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersDeleteCall { +func (c *ProjectsLocationsProjectDataProfilesGetCall) Context(ctx context.Context) *ProjectsLocationsProjectDataProfilesGetCall { 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 *ProjectsLocationsJobTriggersDeleteCall) Header() http.Header { +func (c *ProjectsLocationsProjectDataProfilesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsJobTriggersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsProjectDataProfilesGetCall) 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 } @@ -27210,14 +29963,15 @@ func (c *ProjectsLocationsJobTriggersDeleteCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.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 *ProjectsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "dlp.projects.locations.projectDataProfiles.get" call. +// Exactly one of *GooglePrivacyDlpV2ProjectDataProfile or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GooglePrivacyDlpV2ProjectDataProfile.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 *ProjectsLocationsProjectDataProfilesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ProjectDataProfile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27236,7 +29990,7 @@ func (c *ProjectsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2ProjectDataProfile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27248,25 +30002,25 @@ func (c *ProjectsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption } 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}/locations/{locationsId}/jobTriggers/{jobTriggersId}", - // "httpMethod": "DELETE", - // "id": "dlp.projects.locations.jobTriggers.delete", + // "description": "Gets a project data profile.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/projectDataProfiles/{projectDataProfilesId}", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.projectDataProfiles.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, for example `organizations/12345/locations/us/projectDataProfiles/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/projectDataProfiles/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2ProjectDataProfile" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27275,33 +30029,77 @@ func (c *ProjectsLocationsJobTriggersDeleteCall) Do(opts ...googleapi.CallOption } -// method id "dlp.projects.locations.jobTriggers.get": +// method id "dlp.projects.locations.projectDataProfiles.list": + +type ProjectsLocationsProjectDataProfilesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists data profiles for an organization. +// +// - parent: organizations/{org_id}/locations/{loc_id}. +func (r *ProjectsLocationsProjectDataProfilesService) List(parent string) *ProjectsLocationsProjectDataProfilesListCall { + c := &ProjectsLocationsProjectDataProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + 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: - `sensitivity_level` - HIGH|MODERATE|LOW - +// `data_risk_level` - HIGH|MODERATE|LOW - `status_code` - an RPC status +// code as defined in +// https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto +// * The operator must be `=` or `!=`. Examples: * project_id = 12345 +// AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH +// The length of this field should be no more than 500 characters. +func (c *ProjectsLocationsProjectDataProfilesListCall) Filter(filter string) *ProjectsLocationsProjectDataProfilesListCall { + c.urlParams_.Set("filter", filter) + 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. The default sorting order is ascending. +// Redundant space characters are insignificant. Only one order field at +// a time is allowed. Examples: * `project_id` * `sensitivity_level +// desc` Supported fields are: - `project_id`: GCP project ID - +// `sensitivity_level`: How sensitive the data in a project is, at most. +// - `data_risk_level`: How much risk is associated with this data. - +// `profile_last_generated`: When the profile was last updated in epoch +// seconds. +func (c *ProjectsLocationsProjectDataProfilesListCall) OrderBy(orderBy string) *ProjectsLocationsProjectDataProfilesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} -type ProjectsLocationsJobTriggersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": Size of the page. +// This value can be limited by the server. If zero, server returns a +// page of max size 100. +func (c *ProjectsLocationsProjectDataProfilesListCall) PageSize(pageSize int64) *ProjectsLocationsProjectDataProfilesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Get: Gets a job trigger. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn -// more. -// -// - name: Resource name of the project and the triggeredJob, for -// example `projects/dlp-test-project/jobTriggers/53234423`. -func (r *ProjectsLocationsJobTriggersService) Get(name string) *ProjectsLocationsJobTriggersGetCall { - c := &ProjectsLocationsJobTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. +func (c *ProjectsLocationsProjectDataProfilesListCall) PageToken(pageToken string) *ProjectsLocationsProjectDataProfilesListCall { + 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 *ProjectsLocationsJobTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersGetCall { +func (c *ProjectsLocationsProjectDataProfilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProjectDataProfilesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27311,7 +30109,7 @@ func (c *ProjectsLocationsJobTriggersGetCall) 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 *ProjectsLocationsJobTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobTriggersGetCall { +func (c *ProjectsLocationsProjectDataProfilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProjectDataProfilesListCall { c.ifNoneMatch_ = entityTag return c } @@ -27319,21 +30117,21 @@ func (c *ProjectsLocationsJobTriggersGetCall) 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 *ProjectsLocationsJobTriggersGetCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersGetCall { +func (c *ProjectsLocationsProjectDataProfilesListCall) Context(ctx context.Context) *ProjectsLocationsProjectDataProfilesListCall { 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 *ProjectsLocationsJobTriggersGetCall) Header() http.Header { +func (c *ProjectsLocationsProjectDataProfilesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsJobTriggersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsProjectDataProfilesListCall) 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_ { @@ -27346,7 +30144,7 @@ func (c *ProjectsLocationsJobTriggersGetCall) 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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/projectDataProfiles") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27354,19 +30152,21 @@ func (c *ProjectsLocationsJobTriggersGetCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.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 *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 *ProjectsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { +// Do executes the "dlp.projects.locations.projectDataProfiles.list" call. +// Exactly one of *GooglePrivacyDlpV2ListProjectDataProfilesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GooglePrivacyDlpV2ListProjectDataProfilesResponse.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 *ProjectsLocationsProjectDataProfilesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListProjectDataProfilesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27385,7 +30185,7 @@ func (c *ProjectsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2JobTrigger{ + ret := &GooglePrivacyDlpV2ListProjectDataProfilesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27397,25 +30197,46 @@ func (c *ProjectsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOption) ( } 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}/locations/{locationsId}/jobTriggers/{jobTriggersId}", + // "description": "Lists data profiles for an organization.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/projectDataProfiles", // "httpMethod": "GET", - // "id": "dlp.projects.locations.jobTriggers.get", + // "id": "dlp.projects.locations.projectDataProfiles.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the project and the triggeredJob, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "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: - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH The length of this field should be no more than 500 characters.", + // "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. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id` * `sensitivity_level desc` Supported fields are: - `project_id`: GCP project ID - `sensitivity_level`: How sensitive the data in a project is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Size of the page. This value 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.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. organizations/{org_id}/locations/{loc_id}", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}", + // "path": "v2/{+parent}/projectDataProfiles", // "response": { - // "$ref": "GooglePrivacyDlpV2JobTrigger" + // "$ref": "GooglePrivacyDlpV2ListProjectDataProfilesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27424,34 +30245,68 @@ func (c *ProjectsLocationsJobTriggersGetCall) Do(opts ...googleapi.CallOption) ( } -// method id "dlp.projects.locations.jobTriggers.hybridInspect": +// 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 *ProjectsLocationsProjectDataProfilesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListProjectDataProfilesResponse) 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 ProjectsLocationsJobTriggersHybridInspectCall struct { - s *Service - name string - googleprivacydlpv2hybridinspectjobtriggerrequest *GooglePrivacyDlpV2HybridInspectJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "dlp.projects.locations.storedInfoTypes.create": + +type ProjectsLocationsStoredInfoTypesCreateCall struct { + s *Service + parentid string + googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// HybridInspect: Inspect hybrid content and store findings to a -// trigger. The inspection will be processed asynchronously. To review -// the findings monitor the jobs within the trigger. +// Create: Creates a pre-built stored infoType to be used for +// inspection. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// to learn more. // -// - name: Resource name of the trigger to execute a hybrid inspect on, -// for example `projects/dlp-test-project/jobTriggers/53234423`. -func (r *ProjectsLocationsJobTriggersService) HybridInspect(name string, googleprivacydlpv2hybridinspectjobtriggerrequest *GooglePrivacyDlpV2HybridInspectJobTriggerRequest) *ProjectsLocationsJobTriggersHybridInspectCall { - c := &ProjectsLocationsJobTriggersHybridInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleprivacydlpv2hybridinspectjobtriggerrequest = googleprivacydlpv2hybridinspectjobtriggerrequest +// - 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/sensitive-data-protection/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 *ProjectsLocationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *ProjectsLocationsStoredInfoTypesCreateCall { + c := &ProjectsLocationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parentid = parentid + 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 *ProjectsLocationsJobTriggersHybridInspectCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersHybridInspectCall { +func (c *ProjectsLocationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27459,21 +30314,21 @@ func (c *ProjectsLocationsJobTriggersHybridInspectCall) 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 *ProjectsLocationsJobTriggersHybridInspectCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersHybridInspectCall { +func (c *ProjectsLocationsStoredInfoTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesCreateCall { 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 *ProjectsLocationsJobTriggersHybridInspectCall) Header() http.Header { +func (c *ProjectsLocationsStoredInfoTypesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsJobTriggersHybridInspectCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsStoredInfoTypesCreateCall) 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_ { @@ -27481,14 +30336,14 @@ func (c *ProjectsLocationsJobTriggersHybridInspectCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleprivacydlpv2hybridinspectjobtriggerrequest) + 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/{+name}:hybridInspect") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/storedInfoTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27496,20 +30351,19 @@ func (c *ProjectsLocationsJobTriggersHybridInspectCall) doRequest(alt string) (* } 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.locations.jobTriggers.hybridInspect" call. -// Exactly one of *GooglePrivacyDlpV2HybridInspectResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GooglePrivacyDlpV2HybridInspectResponse.ServerResponse.Header or (if +// Do executes the "dlp.projects.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 *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 *ProjectsLocationsJobTriggersHybridInspectCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2HybridInspectResponse, error) { +func (c *ProjectsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27528,7 +30382,7 @@ func (c *ProjectsLocationsJobTriggersHybridInspectCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2HybridInspectResponse{ + ret := &GooglePrivacyDlpV2StoredInfoType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27540,211 +30394,116 @@ func (c *ProjectsLocationsJobTriggersHybridInspectCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Inspect hybrid content and store findings to a trigger. The inspection will be processed asynchronously. To review the findings monitor the jobs within the trigger.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers/{jobTriggersId}:hybridInspect", + // "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes", // "httpMethod": "POST", - // "id": "dlp.projects.locations.jobTriggers.hybridInspect", + // "id": "dlp.projects.locations.storedInfoTypes.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Resource name of the trigger to execute a hybrid inspect on, for example `projects/dlp-test-project/jobTriggers/53234423`.", + // "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/sensitive-data-protection/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/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+name}:hybridInspect", - // "request": { - // "$ref": "GooglePrivacyDlpV2HybridInspectJobTriggerRequest" - // }, - // "response": { - // "$ref": "GooglePrivacyDlpV2HybridInspectResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "dlp.projects.locations.jobTriggers.list": - -type ProjectsLocationsJobTriggersListCall struct { - s *Service - parentid string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// 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 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 *ProjectsLocationsJobTriggersService) List(parentid string) *ProjectsLocationsJobTriggersListCall { - c := &ProjectsLocationsJobTriggersListCall{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 *ProjectsLocationsJobTriggersListCall) Filter(filter string) *ProjectsLocationsJobTriggersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// LocationId sets the optional parameter "locationId": Deprecated. This -// field has no effect. -func (c *ProjectsLocationsJobTriggersListCall) LocationId(locationId string) *ProjectsLocationsJobTriggersListCall { - c.urlParams_.Set("locationId", locationId) - return c -} + // "path": "v2/{+parent}/storedInfoTypes", + // "request": { + // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" + // }, + // "response": { + // "$ref": "GooglePrivacyDlpV2StoredInfoType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } -// 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. The 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 *ProjectsLocationsJobTriggersListCall) OrderBy(orderBy string) *ProjectsLocationsJobTriggersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c } -// PageSize sets the optional parameter "pageSize": Size of the page. -// This value can be limited by a server. -func (c *ProjectsLocationsJobTriggersListCall) PageSize(pageSize int64) *ProjectsLocationsJobTriggersListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} +// method id "dlp.projects.locations.storedInfoTypes.delete": -// PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from the previous call to ListJobTriggers. -// `order_by` field must not change for subsequent calls. -func (c *ProjectsLocationsJobTriggersListCall) PageToken(pageToken string) *ProjectsLocationsJobTriggersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +type ProjectsLocationsStoredInfoTypesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Type sets the optional parameter "type": The type of jobs. Will use -// `DlpJobType.INSPECT` if not set. -// -// Possible values: +// Delete: Deletes a stored infoType. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// 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 *ProjectsLocationsJobTriggersListCall) Type(type_ string) *ProjectsLocationsJobTriggersListCall { - c.urlParams_.Set("type", type_) +// - 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 *ProjectsLocationsStoredInfoTypesService) Delete(name string) *ProjectsLocationsStoredInfoTypesDeleteCall { + c := &ProjectsLocationsStoredInfoTypesDeleteCall{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 *ProjectsLocationsJobTriggersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersListCall { +func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesDeleteCall { 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 *ProjectsLocationsJobTriggersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobTriggersListCall { - 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 *ProjectsLocationsJobTriggersListCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersListCall { +func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesDeleteCall { 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 *ProjectsLocationsJobTriggersListCall) Header() http.Header { +func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsJobTriggersListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsStoredInfoTypesDeleteCall) 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}/jobTriggers") + 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.projects.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 -// *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 *ProjectsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListJobTriggersResponse, error) { +// Do executes the "dlp.projects.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 *ProjectsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27763,7 +30522,7 @@ func (c *ProjectsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListJobTriggersResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27775,66 +30534,25 @@ func (c *ProjectsLocationsJobTriggersListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobTriggers", - // "httpMethod": "GET", - // "id": "dlp.projects.locations.jobTriggers.list", + // "description": "Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", + // "httpMethod": "DELETE", + // "id": "dlp.projects.locations.storedInfoTypes.delete", // "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 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. The 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. This value can be limited by a server.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Page token to continue retrieval. Comes from the 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", + // "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": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", // "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/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2ListJobTriggersResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27843,94 +30561,82 @@ func (c *ProjectsLocationsJobTriggersListCall) 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 *ProjectsLocationsJobTriggersListCall) 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.locations.jobTriggers.patch": +// method id "dlp.projects.locations.storedInfoTypes.get": -type ProjectsLocationsJobTriggersPatchCall struct { - s *Service - name string - googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsStoredInfoTypesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a job trigger. See -// https://cloud.google.com/dlp/docs/creating-job-triggers to learn -// more. +// Get: Gets a stored infoType. See +// https://cloud.google.com/sensitive-data-protection/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 *ProjectsLocationsJobTriggersService) Patch(name string, googleprivacydlpv2updatejobtriggerrequest *GooglePrivacyDlpV2UpdateJobTriggerRequest) *ProjectsLocationsJobTriggersPatchCall { - c := &ProjectsLocationsJobTriggersPatchCall{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 *ProjectsLocationsStoredInfoTypesService) Get(name string) *ProjectsLocationsStoredInfoTypesGetCall { + c := &ProjectsLocationsStoredInfoTypesGetCall{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 *ProjectsLocationsJobTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobTriggersPatchCall { +func (c *ProjectsLocationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesGetCall { 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 *ProjectsLocationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoredInfoTypesGetCall { + 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 *ProjectsLocationsJobTriggersPatchCall) Context(ctx context.Context) *ProjectsLocationsJobTriggersPatchCall { +func (c *ProjectsLocationsStoredInfoTypesGetCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesGetCall { 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 *ProjectsLocationsJobTriggersPatchCall) Header() http.Header { +func (c *ProjectsLocationsStoredInfoTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsJobTriggersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsStoredInfoTypesGetCall) 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.googleprivacydlpv2updatejobtriggerrequest) - 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 } @@ -27941,14 +30647,14 @@ func (c *ProjectsLocationsJobTriggersPatchCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.jobTriggers.patch" call. -// Exactly one of *GooglePrivacyDlpV2JobTrigger or error will be +// Do executes the "dlp.projects.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 *ProjectsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2JobTrigger, error) { +func (c *ProjectsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27967,7 +30673,7 @@ func (c *ProjectsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) 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, @@ -27979,28 +30685,25 @@ func (c *ProjectsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) } 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}/locations/{locationsId}/jobTriggers/{jobTriggersId}", - // "httpMethod": "PATCH", - // "id": "dlp.projects.locations.jobTriggers.patch", + // "description": "Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", + // "httpMethod": "GET", + // "id": "dlp.projects.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": "^projects/[^/]+/locations/[^/]+/jobTriggers/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", - // "request": { - // "$ref": "GooglePrivacyDlpV2UpdateJobTriggerRequest" - // }, // "response": { - // "$ref": "GooglePrivacyDlpV2JobTrigger" + // "$ref": "GooglePrivacyDlpV2StoredInfoType" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28009,86 +30712,126 @@ func (c *ProjectsLocationsJobTriggersPatchCall) Do(opts ...googleapi.CallOption) } -// method id "dlp.projects.locations.storedInfoTypes.create": +// method id "dlp.projects.locations.storedInfoTypes.list": -type ProjectsLocationsStoredInfoTypesCreateCall struct { - s *Service - parentid string - googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsStoredInfoTypesListCall struct { + s *Service + parentid string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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. +// List: Lists stored infoTypes. See +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// 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: +// (https://cloud.google.com/sensitive-data-protection/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 *ProjectsLocationsStoredInfoTypesService) Create(parentid string, googleprivacydlpv2createstoredinfotyperequest *GooglePrivacyDlpV2CreateStoredInfoTypeRequest) *ProjectsLocationsStoredInfoTypesCreateCall { - c := &ProjectsLocationsStoredInfoTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsStoredInfoTypesService) List(parentid string) *ProjectsLocationsStoredInfoTypesListCall { + c := &ProjectsLocationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parentid = parentid - c.googleprivacydlpv2createstoredinfotyperequest = googleprivacydlpv2createstoredinfotyperequest + return c +} + +// LocationId sets the optional parameter "locationId": Deprecated. This +// field has no effect. +func (c *ProjectsLocationsStoredInfoTypesListCall) LocationId(locationId string) *ProjectsLocationsStoredInfoTypesListCall { + 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. The 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 *ProjectsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) *ProjectsLocationsStoredInfoTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Size of the page. +// This value can be limited by the server. If zero server returns a +// page of max size 100. +func (c *ProjectsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) *ProjectsLocationsStoredInfoTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token to +// continue retrieval. Comes from the previous call to +// `ListStoredInfoTypes`. +func (c *ProjectsLocationsStoredInfoTypesListCall) PageToken(pageToken string) *ProjectsLocationsStoredInfoTypesListCall { + 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 *ProjectsLocationsStoredInfoTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesCreateCall { +func (c *ProjectsLocationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesListCall { 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 *ProjectsLocationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoredInfoTypesListCall { + 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 *ProjectsLocationsStoredInfoTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesCreateCall { +func (c *ProjectsLocationsStoredInfoTypesListCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesListCall { 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 *ProjectsLocationsStoredInfoTypesCreateCall) Header() http.Header { +func (c *ProjectsLocationsStoredInfoTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsStoredInfoTypesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsStoredInfoTypesListCall) 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.googleprivacydlpv2createstoredinfotyperequest) - 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}/storedInfoTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -28099,14 +30842,16 @@ func (c *ProjectsLocationsStoredInfoTypesCreateCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.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 *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 *ProjectsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { +// Do executes the "dlp.projects.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 +// *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 *ProjectsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28125,7 +30870,7 @@ func (c *ProjectsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2StoredInfoType{ + ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28137,16 +30882,37 @@ func (c *ProjectsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOp } 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.", + // "description": "Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes", - // "httpMethod": "POST", - // "id": "dlp.projects.locations.storedInfoTypes.create", + // "httpMethod": "GET", + // "id": "dlp.projects.locations.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. The 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. This value 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 the 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 + 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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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/[^/]+/locations/[^/]+$", // "required": true, @@ -28154,11 +30920,8 @@ func (c *ProjectsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOp // } // }, // "path": "v2/{+parent}/storedInfoTypes", - // "request": { - // "$ref": "GooglePrivacyDlpV2CreateStoredInfoTypeRequest" - // }, // "response": { - // "$ref": "GooglePrivacyDlpV2StoredInfoType" + // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28167,34 +30930,59 @@ func (c *ProjectsLocationsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOp } -// method id "dlp.projects.locations.storedInfoTypes.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 *ProjectsLocationsStoredInfoTypesListCall) 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) + } +} -type ProjectsLocationsStoredInfoTypesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "dlp.projects.locations.storedInfoTypes.patch": + +type ProjectsLocationsStoredInfoTypesPatchCall struct { + s *Service + name string + googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest + 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. +// 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/sensitive-data-protection/docs/creating-stored-infotypes +// to learn more. // -// - name: Resource name of the organization and storedInfoType to be -// deleted, for example +// - name: Resource name of organization and storedInfoType to be +// updated, for example // `organizations/433245324/storedInfoTypes/432452342` or // projects/project-id/storedInfoTypes/432452342. -func (r *ProjectsLocationsStoredInfoTypesService) Delete(name string) *ProjectsLocationsStoredInfoTypesDeleteCall { - c := &ProjectsLocationsStoredInfoTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *ProjectsLocationsStoredInfoTypesPatchCall { + c := &ProjectsLocationsStoredInfoTypesPatchCall{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 *ProjectsLocationsStoredInfoTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesDeleteCall { +func (c *ProjectsLocationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28202,21 +30990,21 @@ func (c *ProjectsLocationsStoredInfoTypesDeleteCall) 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 *ProjectsLocationsStoredInfoTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesDeleteCall { +func (c *ProjectsLocationsStoredInfoTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesPatchCall { 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 *ProjectsLocationsStoredInfoTypesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsStoredInfoTypesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsStoredInfoTypesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsStoredInfoTypesPatchCall) 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_ { @@ -28224,11 +31012,16 @@ func (c *ProjectsLocationsStoredInfoTypesDeleteCall) doRequest(alt string) (*htt } 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 + } + 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("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -28239,14 +31032,14 @@ func (c *ProjectsLocationsStoredInfoTypesDeleteCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.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 +// Do executes the "dlp.projects.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 *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 *ProjectsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28265,7 +31058,7 @@ func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GooglePrivacyDlpV2StoredInfoType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28277,16 +31070,16 @@ func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + // "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/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", - // "httpMethod": "DELETE", - // "id": "dlp.projects.locations.storedInfoTypes.delete", + // "httpMethod": "PATCH", + // "id": "dlp.projects.locations.storedInfoTypes.patch", // "parameterOrder": [ // "name" // ], // "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.", + // "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": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", // "required": true, @@ -28294,8 +31087,11 @@ func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOp // } // }, // "path": "v2/{+name}", + // "request": { + // "$ref": "GooglePrivacyDlpV2UpdateStoredInfoTypeRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GooglePrivacyDlpV2StoredInfoType" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28304,9 +31100,9 @@ func (c *ProjectsLocationsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOp } -// method id "dlp.projects.locations.storedInfoTypes.get": +// method id "dlp.projects.locations.tableDataProfiles.get": -type ProjectsLocationsStoredInfoTypesGetCall struct { +type ProjectsLocationsTableDataProfilesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -28315,16 +31111,12 @@ type ProjectsLocationsStoredInfoTypesGetCall struct { header_ http.Header } -// Get: Gets a stored infoType. See -// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn -// more. +// Get: Gets a table data profile. // -// - 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 *ProjectsLocationsStoredInfoTypesService) Get(name string) *ProjectsLocationsStoredInfoTypesGetCall { - c := &ProjectsLocationsStoredInfoTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name, for example +// `organizations/12345/locations/us/tableDataProfiles/53234423`. +func (r *ProjectsLocationsTableDataProfilesService) Get(name string) *ProjectsLocationsTableDataProfilesGetCall { + c := &ProjectsLocationsTableDataProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -28332,7 +31124,7 @@ func (r *ProjectsLocationsStoredInfoTypesService) Get(name string) *ProjectsLoca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsStoredInfoTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesGetCall { +func (c *ProjectsLocationsTableDataProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTableDataProfilesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28342,7 +31134,7 @@ func (c *ProjectsLocationsStoredInfoTypesGetCall) 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 *ProjectsLocationsStoredInfoTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoredInfoTypesGetCall { +func (c *ProjectsLocationsTableDataProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTableDataProfilesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -28350,21 +31142,21 @@ func (c *ProjectsLocationsStoredInfoTypesGetCall) 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 *ProjectsLocationsStoredInfoTypesGetCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesGetCall { +func (c *ProjectsLocationsTableDataProfilesGetCall) Context(ctx context.Context) *ProjectsLocationsTableDataProfilesGetCall { 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 *ProjectsLocationsStoredInfoTypesGetCall) Header() http.Header { +func (c *ProjectsLocationsTableDataProfilesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsStoredInfoTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsTableDataProfilesGetCall) 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_ { @@ -28390,14 +31182,15 @@ func (c *ProjectsLocationsStoredInfoTypesGetCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.storedInfoTypes.get" call. -// Exactly one of *GooglePrivacyDlpV2StoredInfoType or error will be +// Do executes the "dlp.projects.locations.tableDataProfiles.get" call. +// Exactly one of *GooglePrivacyDlpV2TableDataProfile 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 *ProjectsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2StoredInfoType, error) { +// either *GooglePrivacyDlpV2TableDataProfile.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 *ProjectsLocationsTableDataProfilesGetCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2TableDataProfile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28416,7 +31209,7 @@ func (c *ProjectsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2StoredInfoType{ + ret := &GooglePrivacyDlpV2TableDataProfile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28428,25 +31221,25 @@ func (c *ProjectsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", + // "description": "Gets a table data profile.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/tableDataProfiles/{tableDataProfilesId}", // "httpMethod": "GET", - // "id": "dlp.projects.locations.storedInfoTypes.get", + // "id": "dlp.projects.locations.tableDataProfiles.get", // "parameterOrder": [ // "name" // ], // "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.", + // "description": "Required. Resource name, for example `organizations/12345/locations/us/tableDataProfiles/53234423`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/storedInfoTypes/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/tableDataProfiles/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v2/{+name}", // "response": { - // "$ref": "GooglePrivacyDlpV2StoredInfoType" + // "$ref": "GooglePrivacyDlpV2TableDataProfile" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28455,71 +31248,78 @@ func (c *ProjectsLocationsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOptio } -// method id "dlp.projects.locations.storedInfoTypes.list": +// method id "dlp.projects.locations.tableDataProfiles.list": -type ProjectsLocationsStoredInfoTypesListCall struct { +type ProjectsLocationsTableDataProfilesListCall struct { s *Service - parentid string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists stored infoTypes. See -// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn -// more. +// List: Lists data profiles for an organization. // -// - 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 *ProjectsLocationsStoredInfoTypesService) List(parentid string) *ProjectsLocationsStoredInfoTypesListCall { - c := &ProjectsLocationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parentid = parentid +// - parent: Resource name of the organization or project, for example +// `organizations/433245324/locations/europe` or +// `projects/project-id/locations/asia`. +func (r *ProjectsLocationsTableDataProfilesService) List(parent string) *ProjectsLocationsTableDataProfilesListCall { + c := &ProjectsLocationsTableDataProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// LocationId sets the optional parameter "locationId": Deprecated. This -// field has no effect. -func (c *ProjectsLocationsStoredInfoTypesListCall) LocationId(locationId string) *ProjectsLocationsStoredInfoTypesListCall { - c.urlParams_.Set("locationId", locationId) +// 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: - `project_id` - The GCP project ID. - `dataset_id` - +// The BigQuery dataset ID. - `table_id` - The ID of the BigQuery table. +// - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - +// HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - +// `status_code` - an RPC status code as defined in +// https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto +// * The operator must be `=` or `!=`. Examples: * project_id = 12345 +// AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH +// * project_id = 12345 AND resource_visibility = PUBLIC The length of +// this field should be no more than 500 characters. +func (c *ProjectsLocationsTableDataProfilesListCall) Filter(filter string) *ProjectsLocationsTableDataProfilesListCall { + c.urlParams_.Set("filter", filter) 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. The 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 *ProjectsLocationsStoredInfoTypesListCall) OrderBy(orderBy string) *ProjectsLocationsStoredInfoTypesListCall { +// Redundant space characters are insignificant. Only one order field at +// a time is allowed. Examples: * `project_id asc` * `table_id` * +// `sensitivity_level desc` Supported fields are: - `project_id`: The +// GCP project ID. - `dataset_id`: The ID of a BigQuery dataset. - +// `table_id`: The ID of a BigQuery table. - `sensitivity_level`: How +// sensitive the data in a table is, at most. - `data_risk_level`: How +// much risk is associated with this data. - `profile_last_generated`: +// When the profile was last updated in epoch seconds. - +// `last_modified`: The last time the resource was modified. - +// `resource_visibility`: Visibility restriction for this resource. - +// `row_count`: Number of rows in this resource. +func (c *ProjectsLocationsTableDataProfilesListCall) OrderBy(orderBy string) *ProjectsLocationsTableDataProfilesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Size of the page. -// This value can be limited by the server. If zero server returns a +// This value can be limited by the server. If zero, server returns a // page of max size 100. -func (c *ProjectsLocationsStoredInfoTypesListCall) PageSize(pageSize int64) *ProjectsLocationsStoredInfoTypesListCall { +func (c *ProjectsLocationsTableDataProfilesListCall) PageSize(pageSize int64) *ProjectsLocationsTableDataProfilesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token to -// continue retrieval. Comes from the previous call to -// `ListStoredInfoTypes`. -func (c *ProjectsLocationsStoredInfoTypesListCall) PageToken(pageToken string) *ProjectsLocationsStoredInfoTypesListCall { +// continue retrieval. +func (c *ProjectsLocationsTableDataProfilesListCall) PageToken(pageToken string) *ProjectsLocationsTableDataProfilesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -28527,7 +31327,7 @@ func (c *ProjectsLocationsStoredInfoTypesListCall) 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 *ProjectsLocationsStoredInfoTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesListCall { +func (c *ProjectsLocationsTableDataProfilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTableDataProfilesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28537,7 +31337,7 @@ func (c *ProjectsLocationsStoredInfoTypesListCall) 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 *ProjectsLocationsStoredInfoTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsStoredInfoTypesListCall { +func (c *ProjectsLocationsTableDataProfilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTableDataProfilesListCall { c.ifNoneMatch_ = entityTag return c } @@ -28545,21 +31345,21 @@ func (c *ProjectsLocationsStoredInfoTypesListCall) 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 *ProjectsLocationsStoredInfoTypesListCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesListCall { +func (c *ProjectsLocationsTableDataProfilesListCall) Context(ctx context.Context) *ProjectsLocationsTableDataProfilesListCall { 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 *ProjectsLocationsStoredInfoTypesListCall) Header() http.Header { +func (c *ProjectsLocationsTableDataProfilesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsStoredInfoTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsTableDataProfilesListCall) 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_ { @@ -28572,7 +31372,7 @@ func (c *ProjectsLocationsStoredInfoTypesListCall) 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}/storedInfoTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/tableDataProfiles") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28580,21 +31380,23 @@ func (c *ProjectsLocationsStoredInfoTypesListCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parentid, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dlp.projects.locations.storedInfoTypes.list" call. -// Exactly one of *GooglePrivacyDlpV2ListStoredInfoTypesResponse or +// Do executes the "dlp.projects.locations.tableDataProfiles.list" call. +// Exactly one of *GooglePrivacyDlpV2ListTableDataProfilesResponse 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 +// *GooglePrivacyDlpV2ListTableDataProfilesResponse.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 *ProjectsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListStoredInfoTypesResponse, error) { +func (c *ProjectsLocationsTableDataProfilesListCall) Do(opts ...googleapi.CallOption) (*GooglePrivacyDlpV2ListTableDataProfilesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28613,7 +31415,7 @@ func (c *ProjectsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GooglePrivacyDlpV2ListStoredInfoTypesResponse{ + ret := &GooglePrivacyDlpV2ListTableDataProfilesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28625,46 +31427,46 @@ func (c *ProjectsLocationsStoredInfoTypesListCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/storedInfoTypes", + // "description": "Lists data profiles for an organization.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/tableDataProfiles", // "httpMethod": "GET", - // "id": "dlp.projects.locations.storedInfoTypes.list", + // "id": "dlp.projects.locations.tableDataProfiles.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "locationId": { - // "description": "Deprecated. This field has no effect.", + // "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: - `project_id` - The GCP project ID. - `dataset_id` - The BigQuery dataset ID. - `table_id` - The ID of the BigQuery table. - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * project_id = 12345 AND status_code = 1 * project_id = 12345 AND sensitivity_level = HIGH * project_id = 12345 AND resource_visibility = PUBLIC The length of this field should be no more than 500 characters.", // "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. The 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.", + // "description": "Comma separated list of fields to order by, followed by `asc` or `desc` postfix. This list is case insensitive. The default sorting order is ascending. Redundant space characters are insignificant. Only one order field at a time is allowed. Examples: * `project_id asc` * `table_id` * `sensitivity_level desc` Supported fields are: - `project_id`: The GCP project ID. - `dataset_id`: The ID of a BigQuery dataset. - `table_id`: The ID of a BigQuery table. - `sensitivity_level`: How sensitive the data in a table is, at most. - `data_risk_level`: How much risk is associated with this data. - `profile_last_generated`: When the profile was last updated in epoch seconds. - `last_modified`: The last time the resource was modified. - `resource_visibility`: Visibility restriction for this resource. - `row_count`: Number of rows in this resource.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Size of the page. This value can be limited by the server. If zero server returns a page of max size 100.", + // "description": "Size of the page. This value 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 the previous call to `ListStoredInfoTypes`.", + // "description": "Page token to continue retrieval.", // "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", + // "description": "Required. Resource name of the organization or project, for example `organizations/433245324/locations/europe` or `projects/project-id/locations/asia`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v2/{+parent}/storedInfoTypes", + // "path": "v2/{+parent}/tableDataProfiles", // "response": { - // "$ref": "GooglePrivacyDlpV2ListStoredInfoTypesResponse" + // "$ref": "GooglePrivacyDlpV2ListTableDataProfilesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28676,7 +31478,7 @@ func (c *ProjectsLocationsStoredInfoTypesListCall) 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 *ProjectsLocationsStoredInfoTypesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListStoredInfoTypesResponse) error) error { +func (c *ProjectsLocationsTableDataProfilesListCall) Pages(ctx context.Context, f func(*GooglePrivacyDlpV2ListTableDataProfilesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -28694,155 +31496,6 @@ func (c *ProjectsLocationsStoredInfoTypesListCall) Pages(ctx context.Context, f } } -// method id "dlp.projects.locations.storedInfoTypes.patch": - -type ProjectsLocationsStoredInfoTypesPatchCall struct { - s *Service - name string - googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest - urlParams_ gensupport.URLParams - 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 -// 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 *ProjectsLocationsStoredInfoTypesService) Patch(name string, googleprivacydlpv2updatestoredinfotyperequest *GooglePrivacyDlpV2UpdateStoredInfoTypeRequest) *ProjectsLocationsStoredInfoTypesPatchCall { - c := &ProjectsLocationsStoredInfoTypesPatchCall{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 *ProjectsLocationsStoredInfoTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoredInfoTypesPatchCall { - 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 *ProjectsLocationsStoredInfoTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsStoredInfoTypesPatchCall { - 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 *ProjectsLocationsStoredInfoTypesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsStoredInfoTypesPatchCall) 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 - } - 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.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 *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 *ProjectsLocationsStoredInfoTypesPatchCall) 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/projects/{projectsId}/locations/{locationsId}/storedInfoTypes/{storedInfoTypesId}", - // "httpMethod": "PATCH", - // "id": "dlp.projects.locations.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": "^projects/[^/]+/locations/[^/]+/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.storedInfoTypes.create": type ProjectsStoredInfoTypesCreateCall struct { @@ -28856,14 +31509,14 @@ type ProjectsStoredInfoTypesCreateCall struct { // 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. +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// 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: +// (https://cloud.google.com/sensitive-data-protection/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: @@ -28971,7 +31624,7 @@ func (c *ProjectsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*G } 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.", + // "description": "Creates a pre-built stored infoType to be used for inspection. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", // "flatPath": "v2/projects/{projectsId}/storedInfoTypes", // "httpMethod": "POST", // "id": "dlp.projects.storedInfoTypes.create", @@ -28980,7 +31633,7 @@ func (c *ProjectsStoredInfoTypesCreateCall) Do(opts ...googleapi.CallOption) (*G // ], // "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 the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/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, @@ -29012,8 +31665,8 @@ type ProjectsStoredInfoTypesDeleteCall struct { } // Delete: Deletes a stored infoType. See -// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn -// more. +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// to learn more. // // - name: Resource name of the organization and storedInfoType to be // deleted, for example @@ -29111,7 +31764,7 @@ func (c *ProjectsStoredInfoTypesDeleteCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Deletes a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + // "description": "Deletes a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", // "httpMethod": "DELETE", // "id": "dlp.projects.storedInfoTypes.delete", @@ -29150,8 +31803,8 @@ type ProjectsStoredInfoTypesGetCall struct { } // Get: Gets a stored infoType. See -// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn -// more. +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// to learn more. // // - name: Resource name of the organization and storedInfoType to be // read, for example @@ -29262,7 +31915,7 @@ func (c *ProjectsStoredInfoTypesGetCall) Do(opts ...googleapi.CallOption) (*Goog } return ret, nil // { - // "description": "Gets a stored infoType. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + // "description": "Gets a stored infoType. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", // "httpMethod": "GET", // "id": "dlp.projects.storedInfoTypes.get", @@ -29301,14 +31954,14 @@ type ProjectsStoredInfoTypesListCall struct { } // List: Lists stored infoTypes. See -// https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn -// more. +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// 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: +// (https://cloud.google.com/sensitive-data-protection/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 @@ -29459,7 +32112,7 @@ func (c *ProjectsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Lists stored infoTypes. See https://cloud.google.com/dlp/docs/creating-stored-infotypes to learn more.", + // "description": "Lists stored infoTypes. See https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", // "flatPath": "v2/projects/{projectsId}/storedInfoTypes", // "httpMethod": "GET", // "id": "dlp.projects.storedInfoTypes.list", @@ -29489,7 +32142,7 @@ func (c *ProjectsStoredInfoTypesListCall) Do(opts ...googleapi.CallOption) (*Goo // "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", + // "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/sensitive-data-protection/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, @@ -29542,8 +32195,8 @@ type ProjectsStoredInfoTypesPatchCall struct { // 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. +// https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes +// to learn more. // // - name: Resource name of organization and storedInfoType to be // updated, for example @@ -29647,7 +32300,7 @@ func (c *ProjectsStoredInfoTypesPatchCall) Do(opts ...googleapi.CallOption) (*Go } 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.", + // "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/sensitive-data-protection/docs/creating-stored-infotypes to learn more.", // "flatPath": "v2/projects/{projectsId}/storedInfoTypes/{storedInfoTypesId}", // "httpMethod": "PATCH", // "id": "dlp.projects.storedInfoTypes.patch", diff --git a/dns/v1/dns-api.json b/dns/v1/dns-api.json index df8fb1d2509..7c8ebc90270 100644 --- a/dns/v1/dns-api.json +++ b/dns/v1/dns-api.json @@ -1824,7 +1824,7 @@ } } }, - "revision": "20240118", + "revision": "20240222", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -2938,6 +2938,11 @@ "format": "int32", "type": "integer" }, + "nameserversPerDelegation": { + "description": "Maximum number of nameservers per delegation, meant to prevent abuse", + "format": "int32", + "type": "integer" + }, "networksPerManagedZone": { "description": "Maximum allowed number of networks to which a privately scoped zone can be attached.", "format": "int32", diff --git a/dns/v1/dns-gen.go b/dns/v1/dns-gen.go index e46c889d77f..a1f80f8d386 100644 --- a/dns/v1/dns-gen.go +++ b/dns/v1/dns-gen.go @@ -2303,6 +2303,10 @@ type Quota struct { // can be attached to a network. ManagedZonesPerNetwork int64 `json:"managedZonesPerNetwork,omitempty"` + // NameserversPerDelegation: Maximum number of nameservers per + // delegation, meant to prevent abuse + NameserversPerDelegation int64 `json:"nameserversPerDelegation,omitempty"` + // NetworksPerManagedZone: Maximum allowed number of networks to which a // privately scoped zone can be attached. NetworksPerManagedZone int64 `json:"networksPerManagedZone,omitempty"` diff --git a/dns/v1beta2/dns-api.json b/dns/v1beta2/dns-api.json index 2f33917df8e..b0d2de58a6c 100644 --- a/dns/v1beta2/dns-api.json +++ b/dns/v1beta2/dns-api.json @@ -1821,7 +1821,7 @@ } } }, - "revision": "20240118", + "revision": "20240222", "rootUrl": "https://dns.googleapis.com/", "schemas": { "Change": { @@ -2935,6 +2935,11 @@ "format": "int32", "type": "integer" }, + "nameserversPerDelegation": { + "description": "Maximum number of nameservers per delegation, meant to prevent abuse", + "format": "int32", + "type": "integer" + }, "networksPerManagedZone": { "description": "Maximum allowed number of networks to which a privately scoped zone can be attached.", "format": "int32", diff --git a/dns/v1beta2/dns-gen.go b/dns/v1beta2/dns-gen.go index fd70899506b..a6009c0a3f2 100644 --- a/dns/v1beta2/dns-gen.go +++ b/dns/v1beta2/dns-gen.go @@ -2303,6 +2303,10 @@ type Quota struct { // can be attached to a network. ManagedZonesPerNetwork int64 `json:"managedZonesPerNetwork,omitempty"` + // NameserversPerDelegation: Maximum number of nameservers per + // delegation, meant to prevent abuse + NameserversPerDelegation int64 `json:"nameserversPerDelegation,omitempty"` + // NetworksPerManagedZone: Maximum allowed number of networks to which a // privately scoped zone can be attached. NetworksPerManagedZone int64 `json:"networksPerManagedZone,omitempty"` diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index 2c5903687b9..5c6418b0be6 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -1672,7 +1672,7 @@ } } }, - "revision": "20240215", + "revision": "20240226", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -2390,25 +2390,6 @@ }, "type": "object" }, - "GoogleFirestoreAdminV1CmekConfig": { - "description": "The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key.", - "id": "GoogleFirestoreAdminV1CmekConfig", - "properties": { - "activeKeyVersion": { - "description": "Output only. Currently in-use [KMS key versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). During [key rotation](https://cloud.google.com/kms/docs/key-rotation), there can be multiple in-use key versions. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "kmsKeyName": { - "description": "Required. Only keys in the same location as this database are allowed to be used for encryption. For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.", - "type": "string" - } - }, - "type": "object" - }, "GoogleFirestoreAdminV1CreateDatabaseMetadata": { "description": "Metadata related to the create database operation.", "id": "GoogleFirestoreAdminV1CreateDatabaseMetadata", @@ -2439,10 +2420,6 @@ ], "type": "string" }, - "cmekConfig": { - "$ref": "GoogleFirestoreAdminV1CmekConfig", - "description": "Optional. Presence indicates CMEK is enabled for this database." - }, "concurrencyMode": { "description": "The concurrency control mode to use for this database.", "enum": [ diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index 701ff2b612b..c77cbd6bb9e 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -1658,53 +1658,6 @@ func (s *GoogleFirestoreAdminV1BackupSchedule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleFirestoreAdminV1CmekConfig: The CMEK (Customer Managed -// Encryption Key) configuration for a Firestore database. If not -// present, the database is secured by the default Google encryption -// key. -type GoogleFirestoreAdminV1CmekConfig struct { - // ActiveKeyVersion: Output only. Currently in-use KMS key versions - // (https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - // During key rotation (https://cloud.google.com/kms/docs/key-rotation), - // there can be multiple in-use key versions. The expected format is - // `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cr - // yptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - ActiveKeyVersion []string `json:"activeKeyVersion,omitempty"` - - // KmsKeyName: Required. Only keys in the same location as this database - // are allowed to be used for encryption. For Firestore's nam5 - // multi-region, this corresponds to Cloud KMS multi-region us. For - // Firestore's eur3 multi-region, this corresponds to Cloud KMS - // multi-region europe. See https://cloud.google.com/kms/docs/locations. - // The expected format is - // `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cr - // yptoKeys/{crypto_key}`. - KmsKeyName string `json:"kmsKeyName,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ActiveKeyVersion") 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. "ActiveKeyVersion") to - // include in API requests with the JSON null value. By default, 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 *GoogleFirestoreAdminV1CmekConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleFirestoreAdminV1CmekConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleFirestoreAdminV1CreateDatabaseMetadata: Metadata related to the // create database operation. type GoogleFirestoreAdminV1CreateDatabaseMetadata struct { @@ -1731,10 +1684,6 @@ type GoogleFirestoreAdminV1Database struct { // created with the Firestore API. AppEngineIntegrationMode string `json:"appEngineIntegrationMode,omitempty"` - // CmekConfig: Optional. Presence indicates CMEK is enabled for this - // database. - CmekConfig *GoogleFirestoreAdminV1CmekConfig `json:"cmekConfig,omitempty"` - // ConcurrencyMode: The concurrency control mode to use for this // database. // diff --git a/logging/v2/logging-api.json b/logging/v2/logging-api.json index 5dc5b737f2d..1b753c1d3cd 100644 --- a/logging/v2/logging-api.json +++ b/logging/v2/logging-api.json @@ -7668,7 +7668,7 @@ } } }, - "revision": "20240207", + "revision": "20240223", "rootUrl": "https://logging.googleapis.com/", "schemas": { "BigQueryDataset": { @@ -7824,7 +7824,8 @@ }, "request": { "$ref": "CopyLogEntriesRequest", - "description": "CopyLogEntries RPC request." + "deprecated": true, + "description": "CopyLogEntries RPC request. This field is deprecated and not used." }, "source": { "description": "Source from which to copy log entries.For example, a log bucket:\"projects/my-project/locations/global/buckets/my-source-bucket\"", @@ -9686,6 +9687,20 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "visibility": { + "description": "Required. The visibility status of this query, which determines its ownership.", + "enum": [ + "VISIBILITY_UNSPECIFIED", + "PRIVATE", + "SHARED" + ], + "enumDescriptions": [ + "The saved query visibility is unspecified. A CreateSavedQuery request with an unspecified visibility will be rejected.", + "The saved query is only visible to the user that created it.", + "The saved query is visible to anyone in the project." + ], + "type": "string" } }, "type": "object" @@ -9694,20 +9709,6 @@ "description": "Describes the settings associated with a project, folder, organization, or billing account.", "id": "Settings", "properties": { - "analyticsMode": { - "description": "Optional. The default analytics mode of an org or folder which is inherited by all newly created child project buckets.", - "enum": [ - "ANALYTICS_MODE_UNSPECIFIED", - "ANALYTICS_ENABLED", - "ANALYTICS_DISABLED" - ], - "enumDescriptions": [ - "No default analytics mode defined at this resource level, it will inherit from the closest ancester which has a defined analytics mode. If there is no specified analytics mode across the resource hierarchy, analytics will be disabled by default.", - "By default, analytics will be enabled for all new project-level buckets unless explicitly specified otherwise at bucket creation time.", - "By default, analytics will be disabled for new project-level buckets unless explicitly specified otherwise at bucket creation time." - ], - "type": "string" - }, "defaultSinkConfig": { "$ref": "DefaultSinkConfig", "description": "Optional. Overrides the built-in configuration for _Default sink." diff --git a/logging/v2/logging-gen.go b/logging/v2/logging-gen.go index ae874279e35..508491a6eae 100644 --- a/logging/v2/logging-gen.go +++ b/logging/v2/logging-gen.go @@ -1184,7 +1184,8 @@ type CopyLogEntriesMetadata struct { // Progress: Estimated progress of the operation (0 - 100%). Progress int64 `json:"progress,omitempty"` - // Request: CopyLogEntries RPC request. + // Request: CopyLogEntries RPC request. This field is deprecated and not + // used. Request *CopyLogEntriesRequest `json:"request,omitempty"` // Source: Source from which to copy log entries.For example, a log @@ -4388,6 +4389,18 @@ type SavedQuery struct { // updated. UpdateTime string `json:"updateTime,omitempty"` + // Visibility: Required. The visibility status of this query, which + // determines its ownership. + // + // Possible values: + // "VISIBILITY_UNSPECIFIED" - The saved query visibility is + // unspecified. A CreateSavedQuery request with an unspecified + // visibility will be rejected. + // "PRIVATE" - The saved query is only visible to the user that + // created it. + // "SHARED" - The saved query is visible to anyone in the project. + Visibility string `json:"visibility,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -4418,22 +4431,6 @@ func (s *SavedQuery) MarshalJSON() ([]byte, error) { // Settings: Describes the settings associated with a project, folder, // organization, or billing account. type Settings struct { - // AnalyticsMode: Optional. The default analytics mode of an org or - // folder which is inherited by all newly created child project buckets. - // - // Possible values: - // "ANALYTICS_MODE_UNSPECIFIED" - No default analytics mode defined at - // this resource level, it will inherit from the closest ancester which - // has a defined analytics mode. If there is no specified analytics mode - // across the resource hierarchy, analytics will be disabled by default. - // "ANALYTICS_ENABLED" - By default, analytics will be enabled for all - // new project-level buckets unless explicitly specified otherwise at - // bucket creation time. - // "ANALYTICS_DISABLED" - By default, analytics will be disabled for - // new project-level buckets unless explicitly specified otherwise at - // bucket creation time. - AnalyticsMode string `json:"analyticsMode,omitempty"` - // DefaultSinkConfig: Optional. Overrides the built-in configuration for // _Default sink. DefaultSinkConfig *DefaultSinkConfig `json:"defaultSinkConfig,omitempty"` @@ -4493,20 +4490,21 @@ type Settings struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AnalyticsMode") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "DefaultSinkConfig") + // 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. "AnalyticsMode") to include - // in API requests with the JSON null value. By default, 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. "DefaultSinkConfig") to + // include in API requests with the JSON null value. By default, 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:"-"` } diff --git a/pubsub/v1/pubsub-api.json b/pubsub/v1/pubsub-api.json index a49ea7f8215..6a761db7370 100644 --- a/pubsub/v1/pubsub-api.json +++ b/pubsub/v1/pubsub-api.json @@ -23,6 +23,16 @@ "description": "Regional Endpoint", "endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.europe-west9.rep.googleapis.com/", + "location": "europe-west9" } ], "icons": { @@ -1573,7 +1583,7 @@ } } }, - "revision": "20240208", + "revision": "20240220", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { @@ -2551,7 +2561,7 @@ "properties": { "ingestionDataSourceSettings": { "$ref": "IngestionDataSourceSettings", - "description": "Optional. Settings for managed ingestion from a data source into this topic." + "description": "Optional. Settings for ingestion from a data source into this topic." }, "kmsKeyName": { "description": "Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", diff --git a/pubsub/v1/pubsub-gen.go b/pubsub/v1/pubsub-gen.go index 5aedaa3f35c..60e74ed59ed 100644 --- a/pubsub/v1/pubsub-gen.go +++ b/pubsub/v1/pubsub-gen.go @@ -2369,8 +2369,8 @@ type TextConfig struct { // Topic: A topic resource. type Topic struct { - // IngestionDataSourceSettings: Optional. Settings for managed ingestion - // from a data source into this topic. + // IngestionDataSourceSettings: Optional. Settings for ingestion from a + // data source into this topic. IngestionDataSourceSettings *IngestionDataSourceSettings `json:"ingestionDataSourceSettings,omitempty"` // KmsKeyName: Optional. The resource name of the Cloud KMS CryptoKey to diff --git a/pubsub/v1beta1a/pubsub-api.json b/pubsub/v1beta1a/pubsub-api.json index c8ad5682bcd..84ff8aa7be3 100644 --- a/pubsub/v1beta1a/pubsub-api.json +++ b/pubsub/v1beta1a/pubsub-api.json @@ -23,6 +23,16 @@ "description": "Regional Endpoint", "endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.europe-west9.rep.googleapis.com/", + "location": "europe-west9" } ], "icons": { @@ -464,7 +474,7 @@ } } }, - "revision": "20230830", + "revision": "20240220", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { diff --git a/pubsub/v1beta2/pubsub-api.json b/pubsub/v1beta2/pubsub-api.json index 22d0f8ff4e2..29086d19823 100644 --- a/pubsub/v1beta2/pubsub-api.json +++ b/pubsub/v1beta2/pubsub-api.json @@ -23,6 +23,16 @@ "description": "Regional Endpoint", "endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://pubsub.europe-west9.rep.googleapis.com/", + "location": "europe-west9" } ], "icons": { @@ -731,7 +741,7 @@ } } }, - "revision": "20240126", + "revision": "20240220", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { diff --git a/runtimeconfig/v1beta1/runtimeconfig-api.json b/runtimeconfig/v1beta1/runtimeconfig-api.json index 011e1e1ef1a..4f317f7ccf6 100644 --- a/runtimeconfig/v1beta1/runtimeconfig-api.json +++ b/runtimeconfig/v1beta1/runtimeconfig-api.json @@ -805,7 +805,7 @@ } } }, - "revision": "20231222", + "revision": "20240227", "rootUrl": "https://runtimeconfig.googleapis.com/", "schemas": { "Binding": { @@ -824,7 +824,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/runtimeconfig/v1beta1/runtimeconfig-gen.go b/runtimeconfig/v1beta1/runtimeconfig-gen.go index bbc9a6ee2ef..e4a74b79a3e 100644 --- a/runtimeconfig/v1beta1/runtimeconfig-gen.go +++ b/runtimeconfig/v1beta1/runtimeconfig-gen.go @@ -301,7 +301,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to