cloudmersive-dlp-api-client 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +124 -0
- data/Rakefile +8 -0
- data/cloudmersive-dlp-api-client.gemspec +45 -0
- data/docs/DetectApi.md +232 -0
- data/docs/DlpAdvancedDetectionRequest.md +43 -0
- data/docs/DlpAdvancedDetectionResponse.md +44 -0
- data/docs/DlpAdvancedDocumentDetectionRequest.md +46 -0
- data/docs/DlpAdvancedDocumentRedactionRequest.md +47 -0
- data/docs/DlpAdvancedDocumentRedactionResponse.md +46 -0
- data/docs/DlpAdvancedRedactionRequest.md +44 -0
- data/docs/DlpAdvancedRedactionResponse.md +44 -0
- data/docs/DlpDetectionRequest.md +31 -0
- data/docs/DlpDetectionResponse.md +31 -0
- data/docs/DlpDocumentDetectionRequest.md +33 -0
- data/docs/DlpDocumentRedactionRequest.md +34 -0
- data/docs/DlpDocumentRedactionResponse.md +33 -0
- data/docs/DlpRedactionRequest.md +32 -0
- data/docs/DlpRedactionResponse.md +32 -0
- data/docs/RedactApi.md +232 -0
- data/docs/RedactedPageInfo.md +8 -0
- data/git_push.sh +55 -0
- data/lib/cloudmersive-dlp-api-client/api/detect_api.rb +223 -0
- data/lib/cloudmersive-dlp-api-client/api/redact_api.rb +223 -0
- data/lib/cloudmersive-dlp-api-client/api_client.rb +391 -0
- data/lib/cloudmersive-dlp-api-client/api_error.rb +38 -0
- data/lib/cloudmersive-dlp-api-client/configuration.rb +209 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_detection_request.rb +536 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_detection_response.rb +546 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_document_detection_request.rb +581 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_document_redaction_request.rb +591 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_document_redaction_response.rb +583 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_redaction_request.rb +546 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_advanced_redaction_response.rb +546 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_detection_request.rb +416 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_detection_response.rb +416 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_document_detection_request.rb +451 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_document_redaction_request.rb +461 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_document_redaction_response.rb +453 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_redaction_request.rb +426 -0
- data/lib/cloudmersive-dlp-api-client/models/dlp_redaction_response.rb +426 -0
- data/lib/cloudmersive-dlp-api-client/models/redacted_page_info.rb +186 -0
- data/lib/cloudmersive-dlp-api-client/version.rb +15 -0
- data/lib/cloudmersive-dlp-api-client.rb +56 -0
- data/spec/api/detect_api_spec.rb +83 -0
- data/spec/api/redact_api_spec.rb +83 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/dlp_advanced_detection_request_spec.rb +251 -0
- data/spec/models/dlp_advanced_detection_response_spec.rb +257 -0
- data/spec/models/dlp_advanced_document_detection_request_spec.rb +269 -0
- data/spec/models/dlp_advanced_document_redaction_request_spec.rb +275 -0
- data/spec/models/dlp_advanced_document_redaction_response_spec.rb +269 -0
- data/spec/models/dlp_advanced_redaction_request_spec.rb +257 -0
- data/spec/models/dlp_advanced_redaction_response_spec.rb +257 -0
- data/spec/models/dlp_detection_request_spec.rb +179 -0
- data/spec/models/dlp_detection_response_spec.rb +179 -0
- data/spec/models/dlp_document_detection_request_spec.rb +191 -0
- data/spec/models/dlp_document_redaction_request_spec.rb +197 -0
- data/spec/models/dlp_document_redaction_response_spec.rb +191 -0
- data/spec/models/dlp_redaction_request_spec.rb +185 -0
- data/spec/models/dlp_redaction_response_spec.rb +185 -0
- data/spec/models/redacted_page_info_spec.rb +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +290 -0
data/git_push.sh
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
4
|
+
#
|
|
5
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
6
|
+
#
|
|
7
|
+
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
|
8
|
+
|
|
9
|
+
git_user_id=$1
|
|
10
|
+
git_repo_id=$2
|
|
11
|
+
release_note=$3
|
|
12
|
+
|
|
13
|
+
if [ "$git_user_id" = "" ]; then
|
|
14
|
+
git_user_id="GIT_USER_ID"
|
|
15
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
if [ "$git_repo_id" = "" ]; then
|
|
19
|
+
git_repo_id="GIT_REPO_ID"
|
|
20
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
if [ "$release_note" = "" ]; then
|
|
24
|
+
release_note="Minor update"
|
|
25
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# Initialize the local directory as a Git repository
|
|
29
|
+
git init
|
|
30
|
+
|
|
31
|
+
# Adds the files in the local repository and stages them for commit.
|
|
32
|
+
git add .
|
|
33
|
+
|
|
34
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
35
|
+
git commit -m "$release_note"
|
|
36
|
+
|
|
37
|
+
# Sets the new remote
|
|
38
|
+
git_remote=`git remote`
|
|
39
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
40
|
+
|
|
41
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
|
42
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
43
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
|
44
|
+
else
|
|
45
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
git pull origin master
|
|
51
|
+
|
|
52
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
53
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
|
54
|
+
git push origin master 2>&1 | grep -v 'To https'
|
|
55
|
+
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#dlpapi
|
|
3
|
+
|
|
4
|
+
#Easily and directly scan and detect sensitive data (PII) in input text.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'uri'
|
|
14
|
+
|
|
15
|
+
module CloudmersiveDlpApiClient
|
|
16
|
+
class DetectApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Detect User Data in Document Image
|
|
23
|
+
# Detects configurable types of user data in a document image (PDF, DOCX, PNG, JPG) using Advanced AI.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [DlpDocumentDetectionRequest] :body Input request
|
|
26
|
+
# @return [DlpDetectionResponse]
|
|
27
|
+
def detect_document(opts = {})
|
|
28
|
+
data, _status_code, _headers = detect_document_with_http_info(opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Detect User Data in Document Image
|
|
33
|
+
# Detects configurable types of user data in a document image (PDF, DOCX, PNG, JPG) using Advanced AI.
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @option opts [DlpDocumentDetectionRequest] :body Input request
|
|
36
|
+
# @return [Array<(DlpDetectionResponse, Fixnum, Hash)>] DlpDetectionResponse data, response status code and response headers
|
|
37
|
+
def detect_document_with_http_info(opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: DetectApi.detect_document ...'
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/dlp/detect/document'
|
|
43
|
+
|
|
44
|
+
# query parameters
|
|
45
|
+
query_params = {}
|
|
46
|
+
|
|
47
|
+
# header parameters
|
|
48
|
+
header_params = {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
|
51
|
+
# HTTP header 'Content-Type'
|
|
52
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
|
59
|
+
auth_names = ['Apikey']
|
|
60
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
61
|
+
:header_params => header_params,
|
|
62
|
+
:query_params => query_params,
|
|
63
|
+
:form_params => form_params,
|
|
64
|
+
:body => post_body,
|
|
65
|
+
:auth_names => auth_names,
|
|
66
|
+
:return_type => 'DlpDetectionResponse')
|
|
67
|
+
if @api_client.config.debugging
|
|
68
|
+
@api_client.config.logger.debug "API called: DetectApi#detect_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
69
|
+
end
|
|
70
|
+
return data, status_code, headers
|
|
71
|
+
end
|
|
72
|
+
# Detect User Data in Document Image (Advanced)
|
|
73
|
+
# Detects 29 configurable types of user data including health-related PHI in a document image (PDF, DOCX, PNG, JPG) using Advanced AI.
|
|
74
|
+
# @param [Hash] opts the optional parameters
|
|
75
|
+
# @option opts [DlpAdvancedDocumentDetectionRequest] :body Input request
|
|
76
|
+
# @return [DlpAdvancedDetectionResponse]
|
|
77
|
+
def detect_document_advanced(opts = {})
|
|
78
|
+
data, _status_code, _headers = detect_document_advanced_with_http_info(opts)
|
|
79
|
+
data
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Detect User Data in Document Image (Advanced)
|
|
83
|
+
# Detects 29 configurable types of user data including health-related PHI in a document image (PDF, DOCX, PNG, JPG) using Advanced AI.
|
|
84
|
+
# @param [Hash] opts the optional parameters
|
|
85
|
+
# @option opts [DlpAdvancedDocumentDetectionRequest] :body Input request
|
|
86
|
+
# @return [Array<(DlpAdvancedDetectionResponse, Fixnum, Hash)>] DlpAdvancedDetectionResponse data, response status code and response headers
|
|
87
|
+
def detect_document_advanced_with_http_info(opts = {})
|
|
88
|
+
if @api_client.config.debugging
|
|
89
|
+
@api_client.config.logger.debug 'Calling API: DetectApi.detect_document_advanced ...'
|
|
90
|
+
end
|
|
91
|
+
# resource path
|
|
92
|
+
local_var_path = '/dlp/detect/document/advanced'
|
|
93
|
+
|
|
94
|
+
# query parameters
|
|
95
|
+
query_params = {}
|
|
96
|
+
|
|
97
|
+
# header parameters
|
|
98
|
+
header_params = {}
|
|
99
|
+
# HTTP header 'Accept' (if needed)
|
|
100
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
|
101
|
+
# HTTP header 'Content-Type'
|
|
102
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
|
|
103
|
+
|
|
104
|
+
# form parameters
|
|
105
|
+
form_params = {}
|
|
106
|
+
|
|
107
|
+
# http body (model)
|
|
108
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
|
109
|
+
auth_names = ['Apikey']
|
|
110
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
111
|
+
:header_params => header_params,
|
|
112
|
+
:query_params => query_params,
|
|
113
|
+
:form_params => form_params,
|
|
114
|
+
:body => post_body,
|
|
115
|
+
:auth_names => auth_names,
|
|
116
|
+
:return_type => 'DlpAdvancedDetectionResponse')
|
|
117
|
+
if @api_client.config.debugging
|
|
118
|
+
@api_client.config.logger.debug "API called: DetectApi#detect_document_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
119
|
+
end
|
|
120
|
+
return data, status_code, headers
|
|
121
|
+
end
|
|
122
|
+
# Detect User Data in Input Text
|
|
123
|
+
# Detects configurable types of user data in an input text string using Advanced AI.
|
|
124
|
+
# @param [Hash] opts the optional parameters
|
|
125
|
+
# @option opts [DlpDetectionRequest] :body Input request
|
|
126
|
+
# @return [DlpDetectionResponse]
|
|
127
|
+
def detect_text(opts = {})
|
|
128
|
+
data, _status_code, _headers = detect_text_with_http_info(opts)
|
|
129
|
+
data
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Detect User Data in Input Text
|
|
133
|
+
# Detects configurable types of user data in an input text string using Advanced AI.
|
|
134
|
+
# @param [Hash] opts the optional parameters
|
|
135
|
+
# @option opts [DlpDetectionRequest] :body Input request
|
|
136
|
+
# @return [Array<(DlpDetectionResponse, Fixnum, Hash)>] DlpDetectionResponse data, response status code and response headers
|
|
137
|
+
def detect_text_with_http_info(opts = {})
|
|
138
|
+
if @api_client.config.debugging
|
|
139
|
+
@api_client.config.logger.debug 'Calling API: DetectApi.detect_text ...'
|
|
140
|
+
end
|
|
141
|
+
# resource path
|
|
142
|
+
local_var_path = '/dlp/detect/text'
|
|
143
|
+
|
|
144
|
+
# query parameters
|
|
145
|
+
query_params = {}
|
|
146
|
+
|
|
147
|
+
# header parameters
|
|
148
|
+
header_params = {}
|
|
149
|
+
# HTTP header 'Accept' (if needed)
|
|
150
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
|
151
|
+
# HTTP header 'Content-Type'
|
|
152
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
|
|
153
|
+
|
|
154
|
+
# form parameters
|
|
155
|
+
form_params = {}
|
|
156
|
+
|
|
157
|
+
# http body (model)
|
|
158
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
|
159
|
+
auth_names = ['Apikey']
|
|
160
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
161
|
+
:header_params => header_params,
|
|
162
|
+
:query_params => query_params,
|
|
163
|
+
:form_params => form_params,
|
|
164
|
+
:body => post_body,
|
|
165
|
+
:auth_names => auth_names,
|
|
166
|
+
:return_type => 'DlpDetectionResponse')
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug "API called: DetectApi#detect_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
169
|
+
end
|
|
170
|
+
return data, status_code, headers
|
|
171
|
+
end
|
|
172
|
+
# Detect User Data in Input Text (Advanced)
|
|
173
|
+
# Detects 29 configurable types of user data including health-related PHI in an input text string using Advanced AI.
|
|
174
|
+
# @param [Hash] opts the optional parameters
|
|
175
|
+
# @option opts [DlpAdvancedDetectionRequest] :body Input request
|
|
176
|
+
# @return [DlpAdvancedDetectionResponse]
|
|
177
|
+
def detect_text_advanced(opts = {})
|
|
178
|
+
data, _status_code, _headers = detect_text_advanced_with_http_info(opts)
|
|
179
|
+
data
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Detect User Data in Input Text (Advanced)
|
|
183
|
+
# Detects 29 configurable types of user data including health-related PHI in an input text string using Advanced AI.
|
|
184
|
+
# @param [Hash] opts the optional parameters
|
|
185
|
+
# @option opts [DlpAdvancedDetectionRequest] :body Input request
|
|
186
|
+
# @return [Array<(DlpAdvancedDetectionResponse, Fixnum, Hash)>] DlpAdvancedDetectionResponse data, response status code and response headers
|
|
187
|
+
def detect_text_advanced_with_http_info(opts = {})
|
|
188
|
+
if @api_client.config.debugging
|
|
189
|
+
@api_client.config.logger.debug 'Calling API: DetectApi.detect_text_advanced ...'
|
|
190
|
+
end
|
|
191
|
+
# resource path
|
|
192
|
+
local_var_path = '/dlp/detect/text/advanced'
|
|
193
|
+
|
|
194
|
+
# query parameters
|
|
195
|
+
query_params = {}
|
|
196
|
+
|
|
197
|
+
# header parameters
|
|
198
|
+
header_params = {}
|
|
199
|
+
# HTTP header 'Accept' (if needed)
|
|
200
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
|
201
|
+
# HTTP header 'Content-Type'
|
|
202
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
|
|
203
|
+
|
|
204
|
+
# form parameters
|
|
205
|
+
form_params = {}
|
|
206
|
+
|
|
207
|
+
# http body (model)
|
|
208
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
|
209
|
+
auth_names = ['Apikey']
|
|
210
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
211
|
+
:header_params => header_params,
|
|
212
|
+
:query_params => query_params,
|
|
213
|
+
:form_params => form_params,
|
|
214
|
+
:body => post_body,
|
|
215
|
+
:auth_names => auth_names,
|
|
216
|
+
:return_type => 'DlpAdvancedDetectionResponse')
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug "API called: DetectApi#detect_text_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
219
|
+
end
|
|
220
|
+
return data, status_code, headers
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
end
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#dlpapi
|
|
3
|
+
|
|
4
|
+
#Easily and directly scan and detect sensitive data (PII) in input text.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.14
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'uri'
|
|
14
|
+
|
|
15
|
+
module CloudmersiveDlpApiClient
|
|
16
|
+
class RedactApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Redact User Data in Document
|
|
23
|
+
# Detects and redacts configurable types of user data in a document (PDF, DOCX, PNG, JPG) using Advanced AI. Rasterizes document pages, detects PII regions using a grid-overlay approach, blurs those regions, and returns a rasterized PDF.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [DlpDocumentRedactionRequest] :body Input request
|
|
26
|
+
# @return [DlpDocumentRedactionResponse]
|
|
27
|
+
def redact_document(opts = {})
|
|
28
|
+
data, _status_code, _headers = redact_document_with_http_info(opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Redact User Data in Document
|
|
33
|
+
# Detects and redacts configurable types of user data in a document (PDF, DOCX, PNG, JPG) using Advanced AI. Rasterizes document pages, detects PII regions using a grid-overlay approach, blurs those regions, and returns a rasterized PDF.
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @option opts [DlpDocumentRedactionRequest] :body Input request
|
|
36
|
+
# @return [Array<(DlpDocumentRedactionResponse, Fixnum, Hash)>] DlpDocumentRedactionResponse data, response status code and response headers
|
|
37
|
+
def redact_document_with_http_info(opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: RedactApi.redact_document ...'
|
|
40
|
+
end
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = '/dlp/redact/document'
|
|
43
|
+
|
|
44
|
+
# query parameters
|
|
45
|
+
query_params = {}
|
|
46
|
+
|
|
47
|
+
# header parameters
|
|
48
|
+
header_params = {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
|
51
|
+
# HTTP header 'Content-Type'
|
|
52
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
|
59
|
+
auth_names = ['Apikey']
|
|
60
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
61
|
+
:header_params => header_params,
|
|
62
|
+
:query_params => query_params,
|
|
63
|
+
:form_params => form_params,
|
|
64
|
+
:body => post_body,
|
|
65
|
+
:auth_names => auth_names,
|
|
66
|
+
:return_type => 'DlpDocumentRedactionResponse')
|
|
67
|
+
if @api_client.config.debugging
|
|
68
|
+
@api_client.config.logger.debug "API called: RedactApi#redact_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
69
|
+
end
|
|
70
|
+
return data, status_code, headers
|
|
71
|
+
end
|
|
72
|
+
# Redact User Data in Document (Advanced)
|
|
73
|
+
# Detects and redacts 35 configurable types of user data including health-related PHI in a document (PDF, DOCX, PNG, JPG) using Advanced AI. Rasterizes document pages, detects PII regions using a row-overlay approach, redacts those regions, and returns a rasterized PDF.
|
|
74
|
+
# @param [Hash] opts the optional parameters
|
|
75
|
+
# @option opts [DlpAdvancedDocumentRedactionRequest] :body Input request
|
|
76
|
+
# @return [DlpAdvancedDocumentRedactionResponse]
|
|
77
|
+
def redact_document_advanced(opts = {})
|
|
78
|
+
data, _status_code, _headers = redact_document_advanced_with_http_info(opts)
|
|
79
|
+
data
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Redact User Data in Document (Advanced)
|
|
83
|
+
# Detects and redacts 35 configurable types of user data including health-related PHI in a document (PDF, DOCX, PNG, JPG) using Advanced AI. Rasterizes document pages, detects PII regions using a row-overlay approach, redacts those regions, and returns a rasterized PDF.
|
|
84
|
+
# @param [Hash] opts the optional parameters
|
|
85
|
+
# @option opts [DlpAdvancedDocumentRedactionRequest] :body Input request
|
|
86
|
+
# @return [Array<(DlpAdvancedDocumentRedactionResponse, Fixnum, Hash)>] DlpAdvancedDocumentRedactionResponse data, response status code and response headers
|
|
87
|
+
def redact_document_advanced_with_http_info(opts = {})
|
|
88
|
+
if @api_client.config.debugging
|
|
89
|
+
@api_client.config.logger.debug 'Calling API: RedactApi.redact_document_advanced ...'
|
|
90
|
+
end
|
|
91
|
+
# resource path
|
|
92
|
+
local_var_path = '/dlp/redact/document/advanced'
|
|
93
|
+
|
|
94
|
+
# query parameters
|
|
95
|
+
query_params = {}
|
|
96
|
+
|
|
97
|
+
# header parameters
|
|
98
|
+
header_params = {}
|
|
99
|
+
# HTTP header 'Accept' (if needed)
|
|
100
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
|
101
|
+
# HTTP header 'Content-Type'
|
|
102
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
|
|
103
|
+
|
|
104
|
+
# form parameters
|
|
105
|
+
form_params = {}
|
|
106
|
+
|
|
107
|
+
# http body (model)
|
|
108
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
|
109
|
+
auth_names = ['Apikey']
|
|
110
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
111
|
+
:header_params => header_params,
|
|
112
|
+
:query_params => query_params,
|
|
113
|
+
:form_params => form_params,
|
|
114
|
+
:body => post_body,
|
|
115
|
+
:auth_names => auth_names,
|
|
116
|
+
:return_type => 'DlpAdvancedDocumentRedactionResponse')
|
|
117
|
+
if @api_client.config.debugging
|
|
118
|
+
@api_client.config.logger.debug "API called: RedactApi#redact_document_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
119
|
+
end
|
|
120
|
+
return data, status_code, headers
|
|
121
|
+
end
|
|
122
|
+
# Redact User Data in Input Text
|
|
123
|
+
# Detects and redacts configurable types of user data in an input text string using Advanced AI. First detects PII, then redacts disallowed types by either deleting them or replacing them with asterisks.
|
|
124
|
+
# @param [Hash] opts the optional parameters
|
|
125
|
+
# @option opts [DlpRedactionRequest] :body Input request
|
|
126
|
+
# @return [DlpRedactionResponse]
|
|
127
|
+
def redact_text(opts = {})
|
|
128
|
+
data, _status_code, _headers = redact_text_with_http_info(opts)
|
|
129
|
+
data
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Redact User Data in Input Text
|
|
133
|
+
# Detects and redacts configurable types of user data in an input text string using Advanced AI. First detects PII, then redacts disallowed types by either deleting them or replacing them with asterisks.
|
|
134
|
+
# @param [Hash] opts the optional parameters
|
|
135
|
+
# @option opts [DlpRedactionRequest] :body Input request
|
|
136
|
+
# @return [Array<(DlpRedactionResponse, Fixnum, Hash)>] DlpRedactionResponse data, response status code and response headers
|
|
137
|
+
def redact_text_with_http_info(opts = {})
|
|
138
|
+
if @api_client.config.debugging
|
|
139
|
+
@api_client.config.logger.debug 'Calling API: RedactApi.redact_text ...'
|
|
140
|
+
end
|
|
141
|
+
# resource path
|
|
142
|
+
local_var_path = '/dlp/redact/text'
|
|
143
|
+
|
|
144
|
+
# query parameters
|
|
145
|
+
query_params = {}
|
|
146
|
+
|
|
147
|
+
# header parameters
|
|
148
|
+
header_params = {}
|
|
149
|
+
# HTTP header 'Accept' (if needed)
|
|
150
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
|
151
|
+
# HTTP header 'Content-Type'
|
|
152
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
|
|
153
|
+
|
|
154
|
+
# form parameters
|
|
155
|
+
form_params = {}
|
|
156
|
+
|
|
157
|
+
# http body (model)
|
|
158
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
|
159
|
+
auth_names = ['Apikey']
|
|
160
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
161
|
+
:header_params => header_params,
|
|
162
|
+
:query_params => query_params,
|
|
163
|
+
:form_params => form_params,
|
|
164
|
+
:body => post_body,
|
|
165
|
+
:auth_names => auth_names,
|
|
166
|
+
:return_type => 'DlpRedactionResponse')
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug "API called: RedactApi#redact_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
169
|
+
end
|
|
170
|
+
return data, status_code, headers
|
|
171
|
+
end
|
|
172
|
+
# Redact User Data in Input Text (Advanced)
|
|
173
|
+
# Detects and redacts 34 configurable types of user data including health-related PHI in an input text string using Advanced AI. First detects PII, then redacts disallowed types by either deleting them or replacing them with asterisks.
|
|
174
|
+
# @param [Hash] opts the optional parameters
|
|
175
|
+
# @option opts [DlpAdvancedRedactionRequest] :body Input request
|
|
176
|
+
# @return [DlpAdvancedRedactionResponse]
|
|
177
|
+
def redact_text_advanced(opts = {})
|
|
178
|
+
data, _status_code, _headers = redact_text_advanced_with_http_info(opts)
|
|
179
|
+
data
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Redact User Data in Input Text (Advanced)
|
|
183
|
+
# Detects and redacts 34 configurable types of user data including health-related PHI in an input text string using Advanced AI. First detects PII, then redacts disallowed types by either deleting them or replacing them with asterisks.
|
|
184
|
+
# @param [Hash] opts the optional parameters
|
|
185
|
+
# @option opts [DlpAdvancedRedactionRequest] :body Input request
|
|
186
|
+
# @return [Array<(DlpAdvancedRedactionResponse, Fixnum, Hash)>] DlpAdvancedRedactionResponse data, response status code and response headers
|
|
187
|
+
def redact_text_advanced_with_http_info(opts = {})
|
|
188
|
+
if @api_client.config.debugging
|
|
189
|
+
@api_client.config.logger.debug 'Calling API: RedactApi.redact_text_advanced ...'
|
|
190
|
+
end
|
|
191
|
+
# resource path
|
|
192
|
+
local_var_path = '/dlp/redact/text/advanced'
|
|
193
|
+
|
|
194
|
+
# query parameters
|
|
195
|
+
query_params = {}
|
|
196
|
+
|
|
197
|
+
# header parameters
|
|
198
|
+
header_params = {}
|
|
199
|
+
# HTTP header 'Accept' (if needed)
|
|
200
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
|
|
201
|
+
# HTTP header 'Content-Type'
|
|
202
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
|
|
203
|
+
|
|
204
|
+
# form parameters
|
|
205
|
+
form_params = {}
|
|
206
|
+
|
|
207
|
+
# http body (model)
|
|
208
|
+
post_body = @api_client.object_to_http_body(opts[:'body'])
|
|
209
|
+
auth_names = ['Apikey']
|
|
210
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
211
|
+
:header_params => header_params,
|
|
212
|
+
:query_params => query_params,
|
|
213
|
+
:form_params => form_params,
|
|
214
|
+
:body => post_body,
|
|
215
|
+
:auth_names => auth_names,
|
|
216
|
+
:return_type => 'DlpAdvancedRedactionResponse')
|
|
217
|
+
if @api_client.config.debugging
|
|
218
|
+
@api_client.config.logger.debug "API called: RedactApi#redact_text_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
219
|
+
end
|
|
220
|
+
return data, status_code, headers
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
end
|