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,348 @@
|
|
|
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 PolicyManagementApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Read many policies alphanumerically sorted
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @option opts [String] :prefix
|
|
25
|
+
# @option opts [Integer] :offset The number of policies to drop from the start
|
|
26
|
+
# @option opts [Integer] :limit The number of policies to include
|
|
27
|
+
# @option opts [Boolean] :include_data Whether to include aging-strategy, aging-offset-amount, aging-offset-unit etc.
|
|
28
|
+
# @return [GetManyPolicies200Response]
|
|
29
|
+
def get_many_policies(opts = {})
|
|
30
|
+
data, _status_code, _headers = get_many_policies_with_http_info(opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Read many policies alphanumerically sorted
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @option opts [String] :prefix
|
|
37
|
+
# @option opts [Integer] :offset The number of policies to drop from the start
|
|
38
|
+
# @option opts [Integer] :limit The number of policies to include
|
|
39
|
+
# @option opts [Boolean] :include_data Whether to include aging-strategy, aging-offset-amount, aging-offset-unit etc.
|
|
40
|
+
# @return [Array<(GetManyPolicies200Response, Integer, Hash)>] GetManyPolicies200Response data, response status code and response headers
|
|
41
|
+
def get_many_policies_with_http_info(opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: PolicyManagementApi.get_many_policies ...'
|
|
44
|
+
end
|
|
45
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 1
|
|
46
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling PolicyManagementApi.get_many_policies, must be greater than or equal to 1.'
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
50
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PolicyManagementApi.get_many_policies, must be greater than or equal to 1.'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# resource path
|
|
54
|
+
local_var_path = '/v1/metronome/policies'
|
|
55
|
+
|
|
56
|
+
# query parameters
|
|
57
|
+
query_params = opts[:query_params] || {}
|
|
58
|
+
query_params[:'prefix'] = opts[:'prefix'] if !opts[:'prefix'].nil?
|
|
59
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
60
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
61
|
+
query_params[:'include-data'] = opts[:'include_data'] if !opts[:'include_data'].nil?
|
|
62
|
+
|
|
63
|
+
# header parameters
|
|
64
|
+
header_params = opts[:header_params] || {}
|
|
65
|
+
# HTTP header 'Accept' (if needed)
|
|
66
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
67
|
+
|
|
68
|
+
# form parameters
|
|
69
|
+
form_params = opts[:form_params] || {}
|
|
70
|
+
|
|
71
|
+
# http body (model)
|
|
72
|
+
post_body = opts[:debug_body]
|
|
73
|
+
|
|
74
|
+
# return_type
|
|
75
|
+
return_type = opts[:debug_return_type] || 'GetManyPolicies200Response'
|
|
76
|
+
|
|
77
|
+
# auth_names
|
|
78
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
79
|
+
|
|
80
|
+
new_options = opts.merge(
|
|
81
|
+
:operation => :"PolicyManagementApi.get_many_policies",
|
|
82
|
+
:header_params => header_params,
|
|
83
|
+
:query_params => query_params,
|
|
84
|
+
:form_params => form_params,
|
|
85
|
+
:body => post_body,
|
|
86
|
+
:auth_names => auth_names,
|
|
87
|
+
:return_type => return_type
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
91
|
+
if @api_client.config.debugging
|
|
92
|
+
@api_client.config.logger.debug "API called: PolicyManagementApi#get_many_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
93
|
+
end
|
|
94
|
+
return data, status_code, headers
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Read a specific policy
|
|
98
|
+
# @param policy_id [String]
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @return [PolicyData]
|
|
101
|
+
def get_policy(policy_id, opts = {})
|
|
102
|
+
data, _status_code, _headers = get_policy_with_http_info(policy_id, opts)
|
|
103
|
+
data
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Read a specific policy
|
|
107
|
+
# @param policy_id [String]
|
|
108
|
+
# @param [Hash] opts the optional parameters
|
|
109
|
+
# @return [Array<(PolicyData, Integer, Hash)>] PolicyData data, response status code and response headers
|
|
110
|
+
def get_policy_with_http_info(policy_id, opts = {})
|
|
111
|
+
if @api_client.config.debugging
|
|
112
|
+
@api_client.config.logger.debug 'Calling API: PolicyManagementApi.get_policy ...'
|
|
113
|
+
end
|
|
114
|
+
# verify the required parameter 'policy_id' is set
|
|
115
|
+
if @api_client.config.client_side_validation && policy_id.nil?
|
|
116
|
+
fail ArgumentError, "Missing the required parameter 'policy_id' when calling PolicyManagementApi.get_policy"
|
|
117
|
+
end
|
|
118
|
+
# resource path
|
|
119
|
+
local_var_path = '/v1/metronome/policies/{policy-id}'.sub('{' + 'policy-id' + '}', CGI.escape(policy_id.to_s))
|
|
120
|
+
|
|
121
|
+
# query parameters
|
|
122
|
+
query_params = opts[:query_params] || {}
|
|
123
|
+
|
|
124
|
+
# header parameters
|
|
125
|
+
header_params = opts[:header_params] || {}
|
|
126
|
+
# HTTP header 'Accept' (if needed)
|
|
127
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
128
|
+
|
|
129
|
+
# form parameters
|
|
130
|
+
form_params = opts[:form_params] || {}
|
|
131
|
+
|
|
132
|
+
# http body (model)
|
|
133
|
+
post_body = opts[:debug_body]
|
|
134
|
+
|
|
135
|
+
# return_type
|
|
136
|
+
return_type = opts[:debug_return_type] || 'PolicyData'
|
|
137
|
+
|
|
138
|
+
# auth_names
|
|
139
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
140
|
+
|
|
141
|
+
new_options = opts.merge(
|
|
142
|
+
:operation => :"PolicyManagementApi.get_policy",
|
|
143
|
+
:header_params => header_params,
|
|
144
|
+
:query_params => query_params,
|
|
145
|
+
:form_params => form_params,
|
|
146
|
+
:body => post_body,
|
|
147
|
+
:auth_names => auth_names,
|
|
148
|
+
:return_type => return_type
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug "API called: PolicyManagementApi#get_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Read a specific policy's access log
|
|
159
|
+
# @param policy_id [String]
|
|
160
|
+
# @param [Hash] opts the optional parameters
|
|
161
|
+
# @return [PolicyData]
|
|
162
|
+
def get_policy_log(policy_id, opts = {})
|
|
163
|
+
data, _status_code, _headers = get_policy_log_with_http_info(policy_id, opts)
|
|
164
|
+
data
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Read a specific policy's access log
|
|
168
|
+
# @param policy_id [String]
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @return [Array<(PolicyData, Integer, Hash)>] PolicyData data, response status code and response headers
|
|
171
|
+
def get_policy_log_with_http_info(policy_id, opts = {})
|
|
172
|
+
if @api_client.config.debugging
|
|
173
|
+
@api_client.config.logger.debug 'Calling API: PolicyManagementApi.get_policy_log ...'
|
|
174
|
+
end
|
|
175
|
+
# verify the required parameter 'policy_id' is set
|
|
176
|
+
if @api_client.config.client_side_validation && policy_id.nil?
|
|
177
|
+
fail ArgumentError, "Missing the required parameter 'policy_id' when calling PolicyManagementApi.get_policy_log"
|
|
178
|
+
end
|
|
179
|
+
# resource path
|
|
180
|
+
local_var_path = '/v1/metronome/policies/{policy-id}/log'.sub('{' + 'policy-id' + '}', CGI.escape(policy_id.to_s))
|
|
181
|
+
|
|
182
|
+
# query parameters
|
|
183
|
+
query_params = opts[:query_params] || {}
|
|
184
|
+
|
|
185
|
+
# header parameters
|
|
186
|
+
header_params = opts[:header_params] || {}
|
|
187
|
+
# HTTP header 'Accept' (if needed)
|
|
188
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
189
|
+
|
|
190
|
+
# form parameters
|
|
191
|
+
form_params = opts[:form_params] || {}
|
|
192
|
+
|
|
193
|
+
# http body (model)
|
|
194
|
+
post_body = opts[:debug_body]
|
|
195
|
+
|
|
196
|
+
# return_type
|
|
197
|
+
return_type = opts[:debug_return_type] || 'PolicyData'
|
|
198
|
+
|
|
199
|
+
# auth_names
|
|
200
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
201
|
+
|
|
202
|
+
new_options = opts.merge(
|
|
203
|
+
:operation => :"PolicyManagementApi.get_policy_log",
|
|
204
|
+
:header_params => header_params,
|
|
205
|
+
:query_params => query_params,
|
|
206
|
+
:form_params => form_params,
|
|
207
|
+
:body => post_body,
|
|
208
|
+
:auth_names => auth_names,
|
|
209
|
+
:return_type => return_type
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
213
|
+
if @api_client.config.debugging
|
|
214
|
+
@api_client.config.logger.debug "API called: PolicyManagementApi#get_policy_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
215
|
+
end
|
|
216
|
+
return data, status_code, headers
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Read the items and sub-items that have been used for a specific policy
|
|
220
|
+
# @param policy_id [String]
|
|
221
|
+
# @param [Hash] opts the optional parameters
|
|
222
|
+
# @return [PolicyData]
|
|
223
|
+
def get_policy_members(policy_id, opts = {})
|
|
224
|
+
data, _status_code, _headers = get_policy_members_with_http_info(policy_id, opts)
|
|
225
|
+
data
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Read the items and sub-items that have been used for a specific policy
|
|
229
|
+
# @param policy_id [String]
|
|
230
|
+
# @param [Hash] opts the optional parameters
|
|
231
|
+
# @return [Array<(PolicyData, Integer, Hash)>] PolicyData data, response status code and response headers
|
|
232
|
+
def get_policy_members_with_http_info(policy_id, opts = {})
|
|
233
|
+
if @api_client.config.debugging
|
|
234
|
+
@api_client.config.logger.debug 'Calling API: PolicyManagementApi.get_policy_members ...'
|
|
235
|
+
end
|
|
236
|
+
# verify the required parameter 'policy_id' is set
|
|
237
|
+
if @api_client.config.client_side_validation && policy_id.nil?
|
|
238
|
+
fail ArgumentError, "Missing the required parameter 'policy_id' when calling PolicyManagementApi.get_policy_members"
|
|
239
|
+
end
|
|
240
|
+
# resource path
|
|
241
|
+
local_var_path = '/v1/metronome/policies/{policy-id}/members'.sub('{' + 'policy-id' + '}', CGI.escape(policy_id.to_s))
|
|
242
|
+
|
|
243
|
+
# query parameters
|
|
244
|
+
query_params = opts[:query_params] || {}
|
|
245
|
+
|
|
246
|
+
# header parameters
|
|
247
|
+
header_params = opts[:header_params] || {}
|
|
248
|
+
# HTTP header 'Accept' (if needed)
|
|
249
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
250
|
+
|
|
251
|
+
# form parameters
|
|
252
|
+
form_params = opts[:form_params] || {}
|
|
253
|
+
|
|
254
|
+
# http body (model)
|
|
255
|
+
post_body = opts[:debug_body]
|
|
256
|
+
|
|
257
|
+
# return_type
|
|
258
|
+
return_type = opts[:debug_return_type] || 'PolicyData'
|
|
259
|
+
|
|
260
|
+
# auth_names
|
|
261
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
262
|
+
|
|
263
|
+
new_options = opts.merge(
|
|
264
|
+
:operation => :"PolicyManagementApi.get_policy_members",
|
|
265
|
+
:header_params => header_params,
|
|
266
|
+
:query_params => query_params,
|
|
267
|
+
:form_params => form_params,
|
|
268
|
+
:body => post_body,
|
|
269
|
+
:auth_names => auth_names,
|
|
270
|
+
:return_type => return_type
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
274
|
+
if @api_client.config.debugging
|
|
275
|
+
@api_client.config.logger.debug "API called: PolicyManagementApi#get_policy_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
276
|
+
end
|
|
277
|
+
return data, status_code, headers
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Create or modify a policy
|
|
281
|
+
# @param policy_id [String] The name of the policy to be created
|
|
282
|
+
# @param [Hash] opts the optional parameters
|
|
283
|
+
# @option opts [CreateOrModifyPolicyRequest] :create_or_modify_policy_request
|
|
284
|
+
# @return [CreateOrModifyPolicyResponse]
|
|
285
|
+
def put_policy(policy_id, opts = {})
|
|
286
|
+
data, _status_code, _headers = put_policy_with_http_info(policy_id, opts)
|
|
287
|
+
data
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Create or modify a policy
|
|
291
|
+
# @param policy_id [String] The name of the policy to be created
|
|
292
|
+
# @param [Hash] opts the optional parameters
|
|
293
|
+
# @option opts [CreateOrModifyPolicyRequest] :create_or_modify_policy_request
|
|
294
|
+
# @return [Array<(CreateOrModifyPolicyResponse, Integer, Hash)>] CreateOrModifyPolicyResponse data, response status code and response headers
|
|
295
|
+
def put_policy_with_http_info(policy_id, opts = {})
|
|
296
|
+
if @api_client.config.debugging
|
|
297
|
+
@api_client.config.logger.debug 'Calling API: PolicyManagementApi.put_policy ...'
|
|
298
|
+
end
|
|
299
|
+
# verify the required parameter 'policy_id' is set
|
|
300
|
+
if @api_client.config.client_side_validation && policy_id.nil?
|
|
301
|
+
fail ArgumentError, "Missing the required parameter 'policy_id' when calling PolicyManagementApi.put_policy"
|
|
302
|
+
end
|
|
303
|
+
# resource path
|
|
304
|
+
local_var_path = '/v1/metronome/policies/{policy-id}'.sub('{' + 'policy-id' + '}', CGI.escape(policy_id.to_s))
|
|
305
|
+
|
|
306
|
+
# query parameters
|
|
307
|
+
query_params = opts[:query_params] || {}
|
|
308
|
+
|
|
309
|
+
# header parameters
|
|
310
|
+
header_params = opts[:header_params] || {}
|
|
311
|
+
# HTTP header 'Accept' (if needed)
|
|
312
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
313
|
+
# HTTP header 'Content-Type'
|
|
314
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
315
|
+
if !content_type.nil?
|
|
316
|
+
header_params['Content-Type'] = content_type
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# form parameters
|
|
320
|
+
form_params = opts[:form_params] || {}
|
|
321
|
+
|
|
322
|
+
# http body (model)
|
|
323
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_or_modify_policy_request'])
|
|
324
|
+
|
|
325
|
+
# return_type
|
|
326
|
+
return_type = opts[:debug_return_type] || 'CreateOrModifyPolicyResponse'
|
|
327
|
+
|
|
328
|
+
# auth_names
|
|
329
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
330
|
+
|
|
331
|
+
new_options = opts.merge(
|
|
332
|
+
:operation => :"PolicyManagementApi.put_policy",
|
|
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(:PUT, local_var_path, new_options)
|
|
342
|
+
if @api_client.config.debugging
|
|
343
|
+
@api_client.config.logger.debug "API called: PolicyManagementApi#put_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
344
|
+
end
|
|
345
|
+
return data, status_code, headers
|
|
346
|
+
end
|
|
347
|
+
end
|
|
348
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
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 TelemetryApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Read items and sub-items that will or have already been expired on the given date
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @option opts [TelemetryRequest] :telemetry_request
|
|
25
|
+
# @return [nil]
|
|
26
|
+
def post_telemetry(opts = {})
|
|
27
|
+
post_telemetry_with_http_info(opts)
|
|
28
|
+
nil
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Read items and sub-items that will or have already been expired on the given date
|
|
32
|
+
# @param [Hash] opts the optional parameters
|
|
33
|
+
# @option opts [TelemetryRequest] :telemetry_request
|
|
34
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
35
|
+
def post_telemetry_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: TelemetryApi.post_telemetry ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/v1/metronome/telemetry'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
# HTTP header 'Accept' (if needed)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
49
|
+
# HTTP header 'Content-Type'
|
|
50
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
51
|
+
if !content_type.nil?
|
|
52
|
+
header_params['Content-Type'] = content_type
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# form parameters
|
|
56
|
+
form_params = opts[:form_params] || {}
|
|
57
|
+
|
|
58
|
+
# http body (model)
|
|
59
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'telemetry_request'])
|
|
60
|
+
|
|
61
|
+
# return_type
|
|
62
|
+
return_type = opts[:debug_return_type]
|
|
63
|
+
|
|
64
|
+
# auth_names
|
|
65
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
66
|
+
|
|
67
|
+
new_options = opts.merge(
|
|
68
|
+
:operation => :"TelemetryApi.post_telemetry",
|
|
69
|
+
:header_params => header_params,
|
|
70
|
+
:query_params => query_params,
|
|
71
|
+
:form_params => form_params,
|
|
72
|
+
:body => post_body,
|
|
73
|
+
:auth_names => auth_names,
|
|
74
|
+
:return_type => return_type
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
78
|
+
if @api_client.config.debugging
|
|
79
|
+
@api_client.config.logger.debug "API called: TelemetryApi#post_telemetry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
80
|
+
end
|
|
81
|
+
return data, status_code, headers
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|