qubrics-mailbox 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +108 -0
  3. data/LICENSE +21 -0
  4. data/README.md +183 -0
  5. data/lib/qubrics/mailbox/client.rb +63 -0
  6. data/lib/qubrics/mailbox/version.rb +7 -0
  7. data/lib/qubrics/mailbox.rb +12 -0
  8. data/lib/qubrics_mailbox_generated/api/mailbox_api_api.rb +4371 -0
  9. data/lib/qubrics_mailbox_generated/api_client.rb +447 -0
  10. data/lib/qubrics_mailbox_generated/api_error.rb +58 -0
  11. data/lib/qubrics_mailbox_generated/api_model_base.rb +95 -0
  12. data/lib/qubrics_mailbox_generated/configuration.rb +400 -0
  13. data/lib/qubrics_mailbox_generated/models/api_error_detail.rb +219 -0
  14. data/lib/qubrics_mailbox_generated/models/api_error_error.rb +275 -0
  15. data/lib/qubrics_mailbox_generated/models/api_error_meta.rb +164 -0
  16. data/lib/qubrics_mailbox_generated/models/api_error_response.rb +216 -0
  17. data/lib/qubrics_mailbox_generated/models/batch_delete_mailbox_messages_body.rb +205 -0
  18. data/lib/qubrics_mailbox_generated/models/batch_update_mailbox_messages_body.rb +227 -0
  19. data/lib/qubrics_mailbox_generated/models/connection.rb +273 -0
  20. data/lib/qubrics_mailbox_generated/models/connection_credential.rb +226 -0
  21. data/lib/qubrics_mailbox_generated/models/connection_mailboxes_inner.rb +190 -0
  22. data/lib/qubrics_mailbox_generated/models/connection_response.rb +223 -0
  23. data/lib/qubrics_mailbox_generated/models/connection_team.rb +190 -0
  24. data/lib/qubrics_mailbox_generated/models/control_mailbox_draft_schedule.rb +232 -0
  25. data/lib/qubrics_mailbox_generated/models/create_mailbox_draft.rb +448 -0
  26. data/lib/qubrics_mailbox_generated/models/create_mailbox_draft_attachments_inner.rb +400 -0
  27. data/lib/qubrics_mailbox_generated/models/create_mailbox_draft_bcc_inner.rb +200 -0
  28. data/lib/qubrics_mailbox_generated/models/create_mailbox_draft_from.rb +201 -0
  29. data/lib/qubrics_mailbox_generated/models/create_mailbox_draft_source.rb +235 -0
  30. data/lib/qubrics_mailbox_generated/models/create_mailbox_folder_body.rb +183 -0
  31. data/lib/qubrics_mailbox_generated/models/cursor_pagination.rb +173 -0
  32. data/lib/qubrics_mailbox_generated/models/granted_mailbox.rb +192 -0
  33. data/lib/qubrics_mailbox_generated/models/granted_mailbox_list_response.rb +251 -0
  34. data/lib/qubrics_mailbox_generated/models/mailbox_address.rb +176 -0
  35. data/lib/qubrics_mailbox_generated/models/mailbox_attachment.rb +250 -0
  36. data/lib/qubrics_mailbox_generated/models/mailbox_attachment_text.rb +337 -0
  37. data/lib/qubrics_mailbox_generated/models/mailbox_attachment_text_response.rb +223 -0
  38. data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_intent_body.rb +228 -0
  39. data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_intent_result.rb +323 -0
  40. data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_intent_result_headers.rb +191 -0
  41. data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_intent_result_response.rb +223 -0
  42. data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_result.rb +243 -0
  43. data/lib/qubrics_mailbox_generated/models/mailbox_attachment_upload_result_response.rb +223 -0
  44. data/lib/qubrics_mailbox_generated/models/mailbox_batch_delete_messages_result.rb +248 -0
  45. data/lib/qubrics_mailbox_generated/models/mailbox_batch_delete_messages_result_response.rb +223 -0
  46. data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_body.rb +373 -0
  47. data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_item.rb +188 -0
  48. data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_result.rb +220 -0
  49. data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_result_response.rb +223 -0
  50. data/lib/qubrics_mailbox_generated/models/mailbox_batch_get_result_states.rb +150 -0
  51. data/lib/qubrics_mailbox_generated/models/mailbox_batch_message_failure.rb +216 -0
  52. data/lib/qubrics_mailbox_generated/models/mailbox_batch_message_states.rb +162 -0
  53. data/lib/qubrics_mailbox_generated/models/mailbox_batch_update_messages_result.rb +248 -0
  54. data/lib/qubrics_mailbox_generated/models/mailbox_batch_update_messages_result_response.rb +223 -0
  55. data/lib/qubrics_mailbox_generated/models/mailbox_changes.rb +307 -0
  56. data/lib/qubrics_mailbox_generated/models/mailbox_changes_response.rb +223 -0
  57. data/lib/qubrics_mailbox_generated/models/mailbox_content_headers.rb +214 -0
  58. data/lib/qubrics_mailbox_generated/models/mailbox_content_headers_full_inner.rb +190 -0
  59. data/lib/qubrics_mailbox_generated/models/mailbox_content_headers_selected.rb +234 -0
  60. data/lib/qubrics_mailbox_generated/models/mailbox_draft.rb +670 -0
  61. data/lib/qubrics_mailbox_generated/models/mailbox_draft_delete_response.rb +223 -0
  62. data/lib/qubrics_mailbox_generated/models/mailbox_draft_delete_response_all_of_data.rb +190 -0
  63. data/lib/qubrics_mailbox_generated/models/mailbox_draft_list_response.rb +251 -0
  64. data/lib/qubrics_mailbox_generated/models/mailbox_draft_response.rb +223 -0
  65. data/lib/qubrics_mailbox_generated/models/mailbox_folder.rb +307 -0
  66. data/lib/qubrics_mailbox_generated/models/mailbox_folder_cursor_list_response.rb +251 -0
  67. data/lib/qubrics_mailbox_generated/models/mailbox_folder_deleted_response.rb +223 -0
  68. data/lib/qubrics_mailbox_generated/models/mailbox_folder_query_changes.rb +270 -0
  69. data/lib/qubrics_mailbox_generated/models/mailbox_folder_query_changes_added_inner.rb +190 -0
  70. data/lib/qubrics_mailbox_generated/models/mailbox_folder_query_changes_response.rb +223 -0
  71. data/lib/qubrics_mailbox_generated/models/mailbox_folder_response.rb +223 -0
  72. data/lib/qubrics_mailbox_generated/models/mailbox_get_changes200_response.rb +103 -0
  73. data/lib/qubrics_mailbox_generated/models/mailbox_identity.rb +352 -0
  74. data/lib/qubrics_mailbox_generated/models/mailbox_identity_cursor_list_response.rb +251 -0
  75. data/lib/qubrics_mailbox_generated/models/mailbox_identity_list_meta.rb +173 -0
  76. data/lib/qubrics_mailbox_generated/models/mailbox_identity_response.rb +223 -0
  77. data/lib/qubrics_mailbox_generated/models/mailbox_me.rb +294 -0
  78. data/lib/qubrics_mailbox_generated/models/mailbox_me_item_response.rb +223 -0
  79. data/lib/qubrics_mailbox_generated/models/mailbox_message.rb +594 -0
  80. data/lib/qubrics_mailbox_generated/models/mailbox_message_content.rb +348 -0
  81. data/lib/qubrics_mailbox_generated/models/mailbox_message_content_body.rb +352 -0
  82. data/lib/qubrics_mailbox_generated/models/mailbox_message_content_body_html_cleaning.rb +241 -0
  83. data/lib/qubrics_mailbox_generated/models/mailbox_message_content_dates.rb +162 -0
  84. data/lib/qubrics_mailbox_generated/models/mailbox_message_content_participants.rb +262 -0
  85. data/lib/qubrics_mailbox_generated/models/mailbox_message_content_response.rb +223 -0
  86. data/lib/qubrics_mailbox_generated/models/mailbox_message_content_states.rb +176 -0
  87. data/lib/qubrics_mailbox_generated/models/mailbox_message_count.rb +176 -0
  88. data/lib/qubrics_mailbox_generated/models/mailbox_message_count_response.rb +223 -0
  89. data/lib/qubrics_mailbox_generated/models/mailbox_message_deleted_response.rb +223 -0
  90. data/lib/qubrics_mailbox_generated/models/mailbox_message_detail_response.rb +223 -0
  91. data/lib/qubrics_mailbox_generated/models/mailbox_message_flags.rb +242 -0
  92. data/lib/qubrics_mailbox_generated/models/mailbox_message_query_changes.rb +270 -0
  93. data/lib/qubrics_mailbox_generated/models/mailbox_message_query_changes_response.rb +223 -0
  94. data/lib/qubrics_mailbox_generated/models/mailbox_message_summary.rb +454 -0
  95. data/lib/qubrics_mailbox_generated/models/mailbox_message_summary_cursor_list_response.rb +251 -0
  96. data/lib/qubrics_mailbox_generated/models/mailbox_query_meta.rb +173 -0
  97. data/lib/qubrics_mailbox_generated/models/mailbox_quota.rb +359 -0
  98. data/lib/qubrics_mailbox_generated/models/mailbox_quota_cursor_list_response.rb +251 -0
  99. data/lib/qubrics_mailbox_generated/models/mailbox_raw_body.rb +279 -0
  100. data/lib/qubrics_mailbox_generated/models/mailbox_raw_body_body.rb +200 -0
  101. data/lib/qubrics_mailbox_generated/models/mailbox_raw_body_response.rb +223 -0
  102. data/lib/qubrics_mailbox_generated/models/mailbox_realtime_event.rb +366 -0
  103. data/lib/qubrics_mailbox_generated/models/mailbox_realtime_message.rb +492 -0
  104. data/lib/qubrics_mailbox_generated/models/mailbox_realtime_message_body.rb +214 -0
  105. data/lib/qubrics_mailbox_generated/models/mailbox_search_snippet.rb +190 -0
  106. data/lib/qubrics_mailbox_generated/models/mailbox_search_snippets_result.rb +206 -0
  107. data/lib/qubrics_mailbox_generated/models/mailbox_search_snippets_result_response.rb +223 -0
  108. data/lib/qubrics_mailbox_generated/models/mailbox_send_result_response.rb +223 -0
  109. data/lib/qubrics_mailbox_generated/models/mailbox_send_scope.rb +213 -0
  110. data/lib/qubrics_mailbox_generated/models/mailbox_sender_choices.rb +217 -0
  111. data/lib/qubrics_mailbox_generated/models/mailbox_sender_choices_from.rb +213 -0
  112. data/lib/qubrics_mailbox_generated/models/mailbox_sender_choices_reply_to.rb +213 -0
  113. data/lib/qubrics_mailbox_generated/models/mailbox_sender_choices_response.rb +223 -0
  114. data/lib/qubrics_mailbox_generated/models/mailbox_session.rb +294 -0
  115. data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities.rb +346 -0
  116. data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_attachments.rb +294 -0
  117. data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_folders.rb +320 -0
  118. data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_identities.rb +268 -0
  119. data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_messages.rb +516 -0
  120. data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_quotas.rb +242 -0
  121. data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_submissions.rb +242 -0
  122. data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_sync.rb +222 -0
  123. data/lib/qubrics_mailbox_generated/models/mailbox_session_capabilities_threads.rb +268 -0
  124. data/lib/qubrics_mailbox_generated/models/mailbox_session_endpoints.rb +334 -0
  125. data/lib/qubrics_mailbox_generated/models/mailbox_session_gated.rb +451 -0
  126. data/lib/qubrics_mailbox_generated/models/mailbox_session_limits.rb +448 -0
  127. data/lib/qubrics_mailbox_generated/models/mailbox_session_mailbox.rb +203 -0
  128. data/lib/qubrics_mailbox_generated/models/mailbox_session_response.rb +223 -0
  129. data/lib/qubrics_mailbox_generated/models/mailbox_session_states.rb +294 -0
  130. data/lib/qubrics_mailbox_generated/models/mailbox_submission.rb +321 -0
  131. data/lib/qubrics_mailbox_generated/models/mailbox_submission_cursor_list_response.rb +251 -0
  132. data/lib/qubrics_mailbox_generated/models/mailbox_submission_delivery_status.rb +200 -0
  133. data/lib/qubrics_mailbox_generated/models/mailbox_submission_envelope.rb +178 -0
  134. data/lib/qubrics_mailbox_generated/models/mailbox_submission_envelope_address.rb +178 -0
  135. data/lib/qubrics_mailbox_generated/models/mailbox_submission_response.rb +223 -0
  136. data/lib/qubrics_mailbox_generated/models/mailbox_sync_meta.rb +173 -0
  137. data/lib/qubrics_mailbox_generated/models/mailbox_thread.rb +377 -0
  138. data/lib/qubrics_mailbox_generated/models/mailbox_thread_content_meta.rb +244 -0
  139. data/lib/qubrics_mailbox_generated/models/mailbox_thread_content_meta_states.rb +188 -0
  140. data/lib/qubrics_mailbox_generated/models/mailbox_thread_content_response.rb +251 -0
  141. data/lib/qubrics_mailbox_generated/models/mailbox_thread_detail_response.rb +223 -0
  142. data/lib/qubrics_mailbox_generated/models/mailbox_thread_message_summary_cursor_list_response.rb +251 -0
  143. data/lib/qubrics_mailbox_generated/models/mailbox_thread_messages_meta.rb +199 -0
  144. data/lib/qubrics_mailbox_generated/models/mailbox_thread_summary.rb +349 -0
  145. data/lib/qubrics_mailbox_generated/models/mailbox_thread_summary_cursor_list_response.rb +251 -0
  146. data/lib/qubrics_mailbox_generated/models/mailbox_thread_summary_states.rb +162 -0
  147. data/lib/qubrics_mailbox_generated/models/mailbox_typed_changes.rb +164 -0
  148. data/lib/qubrics_mailbox_generated/models/mailbox_typed_changes_response.rb +223 -0
  149. data/lib/qubrics_mailbox_generated/models/mailbox_typed_changes_types.rb +192 -0
  150. data/lib/qubrics_mailbox_generated/models/mailbox_usage.rb +192 -0
  151. data/lib/qubrics_mailbox_generated/models/mailbox_usage_resource.rb +408 -0
  152. data/lib/qubrics_mailbox_generated/models/mailbox_usage_response.rb +223 -0
  153. data/lib/qubrics_mailbox_generated/models/mailbox_usage_states.rb +150 -0
  154. data/lib/qubrics_mailbox_generated/models/patch_mailbox_folder_body.rb +166 -0
  155. data/lib/qubrics_mailbox_generated/models/patch_mailbox_message_body.rb +168 -0
  156. data/lib/qubrics_mailbox_generated/models/response_meta.rb +164 -0
  157. data/lib/qubrics_mailbox_generated/models/send_mailbox_draft.rb +222 -0
  158. data/lib/qubrics_mailbox_generated/models/send_mailbox_message_body.rb +326 -0
  159. data/lib/qubrics_mailbox_generated/models/send_mailbox_message_body_attachments_inner.rb +103 -0
  160. data/lib/qubrics_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of.rb +217 -0
  161. data/lib/qubrics_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of1.rb +217 -0
  162. data/lib/qubrics_mailbox_generated/models/send_mailbox_message_result.rb +214 -0
  163. data/lib/qubrics_mailbox_generated/models/success_envelope.rb +192 -0
  164. data/lib/qubrics_mailbox_generated/models/update_mailbox_draft.rb +437 -0
  165. data/lib/qubrics_mailbox_generated/models/update_mailbox_identity_body.rb +216 -0
  166. data/lib/qubrics_mailbox_generated/version.rb +15 -0
  167. data/lib/qubrics_mailbox_generated.rb +210 -0
  168. metadata +290 -0
@@ -0,0 +1,448 @@
1
+ =begin
2
+ #Qubrics API
3
+
4
+ #Programmatic access to your Qubrics email infrastructure.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Qubrics::Mailbox::Generated
17
+ class MailboxSessionLimits < ApiModelBase
18
+ attr_accessor :attachment_upload_bytes_max
19
+
20
+ attr_accessor :batch_ids_max
21
+
22
+ attr_accessor :body_chars_max
23
+
24
+ attr_accessor :changes_limit_max
25
+
26
+ attr_accessor :draft_schedule_days_max
27
+
28
+ attr_accessor :inline_attachment_bytes_max
29
+
30
+ attr_accessor :keywords_per_update_max
31
+
32
+ attr_accessor :list_limit_max
33
+
34
+ attr_accessor :message_body_chars_default
35
+
36
+ attr_accessor :outbound_raw_message_bytes_max
37
+
38
+ attr_accessor :thread_body_chars_default
39
+
40
+ class EnumAttributeValidator
41
+ attr_reader :datatype
42
+ attr_reader :allowable_values
43
+
44
+ def initialize(datatype, allowable_values)
45
+ @allowable_values = allowable_values.map do |value|
46
+ case datatype.to_s
47
+ when /Integer/i
48
+ value.to_i
49
+ when /Float/i
50
+ value.to_f
51
+ else
52
+ value
53
+ end
54
+ end
55
+ end
56
+
57
+ def valid?(value)
58
+ !value || allowable_values.include?(value)
59
+ end
60
+ end
61
+
62
+ # Attribute mapping from ruby-style variable name to JSON key.
63
+ def self.attribute_map
64
+ {
65
+ :'attachment_upload_bytes_max' => :'attachment_upload_bytes_max',
66
+ :'batch_ids_max' => :'batch_ids_max',
67
+ :'body_chars_max' => :'body_chars_max',
68
+ :'changes_limit_max' => :'changes_limit_max',
69
+ :'draft_schedule_days_max' => :'draft_schedule_days_max',
70
+ :'inline_attachment_bytes_max' => :'inline_attachment_bytes_max',
71
+ :'keywords_per_update_max' => :'keywords_per_update_max',
72
+ :'list_limit_max' => :'list_limit_max',
73
+ :'message_body_chars_default' => :'message_body_chars_default',
74
+ :'outbound_raw_message_bytes_max' => :'outbound_raw_message_bytes_max',
75
+ :'thread_body_chars_default' => :'thread_body_chars_default'
76
+ }
77
+ end
78
+
79
+ # Returns attribute mapping this model knows about
80
+ def self.acceptable_attribute_map
81
+ attribute_map
82
+ end
83
+
84
+ # Returns all the JSON keys this model knows about
85
+ def self.acceptable_attributes
86
+ acceptable_attribute_map.values
87
+ end
88
+
89
+ # Attribute type mapping.
90
+ def self.openapi_types
91
+ {
92
+ :'attachment_upload_bytes_max' => :'Integer',
93
+ :'batch_ids_max' => :'Integer',
94
+ :'body_chars_max' => :'Integer',
95
+ :'changes_limit_max' => :'Integer',
96
+ :'draft_schedule_days_max' => :'Integer',
97
+ :'inline_attachment_bytes_max' => :'Integer',
98
+ :'keywords_per_update_max' => :'Integer',
99
+ :'list_limit_max' => :'Integer',
100
+ :'message_body_chars_default' => :'Integer',
101
+ :'outbound_raw_message_bytes_max' => :'Integer',
102
+ :'thread_body_chars_default' => :'Integer'
103
+ }
104
+ end
105
+
106
+ # List of attributes with nullable: true
107
+ def self.openapi_nullable
108
+ Set.new([
109
+ ])
110
+ end
111
+
112
+ # Initializes the object
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ def initialize(attributes = {})
115
+ if (!attributes.is_a?(Hash))
116
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Qubrics::Mailbox::Generated::MailboxSessionLimits` initialize method"
117
+ end
118
+
119
+ # check to see if the attribute exists and convert string to symbol for hash key
120
+ acceptable_attribute_map = self.class.acceptable_attribute_map
121
+ attributes = attributes.each_with_object({}) { |(k, v), h|
122
+ if (!acceptable_attribute_map.key?(k.to_sym))
123
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Qubrics::Mailbox::Generated::MailboxSessionLimits`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
124
+ end
125
+ h[k.to_sym] = v
126
+ }
127
+
128
+ if attributes.key?(:'attachment_upload_bytes_max')
129
+ self.attachment_upload_bytes_max = attributes[:'attachment_upload_bytes_max']
130
+ else
131
+ self.attachment_upload_bytes_max = nil
132
+ end
133
+
134
+ if attributes.key?(:'batch_ids_max')
135
+ self.batch_ids_max = attributes[:'batch_ids_max']
136
+ else
137
+ self.batch_ids_max = nil
138
+ end
139
+
140
+ if attributes.key?(:'body_chars_max')
141
+ self.body_chars_max = attributes[:'body_chars_max']
142
+ else
143
+ self.body_chars_max = nil
144
+ end
145
+
146
+ if attributes.key?(:'changes_limit_max')
147
+ self.changes_limit_max = attributes[:'changes_limit_max']
148
+ else
149
+ self.changes_limit_max = nil
150
+ end
151
+
152
+ if attributes.key?(:'draft_schedule_days_max')
153
+ self.draft_schedule_days_max = attributes[:'draft_schedule_days_max']
154
+ else
155
+ self.draft_schedule_days_max = nil
156
+ end
157
+
158
+ if attributes.key?(:'inline_attachment_bytes_max')
159
+ self.inline_attachment_bytes_max = attributes[:'inline_attachment_bytes_max']
160
+ else
161
+ self.inline_attachment_bytes_max = nil
162
+ end
163
+
164
+ if attributes.key?(:'keywords_per_update_max')
165
+ self.keywords_per_update_max = attributes[:'keywords_per_update_max']
166
+ else
167
+ self.keywords_per_update_max = nil
168
+ end
169
+
170
+ if attributes.key?(:'list_limit_max')
171
+ self.list_limit_max = attributes[:'list_limit_max']
172
+ else
173
+ self.list_limit_max = nil
174
+ end
175
+
176
+ if attributes.key?(:'message_body_chars_default')
177
+ self.message_body_chars_default = attributes[:'message_body_chars_default']
178
+ else
179
+ self.message_body_chars_default = nil
180
+ end
181
+
182
+ if attributes.key?(:'outbound_raw_message_bytes_max')
183
+ self.outbound_raw_message_bytes_max = attributes[:'outbound_raw_message_bytes_max']
184
+ else
185
+ self.outbound_raw_message_bytes_max = nil
186
+ end
187
+
188
+ if attributes.key?(:'thread_body_chars_default')
189
+ self.thread_body_chars_default = attributes[:'thread_body_chars_default']
190
+ else
191
+ self.thread_body_chars_default = nil
192
+ end
193
+ end
194
+
195
+ # Show invalid properties with the reasons. Usually used together with valid?
196
+ # @return Array for valid properties with the reasons
197
+ def list_invalid_properties
198
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
199
+ invalid_properties = Array.new
200
+ if @attachment_upload_bytes_max.nil?
201
+ invalid_properties.push('invalid value for "attachment_upload_bytes_max", attachment_upload_bytes_max cannot be nil.')
202
+ end
203
+
204
+ if @batch_ids_max.nil?
205
+ invalid_properties.push('invalid value for "batch_ids_max", batch_ids_max cannot be nil.')
206
+ end
207
+
208
+ if @body_chars_max.nil?
209
+ invalid_properties.push('invalid value for "body_chars_max", body_chars_max cannot be nil.')
210
+ end
211
+
212
+ if @changes_limit_max.nil?
213
+ invalid_properties.push('invalid value for "changes_limit_max", changes_limit_max cannot be nil.')
214
+ end
215
+
216
+ if @draft_schedule_days_max.nil?
217
+ invalid_properties.push('invalid value for "draft_schedule_days_max", draft_schedule_days_max cannot be nil.')
218
+ end
219
+
220
+ if @inline_attachment_bytes_max.nil?
221
+ invalid_properties.push('invalid value for "inline_attachment_bytes_max", inline_attachment_bytes_max cannot be nil.')
222
+ end
223
+
224
+ if @keywords_per_update_max.nil?
225
+ invalid_properties.push('invalid value for "keywords_per_update_max", keywords_per_update_max cannot be nil.')
226
+ end
227
+
228
+ if @list_limit_max.nil?
229
+ invalid_properties.push('invalid value for "list_limit_max", list_limit_max cannot be nil.')
230
+ end
231
+
232
+ if @message_body_chars_default.nil?
233
+ invalid_properties.push('invalid value for "message_body_chars_default", message_body_chars_default cannot be nil.')
234
+ end
235
+
236
+ if @outbound_raw_message_bytes_max.nil?
237
+ invalid_properties.push('invalid value for "outbound_raw_message_bytes_max", outbound_raw_message_bytes_max cannot be nil.')
238
+ end
239
+
240
+ if @thread_body_chars_default.nil?
241
+ invalid_properties.push('invalid value for "thread_body_chars_default", thread_body_chars_default cannot be nil.')
242
+ end
243
+
244
+ invalid_properties
245
+ end
246
+
247
+ # Check to see if the all the properties in the model are valid
248
+ # @return true if the model is valid
249
+ def valid?
250
+ warn '[DEPRECATED] the `valid?` method is obsolete'
251
+ return false if @attachment_upload_bytes_max.nil?
252
+ return false if @batch_ids_max.nil?
253
+ return false if @body_chars_max.nil?
254
+ return false if @changes_limit_max.nil?
255
+ return false if @draft_schedule_days_max.nil?
256
+ draft_schedule_days_max_validator = EnumAttributeValidator.new('Integer', [30, 11184809])
257
+ return false unless draft_schedule_days_max_validator.valid?(@draft_schedule_days_max)
258
+ return false if @inline_attachment_bytes_max.nil?
259
+ return false if @keywords_per_update_max.nil?
260
+ return false if @list_limit_max.nil?
261
+ return false if @message_body_chars_default.nil?
262
+ return false if @outbound_raw_message_bytes_max.nil?
263
+ return false if @thread_body_chars_default.nil?
264
+ true
265
+ end
266
+
267
+ # Custom attribute writer method with validation
268
+ # @param [Object] attachment_upload_bytes_max Value to be assigned
269
+ def attachment_upload_bytes_max=(attachment_upload_bytes_max)
270
+ if attachment_upload_bytes_max.nil?
271
+ fail ArgumentError, 'attachment_upload_bytes_max cannot be nil'
272
+ end
273
+
274
+ @attachment_upload_bytes_max = attachment_upload_bytes_max
275
+ end
276
+
277
+ # Custom attribute writer method with validation
278
+ # @param [Object] batch_ids_max Value to be assigned
279
+ def batch_ids_max=(batch_ids_max)
280
+ if batch_ids_max.nil?
281
+ fail ArgumentError, 'batch_ids_max cannot be nil'
282
+ end
283
+
284
+ @batch_ids_max = batch_ids_max
285
+ end
286
+
287
+ # Custom attribute writer method with validation
288
+ # @param [Object] body_chars_max Value to be assigned
289
+ def body_chars_max=(body_chars_max)
290
+ if body_chars_max.nil?
291
+ fail ArgumentError, 'body_chars_max cannot be nil'
292
+ end
293
+
294
+ @body_chars_max = body_chars_max
295
+ end
296
+
297
+ # Custom attribute writer method with validation
298
+ # @param [Object] changes_limit_max Value to be assigned
299
+ def changes_limit_max=(changes_limit_max)
300
+ if changes_limit_max.nil?
301
+ fail ArgumentError, 'changes_limit_max cannot be nil'
302
+ end
303
+
304
+ @changes_limit_max = changes_limit_max
305
+ end
306
+
307
+ # Custom attribute writer method checking allowed values (enum).
308
+ # @param [Object] draft_schedule_days_max Object to be assigned
309
+ def draft_schedule_days_max=(draft_schedule_days_max)
310
+ validator = EnumAttributeValidator.new('Integer', [30, 11184809])
311
+ unless validator.valid?(draft_schedule_days_max)
312
+ fail ArgumentError, "invalid value for \"draft_schedule_days_max\", must be one of #{validator.allowable_values}."
313
+ end
314
+ @draft_schedule_days_max = draft_schedule_days_max
315
+ end
316
+
317
+ # Custom attribute writer method with validation
318
+ # @param [Object] inline_attachment_bytes_max Value to be assigned
319
+ def inline_attachment_bytes_max=(inline_attachment_bytes_max)
320
+ if inline_attachment_bytes_max.nil?
321
+ fail ArgumentError, 'inline_attachment_bytes_max cannot be nil'
322
+ end
323
+
324
+ @inline_attachment_bytes_max = inline_attachment_bytes_max
325
+ end
326
+
327
+ # Custom attribute writer method with validation
328
+ # @param [Object] keywords_per_update_max Value to be assigned
329
+ def keywords_per_update_max=(keywords_per_update_max)
330
+ if keywords_per_update_max.nil?
331
+ fail ArgumentError, 'keywords_per_update_max cannot be nil'
332
+ end
333
+
334
+ @keywords_per_update_max = keywords_per_update_max
335
+ end
336
+
337
+ # Custom attribute writer method with validation
338
+ # @param [Object] list_limit_max Value to be assigned
339
+ def list_limit_max=(list_limit_max)
340
+ if list_limit_max.nil?
341
+ fail ArgumentError, 'list_limit_max cannot be nil'
342
+ end
343
+
344
+ @list_limit_max = list_limit_max
345
+ end
346
+
347
+ # Custom attribute writer method with validation
348
+ # @param [Object] message_body_chars_default Value to be assigned
349
+ def message_body_chars_default=(message_body_chars_default)
350
+ if message_body_chars_default.nil?
351
+ fail ArgumentError, 'message_body_chars_default cannot be nil'
352
+ end
353
+
354
+ @message_body_chars_default = message_body_chars_default
355
+ end
356
+
357
+ # Custom attribute writer method with validation
358
+ # @param [Object] outbound_raw_message_bytes_max Value to be assigned
359
+ def outbound_raw_message_bytes_max=(outbound_raw_message_bytes_max)
360
+ if outbound_raw_message_bytes_max.nil?
361
+ fail ArgumentError, 'outbound_raw_message_bytes_max cannot be nil'
362
+ end
363
+
364
+ @outbound_raw_message_bytes_max = outbound_raw_message_bytes_max
365
+ end
366
+
367
+ # Custom attribute writer method with validation
368
+ # @param [Object] thread_body_chars_default Value to be assigned
369
+ def thread_body_chars_default=(thread_body_chars_default)
370
+ if thread_body_chars_default.nil?
371
+ fail ArgumentError, 'thread_body_chars_default cannot be nil'
372
+ end
373
+
374
+ @thread_body_chars_default = thread_body_chars_default
375
+ end
376
+
377
+ # Checks equality by comparing each attribute.
378
+ # @param [Object] Object to be compared
379
+ def ==(o)
380
+ return true if self.equal?(o)
381
+ self.class == o.class &&
382
+ attachment_upload_bytes_max == o.attachment_upload_bytes_max &&
383
+ batch_ids_max == o.batch_ids_max &&
384
+ body_chars_max == o.body_chars_max &&
385
+ changes_limit_max == o.changes_limit_max &&
386
+ draft_schedule_days_max == o.draft_schedule_days_max &&
387
+ inline_attachment_bytes_max == o.inline_attachment_bytes_max &&
388
+ keywords_per_update_max == o.keywords_per_update_max &&
389
+ list_limit_max == o.list_limit_max &&
390
+ message_body_chars_default == o.message_body_chars_default &&
391
+ outbound_raw_message_bytes_max == o.outbound_raw_message_bytes_max &&
392
+ thread_body_chars_default == o.thread_body_chars_default
393
+ end
394
+
395
+ # @see the `==` method
396
+ # @param [Object] Object to be compared
397
+ def eql?(o)
398
+ self == o
399
+ end
400
+
401
+ # Calculates hash code according to all attributes.
402
+ # @return [Integer] Hash code
403
+ def hash
404
+ [attachment_upload_bytes_max, batch_ids_max, body_chars_max, changes_limit_max, draft_schedule_days_max, inline_attachment_bytes_max, keywords_per_update_max, list_limit_max, message_body_chars_default, outbound_raw_message_bytes_max, thread_body_chars_default].hash
405
+ end
406
+
407
+ # Builds the object from hash
408
+ # @param [Hash] attributes Model attributes in the form of hash
409
+ # @return [Object] Returns the model itself
410
+ def self.build_from_hash(attributes)
411
+ return nil unless attributes.is_a?(Hash)
412
+ attributes = attributes.transform_keys(&:to_sym)
413
+ transformed_hash = {}
414
+ openapi_types.each_pair do |key, type|
415
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
416
+ transformed_hash["#{key}"] = nil
417
+ elsif type =~ /\AArray<(.*)>/i
418
+ # check to ensure the input is an array given that the attribute
419
+ # is documented as an array but the input is not
420
+ if attributes[attribute_map[key]].is_a?(Array)
421
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
422
+ end
423
+ elsif !attributes[attribute_map[key]].nil?
424
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
425
+ end
426
+ end
427
+ new(transformed_hash)
428
+ end
429
+
430
+ # Returns the object in the form of hash
431
+ # @return [Hash] Returns the object in the form of hash
432
+ def to_hash
433
+ hash = {}
434
+ self.class.attribute_map.each_pair do |attr, param|
435
+ value = self.send(attr)
436
+ if value.nil?
437
+ is_nullable = self.class.openapi_nullable.include?(attr)
438
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
439
+ end
440
+
441
+ hash[param] = _to_hash(value)
442
+ end
443
+ hash
444
+ end
445
+
446
+ end
447
+
448
+ end
@@ -0,0 +1,203 @@
1
+ =begin
2
+ #Qubrics API
3
+
4
+ #Programmatic access to your Qubrics email infrastructure.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Qubrics::Mailbox::Generated
17
+ class MailboxSessionMailbox < ApiModelBase
18
+ attr_accessor :display_name
19
+
20
+ attr_accessor :email
21
+
22
+ # Mailbox public ID
23
+ attr_accessor :id
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'display_name' => :'display_name',
29
+ :'email' => :'email',
30
+ :'id' => :'id'
31
+ }
32
+ end
33
+
34
+ # Returns attribute mapping this model knows about
35
+ def self.acceptable_attribute_map
36
+ attribute_map
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ acceptable_attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'display_name' => :'String',
48
+ :'email' => :'String',
49
+ :'id' => :'String'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ :'display_name',
57
+ ])
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Qubrics::Mailbox::Generated::MailboxSessionMailbox` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ acceptable_attribute_map = self.class.acceptable_attribute_map
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!acceptable_attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Qubrics::Mailbox::Generated::MailboxSessionMailbox`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'display_name')
77
+ self.display_name = attributes[:'display_name']
78
+ else
79
+ self.display_name = nil
80
+ end
81
+
82
+ if attributes.key?(:'email')
83
+ self.email = attributes[:'email']
84
+ else
85
+ self.email = nil
86
+ end
87
+
88
+ if attributes.key?(:'id')
89
+ self.id = attributes[:'id']
90
+ else
91
+ self.id = nil
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if @email.nil?
101
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
102
+ end
103
+
104
+ if @id.nil?
105
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
106
+ end
107
+
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ warn '[DEPRECATED] the `valid?` method is obsolete'
115
+ return false if @email.nil?
116
+ return false if @id.nil?
117
+ true
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param [Object] email Value to be assigned
122
+ def email=(email)
123
+ if email.nil?
124
+ fail ArgumentError, 'email cannot be nil'
125
+ end
126
+
127
+ @email = email
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param [Object] id Value to be assigned
132
+ def id=(id)
133
+ if id.nil?
134
+ fail ArgumentError, 'id cannot be nil'
135
+ end
136
+
137
+ @id = id
138
+ end
139
+
140
+ # Checks equality by comparing each attribute.
141
+ # @param [Object] Object to be compared
142
+ def ==(o)
143
+ return true if self.equal?(o)
144
+ self.class == o.class &&
145
+ display_name == o.display_name &&
146
+ email == o.email &&
147
+ id == o.id
148
+ end
149
+
150
+ # @see the `==` method
151
+ # @param [Object] Object to be compared
152
+ def eql?(o)
153
+ self == o
154
+ end
155
+
156
+ # Calculates hash code according to all attributes.
157
+ # @return [Integer] Hash code
158
+ def hash
159
+ [display_name, email, id].hash
160
+ end
161
+
162
+ # Builds the object from hash
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ # @return [Object] Returns the model itself
165
+ def self.build_from_hash(attributes)
166
+ return nil unless attributes.is_a?(Hash)
167
+ attributes = attributes.transform_keys(&:to_sym)
168
+ transformed_hash = {}
169
+ openapi_types.each_pair do |key, type|
170
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
171
+ transformed_hash["#{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[attribute_map[key]].is_a?(Array)
176
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
177
+ end
178
+ elsif !attributes[attribute_map[key]].nil?
179
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
180
+ end
181
+ end
182
+ new(transformed_hash)
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ end
202
+
203
+ end