keynetra-client 0.1.1
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 +49 -0
- data/Rakefile +10 -0
- data/docs/ACLCreate.md +28 -0
- data/docs/ACLOut.md +34 -0
- data/docs/AccessApi.md +234 -0
- data/docs/AccessDecisionResponse.md +30 -0
- data/docs/AccessRequest.md +28 -0
- data/docs/AdminLoginRequest.md +20 -0
- data/docs/AdminLoginResponse.md +26 -0
- data/docs/AuditRecordOut.md +42 -0
- data/docs/AuthApi.md +133 -0
- data/docs/AuthModelCreate.md +18 -0
- data/docs/AuthModelOut.md +26 -0
- data/docs/BatchAccessItem.md +20 -0
- data/docs/BatchAccessRequest.md +24 -0
- data/docs/BatchAccessResponse.md +20 -0
- data/docs/BatchAccessResult.md +22 -0
- data/docs/DataValue.md +15 -0
- data/docs/DevApi.md +132 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/HealthApi.md +187 -0
- data/docs/ImpactAnalysisRequest.md +18 -0
- data/docs/ImpactAnalysisResponse.md +20 -0
- data/docs/LocationInner.md +15 -0
- data/docs/ManagementApi.md +2096 -0
- data/docs/MetaBody.md +24 -0
- data/docs/PermissionCreate.md +18 -0
- data/docs/PermissionOut.md +20 -0
- data/docs/PermissionUpdate.md +18 -0
- data/docs/PlaygroundApi.md +80 -0
- data/docs/PlaygroundEvaluateRequest.md +20 -0
- data/docs/PlaygroundInput.md +24 -0
- data/docs/PlaygroundPolicy.md +26 -0
- data/docs/PolicyCreate.md +26 -0
- data/docs/PolicyOut.md +28 -0
- data/docs/PolicySimulationInput.md +22 -0
- data/docs/PolicySimulationRequest.md +20 -0
- data/docs/PolicySimulationResponse.md +20 -0
- data/docs/RelationshipCreate.md +26 -0
- data/docs/RelationshipOut.md +28 -0
- data/docs/RoleCreate.md +18 -0
- data/docs/RoleOut.md +20 -0
- data/docs/RoleUpdate.md +18 -0
- data/docs/SimulationResponse.md +30 -0
- data/docs/SuccessResponseACLOut.md +22 -0
- data/docs/SuccessResponseAccessDecisionResponse.md +22 -0
- data/docs/SuccessResponseAdminLoginResponse.md +22 -0
- data/docs/SuccessResponseAuthModelOut.md +22 -0
- data/docs/SuccessResponseBatchAccessResponse.md +22 -0
- data/docs/SuccessResponseDictStrAny.md +22 -0
- data/docs/SuccessResponseDictStrInt.md +22 -0
- data/docs/SuccessResponseDictStrObject.md +22 -0
- data/docs/SuccessResponseDictStrStr.md +22 -0
- data/docs/SuccessResponseDictStrUnionIntStr.md +22 -0
- data/docs/SuccessResponseImpactAnalysisResponse.md +22 -0
- data/docs/SuccessResponseListACLOut.md +22 -0
- data/docs/SuccessResponseListAuditRecordOut.md +22 -0
- data/docs/SuccessResponseListDictStrStr.md +22 -0
- data/docs/SuccessResponseListPermissionOut.md +22 -0
- data/docs/SuccessResponseListPolicyOut.md +22 -0
- data/docs/SuccessResponseListRoleOut.md +22 -0
- data/docs/SuccessResponsePermissionOut.md +22 -0
- data/docs/SuccessResponsePolicyOut.md +22 -0
- data/docs/SuccessResponsePolicySimulationResponse.md +22 -0
- data/docs/SuccessResponseRelationshipOut.md +22 -0
- data/docs/SuccessResponseSimulationResponse.md +22 -0
- data/docs/ValidationError.md +26 -0
- data/git_push.sh +57 -0
- data/keynetra-client.gemspec +39 -0
- data/lib/keynetra-client/api/access_api.rb +226 -0
- data/lib/keynetra-client/api/auth_api.rb +154 -0
- data/lib/keynetra-client/api/dev_api.rb +135 -0
- data/lib/keynetra-client/api/health_api.rb +187 -0
- data/lib/keynetra-client/api/management_api.rb +1851 -0
- data/lib/keynetra-client/api/playground_api.rb +88 -0
- data/lib/keynetra-client/api_client.rb +397 -0
- data/lib/keynetra-client/api_error.rb +58 -0
- data/lib/keynetra-client/api_model_base.rb +88 -0
- data/lib/keynetra-client/configuration.rb +315 -0
- data/lib/keynetra-client/models/access_decision_response.rb +242 -0
- data/lib/keynetra-client/models/access_request.rb +219 -0
- data/lib/keynetra-client/models/acl_create.rb +294 -0
- data/lib/keynetra-client/models/acl_out.rb +356 -0
- data/lib/keynetra-client/models/admin_login_request.rb +190 -0
- data/lib/keynetra-client/models/admin_login_response.rb +238 -0
- data/lib/keynetra-client/models/audit_record_out.rb +454 -0
- data/lib/keynetra-client/models/auth_model_create.rb +164 -0
- data/lib/keynetra-client/models/auth_model_out.rb +272 -0
- data/lib/keynetra-client/models/batch_access_item.rb +175 -0
- data/lib/keynetra-client/models/batch_access_request.rb +198 -0
- data/lib/keynetra-client/models/batch_access_response.rb +176 -0
- data/lib/keynetra-client/models/batch_access_result.rb +200 -0
- data/lib/keynetra-client/models/data_value.rb +103 -0
- data/lib/keynetra-client/models/http_validation_error.rb +149 -0
- data/lib/keynetra-client/models/impact_analysis_request.rb +164 -0
- data/lib/keynetra-client/models/impact_analysis_response.rb +160 -0
- data/lib/keynetra-client/models/location_inner.rb +103 -0
- data/lib/keynetra-client/models/meta_body.rb +179 -0
- data/lib/keynetra-client/models/permission_create.rb +164 -0
- data/lib/keynetra-client/models/permission_out.rb +190 -0
- data/lib/keynetra-client/models/permission_update.rb +164 -0
- data/lib/keynetra-client/models/playground_evaluate_request.rb +192 -0
- data/lib/keynetra-client/models/playground_input.rb +182 -0
- data/lib/keynetra-client/models/playground_policy.rb +207 -0
- data/lib/keynetra-client/models/policy_create.rb +208 -0
- data/lib/keynetra-client/models/policy_out.rb +281 -0
- data/lib/keynetra-client/models/policy_simulation_input.rb +172 -0
- data/lib/keynetra-client/models/policy_simulation_request.rb +158 -0
- data/lib/keynetra-client/models/policy_simulation_response.rb +194 -0
- data/lib/keynetra-client/models/relationship_create.rb +268 -0
- data/lib/keynetra-client/models/relationship_out.rb +294 -0
- data/lib/keynetra-client/models/role_create.rb +164 -0
- data/lib/keynetra-client/models/role_out.rb +190 -0
- data/lib/keynetra-client/models/role_update.rb +164 -0
- data/lib/keynetra-client/models/simulation_response.rb +244 -0
- data/lib/keynetra-client/models/success_response_access_decision_response.rb +182 -0
- data/lib/keynetra-client/models/success_response_acl_out.rb +182 -0
- data/lib/keynetra-client/models/success_response_admin_login_response.rb +182 -0
- data/lib/keynetra-client/models/success_response_auth_model_out.rb +182 -0
- data/lib/keynetra-client/models/success_response_batch_access_response.rb +182 -0
- data/lib/keynetra-client/models/success_response_dict_str_any.rb +184 -0
- data/lib/keynetra-client/models/success_response_dict_str_int.rb +184 -0
- data/lib/keynetra-client/models/success_response_dict_str_object.rb +184 -0
- data/lib/keynetra-client/models/success_response_dict_str_str.rb +184 -0
- data/lib/keynetra-client/models/success_response_dict_str_union_int_str.rb +184 -0
- data/lib/keynetra-client/models/success_response_impact_analysis_response.rb +182 -0
- data/lib/keynetra-client/models/success_response_list_acl_out.rb +184 -0
- data/lib/keynetra-client/models/success_response_list_audit_record_out.rb +184 -0
- data/lib/keynetra-client/models/success_response_list_dict_str_str.rb +184 -0
- data/lib/keynetra-client/models/success_response_list_permission_out.rb +184 -0
- data/lib/keynetra-client/models/success_response_list_policy_out.rb +184 -0
- data/lib/keynetra-client/models/success_response_list_role_out.rb +184 -0
- data/lib/keynetra-client/models/success_response_permission_out.rb +182 -0
- data/lib/keynetra-client/models/success_response_policy_out.rb +182 -0
- data/lib/keynetra-client/models/success_response_policy_simulation_response.rb +182 -0
- data/lib/keynetra-client/models/success_response_relationship_out.rb +182 -0
- data/lib/keynetra-client/models/success_response_simulation_response.rb +182 -0
- data/lib/keynetra-client/models/validation_error.rb +237 -0
- data/lib/keynetra-client/version.rb +15 -0
- data/lib/keynetra-client.rb +105 -0
- data/spec/api/access_api_spec.rb +70 -0
- data/spec/api/auth_api_spec.rb +57 -0
- data/spec/api/dev_api_spec.rb +56 -0
- data/spec/api/health_api_spec.rb +65 -0
- data/spec/api/management_api_spec.rb +361 -0
- data/spec/api/playground_api_spec.rb +46 -0
- data/spec/models/access_decision_response_spec.rb +72 -0
- data/spec/models/access_request_spec.rb +66 -0
- data/spec/models/acl_create_spec.rb +66 -0
- data/spec/models/acl_out_spec.rb +84 -0
- data/spec/models/admin_login_request_spec.rb +42 -0
- data/spec/models/admin_login_response_spec.rb +60 -0
- data/spec/models/audit_record_out_spec.rb +108 -0
- data/spec/models/auth_model_create_spec.rb +36 -0
- data/spec/models/auth_model_out_spec.rb +60 -0
- data/spec/models/batch_access_item_spec.rb +42 -0
- data/spec/models/batch_access_request_spec.rb +54 -0
- data/spec/models/batch_access_response_spec.rb +42 -0
- data/spec/models/batch_access_result_spec.rb +48 -0
- data/spec/models/data_value_spec.rb +21 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/impact_analysis_request_spec.rb +36 -0
- data/spec/models/impact_analysis_response_spec.rb +42 -0
- data/spec/models/location_inner_spec.rb +21 -0
- data/spec/models/meta_body_spec.rb +54 -0
- data/spec/models/permission_create_spec.rb +36 -0
- data/spec/models/permission_out_spec.rb +42 -0
- data/spec/models/permission_update_spec.rb +36 -0
- data/spec/models/playground_evaluate_request_spec.rb +42 -0
- data/spec/models/playground_input_spec.rb +54 -0
- data/spec/models/playground_policy_spec.rb +60 -0
- data/spec/models/policy_create_spec.rb +60 -0
- data/spec/models/policy_out_spec.rb +66 -0
- data/spec/models/policy_simulation_input_spec.rb +48 -0
- data/spec/models/policy_simulation_request_spec.rb +42 -0
- data/spec/models/policy_simulation_response_spec.rb +42 -0
- data/spec/models/relationship_create_spec.rb +60 -0
- data/spec/models/relationship_out_spec.rb +66 -0
- data/spec/models/role_create_spec.rb +36 -0
- data/spec/models/role_out_spec.rb +42 -0
- data/spec/models/role_update_spec.rb +36 -0
- data/spec/models/simulation_response_spec.rb +72 -0
- data/spec/models/success_response_access_decision_response_spec.rb +48 -0
- data/spec/models/success_response_acl_out_spec.rb +48 -0
- data/spec/models/success_response_admin_login_response_spec.rb +48 -0
- data/spec/models/success_response_auth_model_out_spec.rb +48 -0
- data/spec/models/success_response_batch_access_response_spec.rb +48 -0
- data/spec/models/success_response_dict_str_any_spec.rb +48 -0
- data/spec/models/success_response_dict_str_int_spec.rb +48 -0
- data/spec/models/success_response_dict_str_object_spec.rb +48 -0
- data/spec/models/success_response_dict_str_str_spec.rb +48 -0
- data/spec/models/success_response_dict_str_union_int_str_spec.rb +48 -0
- data/spec/models/success_response_impact_analysis_response_spec.rb +48 -0
- data/spec/models/success_response_list_acl_out_spec.rb +48 -0
- data/spec/models/success_response_list_audit_record_out_spec.rb +48 -0
- data/spec/models/success_response_list_dict_str_str_spec.rb +48 -0
- data/spec/models/success_response_list_permission_out_spec.rb +48 -0
- data/spec/models/success_response_list_policy_out_spec.rb +48 -0
- data/spec/models/success_response_list_role_out_spec.rb +48 -0
- data/spec/models/success_response_permission_out_spec.rb +48 -0
- data/spec/models/success_response_policy_out_spec.rb +48 -0
- data/spec/models/success_response_policy_simulation_response_spec.rb +48 -0
- data/spec/models/success_response_relationship_out_spec.rb +48 -0
- data/spec/models/success_response_simulation_response_spec.rb +48 -0
- data/spec/models/validation_error_spec.rb +60 -0
- data/spec/spec_helper.rb +111 -0
- metadata +356 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#KeyNetra
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module KeyNetra
|
|
17
|
+
class ValidationError < ApiModelBase
|
|
18
|
+
attr_accessor :loc
|
|
19
|
+
|
|
20
|
+
attr_accessor :msg
|
|
21
|
+
|
|
22
|
+
attr_accessor :type
|
|
23
|
+
|
|
24
|
+
attr_accessor :input
|
|
25
|
+
|
|
26
|
+
attr_accessor :ctx
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'loc' => :'loc',
|
|
32
|
+
:'msg' => :'msg',
|
|
33
|
+
:'type' => :'type',
|
|
34
|
+
:'input' => :'input',
|
|
35
|
+
:'ctx' => :'ctx'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'loc' => :'Array<LocationInner>',
|
|
53
|
+
:'msg' => :'String',
|
|
54
|
+
:'type' => :'String',
|
|
55
|
+
:'input' => :'Object',
|
|
56
|
+
:'ctx' => :'Object'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
:'input',
|
|
64
|
+
])
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Initializes the object
|
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
if (!attributes.is_a?(Hash))
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `KeyNetra::ValidationError` initialize method"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
77
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `KeyNetra::ValidationError`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
79
|
+
end
|
|
80
|
+
h[k.to_sym] = v
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'loc')
|
|
84
|
+
if (value = attributes[:'loc']).is_a?(Array)
|
|
85
|
+
self.loc = value
|
|
86
|
+
end
|
|
87
|
+
else
|
|
88
|
+
self.loc = nil
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'msg')
|
|
92
|
+
self.msg = attributes[:'msg']
|
|
93
|
+
else
|
|
94
|
+
self.msg = nil
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'type')
|
|
98
|
+
self.type = attributes[:'type']
|
|
99
|
+
else
|
|
100
|
+
self.type = nil
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'input')
|
|
104
|
+
self.input = attributes[:'input']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'ctx')
|
|
108
|
+
self.ctx = attributes[:'ctx']
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
113
|
+
# @return Array for valid properties with the reasons
|
|
114
|
+
def list_invalid_properties
|
|
115
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
116
|
+
invalid_properties = Array.new
|
|
117
|
+
if @loc.nil?
|
|
118
|
+
invalid_properties.push('invalid value for "loc", loc cannot be nil.')
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if @msg.nil?
|
|
122
|
+
invalid_properties.push('invalid value for "msg", msg cannot be nil.')
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if @type.nil?
|
|
126
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
invalid_properties
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Check to see if the all the properties in the model are valid
|
|
133
|
+
# @return true if the model is valid
|
|
134
|
+
def valid?
|
|
135
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
136
|
+
return false if @loc.nil?
|
|
137
|
+
return false if @msg.nil?
|
|
138
|
+
return false if @type.nil?
|
|
139
|
+
true
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Custom attribute writer method with validation
|
|
143
|
+
# @param [Object] loc Value to be assigned
|
|
144
|
+
def loc=(loc)
|
|
145
|
+
if loc.nil?
|
|
146
|
+
fail ArgumentError, 'loc cannot be nil'
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
@loc = loc
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Custom attribute writer method with validation
|
|
153
|
+
# @param [Object] msg Value to be assigned
|
|
154
|
+
def msg=(msg)
|
|
155
|
+
if msg.nil?
|
|
156
|
+
fail ArgumentError, 'msg cannot be nil'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
@msg = msg
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Custom attribute writer method with validation
|
|
163
|
+
# @param [Object] type Value to be assigned
|
|
164
|
+
def type=(type)
|
|
165
|
+
if type.nil?
|
|
166
|
+
fail ArgumentError, 'type cannot be nil'
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
@type = type
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Checks equality by comparing each attribute.
|
|
173
|
+
# @param [Object] Object to be compared
|
|
174
|
+
def ==(o)
|
|
175
|
+
return true if self.equal?(o)
|
|
176
|
+
self.class == o.class &&
|
|
177
|
+
loc == o.loc &&
|
|
178
|
+
msg == o.msg &&
|
|
179
|
+
type == o.type &&
|
|
180
|
+
input == o.input &&
|
|
181
|
+
ctx == o.ctx
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# @see the `==` method
|
|
185
|
+
# @param [Object] Object to be compared
|
|
186
|
+
def eql?(o)
|
|
187
|
+
self == o
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Calculates hash code according to all attributes.
|
|
191
|
+
# @return [Integer] Hash code
|
|
192
|
+
def hash
|
|
193
|
+
[loc, msg, type, input, ctx].hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Builds the object from hash
|
|
197
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
198
|
+
# @return [Object] Returns the model itself
|
|
199
|
+
def self.build_from_hash(attributes)
|
|
200
|
+
return nil unless attributes.is_a?(Hash)
|
|
201
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
202
|
+
transformed_hash = {}
|
|
203
|
+
openapi_types.each_pair do |key, type|
|
|
204
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
205
|
+
transformed_hash["#{key}"] = nil
|
|
206
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
207
|
+
# check to ensure the input is an array given that the attribute
|
|
208
|
+
# is documented as an array but the input is not
|
|
209
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
210
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
211
|
+
end
|
|
212
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
213
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
new(transformed_hash)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Returns the object in the form of hash
|
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
|
221
|
+
def to_hash
|
|
222
|
+
hash = {}
|
|
223
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
224
|
+
value = self.send(attr)
|
|
225
|
+
if value.nil?
|
|
226
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
227
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
hash[param] = _to_hash(value)
|
|
231
|
+
end
|
|
232
|
+
hash
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#KeyNetra
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
module KeyNetra
|
|
14
|
+
VERSION = '0.1.1'
|
|
15
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#KeyNetra
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
# Common files
|
|
14
|
+
require 'keynetra-client/api_client'
|
|
15
|
+
require 'keynetra-client/api_error'
|
|
16
|
+
require 'keynetra-client/api_model_base'
|
|
17
|
+
require 'keynetra-client/version'
|
|
18
|
+
require 'keynetra-client/configuration'
|
|
19
|
+
|
|
20
|
+
# Models
|
|
21
|
+
require 'keynetra-client/models/acl_create'
|
|
22
|
+
require 'keynetra-client/models/acl_out'
|
|
23
|
+
require 'keynetra-client/models/access_decision_response'
|
|
24
|
+
require 'keynetra-client/models/access_request'
|
|
25
|
+
require 'keynetra-client/models/admin_login_request'
|
|
26
|
+
require 'keynetra-client/models/admin_login_response'
|
|
27
|
+
require 'keynetra-client/models/audit_record_out'
|
|
28
|
+
require 'keynetra-client/models/auth_model_create'
|
|
29
|
+
require 'keynetra-client/models/auth_model_out'
|
|
30
|
+
require 'keynetra-client/models/batch_access_item'
|
|
31
|
+
require 'keynetra-client/models/batch_access_request'
|
|
32
|
+
require 'keynetra-client/models/batch_access_response'
|
|
33
|
+
require 'keynetra-client/models/batch_access_result'
|
|
34
|
+
require 'keynetra-client/models/data_value'
|
|
35
|
+
require 'keynetra-client/models/http_validation_error'
|
|
36
|
+
require 'keynetra-client/models/impact_analysis_request'
|
|
37
|
+
require 'keynetra-client/models/impact_analysis_response'
|
|
38
|
+
require 'keynetra-client/models/location_inner'
|
|
39
|
+
require 'keynetra-client/models/meta_body'
|
|
40
|
+
require 'keynetra-client/models/permission_create'
|
|
41
|
+
require 'keynetra-client/models/permission_out'
|
|
42
|
+
require 'keynetra-client/models/permission_update'
|
|
43
|
+
require 'keynetra-client/models/playground_evaluate_request'
|
|
44
|
+
require 'keynetra-client/models/playground_input'
|
|
45
|
+
require 'keynetra-client/models/playground_policy'
|
|
46
|
+
require 'keynetra-client/models/policy_create'
|
|
47
|
+
require 'keynetra-client/models/policy_out'
|
|
48
|
+
require 'keynetra-client/models/policy_simulation_input'
|
|
49
|
+
require 'keynetra-client/models/policy_simulation_request'
|
|
50
|
+
require 'keynetra-client/models/policy_simulation_response'
|
|
51
|
+
require 'keynetra-client/models/relationship_create'
|
|
52
|
+
require 'keynetra-client/models/relationship_out'
|
|
53
|
+
require 'keynetra-client/models/role_create'
|
|
54
|
+
require 'keynetra-client/models/role_out'
|
|
55
|
+
require 'keynetra-client/models/role_update'
|
|
56
|
+
require 'keynetra-client/models/simulation_response'
|
|
57
|
+
require 'keynetra-client/models/success_response_acl_out'
|
|
58
|
+
require 'keynetra-client/models/success_response_access_decision_response'
|
|
59
|
+
require 'keynetra-client/models/success_response_admin_login_response'
|
|
60
|
+
require 'keynetra-client/models/success_response_auth_model_out'
|
|
61
|
+
require 'keynetra-client/models/success_response_batch_access_response'
|
|
62
|
+
require 'keynetra-client/models/success_response_dict_str_any'
|
|
63
|
+
require 'keynetra-client/models/success_response_dict_str_int'
|
|
64
|
+
require 'keynetra-client/models/success_response_dict_str_object'
|
|
65
|
+
require 'keynetra-client/models/success_response_dict_str_str'
|
|
66
|
+
require 'keynetra-client/models/success_response_dict_str_union_int_str'
|
|
67
|
+
require 'keynetra-client/models/success_response_impact_analysis_response'
|
|
68
|
+
require 'keynetra-client/models/success_response_list_acl_out'
|
|
69
|
+
require 'keynetra-client/models/success_response_list_audit_record_out'
|
|
70
|
+
require 'keynetra-client/models/success_response_list_dict_str_str'
|
|
71
|
+
require 'keynetra-client/models/success_response_list_permission_out'
|
|
72
|
+
require 'keynetra-client/models/success_response_list_policy_out'
|
|
73
|
+
require 'keynetra-client/models/success_response_list_role_out'
|
|
74
|
+
require 'keynetra-client/models/success_response_permission_out'
|
|
75
|
+
require 'keynetra-client/models/success_response_policy_out'
|
|
76
|
+
require 'keynetra-client/models/success_response_policy_simulation_response'
|
|
77
|
+
require 'keynetra-client/models/success_response_relationship_out'
|
|
78
|
+
require 'keynetra-client/models/success_response_simulation_response'
|
|
79
|
+
require 'keynetra-client/models/validation_error'
|
|
80
|
+
|
|
81
|
+
# APIs
|
|
82
|
+
require 'keynetra-client/api/access_api'
|
|
83
|
+
require 'keynetra-client/api/auth_api'
|
|
84
|
+
require 'keynetra-client/api/dev_api'
|
|
85
|
+
require 'keynetra-client/api/health_api'
|
|
86
|
+
require 'keynetra-client/api/management_api'
|
|
87
|
+
require 'keynetra-client/api/playground_api'
|
|
88
|
+
|
|
89
|
+
module KeyNetra
|
|
90
|
+
class << self
|
|
91
|
+
# Customize default settings for the SDK using block.
|
|
92
|
+
# KeyNetra.configure do |config|
|
|
93
|
+
# config.username = "xxx"
|
|
94
|
+
# config.password = "xxx"
|
|
95
|
+
# end
|
|
96
|
+
# If no block given, return the default Configuration object.
|
|
97
|
+
def configure
|
|
98
|
+
if block_given?
|
|
99
|
+
yield(Configuration.default)
|
|
100
|
+
else
|
|
101
|
+
Configuration.default
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#KeyNetra
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for KeyNetra::AccessApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'AccessApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = KeyNetra::AccessApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of AccessApi' do
|
|
30
|
+
it 'should create an instance of AccessApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(KeyNetra::AccessApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for check_access_batch_check_access_batch_post
|
|
36
|
+
# Check Access Batch
|
|
37
|
+
# @param batch_access_request
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :policy_set
|
|
40
|
+
# @return [SuccessResponseBatchAccessResponse]
|
|
41
|
+
describe 'check_access_batch_check_access_batch_post test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# unit tests for check_access_check_access_post
|
|
48
|
+
# Check Access
|
|
49
|
+
# @param access_request
|
|
50
|
+
# @param [Hash] opts the optional parameters
|
|
51
|
+
# @option opts [String] :policy_set
|
|
52
|
+
# @return [SuccessResponseAccessDecisionResponse]
|
|
53
|
+
describe 'check_access_check_access_post test' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# unit tests for simulate_simulate_post
|
|
60
|
+
# Simulate
|
|
61
|
+
# @param access_request
|
|
62
|
+
# @param [Hash] opts the optional parameters
|
|
63
|
+
# @return [SuccessResponseSimulationResponse]
|
|
64
|
+
describe 'simulate_simulate_post test' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#KeyNetra
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for KeyNetra::AuthApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'AuthApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = KeyNetra::AuthApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of AuthApi' do
|
|
30
|
+
it 'should create an instance of AuthApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(KeyNetra::AuthApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for admin_login_admin_login_post
|
|
36
|
+
# Admin Login
|
|
37
|
+
# @param admin_login_request
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [SuccessResponseAdminLoginResponse]
|
|
40
|
+
describe 'admin_login_admin_login_post test' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# unit tests for admin_login_admin_login_post_0
|
|
47
|
+
# Admin Login
|
|
48
|
+
# @param admin_login_request
|
|
49
|
+
# @param [Hash] opts the optional parameters
|
|
50
|
+
# @return [SuccessResponseAdminLoginResponse]
|
|
51
|
+
describe 'admin_login_admin_login_post_0 test' do
|
|
52
|
+
it 'should work' do
|
|
53
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#KeyNetra
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for KeyNetra::DevApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'DevApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = KeyNetra::DevApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of DevApi' do
|
|
30
|
+
it 'should create an instance of DevApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(KeyNetra::DevApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for get_sample_data_dev_sample_data_get
|
|
36
|
+
# Get Sample Data
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [SuccessResponseDictStrObject]
|
|
39
|
+
describe 'get_sample_data_dev_sample_data_get test' do
|
|
40
|
+
it 'should work' do
|
|
41
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# unit tests for seed_sample_data_dev_sample_data_seed_post
|
|
46
|
+
# Seed Sample Data
|
|
47
|
+
# @param [Hash] opts the optional parameters
|
|
48
|
+
# @option opts [Boolean] :reset Clear the sample dataset before reseeding it.
|
|
49
|
+
# @return [SuccessResponseDictStrObject]
|
|
50
|
+
describe 'seed_sample_data_dev_sample_data_seed_post test' do
|
|
51
|
+
it 'should work' do
|
|
52
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#KeyNetra
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for KeyNetra::HealthApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'HealthApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = KeyNetra::HealthApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of HealthApi' do
|
|
30
|
+
it 'should create an instance of HealthApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(KeyNetra::HealthApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for health_health_get
|
|
36
|
+
# Health
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [SuccessResponseDictStrStr]
|
|
39
|
+
describe 'health_health_get test' do
|
|
40
|
+
it 'should work' do
|
|
41
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# unit tests for liveness_health_live_get
|
|
46
|
+
# Liveness
|
|
47
|
+
# @param [Hash] opts the optional parameters
|
|
48
|
+
# @return [SuccessResponseDictStrStr]
|
|
49
|
+
describe 'liveness_health_live_get test' do
|
|
50
|
+
it 'should work' do
|
|
51
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# unit tests for readiness_health_ready_get
|
|
56
|
+
# Readiness
|
|
57
|
+
# @param [Hash] opts the optional parameters
|
|
58
|
+
# @return [SuccessResponseDictStrObject]
|
|
59
|
+
describe 'readiness_health_ready_get test' do
|
|
60
|
+
it 'should work' do
|
|
61
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
end
|