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,254 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Metronome
|
|
17
|
+
class ValidationProblem
|
|
18
|
+
attr_accessor :location
|
|
19
|
+
|
|
20
|
+
attr_accessor :val
|
|
21
|
+
|
|
22
|
+
attr_accessor :description
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'location' => :'location',
|
|
28
|
+
:'val' => :'val',
|
|
29
|
+
:'description' => :'description'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'location' => :'Array<String>',
|
|
42
|
+
:'val' => :'String',
|
|
43
|
+
:'description' => :'String'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# List of attributes with nullable: true
|
|
48
|
+
def self.openapi_nullable
|
|
49
|
+
Set.new([
|
|
50
|
+
])
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Initializes the object
|
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
|
+
def initialize(attributes = {})
|
|
56
|
+
if (!attributes.is_a?(Hash))
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Metronome::ValidationProblem` initialize method"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Metronome::ValidationProblem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
|
+
end
|
|
65
|
+
h[k.to_sym] = v
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'location')
|
|
69
|
+
if (value = attributes[:'location']).is_a?(Array)
|
|
70
|
+
self.location = value
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'val')
|
|
75
|
+
self.val = attributes[:'val']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'description')
|
|
79
|
+
self.description = attributes[:'description']
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
invalid_properties = Array.new
|
|
87
|
+
if @location.nil?
|
|
88
|
+
invalid_properties.push('invalid value for "location", location cannot be nil.')
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if @val.nil?
|
|
92
|
+
invalid_properties.push('invalid value for "val", val cannot be nil.')
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if @description.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
return false if @location.nil?
|
|
106
|
+
return false if @val.nil?
|
|
107
|
+
return false if @description.nil?
|
|
108
|
+
true
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Checks equality by comparing each attribute.
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def ==(o)
|
|
114
|
+
return true if self.equal?(o)
|
|
115
|
+
self.class == o.class &&
|
|
116
|
+
location == o.location &&
|
|
117
|
+
val == o.val &&
|
|
118
|
+
description == o.description
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# @see the `==` method
|
|
122
|
+
# @param [Object] Object to be compared
|
|
123
|
+
def eql?(o)
|
|
124
|
+
self == o
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Calculates hash code according to all attributes.
|
|
128
|
+
# @return [Integer] Hash code
|
|
129
|
+
def hash
|
|
130
|
+
[location, val, description].hash
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Builds the object from hash
|
|
134
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
135
|
+
# @return [Object] Returns the model itself
|
|
136
|
+
def self.build_from_hash(attributes)
|
|
137
|
+
new.build_from_hash(attributes)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Builds the object from hash
|
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
142
|
+
# @return [Object] Returns the model itself
|
|
143
|
+
def build_from_hash(attributes)
|
|
144
|
+
return nil unless attributes.is_a?(Hash)
|
|
145
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
146
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
147
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
148
|
+
self.send("#{key}=", nil)
|
|
149
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
150
|
+
# check to ensure the input is an array given that the attribute
|
|
151
|
+
# is documented as an array but the input is not
|
|
152
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
153
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
154
|
+
end
|
|
155
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
156
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
self
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Deserializes the data based on type
|
|
164
|
+
# @param string type Data type
|
|
165
|
+
# @param string value Value to be deserialized
|
|
166
|
+
# @return [Object] Deserialized data
|
|
167
|
+
def _deserialize(type, value)
|
|
168
|
+
case type.to_sym
|
|
169
|
+
when :Time
|
|
170
|
+
Time.parse(value)
|
|
171
|
+
when :Date
|
|
172
|
+
Date.parse(value)
|
|
173
|
+
when :String
|
|
174
|
+
value.to_s
|
|
175
|
+
when :Integer
|
|
176
|
+
value.to_i
|
|
177
|
+
when :Float
|
|
178
|
+
value.to_f
|
|
179
|
+
when :Boolean
|
|
180
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
181
|
+
true
|
|
182
|
+
else
|
|
183
|
+
false
|
|
184
|
+
end
|
|
185
|
+
when :Object
|
|
186
|
+
# generic object (usually a Hash), return directly
|
|
187
|
+
value
|
|
188
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
189
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
190
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
191
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
192
|
+
k_type = Regexp.last_match[:k_type]
|
|
193
|
+
v_type = Regexp.last_match[:v_type]
|
|
194
|
+
{}.tap do |hash|
|
|
195
|
+
value.each do |k, v|
|
|
196
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
else # model
|
|
200
|
+
# models (e.g. Pet) or oneOf
|
|
201
|
+
klass = Metronome.const_get(type)
|
|
202
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Returns the string representation of the object
|
|
207
|
+
# @return [String] String presentation of the object
|
|
208
|
+
def to_s
|
|
209
|
+
to_hash.to_s
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
|
214
|
+
def to_body
|
|
215
|
+
to_hash
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Returns the object in the form of hash
|
|
219
|
+
# @return [Hash] Returns the object in the form of hash
|
|
220
|
+
def to_hash
|
|
221
|
+
hash = {}
|
|
222
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
223
|
+
value = self.send(attr)
|
|
224
|
+
if value.nil?
|
|
225
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
226
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
hash[param] = _to_hash(value)
|
|
230
|
+
end
|
|
231
|
+
hash
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Outputs non-array value in the form of hash
|
|
235
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
236
|
+
# @param [Object] value Any valid value
|
|
237
|
+
# @return [Hash] Returns the value in the form of hash
|
|
238
|
+
def _to_hash(value)
|
|
239
|
+
if value.is_a?(Array)
|
|
240
|
+
value.compact.map { |v| _to_hash(v) }
|
|
241
|
+
elsif value.is_a?(Hash)
|
|
242
|
+
{}.tap do |hash|
|
|
243
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
244
|
+
end
|
|
245
|
+
elsif value.respond_to? :to_hash
|
|
246
|
+
value.to_hash
|
|
247
|
+
else
|
|
248
|
+
value
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
module Metronome
|
|
14
|
+
VERSION = '0.1.0'
|
|
15
|
+
end
|
data/lib/metronome.rb
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
# Common files
|
|
14
|
+
require 'metronome/api_client'
|
|
15
|
+
require 'metronome/api_error'
|
|
16
|
+
require 'metronome/version'
|
|
17
|
+
require 'metronome/configuration'
|
|
18
|
+
|
|
19
|
+
# Models
|
|
20
|
+
require 'metronome/models/access_type'
|
|
21
|
+
require 'metronome/models/aging_offset_unit'
|
|
22
|
+
require 'metronome/models/aging_strategy'
|
|
23
|
+
require 'metronome/models/api_key_data'
|
|
24
|
+
require 'metronome/models/api_key_data_list_response'
|
|
25
|
+
require 'metronome/models/api_key_list_response'
|
|
26
|
+
require 'metronome/models/create_api_key_request'
|
|
27
|
+
require 'metronome/models/create_or_modify_api_key_response'
|
|
28
|
+
require 'metronome/models/create_or_modify_policy_request'
|
|
29
|
+
require 'metronome/models/create_or_modify_policy_response'
|
|
30
|
+
require 'metronome/models/expire_item_response'
|
|
31
|
+
require 'metronome/models/expire_sub_item_response'
|
|
32
|
+
require 'metronome/models/expiry_response'
|
|
33
|
+
require 'metronome/models/expiry_response_pending_inner'
|
|
34
|
+
require 'metronome/models/get_many_api_keys200_response'
|
|
35
|
+
require 'metronome/models/get_many_policies200_response'
|
|
36
|
+
require 'metronome/models/item_expiry'
|
|
37
|
+
require 'metronome/models/item_metadata_response'
|
|
38
|
+
require 'metronome/models/item_or_sub_item_access_log'
|
|
39
|
+
require 'metronome/models/item_or_sub_item_policy_response'
|
|
40
|
+
require 'metronome/models/modify_api_key_request'
|
|
41
|
+
require 'metronome/models/permission'
|
|
42
|
+
require 'metronome/models/permission_denied_response'
|
|
43
|
+
require 'metronome/models/policy_data'
|
|
44
|
+
require 'metronome/models/policy_data_list_response'
|
|
45
|
+
require 'metronome/models/policy_list_response'
|
|
46
|
+
require 'metronome/models/put_api_key_request'
|
|
47
|
+
require 'metronome/models/signup_request'
|
|
48
|
+
require 'metronome/models/signup_response'
|
|
49
|
+
require 'metronome/models/sub_item_metadata_response'
|
|
50
|
+
require 'metronome/models/sub_items_expiry'
|
|
51
|
+
require 'metronome/models/telemetry_observation'
|
|
52
|
+
require 'metronome/models/telemetry_request'
|
|
53
|
+
require 'metronome/models/validation_error_response_inner'
|
|
54
|
+
require 'metronome/models/validation_problem'
|
|
55
|
+
|
|
56
|
+
# APIs
|
|
57
|
+
require 'metronome/api/access_management_api'
|
|
58
|
+
require 'metronome/api/data_expiry_api'
|
|
59
|
+
require 'metronome/api/item_access_api'
|
|
60
|
+
require 'metronome/api/policy_management_api'
|
|
61
|
+
require 'metronome/api/telemetry_api'
|
|
62
|
+
|
|
63
|
+
module Metronome
|
|
64
|
+
class << self
|
|
65
|
+
# Customize default settings for the SDK using block.
|
|
66
|
+
# Metronome.configure do |config|
|
|
67
|
+
# config.username = "xxx"
|
|
68
|
+
# config.password = "xxx"
|
|
69
|
+
# end
|
|
70
|
+
# If no block given, return the default Configuration object.
|
|
71
|
+
def configure
|
|
72
|
+
if block_given?
|
|
73
|
+
yield(Configuration.default)
|
|
74
|
+
Configuration.default.check_required_attributes # PDS patch
|
|
75
|
+
else
|
|
76
|
+
Configuration.default
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
data/shell.nix
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for Metronome::AccessManagementApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'AccessManagementApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = Metronome::AccessManagementApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of AccessManagementApi' do
|
|
30
|
+
it 'should create an instance of AccessManagementApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(Metronome::AccessManagementApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for get_api_key
|
|
36
|
+
# Read a specific API key
|
|
37
|
+
# @param api_key
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [ApiKeyData]
|
|
40
|
+
describe 'get_api_key test' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# unit tests for get_many_api_keys
|
|
47
|
+
# Read many API keys alphanumerically sorted
|
|
48
|
+
# @param [Hash] opts the optional parameters
|
|
49
|
+
# @option opts [Integer] :offset The number of keys to drop from the start
|
|
50
|
+
# @option opts [Integer] :limit The number of keys to include
|
|
51
|
+
# @option opts [Boolean] :include_data Whether to include permissions, status, description etc.
|
|
52
|
+
# @return [GetManyApiKeys200Response]
|
|
53
|
+
describe 'get_many_api_keys test' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# unit tests for put_api_key
|
|
60
|
+
# Create or modify an API key
|
|
61
|
+
# @param api_key The API key to be modified or 'create' for a new key
|
|
62
|
+
# @param [Hash] opts the optional parameters
|
|
63
|
+
# @option opts [PutApiKeyRequest] :put_api_key_request
|
|
64
|
+
# @return [CreateOrModifyApiKeyResponse]
|
|
65
|
+
describe 'put_api_key test' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# unit tests for sign_up
|
|
72
|
+
# Open end point for signing up new customers
|
|
73
|
+
# @param [Hash] opts the optional parameters
|
|
74
|
+
# @option opts [SignupRequest] :signup_request
|
|
75
|
+
# @return [SignupResponse]
|
|
76
|
+
describe 'sign_up test' do
|
|
77
|
+
it 'should work' do
|
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for Metronome::DataExpiryApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'DataExpiryApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = Metronome::DataExpiryApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of DataExpiryApi' do
|
|
30
|
+
it 'should create an instance of DataExpiryApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(Metronome::DataExpiryApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for get_expiry_notices
|
|
36
|
+
# Read items and sub-items that will or have already been expired on the given date
|
|
37
|
+
# @param date The date to query
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [ExpiryResponse]
|
|
40
|
+
describe 'get_expiry_notices test' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
@@ -0,0 +1,132 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for Metronome::ItemAccessApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'ItemAccessApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = Metronome::ItemAccessApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of ItemAccessApi' do
|
|
30
|
+
it 'should create an instance of ItemAccessApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(Metronome::ItemAccessApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for expire_item
|
|
36
|
+
# Expire an item and its sub-items immediately
|
|
37
|
+
# @param item_id The ID of the item being expired
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [ExpireItemResponse]
|
|
40
|
+
describe 'expire_item test' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# unit tests for expire_sub_item
|
|
47
|
+
# Expire a sub-item immediately
|
|
48
|
+
# @param item_id The parent item ID of the sub-item being expired
|
|
49
|
+
# @param sub_item_id The sub-item ID being expired
|
|
50
|
+
# @param [Hash] opts the optional parameters
|
|
51
|
+
# @return [ExpireSubItemResponse]
|
|
52
|
+
describe 'expire_sub_item test' do
|
|
53
|
+
it 'should work' do
|
|
54
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# unit tests for get_item_log
|
|
59
|
+
# Read a specific item's access log
|
|
60
|
+
# @param item_id The ID of the item to be read
|
|
61
|
+
# @param [Hash] opts the optional parameters
|
|
62
|
+
# @option opts [Boolean] :start_date Mutually exclusive with specifying the specific sub-items to read.
|
|
63
|
+
# @option opts [Boolean] :end_date
|
|
64
|
+
# @return [ItemOrSubItemAccessLog]
|
|
65
|
+
describe 'get_item_log test' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# unit tests for get_item_metadata
|
|
72
|
+
# Read a specific item's metadata with or without any sub-items.
|
|
73
|
+
# @param item_id The ID of the item to be read
|
|
74
|
+
# @param [Hash] opts the optional parameters
|
|
75
|
+
# @option opts [Boolean] :all_sub_items Mutually exclusive with specifying the specific sub-items to read.
|
|
76
|
+
# @option opts [Boolean] :no_item_content
|
|
77
|
+
# @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
|
|
78
|
+
# @return [ItemMetadataResponse]
|
|
79
|
+
describe 'get_item_metadata test' do
|
|
80
|
+
it 'should work' do
|
|
81
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# unit tests for get_item_policies
|
|
86
|
+
# Read which policies have been applied to a specific item
|
|
87
|
+
# @param item_id The ID of the item to be read
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @return [ItemOrSubItemPolicyResponse]
|
|
90
|
+
describe 'get_item_policies test' do
|
|
91
|
+
it 'should work' do
|
|
92
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# unit tests for get_sub_item_log
|
|
97
|
+
# Read a specific sub-item's access log
|
|
98
|
+
# @param item_id The parent item ID of the sub-item being read
|
|
99
|
+
# @param sub_item_id The sub-item ID to be read
|
|
100
|
+
# @param [Hash] opts the optional parameters
|
|
101
|
+
# @return [ItemOrSubItemAccessLog]
|
|
102
|
+
describe 'get_sub_item_log test' do
|
|
103
|
+
it 'should work' do
|
|
104
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# unit tests for get_sub_item_metadata
|
|
109
|
+
# Read a specific sub-item's metadata
|
|
110
|
+
# @param item_id The parent item ID of the sub-item being read
|
|
111
|
+
# @param sub_item_id The sub-item ID to be read
|
|
112
|
+
# @param [Hash] opts the optional parameters
|
|
113
|
+
# @return [SubItemMetadataResponse]
|
|
114
|
+
describe 'get_sub_item_metadata test' do
|
|
115
|
+
it 'should work' do
|
|
116
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# unit tests for get_sub_item_policies
|
|
121
|
+
# Read which policies have been applied to a specific sub-item
|
|
122
|
+
# @param item_id The parent item ID of the sub-item being read
|
|
123
|
+
# @param sub_item_id The sub-item ID to be read
|
|
124
|
+
# @param [Hash] opts the optional parameters
|
|
125
|
+
# @return [ItemOrSubItemPolicyResponse]
|
|
126
|
+
describe 'get_sub_item_policies test' do
|
|
127
|
+
it 'should work' do
|
|
128
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
end
|