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,277 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Notifo API
|
3
|
-
|
4
|
-
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 1.0.0
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.1.0-SNAPSHOT
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
require 'time'
|
15
|
-
|
16
|
-
module Notifo
|
17
|
-
class AddContributorDto
|
18
|
-
# The email of the new contributor.
|
19
|
-
attr_accessor :email
|
20
|
-
|
21
|
-
# The role.
|
22
|
-
attr_accessor :role
|
23
|
-
|
24
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
-
def self.attribute_map
|
26
|
-
{
|
27
|
-
:'email' => :'email',
|
28
|
-
:'role' => :'role'
|
29
|
-
}
|
30
|
-
end
|
31
|
-
|
32
|
-
# Returns all the JSON keys this model knows about
|
33
|
-
def self.acceptable_attributes
|
34
|
-
attribute_map.values
|
35
|
-
end
|
36
|
-
|
37
|
-
# Attribute type mapping.
|
38
|
-
def self.openapi_types
|
39
|
-
{
|
40
|
-
:'email' => :'String',
|
41
|
-
:'role' => :'String'
|
42
|
-
}
|
43
|
-
end
|
44
|
-
|
45
|
-
# List of attributes with nullable: true
|
46
|
-
def self.openapi_nullable
|
47
|
-
Set.new([
|
48
|
-
])
|
49
|
-
end
|
50
|
-
|
51
|
-
# Initializes the object
|
52
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
-
def initialize(attributes = {})
|
54
|
-
if (!attributes.is_a?(Hash))
|
55
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Notifo::AddContributorDto` initialize method"
|
56
|
-
end
|
57
|
-
|
58
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Notifo::AddContributorDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
-
end
|
63
|
-
h[k.to_sym] = v
|
64
|
-
}
|
65
|
-
|
66
|
-
if attributes.key?(:'email')
|
67
|
-
self.email = attributes[:'email']
|
68
|
-
end
|
69
|
-
|
70
|
-
if attributes.key?(:'role')
|
71
|
-
self.role = attributes[:'role']
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
-
# @return Array for valid properties with the reasons
|
77
|
-
def list_invalid_properties
|
78
|
-
invalid_properties = Array.new
|
79
|
-
if @email.nil?
|
80
|
-
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
81
|
-
end
|
82
|
-
|
83
|
-
if @email.to_s.length < 1
|
84
|
-
invalid_properties.push('invalid value for "email", the character length must be great than or equal to 1.')
|
85
|
-
end
|
86
|
-
|
87
|
-
if @role.nil?
|
88
|
-
invalid_properties.push('invalid value for "role", role cannot be nil.')
|
89
|
-
end
|
90
|
-
|
91
|
-
if @role.to_s.length < 1
|
92
|
-
invalid_properties.push('invalid value for "role", the character length must be great than or equal to 1.')
|
93
|
-
end
|
94
|
-
|
95
|
-
invalid_properties
|
96
|
-
end
|
97
|
-
|
98
|
-
# Check to see if the all the properties in the model are valid
|
99
|
-
# @return true if the model is valid
|
100
|
-
def valid?
|
101
|
-
return false if @email.nil?
|
102
|
-
return false if @email.to_s.length < 1
|
103
|
-
return false if @role.nil?
|
104
|
-
return false if @role.to_s.length < 1
|
105
|
-
true
|
106
|
-
end
|
107
|
-
|
108
|
-
# Custom attribute writer method with validation
|
109
|
-
# @param [Object] email Value to be assigned
|
110
|
-
def email=(email)
|
111
|
-
if email.nil?
|
112
|
-
fail ArgumentError, 'email cannot be nil'
|
113
|
-
end
|
114
|
-
|
115
|
-
if email.to_s.length < 1
|
116
|
-
fail ArgumentError, 'invalid value for "email", the character length must be great than or equal to 1.'
|
117
|
-
end
|
118
|
-
|
119
|
-
@email = email
|
120
|
-
end
|
121
|
-
|
122
|
-
# Custom attribute writer method with validation
|
123
|
-
# @param [Object] role Value to be assigned
|
124
|
-
def role=(role)
|
125
|
-
if role.nil?
|
126
|
-
fail ArgumentError, 'role cannot be nil'
|
127
|
-
end
|
128
|
-
|
129
|
-
if role.to_s.length < 1
|
130
|
-
fail ArgumentError, 'invalid value for "role", the character length must be great than or equal to 1.'
|
131
|
-
end
|
132
|
-
|
133
|
-
@role = role
|
134
|
-
end
|
135
|
-
|
136
|
-
# Checks equality by comparing each attribute.
|
137
|
-
# @param [Object] Object to be compared
|
138
|
-
def ==(o)
|
139
|
-
return true if self.equal?(o)
|
140
|
-
self.class == o.class &&
|
141
|
-
email == o.email &&
|
142
|
-
role == o.role
|
143
|
-
end
|
144
|
-
|
145
|
-
# @see the `==` method
|
146
|
-
# @param [Object] Object to be compared
|
147
|
-
def eql?(o)
|
148
|
-
self == o
|
149
|
-
end
|
150
|
-
|
151
|
-
# Calculates hash code according to all attributes.
|
152
|
-
# @return [Integer] Hash code
|
153
|
-
def hash
|
154
|
-
[email, role].hash
|
155
|
-
end
|
156
|
-
|
157
|
-
# Builds the object from hash
|
158
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
159
|
-
# @return [Object] Returns the model itself
|
160
|
-
def self.build_from_hash(attributes)
|
161
|
-
new.build_from_hash(attributes)
|
162
|
-
end
|
163
|
-
|
164
|
-
# Builds the object from hash
|
165
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
166
|
-
# @return [Object] Returns the model itself
|
167
|
-
def build_from_hash(attributes)
|
168
|
-
return nil unless attributes.is_a?(Hash)
|
169
|
-
self.class.openapi_types.each_pair do |key, type|
|
170
|
-
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
171
|
-
self.send("#{key}=", nil)
|
172
|
-
elsif type =~ /\AArray<(.*)>/i
|
173
|
-
# check to ensure the input is an array given that the attribute
|
174
|
-
# is documented as an array but the input is not
|
175
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
176
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
177
|
-
end
|
178
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
179
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
180
|
-
end
|
181
|
-
end
|
182
|
-
|
183
|
-
self
|
184
|
-
end
|
185
|
-
|
186
|
-
# Deserializes the data based on type
|
187
|
-
# @param string type Data type
|
188
|
-
# @param string value Value to be deserialized
|
189
|
-
# @return [Object] Deserialized data
|
190
|
-
def _deserialize(type, value)
|
191
|
-
case type.to_sym
|
192
|
-
when :Time
|
193
|
-
Time.parse(value)
|
194
|
-
when :Date
|
195
|
-
Date.parse(value)
|
196
|
-
when :String
|
197
|
-
value.to_s
|
198
|
-
when :Integer
|
199
|
-
value.to_i
|
200
|
-
when :Float
|
201
|
-
value.to_f
|
202
|
-
when :Boolean
|
203
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
204
|
-
true
|
205
|
-
else
|
206
|
-
false
|
207
|
-
end
|
208
|
-
when :Object
|
209
|
-
# generic object (usually a Hash), return directly
|
210
|
-
value
|
211
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
212
|
-
inner_type = Regexp.last_match[:inner_type]
|
213
|
-
value.map { |v| _deserialize(inner_type, v) }
|
214
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
215
|
-
k_type = Regexp.last_match[:k_type]
|
216
|
-
v_type = Regexp.last_match[:v_type]
|
217
|
-
{}.tap do |hash|
|
218
|
-
value.each do |k, v|
|
219
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
220
|
-
end
|
221
|
-
end
|
222
|
-
else # model
|
223
|
-
# models (e.g. Pet) or oneOf
|
224
|
-
klass = Notifo.const_get(type)
|
225
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
226
|
-
end
|
227
|
-
end
|
228
|
-
|
229
|
-
# Returns the string representation of the object
|
230
|
-
# @return [String] String presentation of the object
|
231
|
-
def to_s
|
232
|
-
to_hash.to_s
|
233
|
-
end
|
234
|
-
|
235
|
-
# to_body is an alias to to_hash (backward compatibility)
|
236
|
-
# @return [Hash] Returns the object in the form of hash
|
237
|
-
def to_body
|
238
|
-
to_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
|
-
# Outputs non-array value in the form of hash
|
258
|
-
# For object, use to_hash. Otherwise, just return the value
|
259
|
-
# @param [Object] value Any valid value
|
260
|
-
# @return [Hash] Returns the value in the form of hash
|
261
|
-
def _to_hash(value)
|
262
|
-
if value.is_a?(Array)
|
263
|
-
value.compact.map { |v| _to_hash(v) }
|
264
|
-
elsif value.is_a?(Hash)
|
265
|
-
{}.tap do |hash|
|
266
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
267
|
-
end
|
268
|
-
elsif value.respond_to? :to_hash
|
269
|
-
value.to_hash
|
270
|
-
else
|
271
|
-
value
|
272
|
-
end
|
273
|
-
end
|
274
|
-
|
275
|
-
end
|
276
|
-
|
277
|
-
end
|
@@ -1,311 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Notifo API
|
3
|
-
|
4
|
-
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 1.0.0
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.1.0-SNAPSHOT
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
require 'time'
|
15
|
-
|
16
|
-
module Notifo
|
17
|
-
class AppContributorDto
|
18
|
-
# The id of the user.
|
19
|
-
attr_accessor :user_id
|
20
|
-
|
21
|
-
# The name of the user.
|
22
|
-
attr_accessor :user_name
|
23
|
-
|
24
|
-
# The role.
|
25
|
-
attr_accessor :role
|
26
|
-
|
27
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
-
def self.attribute_map
|
29
|
-
{
|
30
|
-
:'user_id' => :'userId',
|
31
|
-
:'user_name' => :'userName',
|
32
|
-
:'role' => :'role'
|
33
|
-
}
|
34
|
-
end
|
35
|
-
|
36
|
-
# Returns all the JSON keys this model knows about
|
37
|
-
def self.acceptable_attributes
|
38
|
-
attribute_map.values
|
39
|
-
end
|
40
|
-
|
41
|
-
# Attribute type mapping.
|
42
|
-
def self.openapi_types
|
43
|
-
{
|
44
|
-
:'user_id' => :'String',
|
45
|
-
:'user_name' => :'String',
|
46
|
-
:'role' => :'String'
|
47
|
-
}
|
48
|
-
end
|
49
|
-
|
50
|
-
# List of attributes with nullable: true
|
51
|
-
def self.openapi_nullable
|
52
|
-
Set.new([
|
53
|
-
])
|
54
|
-
end
|
55
|
-
|
56
|
-
# Initializes the object
|
57
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
-
def initialize(attributes = {})
|
59
|
-
if (!attributes.is_a?(Hash))
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Notifo::AppContributorDto` initialize method"
|
61
|
-
end
|
62
|
-
|
63
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Notifo::AppContributorDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
|
-
end
|
68
|
-
h[k.to_sym] = v
|
69
|
-
}
|
70
|
-
|
71
|
-
if attributes.key?(:'user_id')
|
72
|
-
self.user_id = attributes[:'user_id']
|
73
|
-
end
|
74
|
-
|
75
|
-
if attributes.key?(:'user_name')
|
76
|
-
self.user_name = attributes[:'user_name']
|
77
|
-
end
|
78
|
-
|
79
|
-
if attributes.key?(:'role')
|
80
|
-
self.role = attributes[:'role']
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
85
|
-
# @return Array for valid properties with the reasons
|
86
|
-
def list_invalid_properties
|
87
|
-
invalid_properties = Array.new
|
88
|
-
if @user_id.nil?
|
89
|
-
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
90
|
-
end
|
91
|
-
|
92
|
-
if @user_id.to_s.length < 1
|
93
|
-
invalid_properties.push('invalid value for "user_id", the character length must be great than or equal to 1.')
|
94
|
-
end
|
95
|
-
|
96
|
-
if @user_name.nil?
|
97
|
-
invalid_properties.push('invalid value for "user_name", user_name cannot be nil.')
|
98
|
-
end
|
99
|
-
|
100
|
-
if @user_name.to_s.length < 1
|
101
|
-
invalid_properties.push('invalid value for "user_name", the character length must be great than or equal to 1.')
|
102
|
-
end
|
103
|
-
|
104
|
-
if @role.nil?
|
105
|
-
invalid_properties.push('invalid value for "role", role cannot be nil.')
|
106
|
-
end
|
107
|
-
|
108
|
-
if @role.to_s.length < 1
|
109
|
-
invalid_properties.push('invalid value for "role", the character length must be great than or equal to 1.')
|
110
|
-
end
|
111
|
-
|
112
|
-
invalid_properties
|
113
|
-
end
|
114
|
-
|
115
|
-
# Check to see if the all the properties in the model are valid
|
116
|
-
# @return true if the model is valid
|
117
|
-
def valid?
|
118
|
-
return false if @user_id.nil?
|
119
|
-
return false if @user_id.to_s.length < 1
|
120
|
-
return false if @user_name.nil?
|
121
|
-
return false if @user_name.to_s.length < 1
|
122
|
-
return false if @role.nil?
|
123
|
-
return false if @role.to_s.length < 1
|
124
|
-
true
|
125
|
-
end
|
126
|
-
|
127
|
-
# Custom attribute writer method with validation
|
128
|
-
# @param [Object] user_id Value to be assigned
|
129
|
-
def user_id=(user_id)
|
130
|
-
if user_id.nil?
|
131
|
-
fail ArgumentError, 'user_id cannot be nil'
|
132
|
-
end
|
133
|
-
|
134
|
-
if user_id.to_s.length < 1
|
135
|
-
fail ArgumentError, 'invalid value for "user_id", the character length must be great than or equal to 1.'
|
136
|
-
end
|
137
|
-
|
138
|
-
@user_id = user_id
|
139
|
-
end
|
140
|
-
|
141
|
-
# Custom attribute writer method with validation
|
142
|
-
# @param [Object] user_name Value to be assigned
|
143
|
-
def user_name=(user_name)
|
144
|
-
if user_name.nil?
|
145
|
-
fail ArgumentError, 'user_name cannot be nil'
|
146
|
-
end
|
147
|
-
|
148
|
-
if user_name.to_s.length < 1
|
149
|
-
fail ArgumentError, 'invalid value for "user_name", the character length must be great than or equal to 1.'
|
150
|
-
end
|
151
|
-
|
152
|
-
@user_name = user_name
|
153
|
-
end
|
154
|
-
|
155
|
-
# Custom attribute writer method with validation
|
156
|
-
# @param [Object] role Value to be assigned
|
157
|
-
def role=(role)
|
158
|
-
if role.nil?
|
159
|
-
fail ArgumentError, 'role cannot be nil'
|
160
|
-
end
|
161
|
-
|
162
|
-
if role.to_s.length < 1
|
163
|
-
fail ArgumentError, 'invalid value for "role", the character length must be great than or equal to 1.'
|
164
|
-
end
|
165
|
-
|
166
|
-
@role = role
|
167
|
-
end
|
168
|
-
|
169
|
-
# Checks equality by comparing each attribute.
|
170
|
-
# @param [Object] Object to be compared
|
171
|
-
def ==(o)
|
172
|
-
return true if self.equal?(o)
|
173
|
-
self.class == o.class &&
|
174
|
-
user_id == o.user_id &&
|
175
|
-
user_name == o.user_name &&
|
176
|
-
role == o.role
|
177
|
-
end
|
178
|
-
|
179
|
-
# @see the `==` method
|
180
|
-
# @param [Object] Object to be compared
|
181
|
-
def eql?(o)
|
182
|
-
self == o
|
183
|
-
end
|
184
|
-
|
185
|
-
# Calculates hash code according to all attributes.
|
186
|
-
# @return [Integer] Hash code
|
187
|
-
def hash
|
188
|
-
[user_id, user_name, role].hash
|
189
|
-
end
|
190
|
-
|
191
|
-
# Builds the object from hash
|
192
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
193
|
-
# @return [Object] Returns the model itself
|
194
|
-
def self.build_from_hash(attributes)
|
195
|
-
new.build_from_hash(attributes)
|
196
|
-
end
|
197
|
-
|
198
|
-
# Builds the object from hash
|
199
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
200
|
-
# @return [Object] Returns the model itself
|
201
|
-
def build_from_hash(attributes)
|
202
|
-
return nil unless attributes.is_a?(Hash)
|
203
|
-
self.class.openapi_types.each_pair do |key, type|
|
204
|
-
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
205
|
-
self.send("#{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[self.class.attribute_map[key]].is_a?(Array)
|
210
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
211
|
-
end
|
212
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
213
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
214
|
-
end
|
215
|
-
end
|
216
|
-
|
217
|
-
self
|
218
|
-
end
|
219
|
-
|
220
|
-
# Deserializes the data based on type
|
221
|
-
# @param string type Data type
|
222
|
-
# @param string value Value to be deserialized
|
223
|
-
# @return [Object] Deserialized data
|
224
|
-
def _deserialize(type, value)
|
225
|
-
case type.to_sym
|
226
|
-
when :Time
|
227
|
-
Time.parse(value)
|
228
|
-
when :Date
|
229
|
-
Date.parse(value)
|
230
|
-
when :String
|
231
|
-
value.to_s
|
232
|
-
when :Integer
|
233
|
-
value.to_i
|
234
|
-
when :Float
|
235
|
-
value.to_f
|
236
|
-
when :Boolean
|
237
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
238
|
-
true
|
239
|
-
else
|
240
|
-
false
|
241
|
-
end
|
242
|
-
when :Object
|
243
|
-
# generic object (usually a Hash), return directly
|
244
|
-
value
|
245
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
246
|
-
inner_type = Regexp.last_match[:inner_type]
|
247
|
-
value.map { |v| _deserialize(inner_type, v) }
|
248
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
249
|
-
k_type = Regexp.last_match[:k_type]
|
250
|
-
v_type = Regexp.last_match[:v_type]
|
251
|
-
{}.tap do |hash|
|
252
|
-
value.each do |k, v|
|
253
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
254
|
-
end
|
255
|
-
end
|
256
|
-
else # model
|
257
|
-
# models (e.g. Pet) or oneOf
|
258
|
-
klass = Notifo.const_get(type)
|
259
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
260
|
-
end
|
261
|
-
end
|
262
|
-
|
263
|
-
# Returns the string representation of the object
|
264
|
-
# @return [String] String presentation of the object
|
265
|
-
def to_s
|
266
|
-
to_hash.to_s
|
267
|
-
end
|
268
|
-
|
269
|
-
# to_body is an alias to to_hash (backward compatibility)
|
270
|
-
# @return [Hash] Returns the object in the form of hash
|
271
|
-
def to_body
|
272
|
-
to_hash
|
273
|
-
end
|
274
|
-
|
275
|
-
# Returns the object in the form of hash
|
276
|
-
# @return [Hash] Returns the object in the form of hash
|
277
|
-
def to_hash
|
278
|
-
hash = {}
|
279
|
-
self.class.attribute_map.each_pair do |attr, param|
|
280
|
-
value = self.send(attr)
|
281
|
-
if value.nil?
|
282
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
283
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
284
|
-
end
|
285
|
-
|
286
|
-
hash[param] = _to_hash(value)
|
287
|
-
end
|
288
|
-
hash
|
289
|
-
end
|
290
|
-
|
291
|
-
# Outputs non-array value in the form of hash
|
292
|
-
# For object, use to_hash. Otherwise, just return the value
|
293
|
-
# @param [Object] value Any valid value
|
294
|
-
# @return [Hash] Returns the value in the form of hash
|
295
|
-
def _to_hash(value)
|
296
|
-
if value.is_a?(Array)
|
297
|
-
value.compact.map { |v| _to_hash(v) }
|
298
|
-
elsif value.is_a?(Hash)
|
299
|
-
{}.tap do |hash|
|
300
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
301
|
-
end
|
302
|
-
elsif value.respond_to? :to_hash
|
303
|
-
value.to_hash
|
304
|
-
else
|
305
|
-
value
|
306
|
-
end
|
307
|
-
end
|
308
|
-
|
309
|
-
end
|
310
|
-
|
311
|
-
end
|