pds-metronome 0.1.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 +9 -0
- data/README.md +164 -0
- data/Rakefile +10 -0
- data/docs/AccessManagementApi.md +300 -0
- data/docs/AccessType.md +15 -0
- data/docs/AgingOffsetUnit.md +15 -0
- data/docs/AgingStrategy.md +15 -0
- data/docs/ApiKeyData.md +28 -0
- data/docs/ApiKeyDataListResponse.md +20 -0
- data/docs/ApiKeyListResponse.md +20 -0
- data/docs/CreateApiKeyRequest.md +22 -0
- data/docs/CreateOrModifyApiKeyResponse.md +22 -0
- data/docs/CreateOrModifyPolicyRequest.md +22 -0
- data/docs/CreateOrModifyPolicyResponse.md +20 -0
- data/docs/DataExpiryApi.md +79 -0
- data/docs/ExpireItemResponse.md +20 -0
- data/docs/ExpireSubItemResponse.md +22 -0
- data/docs/ExpiryResponse.md +22 -0
- data/docs/ExpiryResponsePendingInner.md +79 -0
- data/docs/GetManyApiKeys200Response.md +79 -0
- data/docs/GetManyPolicies200Response.md +79 -0
- data/docs/ItemAccessApi.md +605 -0
- data/docs/ItemExpiry.md +20 -0
- data/docs/ItemMetadataResponse.md +28 -0
- data/docs/ItemOrSubItemAccessLog.md +32 -0
- data/docs/ItemOrSubItemPolicyResponse.md +22 -0
- data/docs/ModifyApiKeyRequest.md +20 -0
- data/docs/Permission.md +15 -0
- data/docs/PermissionDeniedResponse.md +30 -0
- data/docs/PolicyData.md +26 -0
- data/docs/PolicyDataListResponse.md +28 -0
- data/docs/PolicyListResponse.md +28 -0
- data/docs/PolicyManagementApi.md +379 -0
- data/docs/PutApiKeyRequest.md +49 -0
- data/docs/SignupRequest.md +18 -0
- data/docs/SignupResponse.md +24 -0
- data/docs/SubItemMetadataResponse.md +22 -0
- data/docs/SubItemsExpiry.md +22 -0
- data/docs/TelemetryApi.md +80 -0
- data/docs/TelemetryObservation.md +20 -0
- data/docs/TelemetryRequest.md +22 -0
- data/docs/ValidationErrorResponseInner.md +22 -0
- data/docs/ValidationProblem.md +22 -0
- data/lib/metronome/api/access_management_api.rb +285 -0
- data/lib/metronome/api/data_expiry_api.rb +105 -0
- data/lib/metronome/api/item_access_api.rb +549 -0
- data/lib/metronome/api/policy_management_api.rb +348 -0
- data/lib/metronome/api/telemetry_api.rb +84 -0
- data/lib/metronome/api_client.rb +393 -0
- data/lib/metronome/api_error.rb +58 -0
- data/lib/metronome/configuration.rb +312 -0
- data/lib/metronome/models/access_type.rb +41 -0
- data/lib/metronome/models/aging_offset_unit.rb +41 -0
- data/lib/metronome/models/aging_strategy.rb +40 -0
- data/lib/metronome/models/api_key_data.rb +330 -0
- data/lib/metronome/models/api_key_data_list_response.rb +241 -0
- data/lib/metronome/models/api_key_list_response.rb +241 -0
- data/lib/metronome/models/create_api_key_request.rb +239 -0
- data/lib/metronome/models/create_or_modify_api_key_response.rb +255 -0
- data/lib/metronome/models/create_or_modify_policy_request.rb +293 -0
- data/lib/metronome/models/create_or_modify_policy_response.rb +240 -0
- data/lib/metronome/models/expire_item_response.rb +240 -0
- data/lib/metronome/models/expire_sub_item_response.rb +254 -0
- data/lib/metronome/models/expiry_response.rb +299 -0
- data/lib/metronome/models/expiry_response_pending_inner.rb +55 -0
- data/lib/metronome/models/get_many_api_keys200_response.rb +55 -0
- data/lib/metronome/models/get_many_policies200_response.rb +55 -0
- data/lib/metronome/models/item_expiry.rb +239 -0
- data/lib/metronome/models/item_metadata_response.rb +274 -0
- data/lib/metronome/models/item_or_sub_item_access_log.rb +337 -0
- data/lib/metronome/models/item_or_sub_item_policy_response.rb +245 -0
- data/lib/metronome/models/modify_api_key_request.rb +230 -0
- data/lib/metronome/models/permission.rb +45 -0
- data/lib/metronome/models/permission_denied_response.rb +338 -0
- data/lib/metronome/models/policy_data.rb +364 -0
- data/lib/metronome/models/policy_data_list_response.rb +286 -0
- data/lib/metronome/models/policy_list_response.rb +286 -0
- data/lib/metronome/models/put_api_key_request.rb +105 -0
- data/lib/metronome/models/signup_request.rb +225 -0
- data/lib/metronome/models/signup_response.rb +266 -0
- data/lib/metronome/models/sub_item_metadata_response.rb +245 -0
- data/lib/metronome/models/sub_items_expiry.rb +255 -0
- data/lib/metronome/models/telemetry_observation.rb +240 -0
- data/lib/metronome/models/telemetry_request.rb +259 -0
- data/lib/metronome/models/validation_error_response_inner.rb +254 -0
- data/lib/metronome/models/validation_problem.rb +254 -0
- data/lib/metronome/version.rb +15 -0
- data/lib/metronome.rb +80 -0
- data/shell.nix +6 -0
- data/spec/api/access_management_api_spec.rb +82 -0
- data/spec/api/data_expiry_api_spec.rb +46 -0
- data/spec/api/item_access_api_spec.rb +132 -0
- data/spec/api/policy_management_api_spec.rb +94 -0
- data/spec/api/telemetry_api_spec.rb +46 -0
- data/spec/api_client_spec.rb +228 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/access_type_spec.rb +28 -0
- data/spec/models/aging_offset_unit_spec.rb +28 -0
- data/spec/models/aging_strategy_spec.rb +28 -0
- data/spec/models/api_key_data_list_response_spec.rb +40 -0
- data/spec/models/api_key_data_spec.rb +68 -0
- data/spec/models/api_key_list_response_spec.rb +40 -0
- data/spec/models/create_api_key_request_spec.rb +46 -0
- data/spec/models/create_or_modify_api_key_response_spec.rb +46 -0
- data/spec/models/create_or_modify_policy_request_spec.rb +46 -0
- data/spec/models/create_or_modify_policy_response_spec.rb +40 -0
- data/spec/models/expire_item_response_spec.rb +40 -0
- data/spec/models/expire_sub_item_response_spec.rb +46 -0
- data/spec/models/expiry_response_pending_inner_spec.rb +43 -0
- data/spec/models/expiry_response_spec.rb +46 -0
- data/spec/models/get_many_api_keys200_response_spec.rb +43 -0
- data/spec/models/get_many_policies200_response_spec.rb +43 -0
- data/spec/models/item_expiry_spec.rb +40 -0
- data/spec/models/item_metadata_response_spec.rb +64 -0
- data/spec/models/item_or_sub_item_access_log_spec.rb +76 -0
- data/spec/models/item_or_sub_item_policy_response_spec.rb +46 -0
- data/spec/models/modify_api_key_request_spec.rb +40 -0
- data/spec/models/permission_denied_response_spec.rb +82 -0
- data/spec/models/permission_spec.rb +28 -0
- data/spec/models/policy_data_list_response_spec.rb +64 -0
- data/spec/models/policy_data_spec.rb +58 -0
- data/spec/models/policy_list_response_spec.rb +64 -0
- data/spec/models/put_api_key_request_spec.rb +31 -0
- data/spec/models/signup_request_spec.rb +34 -0
- data/spec/models/signup_response_spec.rb +52 -0
- data/spec/models/sub_item_metadata_response_spec.rb +46 -0
- data/spec/models/sub_items_expiry_spec.rb +46 -0
- data/spec/models/telemetry_observation_spec.rb +40 -0
- data/spec/models/telemetry_request_spec.rb +46 -0
- data/spec/models/validation_error_response_inner_spec.rb +46 -0
- data/spec/models/validation_problem_spec.rb +46 -0
- data/spec/spec_helper.rb +111 -0
- metadata +260 -0
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Metronome API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: info@privatedataservices.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 6.4.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Metronome
|
|
16
|
+
class ItemAccessApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Expire an item and its sub-items immediately
|
|
23
|
+
# @param item_id [String] The ID of the item being expired
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [ExpireItemResponse]
|
|
26
|
+
def expire_item(item_id, opts = {})
|
|
27
|
+
data, _status_code, _headers = expire_item_with_http_info(item_id, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Expire an item and its sub-items immediately
|
|
32
|
+
# @param item_id [String] The ID of the item being expired
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(ExpireItemResponse, Integer, Hash)>] ExpireItemResponse data, response status code and response headers
|
|
35
|
+
def expire_item_with_http_info(item_id, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: ItemAccessApi.expire_item ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'item_id' is set
|
|
40
|
+
if @api_client.config.client_side_validation && item_id.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.expire_item"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/v1/metronome/items/{item-id}'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s))
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = opts[:header_params] || {}
|
|
51
|
+
# HTTP header 'Accept' (if needed)
|
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = opts[:form_params] || {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = opts[:debug_body]
|
|
59
|
+
|
|
60
|
+
# return_type
|
|
61
|
+
return_type = opts[:debug_return_type] || 'ExpireItemResponse'
|
|
62
|
+
|
|
63
|
+
# auth_names
|
|
64
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
65
|
+
|
|
66
|
+
new_options = opts.merge(
|
|
67
|
+
:operation => :"ItemAccessApi.expire_item",
|
|
68
|
+
:header_params => header_params,
|
|
69
|
+
:query_params => query_params,
|
|
70
|
+
:form_params => form_params,
|
|
71
|
+
:body => post_body,
|
|
72
|
+
:auth_names => auth_names,
|
|
73
|
+
:return_type => return_type
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
77
|
+
if @api_client.config.debugging
|
|
78
|
+
@api_client.config.logger.debug "API called: ItemAccessApi#expire_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
+
end
|
|
80
|
+
return data, status_code, headers
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Expire a sub-item immediately
|
|
84
|
+
# @param item_id [String] The parent item ID of the sub-item being expired
|
|
85
|
+
# @param sub_item_id [String] The sub-item ID being expired
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [ExpireSubItemResponse]
|
|
88
|
+
def expire_sub_item(item_id, sub_item_id, opts = {})
|
|
89
|
+
data, _status_code, _headers = expire_sub_item_with_http_info(item_id, sub_item_id, opts)
|
|
90
|
+
data
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Expire a sub-item immediately
|
|
94
|
+
# @param item_id [String] The parent item ID of the sub-item being expired
|
|
95
|
+
# @param sub_item_id [String] The sub-item ID being expired
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @return [Array<(ExpireSubItemResponse, Integer, Hash)>] ExpireSubItemResponse data, response status code and response headers
|
|
98
|
+
def expire_sub_item_with_http_info(item_id, sub_item_id, opts = {})
|
|
99
|
+
if @api_client.config.debugging
|
|
100
|
+
@api_client.config.logger.debug 'Calling API: ItemAccessApi.expire_sub_item ...'
|
|
101
|
+
end
|
|
102
|
+
# verify the required parameter 'item_id' is set
|
|
103
|
+
if @api_client.config.client_side_validation && item_id.nil?
|
|
104
|
+
fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.expire_sub_item"
|
|
105
|
+
end
|
|
106
|
+
# verify the required parameter 'sub_item_id' is set
|
|
107
|
+
if @api_client.config.client_side_validation && sub_item_id.nil?
|
|
108
|
+
fail ArgumentError, "Missing the required parameter 'sub_item_id' when calling ItemAccessApi.expire_sub_item"
|
|
109
|
+
end
|
|
110
|
+
# resource path
|
|
111
|
+
local_var_path = '/v1/metronome/items/{item-id}/{sub-item-id}'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s)).sub('{' + 'sub-item-id' + '}', CGI.escape(sub_item_id.to_s))
|
|
112
|
+
|
|
113
|
+
# query parameters
|
|
114
|
+
query_params = opts[:query_params] || {}
|
|
115
|
+
|
|
116
|
+
# header parameters
|
|
117
|
+
header_params = opts[:header_params] || {}
|
|
118
|
+
# HTTP header 'Accept' (if needed)
|
|
119
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
120
|
+
|
|
121
|
+
# form parameters
|
|
122
|
+
form_params = opts[:form_params] || {}
|
|
123
|
+
|
|
124
|
+
# http body (model)
|
|
125
|
+
post_body = opts[:debug_body]
|
|
126
|
+
|
|
127
|
+
# return_type
|
|
128
|
+
return_type = opts[:debug_return_type] || 'ExpireSubItemResponse'
|
|
129
|
+
|
|
130
|
+
# auth_names
|
|
131
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
132
|
+
|
|
133
|
+
new_options = opts.merge(
|
|
134
|
+
:operation => :"ItemAccessApi.expire_sub_item",
|
|
135
|
+
:header_params => header_params,
|
|
136
|
+
:query_params => query_params,
|
|
137
|
+
:form_params => form_params,
|
|
138
|
+
:body => post_body,
|
|
139
|
+
:auth_names => auth_names,
|
|
140
|
+
:return_type => return_type
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
144
|
+
if @api_client.config.debugging
|
|
145
|
+
@api_client.config.logger.debug "API called: ItemAccessApi#expire_sub_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
146
|
+
end
|
|
147
|
+
return data, status_code, headers
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Read a specific item's access log
|
|
151
|
+
# @param item_id [String] The ID of the item to be read
|
|
152
|
+
# @param [Hash] opts the optional parameters
|
|
153
|
+
# @option opts [Boolean] :start_date Mutually exclusive with specifying the specific sub-items to read.
|
|
154
|
+
# @option opts [Boolean] :end_date
|
|
155
|
+
# @return [ItemOrSubItemAccessLog]
|
|
156
|
+
def get_item_log(item_id, opts = {})
|
|
157
|
+
data, _status_code, _headers = get_item_log_with_http_info(item_id, opts)
|
|
158
|
+
data
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Read a specific item's access log
|
|
162
|
+
# @param item_id [String] The ID of the item to be read
|
|
163
|
+
# @param [Hash] opts the optional parameters
|
|
164
|
+
# @option opts [Boolean] :start_date Mutually exclusive with specifying the specific sub-items to read.
|
|
165
|
+
# @option opts [Boolean] :end_date
|
|
166
|
+
# @return [Array<(ItemOrSubItemAccessLog, Integer, Hash)>] ItemOrSubItemAccessLog data, response status code and response headers
|
|
167
|
+
def get_item_log_with_http_info(item_id, opts = {})
|
|
168
|
+
if @api_client.config.debugging
|
|
169
|
+
@api_client.config.logger.debug 'Calling API: ItemAccessApi.get_item_log ...'
|
|
170
|
+
end
|
|
171
|
+
# verify the required parameter 'item_id' is set
|
|
172
|
+
if @api_client.config.client_side_validation && item_id.nil?
|
|
173
|
+
fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.get_item_log"
|
|
174
|
+
end
|
|
175
|
+
# resource path
|
|
176
|
+
local_var_path = '/v1/metronome/items/{item-id}/log'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s))
|
|
177
|
+
|
|
178
|
+
# query parameters
|
|
179
|
+
query_params = opts[:query_params] || {}
|
|
180
|
+
query_params[:'start-date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
|
181
|
+
query_params[:'end-date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
|
182
|
+
|
|
183
|
+
# header parameters
|
|
184
|
+
header_params = opts[:header_params] || {}
|
|
185
|
+
# HTTP header 'Accept' (if needed)
|
|
186
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
187
|
+
|
|
188
|
+
# form parameters
|
|
189
|
+
form_params = opts[:form_params] || {}
|
|
190
|
+
|
|
191
|
+
# http body (model)
|
|
192
|
+
post_body = opts[:debug_body]
|
|
193
|
+
|
|
194
|
+
# return_type
|
|
195
|
+
return_type = opts[:debug_return_type] || 'ItemOrSubItemAccessLog'
|
|
196
|
+
|
|
197
|
+
# auth_names
|
|
198
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
199
|
+
|
|
200
|
+
new_options = opts.merge(
|
|
201
|
+
:operation => :"ItemAccessApi.get_item_log",
|
|
202
|
+
:header_params => header_params,
|
|
203
|
+
:query_params => query_params,
|
|
204
|
+
:form_params => form_params,
|
|
205
|
+
:body => post_body,
|
|
206
|
+
:auth_names => auth_names,
|
|
207
|
+
:return_type => return_type
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
211
|
+
if @api_client.config.debugging
|
|
212
|
+
@api_client.config.logger.debug "API called: ItemAccessApi#get_item_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
213
|
+
end
|
|
214
|
+
return data, status_code, headers
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Read a specific item's metadata with or without any sub-items.
|
|
218
|
+
# @param item_id [String] The ID of the item to be read
|
|
219
|
+
# @param [Hash] opts the optional parameters
|
|
220
|
+
# @option opts [Boolean] :all_sub_items Mutually exclusive with specifying the specific sub-items to read.
|
|
221
|
+
# @option opts [Boolean] :no_item_content
|
|
222
|
+
# @option opts [Array<String>] :sub_item Mutually exclusive with all-sub-items=true. If you only wish to read a few specific sub-items with this item, include each sub-item name in multiple form parameters eg https://url/v1/metronome/items/customer-123?sub-item=email&sub-item=mobile-phone&sub-item=address
|
|
223
|
+
# @return [ItemMetadataResponse]
|
|
224
|
+
def get_item_metadata(item_id, opts = {})
|
|
225
|
+
data, _status_code, _headers = get_item_metadata_with_http_info(item_id, opts)
|
|
226
|
+
data
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Read a specific item's metadata with or without any sub-items.
|
|
230
|
+
# @param item_id [String] The ID of the item to be read
|
|
231
|
+
# @param [Hash] opts the optional parameters
|
|
232
|
+
# @option opts [Boolean] :all_sub_items Mutually exclusive with specifying the specific sub-items to read.
|
|
233
|
+
# @option opts [Boolean] :no_item_content
|
|
234
|
+
# @option opts [Array<String>] :sub_item Mutually exclusive with all-sub-items=true. If you only wish to read a few specific sub-items with this item, include each sub-item name in multiple form parameters eg https://url/v1/metronome/items/customer-123?sub-item=email&sub-item=mobile-phone&sub-item=address
|
|
235
|
+
# @return [Array<(ItemMetadataResponse, Integer, Hash)>] ItemMetadataResponse data, response status code and response headers
|
|
236
|
+
def get_item_metadata_with_http_info(item_id, opts = {})
|
|
237
|
+
if @api_client.config.debugging
|
|
238
|
+
@api_client.config.logger.debug 'Calling API: ItemAccessApi.get_item_metadata ...'
|
|
239
|
+
end
|
|
240
|
+
# verify the required parameter 'item_id' is set
|
|
241
|
+
if @api_client.config.client_side_validation && item_id.nil?
|
|
242
|
+
fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.get_item_metadata"
|
|
243
|
+
end
|
|
244
|
+
# resource path
|
|
245
|
+
local_var_path = '/v1/metronome/items/{item-id}'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s))
|
|
246
|
+
|
|
247
|
+
# query parameters
|
|
248
|
+
query_params = opts[:query_params] || {}
|
|
249
|
+
query_params[:'all-sub-items'] = opts[:'all_sub_items'] if !opts[:'all_sub_items'].nil?
|
|
250
|
+
query_params[:'no-item-content'] = opts[:'no_item_content'] if !opts[:'no_item_content'].nil?
|
|
251
|
+
query_params[:'sub-item'] = @api_client.build_collection_param(opts[:'sub_item'], :multi) if !opts[:'sub_item'].nil?
|
|
252
|
+
|
|
253
|
+
# header parameters
|
|
254
|
+
header_params = opts[:header_params] || {}
|
|
255
|
+
# HTTP header 'Accept' (if needed)
|
|
256
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
257
|
+
|
|
258
|
+
# form parameters
|
|
259
|
+
form_params = opts[:form_params] || {}
|
|
260
|
+
|
|
261
|
+
# http body (model)
|
|
262
|
+
post_body = opts[:debug_body]
|
|
263
|
+
|
|
264
|
+
# return_type
|
|
265
|
+
return_type = opts[:debug_return_type] || 'ItemMetadataResponse'
|
|
266
|
+
|
|
267
|
+
# auth_names
|
|
268
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
269
|
+
|
|
270
|
+
new_options = opts.merge(
|
|
271
|
+
:operation => :"ItemAccessApi.get_item_metadata",
|
|
272
|
+
:header_params => header_params,
|
|
273
|
+
:query_params => query_params,
|
|
274
|
+
:form_params => form_params,
|
|
275
|
+
:body => post_body,
|
|
276
|
+
:auth_names => auth_names,
|
|
277
|
+
:return_type => return_type
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
281
|
+
if @api_client.config.debugging
|
|
282
|
+
@api_client.config.logger.debug "API called: ItemAccessApi#get_item_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
283
|
+
end
|
|
284
|
+
return data, status_code, headers
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Read which policies have been applied to a specific item
|
|
288
|
+
# @param item_id [String] The ID of the item to be read
|
|
289
|
+
# @param [Hash] opts the optional parameters
|
|
290
|
+
# @return [ItemOrSubItemPolicyResponse]
|
|
291
|
+
def get_item_policies(item_id, opts = {})
|
|
292
|
+
data, _status_code, _headers = get_item_policies_with_http_info(item_id, opts)
|
|
293
|
+
data
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Read which policies have been applied to a specific item
|
|
297
|
+
# @param item_id [String] The ID of the item to be read
|
|
298
|
+
# @param [Hash] opts the optional parameters
|
|
299
|
+
# @return [Array<(ItemOrSubItemPolicyResponse, Integer, Hash)>] ItemOrSubItemPolicyResponse data, response status code and response headers
|
|
300
|
+
def get_item_policies_with_http_info(item_id, opts = {})
|
|
301
|
+
if @api_client.config.debugging
|
|
302
|
+
@api_client.config.logger.debug 'Calling API: ItemAccessApi.get_item_policies ...'
|
|
303
|
+
end
|
|
304
|
+
# verify the required parameter 'item_id' is set
|
|
305
|
+
if @api_client.config.client_side_validation && item_id.nil?
|
|
306
|
+
fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.get_item_policies"
|
|
307
|
+
end
|
|
308
|
+
# resource path
|
|
309
|
+
local_var_path = '/v1/metronome/items/{item-id}/policies'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s))
|
|
310
|
+
|
|
311
|
+
# query parameters
|
|
312
|
+
query_params = opts[:query_params] || {}
|
|
313
|
+
|
|
314
|
+
# header parameters
|
|
315
|
+
header_params = opts[:header_params] || {}
|
|
316
|
+
# HTTP header 'Accept' (if needed)
|
|
317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
318
|
+
|
|
319
|
+
# form parameters
|
|
320
|
+
form_params = opts[:form_params] || {}
|
|
321
|
+
|
|
322
|
+
# http body (model)
|
|
323
|
+
post_body = opts[:debug_body]
|
|
324
|
+
|
|
325
|
+
# return_type
|
|
326
|
+
return_type = opts[:debug_return_type] || 'ItemOrSubItemPolicyResponse'
|
|
327
|
+
|
|
328
|
+
# auth_names
|
|
329
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
330
|
+
|
|
331
|
+
new_options = opts.merge(
|
|
332
|
+
:operation => :"ItemAccessApi.get_item_policies",
|
|
333
|
+
:header_params => header_params,
|
|
334
|
+
:query_params => query_params,
|
|
335
|
+
:form_params => form_params,
|
|
336
|
+
:body => post_body,
|
|
337
|
+
:auth_names => auth_names,
|
|
338
|
+
:return_type => return_type
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
342
|
+
if @api_client.config.debugging
|
|
343
|
+
@api_client.config.logger.debug "API called: ItemAccessApi#get_item_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
344
|
+
end
|
|
345
|
+
return data, status_code, headers
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# Read a specific sub-item's access log
|
|
349
|
+
# @param item_id [String] The parent item ID of the sub-item being read
|
|
350
|
+
# @param sub_item_id [String] The sub-item ID to be read
|
|
351
|
+
# @param [Hash] opts the optional parameters
|
|
352
|
+
# @return [ItemOrSubItemAccessLog]
|
|
353
|
+
def get_sub_item_log(item_id, sub_item_id, opts = {})
|
|
354
|
+
data, _status_code, _headers = get_sub_item_log_with_http_info(item_id, sub_item_id, opts)
|
|
355
|
+
data
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Read a specific sub-item's access log
|
|
359
|
+
# @param item_id [String] The parent item ID of the sub-item being read
|
|
360
|
+
# @param sub_item_id [String] The sub-item ID to be read
|
|
361
|
+
# @param [Hash] opts the optional parameters
|
|
362
|
+
# @return [Array<(ItemOrSubItemAccessLog, Integer, Hash)>] ItemOrSubItemAccessLog data, response status code and response headers
|
|
363
|
+
def get_sub_item_log_with_http_info(item_id, sub_item_id, opts = {})
|
|
364
|
+
if @api_client.config.debugging
|
|
365
|
+
@api_client.config.logger.debug 'Calling API: ItemAccessApi.get_sub_item_log ...'
|
|
366
|
+
end
|
|
367
|
+
# verify the required parameter 'item_id' is set
|
|
368
|
+
if @api_client.config.client_side_validation && item_id.nil?
|
|
369
|
+
fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.get_sub_item_log"
|
|
370
|
+
end
|
|
371
|
+
# verify the required parameter 'sub_item_id' is set
|
|
372
|
+
if @api_client.config.client_side_validation && sub_item_id.nil?
|
|
373
|
+
fail ArgumentError, "Missing the required parameter 'sub_item_id' when calling ItemAccessApi.get_sub_item_log"
|
|
374
|
+
end
|
|
375
|
+
# resource path
|
|
376
|
+
local_var_path = '/v1/metronome/items/{item-id}/{sub-item-id}/log'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s)).sub('{' + 'sub-item-id' + '}', CGI.escape(sub_item_id.to_s))
|
|
377
|
+
|
|
378
|
+
# query parameters
|
|
379
|
+
query_params = opts[:query_params] || {}
|
|
380
|
+
|
|
381
|
+
# header parameters
|
|
382
|
+
header_params = opts[:header_params] || {}
|
|
383
|
+
# HTTP header 'Accept' (if needed)
|
|
384
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
385
|
+
|
|
386
|
+
# form parameters
|
|
387
|
+
form_params = opts[:form_params] || {}
|
|
388
|
+
|
|
389
|
+
# http body (model)
|
|
390
|
+
post_body = opts[:debug_body]
|
|
391
|
+
|
|
392
|
+
# return_type
|
|
393
|
+
return_type = opts[:debug_return_type] || 'ItemOrSubItemAccessLog'
|
|
394
|
+
|
|
395
|
+
# auth_names
|
|
396
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
397
|
+
|
|
398
|
+
new_options = opts.merge(
|
|
399
|
+
:operation => :"ItemAccessApi.get_sub_item_log",
|
|
400
|
+
:header_params => header_params,
|
|
401
|
+
:query_params => query_params,
|
|
402
|
+
:form_params => form_params,
|
|
403
|
+
:body => post_body,
|
|
404
|
+
:auth_names => auth_names,
|
|
405
|
+
:return_type => return_type
|
|
406
|
+
)
|
|
407
|
+
|
|
408
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
409
|
+
if @api_client.config.debugging
|
|
410
|
+
@api_client.config.logger.debug "API called: ItemAccessApi#get_sub_item_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
411
|
+
end
|
|
412
|
+
return data, status_code, headers
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
# Read a specific sub-item's metadata
|
|
416
|
+
# @param item_id [String] The parent item ID of the sub-item being read
|
|
417
|
+
# @param sub_item_id [String] The sub-item ID to be read
|
|
418
|
+
# @param [Hash] opts the optional parameters
|
|
419
|
+
# @return [SubItemMetadataResponse]
|
|
420
|
+
def get_sub_item_metadata(item_id, sub_item_id, opts = {})
|
|
421
|
+
data, _status_code, _headers = get_sub_item_metadata_with_http_info(item_id, sub_item_id, opts)
|
|
422
|
+
data
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
# Read a specific sub-item's metadata
|
|
426
|
+
# @param item_id [String] The parent item ID of the sub-item being read
|
|
427
|
+
# @param sub_item_id [String] The sub-item ID to be read
|
|
428
|
+
# @param [Hash] opts the optional parameters
|
|
429
|
+
# @return [Array<(SubItemMetadataResponse, Integer, Hash)>] SubItemMetadataResponse data, response status code and response headers
|
|
430
|
+
def get_sub_item_metadata_with_http_info(item_id, sub_item_id, opts = {})
|
|
431
|
+
if @api_client.config.debugging
|
|
432
|
+
@api_client.config.logger.debug 'Calling API: ItemAccessApi.get_sub_item_metadata ...'
|
|
433
|
+
end
|
|
434
|
+
# verify the required parameter 'item_id' is set
|
|
435
|
+
if @api_client.config.client_side_validation && item_id.nil?
|
|
436
|
+
fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.get_sub_item_metadata"
|
|
437
|
+
end
|
|
438
|
+
# verify the required parameter 'sub_item_id' is set
|
|
439
|
+
if @api_client.config.client_side_validation && sub_item_id.nil?
|
|
440
|
+
fail ArgumentError, "Missing the required parameter 'sub_item_id' when calling ItemAccessApi.get_sub_item_metadata"
|
|
441
|
+
end
|
|
442
|
+
# resource path
|
|
443
|
+
local_var_path = '/v1/metronome/items/{item-id}/{sub-item-id}'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s)).sub('{' + 'sub-item-id' + '}', CGI.escape(sub_item_id.to_s))
|
|
444
|
+
|
|
445
|
+
# query parameters
|
|
446
|
+
query_params = opts[:query_params] || {}
|
|
447
|
+
|
|
448
|
+
# header parameters
|
|
449
|
+
header_params = opts[:header_params] || {}
|
|
450
|
+
# HTTP header 'Accept' (if needed)
|
|
451
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
452
|
+
|
|
453
|
+
# form parameters
|
|
454
|
+
form_params = opts[:form_params] || {}
|
|
455
|
+
|
|
456
|
+
# http body (model)
|
|
457
|
+
post_body = opts[:debug_body]
|
|
458
|
+
|
|
459
|
+
# return_type
|
|
460
|
+
return_type = opts[:debug_return_type] || 'SubItemMetadataResponse'
|
|
461
|
+
|
|
462
|
+
# auth_names
|
|
463
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
464
|
+
|
|
465
|
+
new_options = opts.merge(
|
|
466
|
+
:operation => :"ItemAccessApi.get_sub_item_metadata",
|
|
467
|
+
:header_params => header_params,
|
|
468
|
+
:query_params => query_params,
|
|
469
|
+
:form_params => form_params,
|
|
470
|
+
:body => post_body,
|
|
471
|
+
:auth_names => auth_names,
|
|
472
|
+
:return_type => return_type
|
|
473
|
+
)
|
|
474
|
+
|
|
475
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
476
|
+
if @api_client.config.debugging
|
|
477
|
+
@api_client.config.logger.debug "API called: ItemAccessApi#get_sub_item_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
478
|
+
end
|
|
479
|
+
return data, status_code, headers
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
# Read which policies have been applied to a specific sub-item
|
|
483
|
+
# @param item_id [String] The parent item ID of the sub-item being read
|
|
484
|
+
# @param sub_item_id [String] The sub-item ID to be read
|
|
485
|
+
# @param [Hash] opts the optional parameters
|
|
486
|
+
# @return [ItemOrSubItemPolicyResponse]
|
|
487
|
+
def get_sub_item_policies(item_id, sub_item_id, opts = {})
|
|
488
|
+
data, _status_code, _headers = get_sub_item_policies_with_http_info(item_id, sub_item_id, opts)
|
|
489
|
+
data
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
# Read which policies have been applied to a specific sub-item
|
|
493
|
+
# @param item_id [String] The parent item ID of the sub-item being read
|
|
494
|
+
# @param sub_item_id [String] The sub-item ID to be read
|
|
495
|
+
# @param [Hash] opts the optional parameters
|
|
496
|
+
# @return [Array<(ItemOrSubItemPolicyResponse, Integer, Hash)>] ItemOrSubItemPolicyResponse data, response status code and response headers
|
|
497
|
+
def get_sub_item_policies_with_http_info(item_id, sub_item_id, opts = {})
|
|
498
|
+
if @api_client.config.debugging
|
|
499
|
+
@api_client.config.logger.debug 'Calling API: ItemAccessApi.get_sub_item_policies ...'
|
|
500
|
+
end
|
|
501
|
+
# verify the required parameter 'item_id' is set
|
|
502
|
+
if @api_client.config.client_side_validation && item_id.nil?
|
|
503
|
+
fail ArgumentError, "Missing the required parameter 'item_id' when calling ItemAccessApi.get_sub_item_policies"
|
|
504
|
+
end
|
|
505
|
+
# verify the required parameter 'sub_item_id' is set
|
|
506
|
+
if @api_client.config.client_side_validation && sub_item_id.nil?
|
|
507
|
+
fail ArgumentError, "Missing the required parameter 'sub_item_id' when calling ItemAccessApi.get_sub_item_policies"
|
|
508
|
+
end
|
|
509
|
+
# resource path
|
|
510
|
+
local_var_path = '/v1/metronome/items/{item-id}/{sub-item-id}/policies'.sub('{' + 'item-id' + '}', CGI.escape(item_id.to_s)).sub('{' + 'sub-item-id' + '}', CGI.escape(sub_item_id.to_s))
|
|
511
|
+
|
|
512
|
+
# query parameters
|
|
513
|
+
query_params = opts[:query_params] || {}
|
|
514
|
+
|
|
515
|
+
# header parameters
|
|
516
|
+
header_params = opts[:header_params] || {}
|
|
517
|
+
# HTTP header 'Accept' (if needed)
|
|
518
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
519
|
+
|
|
520
|
+
# form parameters
|
|
521
|
+
form_params = opts[:form_params] || {}
|
|
522
|
+
|
|
523
|
+
# http body (model)
|
|
524
|
+
post_body = opts[:debug_body]
|
|
525
|
+
|
|
526
|
+
# return_type
|
|
527
|
+
return_type = opts[:debug_return_type] || 'ItemOrSubItemPolicyResponse'
|
|
528
|
+
|
|
529
|
+
# auth_names
|
|
530
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
531
|
+
|
|
532
|
+
new_options = opts.merge(
|
|
533
|
+
:operation => :"ItemAccessApi.get_sub_item_policies",
|
|
534
|
+
:header_params => header_params,
|
|
535
|
+
:query_params => query_params,
|
|
536
|
+
:form_params => form_params,
|
|
537
|
+
:body => post_body,
|
|
538
|
+
:auth_names => auth_names,
|
|
539
|
+
:return_type => return_type
|
|
540
|
+
)
|
|
541
|
+
|
|
542
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
543
|
+
if @api_client.config.debugging
|
|
544
|
+
@api_client.config.logger.debug "API called: ItemAccessApi#get_sub_item_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
545
|
+
end
|
|
546
|
+
return data, status_code, headers
|
|
547
|
+
end
|
|
548
|
+
end
|
|
549
|
+
end
|