pingram 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +54 -0
  4. data/Rakefile +10 -0
  5. data/lib/pingram/api/account_api.rb +506 -0
  6. data/lib/pingram/api/addresses_api.rb +209 -0
  7. data/lib/pingram/api/components_api.rb +396 -0
  8. data/lib/pingram/api/default_api.rb +88 -0
  9. data/lib/pingram/api/domains_api.rb +204 -0
  10. data/lib/pingram/api/editor_api.rb +88 -0
  11. data/lib/pingram/api/environments_api.rb +215 -0
  12. data/lib/pingram/api/health_api.rb +77 -0
  13. data/lib/pingram/api/insights_api.rb +88 -0
  14. data/lib/pingram/api/keys_api.rb +204 -0
  15. data/lib/pingram/api/logs_api.rb +375 -0
  16. data/lib/pingram/api/members_api.rb +433 -0
  17. data/lib/pingram/api/sender_api.rb +221 -0
  18. data/lib/pingram/api/templates_api.rb +479 -0
  19. data/lib/pingram/api/types_api.rb +335 -0
  20. data/lib/pingram/api/user_api.rb +587 -0
  21. data/lib/pingram/api/users_api.rb +228 -0
  22. data/lib/pingram/api_client.rb +397 -0
  23. data/lib/pingram/api_error.rb +58 -0
  24. data/lib/pingram/api_model_base.rb +88 -0
  25. data/lib/pingram/client_wrapper.rb +212 -0
  26. data/lib/pingram/configuration.rb +330 -0
  27. data/lib/pingram/models/account_addresses_response.rb +166 -0
  28. data/lib/pingram/models/account_addresses_response_addresses_inner.rb +301 -0
  29. data/lib/pingram/models/account_get_response.rb +354 -0
  30. data/lib/pingram/models/account_get_response_pending_downgrade_usage_limit.rb +201 -0
  31. data/lib/pingram/models/address_response.rb +164 -0
  32. data/lib/pingram/models/auto_join_get_response.rb +192 -0
  33. data/lib/pingram/models/auto_join_post_response.rb +192 -0
  34. data/lib/pingram/models/auto_join_request_body.rb +166 -0
  35. data/lib/pingram/models/bee_token_v2.rb +190 -0
  36. data/lib/pingram/models/billing_post_request_body.rb +216 -0
  37. data/lib/pingram/models/billing_post_response_body.rb +367 -0
  38. data/lib/pingram/models/billing_post_response_body_pending_downgrade_usage_limit.rb +202 -0
  39. data/lib/pingram/models/channels_enum.rb +45 -0
  40. data/lib/pingram/models/create_account_request_body.rb +164 -0
  41. data/lib/pingram/models/create_account_response.rb +190 -0
  42. data/lib/pingram/models/create_address_request.rb +182 -0
  43. data/lib/pingram/models/create_key_request.rb +227 -0
  44. data/lib/pingram/models/create_key_response.rb +308 -0
  45. data/lib/pingram/models/delete_key_response.rb +165 -0
  46. data/lib/pingram/models/delete_user_response.rb +164 -0
  47. data/lib/pingram/models/email_auth_token_post_request.rb +147 -0
  48. data/lib/pingram/models/email_component_patch_request.rb +174 -0
  49. data/lib/pingram/models/email_component_post_request.rb +217 -0
  50. data/lib/pingram/models/email_component_response.rb +424 -0
  51. data/lib/pingram/models/email_component_response_referenced_by_inner.rb +238 -0
  52. data/lib/pingram/models/environment.rb +270 -0
  53. data/lib/pingram/models/environment_create_request.rb +164 -0
  54. data/lib/pingram/models/environment_patch_request.rb +176 -0
  55. data/lib/pingram/models/get_account_metadata_response.rb +164 -0
  56. data/lib/pingram/models/get_account_metadata_response_user_account_metadata.rb +216 -0
  57. data/lib/pingram/models/get_email_components_response_inner.rb +424 -0
  58. data/lib/pingram/models/get_environments_response_inner.rb +270 -0
  59. data/lib/pingram/models/get_inapp_notifications_response.rb +166 -0
  60. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner.rb +389 -0
  61. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options.rb +206 -0
  62. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_instant.rb +191 -0
  63. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_off.rb +164 -0
  64. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_replies_inner.rb +190 -0
  65. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_template.rb +103 -0
  66. data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_template_any_of.rb +301 -0
  67. data/lib/pingram/models/get_keys_response.rb +168 -0
  68. data/lib/pingram/models/get_keys_response_keys_inner.rb +371 -0
  69. data/lib/pingram/models/get_logs_response.rb +175 -0
  70. data/lib/pingram/models/get_logs_response_messages_inner.rb +419 -0
  71. data/lib/pingram/models/get_logs_response_messages_inner_attachments_inner.rb +225 -0
  72. data/lib/pingram/models/get_members_response_inner.rb +236 -0
  73. data/lib/pingram/models/get_metrics_response_inner.rb +238 -0
  74. data/lib/pingram/models/get_metrics_response_inner_messages_inner.rb +159 -0
  75. data/lib/pingram/models/get_notifications_response_inner.rb +317 -0
  76. data/lib/pingram/models/get_notifications_response_inner_deduplication.rb +164 -0
  77. data/lib/pingram/models/get_notifications_response_inner_options.rb +201 -0
  78. data/lib/pingram/models/get_notifications_response_inner_options_email.rb +242 -0
  79. data/lib/pingram/models/get_notifications_response_inner_options_email_daily.rb +173 -0
  80. data/lib/pingram/models/get_notifications_response_inner_options_email_monthly.rb +216 -0
  81. data/lib/pingram/models/get_notifications_response_inner_options_email_weekly.rb +182 -0
  82. data/lib/pingram/models/get_notifications_response_inner_templates_inner.rb +214 -0
  83. data/lib/pingram/models/get_notifications_response_inner_throttling.rb +294 -0
  84. data/lib/pingram/models/get_senders_response_inner.rb +342 -0
  85. data/lib/pingram/models/get_templates_response.rb +103 -0
  86. data/lib/pingram/models/get_users_response.rb +201 -0
  87. data/lib/pingram/models/get_users_response_users_inner.rb +268 -0
  88. data/lib/pingram/models/get_users_response_users_inner_email_suppression_status.rb +214 -0
  89. data/lib/pingram/models/get_users_response_users_inner_push_tokens_inner.rb +252 -0
  90. data/lib/pingram/models/get_users_response_users_inner_push_tokens_inner_device.rb +209 -0
  91. data/lib/pingram/models/get_users_response_users_inner_slack_token.rb +317 -0
  92. data/lib/pingram/models/get_users_response_users_inner_slack_token_authed_user.rb +192 -0
  93. data/lib/pingram/models/get_users_response_users_inner_slack_token_enterprise.rb +156 -0
  94. data/lib/pingram/models/get_users_response_users_inner_slack_token_incoming_webhook.rb +174 -0
  95. data/lib/pingram/models/get_users_response_users_inner_slack_token_response_metadata.rb +200 -0
  96. data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner.rb +164 -0
  97. data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub.rb +191 -0
  98. data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub_keys.rb +190 -0
  99. data/lib/pingram/models/in_app_notification_patch_request.rb +231 -0
  100. data/lib/pingram/models/in_app_notification_unread_clear_request.rb +156 -0
  101. data/lib/pingram/models/inapp_unread_count_response.rb +164 -0
  102. data/lib/pingram/models/inbound_request_body.rb +103 -0
  103. data/lib/pingram/models/inbound_response_body.rb +216 -0
  104. data/lib/pingram/models/inbound_response_body_results_inner.rb +216 -0
  105. data/lib/pingram/models/ingishts_post_request.rb +288 -0
  106. data/lib/pingram/models/ingishts_post_request_label_options.rb +147 -0
  107. data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner.rb +208 -0
  108. data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat.rb +211 -0
  109. data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric.rb +171 -0
  110. data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric_dimensions_inner.rb +159 -0
  111. data/lib/pingram/models/intercom_webhook.rb +293 -0
  112. data/lib/pingram/models/intercom_webhook_data.rb +164 -0
  113. data/lib/pingram/models/intercom_webhook_data_item.rb +103 -0
  114. data/lib/pingram/models/intercom_webhook_data_item_any_of.rb +453 -0
  115. data/lib/pingram/models/intercom_webhook_data_item_any_of_contacts.rb +216 -0
  116. data/lib/pingram/models/intercom_webhook_data_item_any_of_contacts_contacts_inner.rb +199 -0
  117. data/lib/pingram/models/intercom_webhook_data_item_any_of_source.rb +260 -0
  118. data/lib/pingram/models/intercom_webhook_data_item_any_of_source_author.rb +208 -0
  119. data/lib/pingram/models/invite_post_response.rb +156 -0
  120. data/lib/pingram/models/log_query_post_body.rb +251 -0
  121. data/lib/pingram/models/logs_bulk_request.rb +167 -0
  122. data/lib/pingram/models/logs_get_response.rb +167 -0
  123. data/lib/pingram/models/logs_get_response_logs_inner.rb +1808 -0
  124. data/lib/pingram/models/logs_query_response.rb +165 -0
  125. data/lib/pingram/models/logs_query_result_response.rb +194 -0
  126. data/lib/pingram/models/logs_retention_response.rb +165 -0
  127. data/lib/pingram/models/logs_tail_response.rb +167 -0
  128. data/lib/pingram/models/member_invite_request.rb +173 -0
  129. data/lib/pingram/models/member_update_request.rb +164 -0
  130. data/lib/pingram/models/message_response.rb +164 -0
  131. data/lib/pingram/models/notification.rb +317 -0
  132. data/lib/pingram/models/notification_create_request.rb +227 -0
  133. data/lib/pingram/models/notification_patch_request.rb +203 -0
  134. data/lib/pingram/models/post_email_test_request.rb +303 -0
  135. data/lib/pingram/models/post_email_test_response.rb +175 -0
  136. data/lib/pingram/models/post_senders_request_body.rb +164 -0
  137. data/lib/pingram/models/post_user_request.rb +215 -0
  138. data/lib/pingram/models/sender_post_body.rb +324 -0
  139. data/lib/pingram/models/sender_post_body_email.rb +217 -0
  140. data/lib/pingram/models/sender_post_body_inapp.rb +182 -0
  141. data/lib/pingram/models/sender_post_body_mobile_push.rb +190 -0
  142. data/lib/pingram/models/sender_post_body_options.rb +165 -0
  143. data/lib/pingram/models/sender_post_body_options_apn.rb +201 -0
  144. data/lib/pingram/models/sender_post_body_options_email.rb +209 -0
  145. data/lib/pingram/models/sender_post_body_options_email_attachments_inner.rb +103 -0
  146. data/lib/pingram/models/sender_post_body_options_email_attachments_inner_any_of.rb +190 -0
  147. data/lib/pingram/models/sender_post_body_options_email_attachments_inner_any_of1.rb +199 -0
  148. data/lib/pingram/models/sender_post_body_options_fcm.rb +147 -0
  149. data/lib/pingram/models/sender_post_body_options_fcm_android.rb +208 -0
  150. data/lib/pingram/models/sender_post_body_slack.rb +299 -0
  151. data/lib/pingram/models/sender_post_body_slack_metadata.rb +173 -0
  152. data/lib/pingram/models/sender_post_body_slack_metadata_entities_inner.rb +257 -0
  153. data/lib/pingram/models/sender_post_body_slack_metadata_entities_inner_external_ref.rb +174 -0
  154. data/lib/pingram/models/sender_post_body_sms.rb +156 -0
  155. data/lib/pingram/models/sender_post_body_sms_auto_reply.rb +164 -0
  156. data/lib/pingram/models/sender_post_body_to.rb +251 -0
  157. data/lib/pingram/models/sender_post_body_user.rb +268 -0
  158. data/lib/pingram/models/sender_post_body_web_push.rb +208 -0
  159. data/lib/pingram/models/sender_post_response.rb +192 -0
  160. data/lib/pingram/models/set_default_template_request.rb +204 -0
  161. data/lib/pingram/models/slack_interactivity_response.rb +165 -0
  162. data/lib/pingram/models/slack_oauth_request.rb +190 -0
  163. data/lib/pingram/models/success_response.rb +164 -0
  164. data/lib/pingram/models/supabase_configure_request.rb +242 -0
  165. data/lib/pingram/models/supabase_configure_response.rb +173 -0
  166. data/lib/pingram/models/supabase_o_auth_request.rb +216 -0
  167. data/lib/pingram/models/supabase_o_auth_response.rb +173 -0
  168. data/lib/pingram/models/supabase_projects_response.rb +166 -0
  169. data/lib/pingram/models/supabase_projects_response_projects_inner.rb +268 -0
  170. data/lib/pingram/models/supabase_status_response.rb +208 -0
  171. data/lib/pingram/models/template.rb +301 -0
  172. data/lib/pingram/models/template_patch_request.rb +104 -0
  173. data/lib/pingram/models/template_patch_request_any_of.rb +199 -0
  174. data/lib/pingram/models/template_patch_request_any_of1.rb +187 -0
  175. data/lib/pingram/models/template_patch_request_any_of1_batch.rb +217 -0
  176. data/lib/pingram/models/template_patch_request_any_of1_instant.rb +184 -0
  177. data/lib/pingram/models/template_post_request.rb +346 -0
  178. data/lib/pingram/models/template_post_request_batch.rb +217 -0
  179. data/lib/pingram/models/template_post_request_instant.rb +183 -0
  180. data/lib/pingram/models/update_address_request.rb +182 -0
  181. data/lib/pingram/models/user.rb +268 -0
  182. data/lib/pingram/models/user_suppression_delete_response.rb +164 -0
  183. data/lib/pingram/models/webhook_response.rb +182 -0
  184. data/lib/pingram/version.rb +15 -0
  185. data/lib/pingram.rb +215 -0
  186. data/pingram.gemspec +38 -0
  187. metadata +270 -0
@@ -0,0 +1,419 @@
1
+ =begin
2
+ #NotificationAPI
3
+
4
+ #Internal API for notification delivery and management
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Pingram
17
+ class GetLogsResponseMessagesInner < ApiModelBase
18
+ attr_accessor :tracking_id
19
+
20
+ attr_accessor :event_type
21
+
22
+ attr_accessor :timestamp
23
+
24
+ attr_accessor :epoch_ms
25
+
26
+ attr_accessor :inbox
27
+
28
+ attr_accessor :from
29
+
30
+ attr_accessor :from_name
31
+
32
+ attr_accessor :subject
33
+
34
+ attr_accessor :to
35
+
36
+ attr_accessor :cc
37
+
38
+ attr_accessor :bcc
39
+
40
+ attr_accessor :reply_to
41
+
42
+ attr_accessor :body_text
43
+
44
+ attr_accessor :body_html
45
+
46
+ attr_accessor :attachments
47
+
48
+ attr_accessor :message_id
49
+
50
+ attr_accessor :in_reply_to
51
+
52
+ attr_accessor :references
53
+
54
+ attr_accessor :resolution_type
55
+
56
+ class EnumAttributeValidator
57
+ attr_reader :datatype
58
+ attr_reader :allowable_values
59
+
60
+ def initialize(datatype, allowable_values)
61
+ @allowable_values = allowable_values.map do |value|
62
+ case datatype.to_s
63
+ when /Integer/i
64
+ value.to_i
65
+ when /Float/i
66
+ value.to_f
67
+ else
68
+ value
69
+ end
70
+ end
71
+ end
72
+
73
+ def valid?(value)
74
+ !value || allowable_values.include?(value)
75
+ end
76
+ end
77
+
78
+ # Attribute mapping from ruby-style variable name to JSON key.
79
+ def self.attribute_map
80
+ {
81
+ :'tracking_id' => :'trackingId',
82
+ :'event_type' => :'eventType',
83
+ :'timestamp' => :'timestamp',
84
+ :'epoch_ms' => :'epochMs',
85
+ :'inbox' => :'inbox',
86
+ :'from' => :'from',
87
+ :'from_name' => :'fromName',
88
+ :'subject' => :'subject',
89
+ :'to' => :'to',
90
+ :'cc' => :'cc',
91
+ :'bcc' => :'bcc',
92
+ :'reply_to' => :'replyTo',
93
+ :'body_text' => :'bodyText',
94
+ :'body_html' => :'bodyHtml',
95
+ :'attachments' => :'attachments',
96
+ :'message_id' => :'messageId',
97
+ :'in_reply_to' => :'inReplyTo',
98
+ :'references' => :'references',
99
+ :'resolution_type' => :'resolutionType'
100
+ }
101
+ end
102
+
103
+ # Returns attribute mapping this model knows about
104
+ def self.acceptable_attribute_map
105
+ attribute_map
106
+ end
107
+
108
+ # Returns all the JSON keys this model knows about
109
+ def self.acceptable_attributes
110
+ acceptable_attribute_map.values
111
+ end
112
+
113
+ # Attribute type mapping.
114
+ def self.openapi_types
115
+ {
116
+ :'tracking_id' => :'String',
117
+ :'event_type' => :'String',
118
+ :'timestamp' => :'String',
119
+ :'epoch_ms' => :'Float',
120
+ :'inbox' => :'String',
121
+ :'from' => :'String',
122
+ :'from_name' => :'String',
123
+ :'subject' => :'String',
124
+ :'to' => :'Array<String>',
125
+ :'cc' => :'Array<String>',
126
+ :'bcc' => :'Array<String>',
127
+ :'reply_to' => :'String',
128
+ :'body_text' => :'String',
129
+ :'body_html' => :'String',
130
+ :'attachments' => :'Array<GetLogsResponseMessagesInnerAttachmentsInner>',
131
+ :'message_id' => :'String',
132
+ :'in_reply_to' => :'String',
133
+ :'references' => :'String',
134
+ :'resolution_type' => :'String'
135
+ }
136
+ end
137
+
138
+ # List of attributes with nullable: true
139
+ def self.openapi_nullable
140
+ Set.new([
141
+ ])
142
+ end
143
+
144
+ # Initializes the object
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ def initialize(attributes = {})
147
+ if (!attributes.is_a?(Hash))
148
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetLogsResponseMessagesInner` initialize method"
149
+ end
150
+
151
+ # check to see if the attribute exists and convert string to symbol for hash key
152
+ acceptable_attribute_map = self.class.acceptable_attribute_map
153
+ attributes = attributes.each_with_object({}) { |(k, v), h|
154
+ if (!acceptable_attribute_map.key?(k.to_sym))
155
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetLogsResponseMessagesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
156
+ end
157
+ h[k.to_sym] = v
158
+ }
159
+
160
+ if attributes.key?(:'tracking_id')
161
+ self.tracking_id = attributes[:'tracking_id']
162
+ else
163
+ self.tracking_id = nil
164
+ end
165
+
166
+ if attributes.key?(:'event_type')
167
+ self.event_type = attributes[:'event_type']
168
+ else
169
+ self.event_type = nil
170
+ end
171
+
172
+ if attributes.key?(:'timestamp')
173
+ self.timestamp = attributes[:'timestamp']
174
+ else
175
+ self.timestamp = nil
176
+ end
177
+
178
+ if attributes.key?(:'epoch_ms')
179
+ self.epoch_ms = attributes[:'epoch_ms']
180
+ else
181
+ self.epoch_ms = nil
182
+ end
183
+
184
+ if attributes.key?(:'inbox')
185
+ self.inbox = attributes[:'inbox']
186
+ end
187
+
188
+ if attributes.key?(:'from')
189
+ self.from = attributes[:'from']
190
+ end
191
+
192
+ if attributes.key?(:'from_name')
193
+ self.from_name = attributes[:'from_name']
194
+ end
195
+
196
+ if attributes.key?(:'subject')
197
+ self.subject = attributes[:'subject']
198
+ end
199
+
200
+ if attributes.key?(:'to')
201
+ if (value = attributes[:'to']).is_a?(Array)
202
+ self.to = value
203
+ end
204
+ end
205
+
206
+ if attributes.key?(:'cc')
207
+ if (value = attributes[:'cc']).is_a?(Array)
208
+ self.cc = value
209
+ end
210
+ end
211
+
212
+ if attributes.key?(:'bcc')
213
+ if (value = attributes[:'bcc']).is_a?(Array)
214
+ self.bcc = value
215
+ end
216
+ end
217
+
218
+ if attributes.key?(:'reply_to')
219
+ self.reply_to = attributes[:'reply_to']
220
+ end
221
+
222
+ if attributes.key?(:'body_text')
223
+ self.body_text = attributes[:'body_text']
224
+ end
225
+
226
+ if attributes.key?(:'body_html')
227
+ self.body_html = attributes[:'body_html']
228
+ end
229
+
230
+ if attributes.key?(:'attachments')
231
+ if (value = attributes[:'attachments']).is_a?(Array)
232
+ self.attachments = value
233
+ end
234
+ end
235
+
236
+ if attributes.key?(:'message_id')
237
+ self.message_id = attributes[:'message_id']
238
+ end
239
+
240
+ if attributes.key?(:'in_reply_to')
241
+ self.in_reply_to = attributes[:'in_reply_to']
242
+ end
243
+
244
+ if attributes.key?(:'references')
245
+ self.references = attributes[:'references']
246
+ end
247
+
248
+ if attributes.key?(:'resolution_type')
249
+ self.resolution_type = attributes[:'resolution_type']
250
+ end
251
+ end
252
+
253
+ # Show invalid properties with the reasons. Usually used together with valid?
254
+ # @return Array for valid properties with the reasons
255
+ def list_invalid_properties
256
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
257
+ invalid_properties = Array.new
258
+ if @tracking_id.nil?
259
+ invalid_properties.push('invalid value for "tracking_id", tracking_id cannot be nil.')
260
+ end
261
+
262
+ if @event_type.nil?
263
+ invalid_properties.push('invalid value for "event_type", event_type cannot be nil.')
264
+ end
265
+
266
+ if @timestamp.nil?
267
+ invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
268
+ end
269
+
270
+ if @epoch_ms.nil?
271
+ invalid_properties.push('invalid value for "epoch_ms", epoch_ms cannot be nil.')
272
+ end
273
+
274
+ invalid_properties
275
+ end
276
+
277
+ # Check to see if the all the properties in the model are valid
278
+ # @return true if the model is valid
279
+ def valid?
280
+ warn '[DEPRECATED] the `valid?` method is obsolete'
281
+ return false if @tracking_id.nil?
282
+ return false if @event_type.nil?
283
+ return false if @timestamp.nil?
284
+ return false if @epoch_ms.nil?
285
+ resolution_type_validator = EnumAttributeValidator.new('String', ["reply", "builtin", "custom"])
286
+ return false unless resolution_type_validator.valid?(@resolution_type)
287
+ true
288
+ end
289
+
290
+ # Custom attribute writer method with validation
291
+ # @param [Object] tracking_id Value to be assigned
292
+ def tracking_id=(tracking_id)
293
+ if tracking_id.nil?
294
+ fail ArgumentError, 'tracking_id cannot be nil'
295
+ end
296
+
297
+ @tracking_id = tracking_id
298
+ end
299
+
300
+ # Custom attribute writer method with validation
301
+ # @param [Object] event_type Value to be assigned
302
+ def event_type=(event_type)
303
+ if event_type.nil?
304
+ fail ArgumentError, 'event_type cannot be nil'
305
+ end
306
+
307
+ @event_type = event_type
308
+ end
309
+
310
+ # Custom attribute writer method with validation
311
+ # @param [Object] timestamp Value to be assigned
312
+ def timestamp=(timestamp)
313
+ if timestamp.nil?
314
+ fail ArgumentError, 'timestamp cannot be nil'
315
+ end
316
+
317
+ @timestamp = timestamp
318
+ end
319
+
320
+ # Custom attribute writer method with validation
321
+ # @param [Object] epoch_ms Value to be assigned
322
+ def epoch_ms=(epoch_ms)
323
+ if epoch_ms.nil?
324
+ fail ArgumentError, 'epoch_ms cannot be nil'
325
+ end
326
+
327
+ @epoch_ms = epoch_ms
328
+ end
329
+
330
+ # Custom attribute writer method checking allowed values (enum).
331
+ # @param [Object] resolution_type Object to be assigned
332
+ def resolution_type=(resolution_type)
333
+ validator = EnumAttributeValidator.new('String', ["reply", "builtin", "custom"])
334
+ unless validator.valid?(resolution_type)
335
+ fail ArgumentError, "invalid value for \"resolution_type\", must be one of #{validator.allowable_values}."
336
+ end
337
+ @resolution_type = resolution_type
338
+ end
339
+
340
+ # Checks equality by comparing each attribute.
341
+ # @param [Object] Object to be compared
342
+ def ==(o)
343
+ return true if self.equal?(o)
344
+ self.class == o.class &&
345
+ tracking_id == o.tracking_id &&
346
+ event_type == o.event_type &&
347
+ timestamp == o.timestamp &&
348
+ epoch_ms == o.epoch_ms &&
349
+ inbox == o.inbox &&
350
+ from == o.from &&
351
+ from_name == o.from_name &&
352
+ subject == o.subject &&
353
+ to == o.to &&
354
+ cc == o.cc &&
355
+ bcc == o.bcc &&
356
+ reply_to == o.reply_to &&
357
+ body_text == o.body_text &&
358
+ body_html == o.body_html &&
359
+ attachments == o.attachments &&
360
+ message_id == o.message_id &&
361
+ in_reply_to == o.in_reply_to &&
362
+ references == o.references &&
363
+ resolution_type == o.resolution_type
364
+ end
365
+
366
+ # @see the `==` method
367
+ # @param [Object] Object to be compared
368
+ def eql?(o)
369
+ self == o
370
+ end
371
+
372
+ # Calculates hash code according to all attributes.
373
+ # @return [Integer] Hash code
374
+ def hash
375
+ [tracking_id, event_type, timestamp, epoch_ms, inbox, from, from_name, subject, to, cc, bcc, reply_to, body_text, body_html, attachments, message_id, in_reply_to, references, resolution_type].hash
376
+ end
377
+
378
+ # Builds the object from hash
379
+ # @param [Hash] attributes Model attributes in the form of hash
380
+ # @return [Object] Returns the model itself
381
+ def self.build_from_hash(attributes)
382
+ return nil unless attributes.is_a?(Hash)
383
+ attributes = attributes.transform_keys(&:to_sym)
384
+ transformed_hash = {}
385
+ openapi_types.each_pair do |key, type|
386
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
387
+ transformed_hash["#{key}"] = nil
388
+ elsif type =~ /\AArray<(.*)>/i
389
+ # check to ensure the input is an array given that the attribute
390
+ # is documented as an array but the input is not
391
+ if attributes[attribute_map[key]].is_a?(Array)
392
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
393
+ end
394
+ elsif !attributes[attribute_map[key]].nil?
395
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
396
+ end
397
+ end
398
+ new(transformed_hash)
399
+ end
400
+
401
+ # Returns the object in the form of hash
402
+ # @return [Hash] Returns the object in the form of hash
403
+ def to_hash
404
+ hash = {}
405
+ self.class.attribute_map.each_pair do |attr, param|
406
+ value = self.send(attr)
407
+ if value.nil?
408
+ is_nullable = self.class.openapi_nullable.include?(attr)
409
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
410
+ end
411
+
412
+ hash[param] = _to_hash(value)
413
+ end
414
+ hash
415
+ end
416
+
417
+ end
418
+
419
+ end
@@ -0,0 +1,225 @@
1
+ =begin
2
+ #NotificationAPI
3
+
4
+ #Internal API for notification delivery and management
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Pingram
17
+ class GetLogsResponseMessagesInnerAttachmentsInner < ApiModelBase
18
+ attr_accessor :filename
19
+
20
+ attr_accessor :content_type
21
+
22
+ attr_accessor :size
23
+
24
+ attr_accessor :content_id
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'filename' => :'filename',
30
+ :'content_type' => :'contentType',
31
+ :'size' => :'size',
32
+ :'content_id' => :'contentId'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'filename' => :'String',
50
+ :'content_type' => :'String',
51
+ :'size' => :'Float',
52
+ :'content_id' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetLogsResponseMessagesInnerAttachmentsInner` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetLogsResponseMessagesInnerAttachmentsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'filename')
79
+ self.filename = attributes[:'filename']
80
+ else
81
+ self.filename = nil
82
+ end
83
+
84
+ if attributes.key?(:'content_type')
85
+ self.content_type = attributes[:'content_type']
86
+ else
87
+ self.content_type = nil
88
+ end
89
+
90
+ if attributes.key?(:'size')
91
+ self.size = attributes[:'size']
92
+ else
93
+ self.size = nil
94
+ end
95
+
96
+ if attributes.key?(:'content_id')
97
+ self.content_id = attributes[:'content_id']
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
105
+ invalid_properties = Array.new
106
+ if @filename.nil?
107
+ invalid_properties.push('invalid value for "filename", filename cannot be nil.')
108
+ end
109
+
110
+ if @content_type.nil?
111
+ invalid_properties.push('invalid value for "content_type", content_type cannot be nil.')
112
+ end
113
+
114
+ if @size.nil?
115
+ invalid_properties.push('invalid value for "size", size cannot be nil.')
116
+ end
117
+
118
+ invalid_properties
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ def valid?
124
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
+ return false if @filename.nil?
126
+ return false if @content_type.nil?
127
+ return false if @size.nil?
128
+ true
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] filename Value to be assigned
133
+ def filename=(filename)
134
+ if filename.nil?
135
+ fail ArgumentError, 'filename cannot be nil'
136
+ end
137
+
138
+ @filename = filename
139
+ end
140
+
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] content_type Value to be assigned
143
+ def content_type=(content_type)
144
+ if content_type.nil?
145
+ fail ArgumentError, 'content_type cannot be nil'
146
+ end
147
+
148
+ @content_type = content_type
149
+ end
150
+
151
+ # Custom attribute writer method with validation
152
+ # @param [Object] size Value to be assigned
153
+ def size=(size)
154
+ if size.nil?
155
+ fail ArgumentError, 'size cannot be nil'
156
+ end
157
+
158
+ @size = size
159
+ end
160
+
161
+ # Checks equality by comparing each attribute.
162
+ # @param [Object] Object to be compared
163
+ def ==(o)
164
+ return true if self.equal?(o)
165
+ self.class == o.class &&
166
+ filename == o.filename &&
167
+ content_type == o.content_type &&
168
+ size == o.size &&
169
+ content_id == o.content_id
170
+ end
171
+
172
+ # @see the `==` method
173
+ # @param [Object] Object to be compared
174
+ def eql?(o)
175
+ self == o
176
+ end
177
+
178
+ # Calculates hash code according to all attributes.
179
+ # @return [Integer] Hash code
180
+ def hash
181
+ [filename, content_type, size, content_id].hash
182
+ end
183
+
184
+ # Builds the object from hash
185
+ # @param [Hash] attributes Model attributes in the form of hash
186
+ # @return [Object] Returns the model itself
187
+ def self.build_from_hash(attributes)
188
+ return nil unless attributes.is_a?(Hash)
189
+ attributes = attributes.transform_keys(&:to_sym)
190
+ transformed_hash = {}
191
+ openapi_types.each_pair do |key, type|
192
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
193
+ transformed_hash["#{key}"] = nil
194
+ elsif type =~ /\AArray<(.*)>/i
195
+ # check to ensure the input is an array given that the attribute
196
+ # is documented as an array but the input is not
197
+ if attributes[attribute_map[key]].is_a?(Array)
198
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
199
+ end
200
+ elsif !attributes[attribute_map[key]].nil?
201
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
202
+ end
203
+ end
204
+ new(transformed_hash)
205
+ end
206
+
207
+ # Returns the object in the form of hash
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_hash
210
+ hash = {}
211
+ self.class.attribute_map.each_pair do |attr, param|
212
+ value = self.send(attr)
213
+ if value.nil?
214
+ is_nullable = self.class.openapi_nullable.include?(attr)
215
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
+ end
217
+
218
+ hash[param] = _to_hash(value)
219
+ end
220
+ hash
221
+ end
222
+
223
+ end
224
+
225
+ end