/
locations.clj
35 lines (31 loc) · 1.2 KB
/
locations.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(ns happygapi.dlp.locations
"Cloud Data Loss Prevention (DLP) API: locations.
Provides methods for detection, risk analysis, and de-identification of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories.
See: https://cloud.google.com/dlp/docs/api/reference/rest/v2/locations"
(:require [cheshire.core :as json]
[clj-http.client :as http]
[happy.util :as util]))
(defn infoTypes-list$
"https://cloud.google.com/dlp/docs/api/reference/rest/v2/locations/infoTypes/list
Required parameters: locationId
Optional parameters: languageCode, filter
Returns a list of the sensitive information types that the DLP API
supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
learn more."
{:scopes ["https://www.googleapis.com/auth/cloud-platform"]}
[auth parameters]
{:pre [(util/has-keys? parameters #{:locationId})]}
(util/get-response
(http/get
(util/get-url
"https://dlp.googleapis.com/"
"v2/locations/{locationId}/infoTypes"
#{:locationId}
parameters)
(merge-with
merge
{:throw-exceptions false,
:query-params parameters,
:accept :json,
:as :json}
auth))))