notifo-io-easierlife 1.0.0 → 1.0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +599 -97
- data/Rakefile +0 -2
- data/docs/AddAllowedTopicDto.md +4 -15
- data/docs/AddContributorDto.md +5 -17
- data/docs/AppContributorDto.md +6 -19
- data/docs/AppDetailsDto.md +19 -45
- data/docs/AppDto.md +9 -25
- data/docs/AppsApi.md +181 -363
- data/docs/Body.md +7 -0
- data/docs/ConfigsApi.md +28 -68
- data/docs/ConfirmMode.md +3 -12
- data/docs/CreateEmailTemplateDto.md +4 -15
- data/docs/EmailTemplateDto.md +6 -19
- data/docs/EmailTemplatesDto.md +6 -0
- data/docs/EmailVerificationStatus.md +3 -12
- data/docs/ErrorDto.md +8 -23
- data/docs/EventDto.md +15 -37
- data/docs/EventProperties.md +6 -0
- data/docs/EventsApi.md +43 -80
- data/docs/IsoDayOfWeek.md +3 -12
- data/docs/ListResponseDtoOfEventDto.md +5 -17
- data/docs/ListResponseDtoOfLogEntryDto.md +5 -17
- data/docs/ListResponseDtoOfMediaDto.md +5 -17
- data/docs/ListResponseDtoOfSubscriptionDto.md +5 -17
- data/docs/ListResponseDtoOfTemplateDto.md +5 -17
- data/docs/ListResponseDtoOfTopicDto.md +5 -17
- data/docs/ListResponseDtoOfUserDto.md +5 -17
- data/docs/LocalizedText.md +6 -0
- data/docs/LogEntryDto.md +7 -21
- data/docs/LogsApi.md +25 -44
- data/docs/MediaApi.md +118 -212
- data/docs/MediaDto.md +10 -27
- data/docs/MediaMetadata.md +6 -0
- data/docs/MediaType.md +3 -12
- data/docs/NotificationFormattingDto.md +11 -29
- data/docs/NotificationSend.md +3 -12
- data/docs/NotificationSettingDto.md +5 -17
- data/docs/ProfileDto.md +11 -29
- data/docs/PublishDto.md +13 -33
- data/docs/PublishManyDto.md +4 -15
- data/docs/ResizeMode.md +3 -12
- data/docs/SchedulingDto.md +7 -21
- data/docs/SchedulingType.md +3 -12
- data/docs/SubscriptionDto.md +5 -17
- data/docs/TemplateDto.md +6 -19
- data/docs/TemplatesApi.md +61 -116
- data/docs/TopicDto.md +6 -19
- data/docs/TopicsApi.md +25 -44
- data/docs/UpdateProfileDto.md +9 -25
- data/docs/UpsertAppDto.md +13 -33
- data/docs/UpsertTemplateDto.md +6 -19
- data/docs/UpsertTemplatesDto.md +4 -15
- data/docs/UpsertUserDto.md +11 -29
- data/docs/UpsertUsersDto.md +4 -15
- data/docs/UserApi.md +84 -176
- data/docs/UserDto.md +13 -33
- data/docs/UsersApi.md +173 -337
- data/git_push.sh +7 -10
- data/lib/swagger_client.rb +93 -0
- data/lib/{notifo → swagger_client}/api/apps_api.rb +131 -203
- data/lib/{notifo → swagger_client}/api/configs_api.rb +15 -31
- data/lib/{notifo → swagger_client}/api/events_api.rb +30 -46
- data/lib/{notifo → swagger_client}/api/logs_api.rb +13 -22
- data/lib/{notifo → swagger_client}/api/media_api.rb +61 -98
- data/lib/{notifo → swagger_client}/api/templates_api.rb +40 -63
- data/lib/{notifo → swagger_client}/api/topics_api.rb +13 -22
- data/lib/{notifo → swagger_client}/api/user_api.rb +52 -89
- data/lib/{notifo → swagger_client}/api/users_api.rb +122 -187
- data/lib/{notifo → swagger_client}/api_client.rb +55 -57
- data/lib/{notifo → swagger_client}/api_error.rb +6 -6
- data/lib/{notifo → swagger_client}/configuration.rb +12 -84
- data/lib/{notifo → swagger_client}/models/add_allowed_topic_dto.rb +16 -47
- data/lib/swagger_client/models/add_contributor_dto.rb +227 -0
- data/lib/swagger_client/models/app_contributor_dto.rb +242 -0
- data/lib/{notifo → swagger_client}/models/app_details_dto.rb +31 -106
- data/lib/{notifo → swagger_client}/models/app_dto.rb +21 -90
- data/lib/swagger_client/models/body.rb +206 -0
- data/lib/swagger_client/models/confirm_mode.rb +29 -0
- data/lib/{notifo → swagger_client}/models/create_email_template_dto.rb +16 -47
- data/lib/swagger_client/models/email_template_dto.rb +237 -0
- data/lib/swagger_client/models/email_templates_dto.rb +201 -0
- data/lib/swagger_client/models/email_verification_status.rb +30 -0
- data/lib/{notifo → swagger_client}/models/error_dto.rb +20 -36
- data/lib/{notifo → swagger_client}/models/event_dto.rb +27 -117
- data/lib/swagger_client/models/event_properties.rb +201 -0
- data/lib/swagger_client/models/iso_day_of_week.rb +34 -0
- data/lib/{notifo/models/list_response_dto_of_subscription_dto.rb → swagger_client/models/list_response_dto_of_event_dto.rb} +18 -30
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_log_entry_dto.rb +17 -29
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_media_dto.rb +17 -29
- data/lib/{notifo/models/list_response_dto_of_event_dto.rb → swagger_client/models/list_response_dto_of_subscription_dto.rb} +18 -30
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_template_dto.rb +17 -29
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_topic_dto.rb +17 -29
- data/lib/{notifo → swagger_client}/models/list_response_dto_of_user_dto.rb +17 -29
- data/lib/swagger_client/models/localized_text.rb +201 -0
- data/lib/{notifo → swagger_client}/models/log_entry_dto.rb +19 -88
- data/lib/{notifo → swagger_client}/models/media_dto.rb +23 -113
- data/lib/swagger_client/models/media_metadata.rb +201 -0
- data/lib/swagger_client/models/media_type.rb +30 -0
- data/lib/{notifo → swagger_client}/models/notification_formatting_dto.rb +30 -56
- data/lib/swagger_client/models/notification_send.rb +30 -0
- data/lib/{notifo → swagger_client}/models/notification_setting_dto.rb +26 -39
- data/lib/{notifo → swagger_client}/models/profile_dto.rb +23 -76
- data/lib/{notifo → swagger_client}/models/publish_dto.rb +26 -63
- data/lib/{notifo → swagger_client}/models/publish_many_dto.rb +16 -28
- data/lib/swagger_client/models/resize_mode.rb +33 -0
- data/lib/{notifo → swagger_client}/models/scheduling_dto.rb +19 -32
- data/lib/swagger_client/models/scheduling_type.rb +28 -0
- data/lib/{notifo → swagger_client}/models/subscription_dto.rb +17 -49
- data/lib/{notifo → swagger_client}/models/template_dto.rb +18 -49
- data/lib/{notifo → swagger_client}/models/topic_dto.rb +18 -68
- data/lib/{notifo → swagger_client}/models/update_profile_dto.rb +21 -39
- data/lib/{notifo → swagger_client}/models/upsert_app_dto.rb +25 -47
- data/lib/{notifo → swagger_client}/models/upsert_template_dto.rb +18 -50
- data/lib/{notifo → swagger_client}/models/upsert_templates_dto.rb +16 -28
- data/lib/{notifo → swagger_client}/models/upsert_user_dto.rb +23 -43
- data/lib/{notifo → swagger_client}/models/upsert_users_dto.rb +16 -28
- data/lib/{notifo → swagger_client}/models/user_dto.rb +25 -80
- data/lib/swagger_client/version.rb +14 -0
- data/spec/api/apps_api_spec.rb +14 -15
- data/spec/api/configs_api_spec.rb +8 -9
- data/spec/api/events_api_spec.rb +9 -10
- data/spec/api/logs_api_spec.rb +8 -9
- data/spec/api/media_api_spec.rb +13 -14
- data/spec/api/templates_api_spec.rb +9 -10
- data/spec/api/topics_api_spec.rb +8 -9
- data/spec/api/user_api_spec.rb +10 -11
- data/spec/api/users_api_spec.rb +11 -12
- data/spec/api_client_spec.rb +34 -35
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +7 -8
- data/spec/models/add_allowed_topic_dto_spec.rb +16 -10
- data/spec/models/add_contributor_dto_spec.rb +16 -10
- data/spec/models/app_contributor_dto_spec.rb +16 -10
- data/spec/models/app_details_dto_spec.rb +16 -10
- data/spec/models/app_dto_spec.rb +16 -10
- data/spec/models/body_spec.rb +40 -0
- data/spec/models/confirm_mode_spec.rb +16 -10
- data/spec/models/create_email_template_dto_spec.rb +16 -10
- data/spec/models/email_template_dto_spec.rb +16 -10
- data/spec/models/email_templates_dto_spec.rb +34 -0
- data/spec/models/email_verification_status_spec.rb +16 -10
- data/spec/models/error_dto_spec.rb +16 -10
- data/spec/models/event_dto_spec.rb +16 -10
- data/spec/models/event_properties_spec.rb +34 -0
- data/spec/models/iso_day_of_week_spec.rb +16 -10
- data/spec/models/list_response_dto_of_event_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_media_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_subscription_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_template_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_topic_dto_spec.rb +16 -10
- data/spec/models/list_response_dto_of_user_dto_spec.rb +16 -10
- data/spec/models/localized_text_spec.rb +34 -0
- data/spec/models/log_entry_dto_spec.rb +16 -10
- data/spec/models/media_dto_spec.rb +16 -10
- data/spec/models/media_metadata_spec.rb +34 -0
- data/spec/models/media_type_spec.rb +16 -10
- data/spec/models/notification_formatting_dto_spec.rb +16 -10
- data/spec/models/notification_send_spec.rb +16 -10
- data/spec/models/notification_setting_dto_spec.rb +17 -11
- data/spec/models/profile_dto_spec.rb +16 -10
- data/spec/models/publish_dto_spec.rb +16 -10
- data/spec/models/publish_many_dto_spec.rb +16 -10
- data/spec/models/resize_mode_spec.rb +16 -10
- data/spec/models/scheduling_dto_spec.rb +16 -10
- data/spec/models/scheduling_type_spec.rb +16 -10
- data/spec/models/subscription_dto_spec.rb +16 -10
- data/spec/models/template_dto_spec.rb +16 -10
- data/spec/models/topic_dto_spec.rb +16 -10
- data/spec/models/update_profile_dto_spec.rb +16 -10
- data/spec/models/upsert_app_dto_spec.rb +16 -10
- data/spec/models/upsert_template_dto_spec.rb +16 -10
- data/spec/models/upsert_templates_dto_spec.rb +16 -10
- data/spec/models/upsert_user_dto_spec.rb +16 -10
- data/spec/models/upsert_users_dto_spec.rb +16 -10
- data/spec/models/user_dto_spec.rb +16 -10
- data/spec/spec_helper.rb +5 -6
- data/{notifo.gemspec → swagger_client.gemspec} +9 -9
- metadata +101 -60
- data/lib/notifo.rb +0 -89
- data/lib/notifo/models/add_contributor_dto.rb +0 -277
- data/lib/notifo/models/app_contributor_dto.rb +0 -311
- data/lib/notifo/models/confirm_mode.rb +0 -38
- data/lib/notifo/models/email_template_dto.rb +0 -288
- data/lib/notifo/models/email_verification_status.rb +0 -39
- data/lib/notifo/models/iso_day_of_week.rb +0 -43
- data/lib/notifo/models/media_type.rb +0 -39
- data/lib/notifo/models/notification_send.rb +0 -39
- data/lib/notifo/models/resize_mode.rb +0 -42
- data/lib/notifo/models/scheduling_type.rb +0 -37
- data/lib/notifo/version.rb +0 -15
- data/notifo-io-1.0.0.gem +0 -0
@@ -1,19 +1,17 @@
|
|
1
1
|
=begin
|
2
2
|
#Notifo API
|
3
3
|
|
4
|
-
#No description provided (generated by
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.1.0-SNAPSHOT
|
6
|
+
OpenAPI spec version: 1.0.0
|
10
7
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.24
|
11
10
|
=end
|
12
11
|
|
13
12
|
require 'date'
|
14
|
-
require 'time'
|
15
13
|
|
16
|
-
module
|
14
|
+
module SwaggerClient
|
17
15
|
class AppDetailsDto
|
18
16
|
# The id of the app.
|
19
17
|
attr_accessor :id
|
@@ -84,56 +82,45 @@ module Notifo
|
|
84
82
|
}
|
85
83
|
end
|
86
84
|
|
87
|
-
# Returns all the JSON keys this model knows about
|
88
|
-
def self.acceptable_attributes
|
89
|
-
attribute_map.values
|
90
|
-
end
|
91
|
-
|
92
85
|
# Attribute type mapping.
|
93
86
|
def self.openapi_types
|
94
87
|
{
|
95
|
-
:'id' => :'
|
96
|
-
:'name' => :'
|
97
|
-
:'role' => :'
|
98
|
-
:'languages' => :'
|
99
|
-
:'email_address' => :'
|
100
|
-
:'email_name' => :'
|
101
|
-
:'firebase_project' => :'
|
102
|
-
:'firebase_credential' => :'
|
103
|
-
:'webhook_url' => :'
|
104
|
-
:'confirm_url' => :'
|
105
|
-
:'allow_email' => :'
|
106
|
-
:'allow_sms' => :'
|
107
|
-
:'email_verification_status' => :'
|
108
|
-
:'api_keys' => :'
|
109
|
-
:'contributors' => :'
|
110
|
-
:'counters' => :'
|
88
|
+
:'id' => :'Object',
|
89
|
+
:'name' => :'Object',
|
90
|
+
:'role' => :'Object',
|
91
|
+
:'languages' => :'Object',
|
92
|
+
:'email_address' => :'Object',
|
93
|
+
:'email_name' => :'Object',
|
94
|
+
:'firebase_project' => :'Object',
|
95
|
+
:'firebase_credential' => :'Object',
|
96
|
+
:'webhook_url' => :'Object',
|
97
|
+
:'confirm_url' => :'Object',
|
98
|
+
:'allow_email' => :'Object',
|
99
|
+
:'allow_sms' => :'Object',
|
100
|
+
:'email_verification_status' => :'Object',
|
101
|
+
:'api_keys' => :'Object',
|
102
|
+
:'contributors' => :'Object',
|
103
|
+
:'counters' => :'Object'
|
111
104
|
}
|
112
105
|
end
|
113
106
|
|
114
107
|
# List of attributes with nullable: true
|
115
108
|
def self.openapi_nullable
|
116
109
|
Set.new([
|
117
|
-
:'email_address',
|
118
|
-
:'email_name',
|
119
|
-
:'firebase_project',
|
120
|
-
:'firebase_credential',
|
121
|
-
:'webhook_url',
|
122
|
-
:'confirm_url',
|
123
110
|
])
|
124
111
|
end
|
125
|
-
|
112
|
+
|
126
113
|
# Initializes the object
|
127
114
|
# @param [Hash] attributes Model attributes in the form of hash
|
128
115
|
def initialize(attributes = {})
|
129
116
|
if (!attributes.is_a?(Hash))
|
130
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
117
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::AppDetailsDto` initialize method"
|
131
118
|
end
|
132
119
|
|
133
120
|
# check to see if the attribute exists and convert string to symbol for hash key
|
134
121
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
135
122
|
if (!self.class.attribute_map.key?(k.to_sym))
|
136
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
123
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::AppDetailsDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
137
124
|
end
|
138
125
|
h[k.to_sym] = v
|
139
126
|
}
|
@@ -219,26 +206,14 @@ module Notifo
|
|
219
206
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
220
207
|
end
|
221
208
|
|
222
|
-
if @id.to_s.length < 1
|
223
|
-
invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.')
|
224
|
-
end
|
225
|
-
|
226
209
|
if @name.nil?
|
227
210
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
228
211
|
end
|
229
212
|
|
230
|
-
if @name.to_s.length < 1
|
231
|
-
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
232
|
-
end
|
233
|
-
|
234
213
|
if @role.nil?
|
235
214
|
invalid_properties.push('invalid value for "role", role cannot be nil.')
|
236
215
|
end
|
237
216
|
|
238
|
-
if @role.to_s.length < 1
|
239
|
-
invalid_properties.push('invalid value for "role", the character length must be great than or equal to 1.')
|
240
|
-
end
|
241
|
-
|
242
217
|
if @languages.nil?
|
243
218
|
invalid_properties.push('invalid value for "languages", languages cannot be nil.')
|
244
219
|
end
|
@@ -274,11 +249,8 @@ module Notifo
|
|
274
249
|
# @return true if the model is valid
|
275
250
|
def valid?
|
276
251
|
return false if @id.nil?
|
277
|
-
return false if @id.to_s.length < 1
|
278
252
|
return false if @name.nil?
|
279
|
-
return false if @name.to_s.length < 1
|
280
253
|
return false if @role.nil?
|
281
|
-
return false if @role.to_s.length < 1
|
282
254
|
return false if @languages.nil?
|
283
255
|
return false if @allow_email.nil?
|
284
256
|
return false if @allow_sms.nil?
|
@@ -289,48 +261,6 @@ module Notifo
|
|
289
261
|
true
|
290
262
|
end
|
291
263
|
|
292
|
-
# Custom attribute writer method with validation
|
293
|
-
# @param [Object] id Value to be assigned
|
294
|
-
def id=(id)
|
295
|
-
if id.nil?
|
296
|
-
fail ArgumentError, 'id cannot be nil'
|
297
|
-
end
|
298
|
-
|
299
|
-
if id.to_s.length < 1
|
300
|
-
fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.'
|
301
|
-
end
|
302
|
-
|
303
|
-
@id = id
|
304
|
-
end
|
305
|
-
|
306
|
-
# Custom attribute writer method with validation
|
307
|
-
# @param [Object] name Value to be assigned
|
308
|
-
def name=(name)
|
309
|
-
if name.nil?
|
310
|
-
fail ArgumentError, 'name cannot be nil'
|
311
|
-
end
|
312
|
-
|
313
|
-
if name.to_s.length < 1
|
314
|
-
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
315
|
-
end
|
316
|
-
|
317
|
-
@name = name
|
318
|
-
end
|
319
|
-
|
320
|
-
# Custom attribute writer method with validation
|
321
|
-
# @param [Object] role Value to be assigned
|
322
|
-
def role=(role)
|
323
|
-
if role.nil?
|
324
|
-
fail ArgumentError, 'role cannot be nil'
|
325
|
-
end
|
326
|
-
|
327
|
-
if role.to_s.length < 1
|
328
|
-
fail ArgumentError, 'invalid value for "role", the character length must be great than or equal to 1.'
|
329
|
-
end
|
330
|
-
|
331
|
-
@role = role
|
332
|
-
end
|
333
|
-
|
334
264
|
# Checks equality by comparing each attribute.
|
335
265
|
# @param [Object] Object to be compared
|
336
266
|
def ==(o)
|
@@ -379,9 +309,7 @@ module Notifo
|
|
379
309
|
def build_from_hash(attributes)
|
380
310
|
return nil unless attributes.is_a?(Hash)
|
381
311
|
self.class.openapi_types.each_pair do |key, type|
|
382
|
-
if
|
383
|
-
self.send("#{key}=", nil)
|
384
|
-
elsif type =~ /\AArray<(.*)>/i
|
312
|
+
if type =~ /\AArray<(.*)>/i
|
385
313
|
# check to ensure the input is an array given that the attribute
|
386
314
|
# is documented as an array but the input is not
|
387
315
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -389,6 +317,8 @@ module Notifo
|
|
389
317
|
end
|
390
318
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
391
319
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
320
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
321
|
+
self.send("#{key}=", nil)
|
392
322
|
end
|
393
323
|
end
|
394
324
|
|
@@ -401,8 +331,8 @@ module Notifo
|
|
401
331
|
# @return [Object] Deserialized data
|
402
332
|
def _deserialize(type, value)
|
403
333
|
case type.to_sym
|
404
|
-
when :
|
405
|
-
|
334
|
+
when :DateTime
|
335
|
+
DateTime.parse(value)
|
406
336
|
when :Date
|
407
337
|
Date.parse(value)
|
408
338
|
when :String
|
@@ -432,9 +362,7 @@ module Notifo
|
|
432
362
|
end
|
433
363
|
end
|
434
364
|
else # model
|
435
|
-
|
436
|
-
klass = Notifo.const_get(type)
|
437
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
365
|
+
SwaggerClient.const_get(type).build_from_hash(value)
|
438
366
|
end
|
439
367
|
end
|
440
368
|
|
@@ -482,8 +410,5 @@ module Notifo
|
|
482
410
|
else
|
483
411
|
value
|
484
412
|
end
|
485
|
-
end
|
486
|
-
|
487
|
-
end
|
488
|
-
|
413
|
+
end end
|
489
414
|
end
|
@@ -1,19 +1,17 @@
|
|
1
1
|
=begin
|
2
2
|
#Notifo API
|
3
3
|
|
4
|
-
#No description provided (generated by
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.1.0-SNAPSHOT
|
6
|
+
OpenAPI spec version: 1.0.0
|
10
7
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.24
|
11
10
|
=end
|
12
11
|
|
13
12
|
require 'date'
|
14
|
-
require 'time'
|
15
13
|
|
16
|
-
module
|
14
|
+
module SwaggerClient
|
17
15
|
class AppDto
|
18
16
|
# The id of the app.
|
19
17
|
attr_accessor :id
|
@@ -45,20 +43,15 @@ module Notifo
|
|
45
43
|
}
|
46
44
|
end
|
47
45
|
|
48
|
-
# Returns all the JSON keys this model knows about
|
49
|
-
def self.acceptable_attributes
|
50
|
-
attribute_map.values
|
51
|
-
end
|
52
|
-
|
53
46
|
# Attribute type mapping.
|
54
47
|
def self.openapi_types
|
55
48
|
{
|
56
|
-
:'id' => :'
|
57
|
-
:'name' => :'
|
58
|
-
:'role' => :'
|
59
|
-
:'languages' => :'
|
60
|
-
:'api_keys' => :'
|
61
|
-
:'counters' => :'
|
49
|
+
:'id' => :'Object',
|
50
|
+
:'name' => :'Object',
|
51
|
+
:'role' => :'Object',
|
52
|
+
:'languages' => :'Object',
|
53
|
+
:'api_keys' => :'Object',
|
54
|
+
:'counters' => :'Object'
|
62
55
|
}
|
63
56
|
end
|
64
57
|
|
@@ -67,18 +60,18 @@ module Notifo
|
|
67
60
|
Set.new([
|
68
61
|
])
|
69
62
|
end
|
70
|
-
|
63
|
+
|
71
64
|
# Initializes the object
|
72
65
|
# @param [Hash] attributes Model attributes in the form of hash
|
73
66
|
def initialize(attributes = {})
|
74
67
|
if (!attributes.is_a?(Hash))
|
75
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::AppDto` initialize method"
|
76
69
|
end
|
77
70
|
|
78
71
|
# check to see if the attribute exists and convert string to symbol for hash key
|
79
72
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
73
|
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
74
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::AppDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
75
|
end
|
83
76
|
h[k.to_sym] = v
|
84
77
|
}
|
@@ -122,26 +115,14 @@ module Notifo
|
|
122
115
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
123
116
|
end
|
124
117
|
|
125
|
-
if @id.to_s.length < 1
|
126
|
-
invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.')
|
127
|
-
end
|
128
|
-
|
129
118
|
if @name.nil?
|
130
119
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
131
120
|
end
|
132
121
|
|
133
|
-
if @name.to_s.length < 1
|
134
|
-
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
135
|
-
end
|
136
|
-
|
137
122
|
if @role.nil?
|
138
123
|
invalid_properties.push('invalid value for "role", role cannot be nil.')
|
139
124
|
end
|
140
125
|
|
141
|
-
if @role.to_s.length < 1
|
142
|
-
invalid_properties.push('invalid value for "role", the character length must be great than or equal to 1.')
|
143
|
-
end
|
144
|
-
|
145
126
|
if @languages.nil?
|
146
127
|
invalid_properties.push('invalid value for "languages", languages cannot be nil.')
|
147
128
|
end
|
@@ -161,59 +142,14 @@ module Notifo
|
|
161
142
|
# @return true if the model is valid
|
162
143
|
def valid?
|
163
144
|
return false if @id.nil?
|
164
|
-
return false if @id.to_s.length < 1
|
165
145
|
return false if @name.nil?
|
166
|
-
return false if @name.to_s.length < 1
|
167
146
|
return false if @role.nil?
|
168
|
-
return false if @role.to_s.length < 1
|
169
147
|
return false if @languages.nil?
|
170
148
|
return false if @api_keys.nil?
|
171
149
|
return false if @counters.nil?
|
172
150
|
true
|
173
151
|
end
|
174
152
|
|
175
|
-
# Custom attribute writer method with validation
|
176
|
-
# @param [Object] id Value to be assigned
|
177
|
-
def id=(id)
|
178
|
-
if id.nil?
|
179
|
-
fail ArgumentError, 'id cannot be nil'
|
180
|
-
end
|
181
|
-
|
182
|
-
if id.to_s.length < 1
|
183
|
-
fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.'
|
184
|
-
end
|
185
|
-
|
186
|
-
@id = id
|
187
|
-
end
|
188
|
-
|
189
|
-
# Custom attribute writer method with validation
|
190
|
-
# @param [Object] name Value to be assigned
|
191
|
-
def name=(name)
|
192
|
-
if name.nil?
|
193
|
-
fail ArgumentError, 'name cannot be nil'
|
194
|
-
end
|
195
|
-
|
196
|
-
if name.to_s.length < 1
|
197
|
-
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
198
|
-
end
|
199
|
-
|
200
|
-
@name = name
|
201
|
-
end
|
202
|
-
|
203
|
-
# Custom attribute writer method with validation
|
204
|
-
# @param [Object] role Value to be assigned
|
205
|
-
def role=(role)
|
206
|
-
if role.nil?
|
207
|
-
fail ArgumentError, 'role cannot be nil'
|
208
|
-
end
|
209
|
-
|
210
|
-
if role.to_s.length < 1
|
211
|
-
fail ArgumentError, 'invalid value for "role", the character length must be great than or equal to 1.'
|
212
|
-
end
|
213
|
-
|
214
|
-
@role = role
|
215
|
-
end
|
216
|
-
|
217
153
|
# Checks equality by comparing each attribute.
|
218
154
|
# @param [Object] Object to be compared
|
219
155
|
def ==(o)
|
@@ -252,9 +188,7 @@ module Notifo
|
|
252
188
|
def build_from_hash(attributes)
|
253
189
|
return nil unless attributes.is_a?(Hash)
|
254
190
|
self.class.openapi_types.each_pair do |key, type|
|
255
|
-
if
|
256
|
-
self.send("#{key}=", nil)
|
257
|
-
elsif type =~ /\AArray<(.*)>/i
|
191
|
+
if type =~ /\AArray<(.*)>/i
|
258
192
|
# check to ensure the input is an array given that the attribute
|
259
193
|
# is documented as an array but the input is not
|
260
194
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -262,6 +196,8 @@ module Notifo
|
|
262
196
|
end
|
263
197
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
264
198
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
199
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
200
|
+
self.send("#{key}=", nil)
|
265
201
|
end
|
266
202
|
end
|
267
203
|
|
@@ -274,8 +210,8 @@ module Notifo
|
|
274
210
|
# @return [Object] Deserialized data
|
275
211
|
def _deserialize(type, value)
|
276
212
|
case type.to_sym
|
277
|
-
when :
|
278
|
-
|
213
|
+
when :DateTime
|
214
|
+
DateTime.parse(value)
|
279
215
|
when :Date
|
280
216
|
Date.parse(value)
|
281
217
|
when :String
|
@@ -305,9 +241,7 @@ module Notifo
|
|
305
241
|
end
|
306
242
|
end
|
307
243
|
else # model
|
308
|
-
|
309
|
-
klass = Notifo.const_get(type)
|
310
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
244
|
+
SwaggerClient.const_get(type).build_from_hash(value)
|
311
245
|
end
|
312
246
|
end
|
313
247
|
|
@@ -355,8 +289,5 @@ module Notifo
|
|
355
289
|
else
|
356
290
|
value
|
357
291
|
end
|
358
|
-
end
|
359
|
-
|
360
|
-
end
|
361
|
-
|
292
|
+
end end
|
362
293
|
end
|
@@ -0,0 +1,206 @@
|
|
1
|
+
=begin
|
2
|
+
#Notifo API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.24
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'date'
|
13
|
+
|
14
|
+
module SwaggerClient
|
15
|
+
class Body
|
16
|
+
attr_accessor :file
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'file' => :'file'
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
# Attribute type mapping.
|
26
|
+
def self.openapi_types
|
27
|
+
{
|
28
|
+
:'file' => :'Object'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# List of attributes with nullable: true
|
33
|
+
def self.openapi_nullable
|
34
|
+
Set.new([
|
35
|
+
])
|
36
|
+
end
|
37
|
+
|
38
|
+
# Initializes the object
|
39
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
40
|
+
def initialize(attributes = {})
|
41
|
+
if (!attributes.is_a?(Hash))
|
42
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SwaggerClient::Body` initialize method"
|
43
|
+
end
|
44
|
+
|
45
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
46
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
47
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
48
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SwaggerClient::Body`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
49
|
+
end
|
50
|
+
h[k.to_sym] = v
|
51
|
+
}
|
52
|
+
|
53
|
+
if attributes.key?(:'file')
|
54
|
+
self.file = attributes[:'file']
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
59
|
+
# @return Array for valid properties with the reasons
|
60
|
+
def list_invalid_properties
|
61
|
+
invalid_properties = Array.new
|
62
|
+
invalid_properties
|
63
|
+
end
|
64
|
+
|
65
|
+
# Check to see if the all the properties in the model are valid
|
66
|
+
# @return true if the model is valid
|
67
|
+
def valid?
|
68
|
+
true
|
69
|
+
end
|
70
|
+
|
71
|
+
# Checks equality by comparing each attribute.
|
72
|
+
# @param [Object] Object to be compared
|
73
|
+
def ==(o)
|
74
|
+
return true if self.equal?(o)
|
75
|
+
self.class == o.class &&
|
76
|
+
file == o.file
|
77
|
+
end
|
78
|
+
|
79
|
+
# @see the `==` method
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def eql?(o)
|
82
|
+
self == o
|
83
|
+
end
|
84
|
+
|
85
|
+
# Calculates hash code according to all attributes.
|
86
|
+
# @return [Integer] Hash code
|
87
|
+
def hash
|
88
|
+
[file].hash
|
89
|
+
end
|
90
|
+
|
91
|
+
# Builds the object from hash
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
93
|
+
# @return [Object] Returns the model itself
|
94
|
+
def self.build_from_hash(attributes)
|
95
|
+
new.build_from_hash(attributes)
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def build_from_hash(attributes)
|
102
|
+
return nil unless attributes.is_a?(Hash)
|
103
|
+
self.class.openapi_types.each_pair do |key, type|
|
104
|
+
if type =~ /\AArray<(.*)>/i
|
105
|
+
# check to ensure the input is an array given that the attribute
|
106
|
+
# is documented as an array but the input is not
|
107
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
108
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
109
|
+
end
|
110
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
111
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
112
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
|
+
self.send("#{key}=", nil)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
self
|
118
|
+
end
|
119
|
+
|
120
|
+
# Deserializes the data based on type
|
121
|
+
# @param string type Data type
|
122
|
+
# @param string value Value to be deserialized
|
123
|
+
# @return [Object] Deserialized data
|
124
|
+
def _deserialize(type, value)
|
125
|
+
case type.to_sym
|
126
|
+
when :DateTime
|
127
|
+
DateTime.parse(value)
|
128
|
+
when :Date
|
129
|
+
Date.parse(value)
|
130
|
+
when :String
|
131
|
+
value.to_s
|
132
|
+
when :Integer
|
133
|
+
value.to_i
|
134
|
+
when :Float
|
135
|
+
value.to_f
|
136
|
+
when :Boolean
|
137
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
138
|
+
true
|
139
|
+
else
|
140
|
+
false
|
141
|
+
end
|
142
|
+
when :Object
|
143
|
+
# generic object (usually a Hash), return directly
|
144
|
+
value
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
148
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
151
|
+
{}.tap do |hash|
|
152
|
+
value.each do |k, v|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
else # model
|
157
|
+
SwaggerClient.const_get(type).build_from_hash(value)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# Returns the string representation of the object
|
162
|
+
# @return [String] String presentation of the object
|
163
|
+
def to_s
|
164
|
+
to_hash.to_s
|
165
|
+
end
|
166
|
+
|
167
|
+
# to_body is an alias to to_hash (backward compatibility)
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
169
|
+
def to_body
|
170
|
+
to_hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the object in the form of hash
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
175
|
+
def to_hash
|
176
|
+
hash = {}
|
177
|
+
self.class.attribute_map.each_pair do |attr, param|
|
178
|
+
value = self.send(attr)
|
179
|
+
if value.nil?
|
180
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
181
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
182
|
+
end
|
183
|
+
|
184
|
+
hash[param] = _to_hash(value)
|
185
|
+
end
|
186
|
+
hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Outputs non-array value in the form of hash
|
190
|
+
# For object, use to_hash. Otherwise, just return the value
|
191
|
+
# @param [Object] value Any valid value
|
192
|
+
# @return [Hash] Returns the value in the form of hash
|
193
|
+
def _to_hash(value)
|
194
|
+
if value.is_a?(Array)
|
195
|
+
value.compact.map { |v| _to_hash(v) }
|
196
|
+
elsif value.is_a?(Hash)
|
197
|
+
{}.tap do |hash|
|
198
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
199
|
+
end
|
200
|
+
elsif value.respond_to? :to_hash
|
201
|
+
value.to_hash
|
202
|
+
else
|
203
|
+
value
|
204
|
+
end
|
205
|
+
end end
|
206
|
+
end
|