relentless_identity 1.0.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 +143 -0
- data/Rakefile +10 -0
- data/docs/AccountApi.md +219 -0
- data/docs/AliasInfo.md +20 -0
- data/docs/BatchSummary.md +26 -0
- data/docs/ClientBackgroundJobDetailResponse.md +30 -0
- data/docs/ClientBackgroundJobItemResponse.md +48 -0
- data/docs/ClientBackgroundJobPageResponse.md +26 -0
- data/docs/ClientBackgroundJobResponse.md +76 -0
- data/docs/ClientBatchIdentityResponse.md +20 -0
- data/docs/ClientFinderResponse.md +34 -0
- data/docs/ClientFinderResponseAlias.md +20 -0
- data/docs/ClientIdentityResponse.md +34 -0
- data/docs/ClientRequestHistoryItem.md +52 -0
- data/docs/ClientRequestHistoryPageResponse.md +26 -0
- data/docs/ClientTokenStatusResponse.md +28 -0
- data/docs/ClientUsageResponse.md +54 -0
- data/docs/ErrorResponse.md +24 -0
- data/docs/FinderApi.md +77 -0
- data/docs/FinderBatchJobRequest.md +22 -0
- data/docs/FinderBatchJobRequestInputsInner.md +20 -0
- data/docs/FinderRequest.md +20 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/IdentityProvider.md +20 -0
- data/docs/JobsApi.md +529 -0
- data/docs/LocationInner.md +15 -0
- data/docs/ProbeApi.md +147 -0
- data/docs/ProbeBatchJobBackgroundRequest.md +22 -0
- data/docs/ProbeBatchRequest.md +18 -0
- data/docs/ProbeRequest.md +18 -0
- data/docs/ValidationError.md +26 -0
- data/git_push.sh +57 -0
- data/lib/relentless_identity/api/account_api.rb +225 -0
- data/lib/relentless_identity/api/finder_api.rb +90 -0
- data/lib/relentless_identity/api/jobs_api.rb +535 -0
- data/lib/relentless_identity/api/probe_api.rb +158 -0
- data/lib/relentless_identity/api_client.rb +397 -0
- data/lib/relentless_identity/api_error.rb +58 -0
- data/lib/relentless_identity/api_model_base.rb +88 -0
- data/lib/relentless_identity/configuration.rb +309 -0
- data/lib/relentless_identity/models/alias_info.rb +159 -0
- data/lib/relentless_identity/models/batch_summary.rb +318 -0
- data/lib/relentless_identity/models/client_background_job_detail_response.rb +307 -0
- data/lib/relentless_identity/models/client_background_job_item_response.rb +455 -0
- data/lib/relentless_identity/models/client_background_job_page_response.rb +271 -0
- data/lib/relentless_identity/models/client_background_job_response.rb +745 -0
- data/lib/relentless_identity/models/client_batch_identity_response.rb +194 -0
- data/lib/relentless_identity/models/client_finder_response.rb +285 -0
- data/lib/relentless_identity/models/client_finder_response_alias.rb +104 -0
- data/lib/relentless_identity/models/client_identity_response.rb +285 -0
- data/lib/relentless_identity/models/client_request_history_item.rb +450 -0
- data/lib/relentless_identity/models/client_request_history_page_response.rb +271 -0
- data/lib/relentless_identity/models/client_token_status_response.rb +259 -0
- data/lib/relentless_identity/models/client_usage_response.rb +506 -0
- data/lib/relentless_identity/models/error_response.rb +178 -0
- data/lib/relentless_identity/models/finder_batch_job_request.rb +206 -0
- data/lib/relentless_identity/models/finder_batch_job_request_inputs_inner.rb +192 -0
- data/lib/relentless_identity/models/finder_request.rb +193 -0
- data/lib/relentless_identity/models/http_validation_error.rb +149 -0
- data/lib/relentless_identity/models/identity_provider.rb +157 -0
- data/lib/relentless_identity/models/location_inner.rb +103 -0
- data/lib/relentless_identity/models/probe_batch_job_background_request.rb +206 -0
- data/lib/relentless_identity/models/probe_batch_request.rb +186 -0
- data/lib/relentless_identity/models/probe_request.rb +166 -0
- data/lib/relentless_identity/models/validation_error.rb +237 -0
- data/lib/relentless_identity/version.rb +15 -0
- data/lib/relentless_identity.rb +69 -0
- data/relentless_identity.gemspec +39 -0
- data/spec/api/account_api_spec.rb +72 -0
- data/spec/api/finder_api_spec.rb +47 -0
- data/spec/api/jobs_api_spec.rb +130 -0
- data/spec/api/probe_api_spec.rb +59 -0
- data/spec/models/alias_info_spec.rb +42 -0
- data/spec/models/batch_summary_spec.rb +60 -0
- data/spec/models/client_background_job_detail_response_spec.rb +72 -0
- data/spec/models/client_background_job_item_response_spec.rb +138 -0
- data/spec/models/client_background_job_page_response_spec.rb +60 -0
- data/spec/models/client_background_job_response_spec.rb +222 -0
- data/spec/models/client_batch_identity_response_spec.rb +42 -0
- data/spec/models/client_finder_response_alias_spec.rb +21 -0
- data/spec/models/client_finder_response_spec.rb +92 -0
- data/spec/models/client_identity_response_spec.rb +92 -0
- data/spec/models/client_request_history_item_spec.rb +150 -0
- data/spec/models/client_request_history_page_response_spec.rb +60 -0
- data/spec/models/client_token_status_response_spec.rb +70 -0
- data/spec/models/client_usage_response_spec.rb +144 -0
- data/spec/models/error_response_spec.rb +54 -0
- data/spec/models/finder_batch_job_request_inputs_inner_spec.rb +42 -0
- data/spec/models/finder_batch_job_request_spec.rb +48 -0
- data/spec/models/finder_request_spec.rb +42 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/identity_provider_spec.rb +42 -0
- data/spec/models/location_inner_spec.rb +21 -0
- data/spec/models/probe_batch_job_background_request_spec.rb +48 -0
- data/spec/models/probe_batch_request_spec.rb +36 -0
- data/spec/models/probe_request_spec.rb +36 -0
- data/spec/models/validation_error_spec.rb +60 -0
- data/spec/spec_helper.rb +111 -0
- metadata +213 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Relentless Identity API
|
|
3
|
+
|
|
4
|
+
#Public client API for Finder and Probe workflows. This spec is generated from the FastAPI app, then narrowed to the supported bearer-authenticated routes used by SDKs and the API reference.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
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 RelentlessIdentity
|
|
17
|
+
# Paginated request history result.
|
|
18
|
+
class ClientRequestHistoryPageResponse < ApiModelBase
|
|
19
|
+
attr_accessor :items
|
|
20
|
+
|
|
21
|
+
attr_accessor :total
|
|
22
|
+
|
|
23
|
+
attr_accessor :page
|
|
24
|
+
|
|
25
|
+
attr_accessor :page_size
|
|
26
|
+
|
|
27
|
+
attr_accessor :total_pages
|
|
28
|
+
|
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
|
+
def self.attribute_map
|
|
31
|
+
{
|
|
32
|
+
:'items' => :'items',
|
|
33
|
+
:'total' => :'total',
|
|
34
|
+
:'page' => :'page',
|
|
35
|
+
:'page_size' => :'page_size',
|
|
36
|
+
:'total_pages' => :'total_pages'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns attribute mapping this model knows about
|
|
41
|
+
def self.acceptable_attribute_map
|
|
42
|
+
attribute_map
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
acceptable_attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'items' => :'Array<ClientRequestHistoryItem>',
|
|
54
|
+
:'total' => :'Integer',
|
|
55
|
+
:'page' => :'Integer',
|
|
56
|
+
:'page_size' => :'Integer',
|
|
57
|
+
:'total_pages' => :'Integer'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# List of attributes with nullable: true
|
|
62
|
+
def self.openapi_nullable
|
|
63
|
+
Set.new([
|
|
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 `RelentlessIdentity::ClientRequestHistoryPageResponse` 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 `RelentlessIdentity::ClientRequestHistoryPageResponse`. 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?(:'items')
|
|
84
|
+
if (value = attributes[:'items']).is_a?(Array)
|
|
85
|
+
self.items = value
|
|
86
|
+
end
|
|
87
|
+
else
|
|
88
|
+
self.items = nil
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'total')
|
|
92
|
+
self.total = attributes[:'total']
|
|
93
|
+
else
|
|
94
|
+
self.total = nil
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'page')
|
|
98
|
+
self.page = attributes[:'page']
|
|
99
|
+
else
|
|
100
|
+
self.page = nil
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'page_size')
|
|
104
|
+
self.page_size = attributes[:'page_size']
|
|
105
|
+
else
|
|
106
|
+
self.page_size = nil
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'total_pages')
|
|
110
|
+
self.total_pages = attributes[:'total_pages']
|
|
111
|
+
else
|
|
112
|
+
self.total_pages = nil
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
117
|
+
# @return Array for valid properties with the reasons
|
|
118
|
+
def list_invalid_properties
|
|
119
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
120
|
+
invalid_properties = Array.new
|
|
121
|
+
if @items.nil?
|
|
122
|
+
invalid_properties.push('invalid value for "items", items cannot be nil.')
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if @total.nil?
|
|
126
|
+
invalid_properties.push('invalid value for "total", total cannot be nil.')
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if @page.nil?
|
|
130
|
+
invalid_properties.push('invalid value for "page", page cannot be nil.')
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if @page_size.nil?
|
|
134
|
+
invalid_properties.push('invalid value for "page_size", page_size cannot be nil.')
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if @total_pages.nil?
|
|
138
|
+
invalid_properties.push('invalid value for "total_pages", total_pages cannot be nil.')
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
invalid_properties
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Check to see if the all the properties in the model are valid
|
|
145
|
+
# @return true if the model is valid
|
|
146
|
+
def valid?
|
|
147
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
148
|
+
return false if @items.nil?
|
|
149
|
+
return false if @total.nil?
|
|
150
|
+
return false if @page.nil?
|
|
151
|
+
return false if @page_size.nil?
|
|
152
|
+
return false if @total_pages.nil?
|
|
153
|
+
true
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Custom attribute writer method with validation
|
|
157
|
+
# @param [Object] items Value to be assigned
|
|
158
|
+
def items=(items)
|
|
159
|
+
if items.nil?
|
|
160
|
+
fail ArgumentError, 'items cannot be nil'
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
@items = items
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Custom attribute writer method with validation
|
|
167
|
+
# @param [Object] total Value to be assigned
|
|
168
|
+
def total=(total)
|
|
169
|
+
if total.nil?
|
|
170
|
+
fail ArgumentError, 'total cannot be nil'
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
@total = total
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Custom attribute writer method with validation
|
|
177
|
+
# @param [Object] page Value to be assigned
|
|
178
|
+
def page=(page)
|
|
179
|
+
if page.nil?
|
|
180
|
+
fail ArgumentError, 'page cannot be nil'
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
@page = page
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Custom attribute writer method with validation
|
|
187
|
+
# @param [Object] page_size Value to be assigned
|
|
188
|
+
def page_size=(page_size)
|
|
189
|
+
if page_size.nil?
|
|
190
|
+
fail ArgumentError, 'page_size cannot be nil'
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
@page_size = page_size
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Custom attribute writer method with validation
|
|
197
|
+
# @param [Object] total_pages Value to be assigned
|
|
198
|
+
def total_pages=(total_pages)
|
|
199
|
+
if total_pages.nil?
|
|
200
|
+
fail ArgumentError, 'total_pages cannot be nil'
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
@total_pages = total_pages
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Checks equality by comparing each attribute.
|
|
207
|
+
# @param [Object] Object to be compared
|
|
208
|
+
def ==(o)
|
|
209
|
+
return true if self.equal?(o)
|
|
210
|
+
self.class == o.class &&
|
|
211
|
+
items == o.items &&
|
|
212
|
+
total == o.total &&
|
|
213
|
+
page == o.page &&
|
|
214
|
+
page_size == o.page_size &&
|
|
215
|
+
total_pages == o.total_pages
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# @see the `==` method
|
|
219
|
+
# @param [Object] Object to be compared
|
|
220
|
+
def eql?(o)
|
|
221
|
+
self == o
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Calculates hash code according to all attributes.
|
|
225
|
+
# @return [Integer] Hash code
|
|
226
|
+
def hash
|
|
227
|
+
[items, total, page, page_size, total_pages].hash
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Builds the object from hash
|
|
231
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
232
|
+
# @return [Object] Returns the model itself
|
|
233
|
+
def self.build_from_hash(attributes)
|
|
234
|
+
return nil unless attributes.is_a?(Hash)
|
|
235
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
236
|
+
transformed_hash = {}
|
|
237
|
+
openapi_types.each_pair do |key, type|
|
|
238
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
239
|
+
transformed_hash["#{key}"] = nil
|
|
240
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
241
|
+
# check to ensure the input is an array given that the attribute
|
|
242
|
+
# is documented as an array but the input is not
|
|
243
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
244
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
245
|
+
end
|
|
246
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
247
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
new(transformed_hash)
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Returns the object in the form of hash
|
|
254
|
+
# @return [Hash] Returns the object in the form of hash
|
|
255
|
+
def to_hash
|
|
256
|
+
hash = {}
|
|
257
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
258
|
+
value = self.send(attr)
|
|
259
|
+
if value.nil?
|
|
260
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
261
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
hash[param] = _to_hash(value)
|
|
265
|
+
end
|
|
266
|
+
hash
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
end
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Relentless Identity API
|
|
3
|
+
|
|
4
|
+
#Public client API for Finder and Probe workflows. This spec is generated from the FastAPI app, then narrowed to the supported bearer-authenticated routes used by SDKs and the API reference.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
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 RelentlessIdentity
|
|
17
|
+
# Current bearer token claims as seen by the API.
|
|
18
|
+
class ClientTokenStatusResponse < ApiModelBase
|
|
19
|
+
# Whether the current bearer token is valid for this request.
|
|
20
|
+
attr_accessor :valid
|
|
21
|
+
|
|
22
|
+
# User id associated with the bearer token.
|
|
23
|
+
attr_accessor :user_id
|
|
24
|
+
|
|
25
|
+
# How the bearer token was issued.
|
|
26
|
+
attr_accessor :token_type
|
|
27
|
+
|
|
28
|
+
# Scopes currently attached to the bearer token.
|
|
29
|
+
attr_accessor :scopes
|
|
30
|
+
|
|
31
|
+
attr_accessor :expires_at
|
|
32
|
+
|
|
33
|
+
attr_accessor :expires_in_seconds
|
|
34
|
+
|
|
35
|
+
class EnumAttributeValidator
|
|
36
|
+
attr_reader :datatype
|
|
37
|
+
attr_reader :allowable_values
|
|
38
|
+
|
|
39
|
+
def initialize(datatype, allowable_values)
|
|
40
|
+
@allowable_values = allowable_values.map do |value|
|
|
41
|
+
case datatype.to_s
|
|
42
|
+
when /Integer/i
|
|
43
|
+
value.to_i
|
|
44
|
+
when /Float/i
|
|
45
|
+
value.to_f
|
|
46
|
+
else
|
|
47
|
+
value
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def valid?(value)
|
|
53
|
+
!value || allowable_values.include?(value)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
58
|
+
def self.attribute_map
|
|
59
|
+
{
|
|
60
|
+
:'valid' => :'valid',
|
|
61
|
+
:'user_id' => :'user_id',
|
|
62
|
+
:'token_type' => :'token_type',
|
|
63
|
+
:'scopes' => :'scopes',
|
|
64
|
+
:'expires_at' => :'expires_at',
|
|
65
|
+
:'expires_in_seconds' => :'expires_in_seconds'
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Returns attribute mapping this model knows about
|
|
70
|
+
def self.acceptable_attribute_map
|
|
71
|
+
attribute_map
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Returns all the JSON keys this model knows about
|
|
75
|
+
def self.acceptable_attributes
|
|
76
|
+
acceptable_attribute_map.values
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Attribute type mapping.
|
|
80
|
+
def self.openapi_types
|
|
81
|
+
{
|
|
82
|
+
:'valid' => :'Boolean',
|
|
83
|
+
:'user_id' => :'String',
|
|
84
|
+
:'token_type' => :'String',
|
|
85
|
+
:'scopes' => :'Array<String>',
|
|
86
|
+
:'expires_at' => :'Time',
|
|
87
|
+
:'expires_in_seconds' => :'Integer'
|
|
88
|
+
}
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# List of attributes with nullable: true
|
|
92
|
+
def self.openapi_nullable
|
|
93
|
+
Set.new([
|
|
94
|
+
:'expires_at',
|
|
95
|
+
:'expires_in_seconds'
|
|
96
|
+
])
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Initializes the object
|
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
101
|
+
def initialize(attributes = {})
|
|
102
|
+
if (!attributes.is_a?(Hash))
|
|
103
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `RelentlessIdentity::ClientTokenStatusResponse` initialize method"
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
107
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
108
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
109
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
110
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `RelentlessIdentity::ClientTokenStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
111
|
+
end
|
|
112
|
+
h[k.to_sym] = v
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'valid')
|
|
116
|
+
self.valid = attributes[:'valid']
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'user_id')
|
|
120
|
+
self.user_id = attributes[:'user_id']
|
|
121
|
+
else
|
|
122
|
+
self.user_id = nil
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'token_type')
|
|
126
|
+
self.token_type = attributes[:'token_type']
|
|
127
|
+
else
|
|
128
|
+
self.token_type = nil
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'scopes')
|
|
132
|
+
if (value = attributes[:'scopes']).is_a?(Array)
|
|
133
|
+
self.scopes = value
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'expires_at')
|
|
138
|
+
self.expires_at = attributes[:'expires_at']
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'expires_in_seconds')
|
|
142
|
+
self.expires_in_seconds = attributes[:'expires_in_seconds']
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
147
|
+
# @return Array for valid properties with the reasons
|
|
148
|
+
def list_invalid_properties
|
|
149
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
150
|
+
invalid_properties = Array.new
|
|
151
|
+
if @user_id.nil?
|
|
152
|
+
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if @token_type.nil?
|
|
156
|
+
invalid_properties.push('invalid value for "token_type", token_type cannot be nil.')
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
invalid_properties
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Check to see if the all the properties in the model are valid
|
|
163
|
+
# @return true if the model is valid
|
|
164
|
+
def valid?
|
|
165
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
166
|
+
return false if @user_id.nil?
|
|
167
|
+
return false if @token_type.nil?
|
|
168
|
+
token_type_validator = EnumAttributeValidator.new('String', ["pat", "oauth"])
|
|
169
|
+
return false unless token_type_validator.valid?(@token_type)
|
|
170
|
+
true
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Custom attribute writer method with validation
|
|
174
|
+
# @param [Object] user_id Value to be assigned
|
|
175
|
+
def user_id=(user_id)
|
|
176
|
+
if user_id.nil?
|
|
177
|
+
fail ArgumentError, 'user_id cannot be nil'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
@user_id = user_id
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
184
|
+
# @param [Object] token_type Object to be assigned
|
|
185
|
+
def token_type=(token_type)
|
|
186
|
+
validator = EnumAttributeValidator.new('String', ["pat", "oauth"])
|
|
187
|
+
unless validator.valid?(token_type)
|
|
188
|
+
fail ArgumentError, "invalid value for \"token_type\", must be one of #{validator.allowable_values}."
|
|
189
|
+
end
|
|
190
|
+
@token_type = token_type
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Checks equality by comparing each attribute.
|
|
194
|
+
# @param [Object] Object to be compared
|
|
195
|
+
def ==(o)
|
|
196
|
+
return true if self.equal?(o)
|
|
197
|
+
self.class == o.class &&
|
|
198
|
+
valid == o.valid &&
|
|
199
|
+
user_id == o.user_id &&
|
|
200
|
+
token_type == o.token_type &&
|
|
201
|
+
scopes == o.scopes &&
|
|
202
|
+
expires_at == o.expires_at &&
|
|
203
|
+
expires_in_seconds == o.expires_in_seconds
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# @see the `==` method
|
|
207
|
+
# @param [Object] Object to be compared
|
|
208
|
+
def eql?(o)
|
|
209
|
+
self == o
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Calculates hash code according to all attributes.
|
|
213
|
+
# @return [Integer] Hash code
|
|
214
|
+
def hash
|
|
215
|
+
[valid, user_id, token_type, scopes, expires_at, expires_in_seconds].hash
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Builds the object from hash
|
|
219
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
220
|
+
# @return [Object] Returns the model itself
|
|
221
|
+
def self.build_from_hash(attributes)
|
|
222
|
+
return nil unless attributes.is_a?(Hash)
|
|
223
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
224
|
+
transformed_hash = {}
|
|
225
|
+
openapi_types.each_pair do |key, type|
|
|
226
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
227
|
+
transformed_hash["#{key}"] = nil
|
|
228
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
229
|
+
# check to ensure the input is an array given that the attribute
|
|
230
|
+
# is documented as an array but the input is not
|
|
231
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
232
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
233
|
+
end
|
|
234
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
235
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
new(transformed_hash)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Returns the object in the form of hash
|
|
242
|
+
# @return [Hash] Returns the object in the form of hash
|
|
243
|
+
def to_hash
|
|
244
|
+
hash = {}
|
|
245
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
246
|
+
value = self.send(attr)
|
|
247
|
+
if value.nil?
|
|
248
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
249
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
hash[param] = _to_hash(value)
|
|
253
|
+
end
|
|
254
|
+
hash
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
end
|