sendmux-mailbox 2.0.1 → 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 (153) hide show
  1. checksums.yaml +4 -4
  2. metadata +13 -230
  3. data/CHANGELOG.md +0 -79
  4. data/LICENSE +0 -21
  5. data/README.md +0 -181
  6. data/lib/sendmux/mailbox/client.rb +0 -41
  7. data/lib/sendmux/mailbox/version.rb +0 -7
  8. data/lib/sendmux/mailbox.rb +0 -12
  9. data/lib/sendmux_mailbox_generated/api/mailbox_api_api.rb +0 -3547
  10. data/lib/sendmux_mailbox_generated/api_client.rb +0 -447
  11. data/lib/sendmux_mailbox_generated/api_error.rb +0 -58
  12. data/lib/sendmux_mailbox_generated/api_model_base.rb +0 -88
  13. data/lib/sendmux_mailbox_generated/configuration.rb +0 -400
  14. data/lib/sendmux_mailbox_generated/models/api_error_detail.rb +0 -219
  15. data/lib/sendmux_mailbox_generated/models/api_error_error.rb +0 -275
  16. data/lib/sendmux_mailbox_generated/models/api_error_meta.rb +0 -164
  17. data/lib/sendmux_mailbox_generated/models/api_error_response.rb +0 -216
  18. data/lib/sendmux_mailbox_generated/models/batch_delete_mailbox_messages_body.rb +0 -205
  19. data/lib/sendmux_mailbox_generated/models/batch_update_mailbox_messages_body.rb +0 -227
  20. data/lib/sendmux_mailbox_generated/models/connection.rb +0 -273
  21. data/lib/sendmux_mailbox_generated/models/connection_credential.rb +0 -226
  22. data/lib/sendmux_mailbox_generated/models/connection_mailboxes_inner.rb +0 -190
  23. data/lib/sendmux_mailbox_generated/models/connection_response.rb +0 -223
  24. data/lib/sendmux_mailbox_generated/models/connection_team.rb +0 -190
  25. data/lib/sendmux_mailbox_generated/models/create_mailbox_folder_body.rb +0 -183
  26. data/lib/sendmux_mailbox_generated/models/cursor_pagination.rb +0 -173
  27. data/lib/sendmux_mailbox_generated/models/granted_mailbox.rb +0 -192
  28. data/lib/sendmux_mailbox_generated/models/granted_mailbox_list_response.rb +0 -251
  29. data/lib/sendmux_mailbox_generated/models/mailbox_address.rb +0 -176
  30. data/lib/sendmux_mailbox_generated/models/mailbox_attachment.rb +0 -250
  31. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_body.rb +0 -228
  32. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_result.rb +0 -323
  33. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_result_headers.rb +0 -191
  34. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_intent_result_response.rb +0 -223
  35. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_result.rb +0 -243
  36. data/lib/sendmux_mailbox_generated/models/mailbox_attachment_upload_result_response.rb +0 -223
  37. data/lib/sendmux_mailbox_generated/models/mailbox_batch_delete_messages_result.rb +0 -248
  38. data/lib/sendmux_mailbox_generated/models/mailbox_batch_delete_messages_result_response.rb +0 -223
  39. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_body.rb +0 -373
  40. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_item.rb +0 -188
  41. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_result.rb +0 -220
  42. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_result_response.rb +0 -223
  43. data/lib/sendmux_mailbox_generated/models/mailbox_batch_get_result_states.rb +0 -150
  44. data/lib/sendmux_mailbox_generated/models/mailbox_batch_message_failure.rb +0 -216
  45. data/lib/sendmux_mailbox_generated/models/mailbox_batch_message_states.rb +0 -162
  46. data/lib/sendmux_mailbox_generated/models/mailbox_batch_update_messages_result.rb +0 -248
  47. data/lib/sendmux_mailbox_generated/models/mailbox_batch_update_messages_result_response.rb +0 -223
  48. data/lib/sendmux_mailbox_generated/models/mailbox_changes.rb +0 -307
  49. data/lib/sendmux_mailbox_generated/models/mailbox_changes_response.rb +0 -223
  50. data/lib/sendmux_mailbox_generated/models/mailbox_content_headers.rb +0 -214
  51. data/lib/sendmux_mailbox_generated/models/mailbox_content_headers_full_inner.rb +0 -190
  52. data/lib/sendmux_mailbox_generated/models/mailbox_content_headers_selected.rb +0 -234
  53. data/lib/sendmux_mailbox_generated/models/mailbox_folder.rb +0 -307
  54. data/lib/sendmux_mailbox_generated/models/mailbox_folder_cursor_list_response.rb +0 -251
  55. data/lib/sendmux_mailbox_generated/models/mailbox_folder_deleted_response.rb +0 -223
  56. data/lib/sendmux_mailbox_generated/models/mailbox_folder_deleted_response_all_of_data.rb +0 -190
  57. data/lib/sendmux_mailbox_generated/models/mailbox_folder_query_changes.rb +0 -270
  58. data/lib/sendmux_mailbox_generated/models/mailbox_folder_query_changes_added_inner.rb +0 -190
  59. data/lib/sendmux_mailbox_generated/models/mailbox_folder_query_changes_response.rb +0 -223
  60. data/lib/sendmux_mailbox_generated/models/mailbox_folder_response.rb +0 -223
  61. data/lib/sendmux_mailbox_generated/models/mailbox_get_changes200_response.rb +0 -103
  62. data/lib/sendmux_mailbox_generated/models/mailbox_identity.rb +0 -352
  63. data/lib/sendmux_mailbox_generated/models/mailbox_identity_cursor_list_response.rb +0 -251
  64. data/lib/sendmux_mailbox_generated/models/mailbox_identity_list_meta.rb +0 -173
  65. data/lib/sendmux_mailbox_generated/models/mailbox_identity_response.rb +0 -223
  66. data/lib/sendmux_mailbox_generated/models/mailbox_me.rb +0 -294
  67. data/lib/sendmux_mailbox_generated/models/mailbox_me_item_response.rb +0 -223
  68. data/lib/sendmux_mailbox_generated/models/mailbox_message.rb +0 -478
  69. data/lib/sendmux_mailbox_generated/models/mailbox_message_content.rb +0 -348
  70. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_body.rb +0 -327
  71. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_dates.rb +0 -162
  72. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_participants.rb +0 -262
  73. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_response.rb +0 -223
  74. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_response_all_of_data.rb +0 -355
  75. data/lib/sendmux_mailbox_generated/models/mailbox_message_content_states.rb +0 -176
  76. data/lib/sendmux_mailbox_generated/models/mailbox_message_count.rb +0 -176
  77. data/lib/sendmux_mailbox_generated/models/mailbox_message_count_response.rb +0 -223
  78. data/lib/sendmux_mailbox_generated/models/mailbox_message_deleted_response.rb +0 -223
  79. data/lib/sendmux_mailbox_generated/models/mailbox_message_detail_response.rb +0 -223
  80. data/lib/sendmux_mailbox_generated/models/mailbox_message_flags.rb +0 -242
  81. data/lib/sendmux_mailbox_generated/models/mailbox_message_query_changes.rb +0 -270
  82. data/lib/sendmux_mailbox_generated/models/mailbox_message_query_changes_response.rb +0 -223
  83. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary.rb +0 -454
  84. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary_cursor_list_response.rb +0 -251
  85. data/lib/sendmux_mailbox_generated/models/mailbox_query_meta.rb +0 -173
  86. data/lib/sendmux_mailbox_generated/models/mailbox_quota.rb +0 -359
  87. data/lib/sendmux_mailbox_generated/models/mailbox_quota_cursor_list_response.rb +0 -251
  88. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body.rb +0 -279
  89. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body_body.rb +0 -200
  90. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body_response.rb +0 -223
  91. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body_response_all_of_data.rb +0 -286
  92. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_event.rb +0 -366
  93. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message.rb +0 -492
  94. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message_body.rb +0 -214
  95. data/lib/sendmux_mailbox_generated/models/mailbox_search_snippet.rb +0 -190
  96. data/lib/sendmux_mailbox_generated/models/mailbox_search_snippets_result.rb +0 -206
  97. data/lib/sendmux_mailbox_generated/models/mailbox_search_snippets_result_response.rb +0 -223
  98. data/lib/sendmux_mailbox_generated/models/mailbox_send_result_response.rb +0 -223
  99. data/lib/sendmux_mailbox_generated/models/mailbox_send_scope.rb +0 -213
  100. data/lib/sendmux_mailbox_generated/models/mailbox_session.rb +0 -294
  101. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities.rb +0 -346
  102. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_attachments.rb +0 -294
  103. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_folders.rb +0 -320
  104. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_identities.rb +0 -268
  105. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb +0 -516
  106. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_quotas.rb +0 -242
  107. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_submissions.rb +0 -242
  108. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_sync.rb +0 -222
  109. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_threads.rb +0 -268
  110. data/lib/sendmux_mailbox_generated/models/mailbox_session_endpoints.rb +0 -334
  111. data/lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb +0 -451
  112. data/lib/sendmux_mailbox_generated/models/mailbox_session_limits.rb +0 -398
  113. data/lib/sendmux_mailbox_generated/models/mailbox_session_mailbox.rb +0 -203
  114. data/lib/sendmux_mailbox_generated/models/mailbox_session_response.rb +0 -223
  115. data/lib/sendmux_mailbox_generated/models/mailbox_session_states.rb +0 -294
  116. data/lib/sendmux_mailbox_generated/models/mailbox_submission.rb +0 -321
  117. data/lib/sendmux_mailbox_generated/models/mailbox_submission_cursor_list_response.rb +0 -251
  118. data/lib/sendmux_mailbox_generated/models/mailbox_submission_delivery_status.rb +0 -200
  119. data/lib/sendmux_mailbox_generated/models/mailbox_submission_envelope.rb +0 -178
  120. data/lib/sendmux_mailbox_generated/models/mailbox_submission_envelope_address.rb +0 -178
  121. data/lib/sendmux_mailbox_generated/models/mailbox_submission_envelope_rcpt_to_inner.rb +0 -185
  122. data/lib/sendmux_mailbox_generated/models/mailbox_submission_response.rb +0 -223
  123. data/lib/sendmux_mailbox_generated/models/mailbox_sync_meta.rb +0 -173
  124. data/lib/sendmux_mailbox_generated/models/mailbox_thread.rb +0 -377
  125. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_meta.rb +0 -244
  126. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_meta_states.rb +0 -188
  127. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_response.rb +0 -251
  128. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_response_all_of_data.rb +0 -355
  129. data/lib/sendmux_mailbox_generated/models/mailbox_thread_detail_response.rb +0 -223
  130. data/lib/sendmux_mailbox_generated/models/mailbox_thread_message_summary_cursor_list_response.rb +0 -251
  131. data/lib/sendmux_mailbox_generated/models/mailbox_thread_messages_meta.rb +0 -199
  132. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary.rb +0 -349
  133. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_cursor_list_response.rb +0 -251
  134. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_states.rb +0 -162
  135. data/lib/sendmux_mailbox_generated/models/mailbox_typed_changes.rb +0 -164
  136. data/lib/sendmux_mailbox_generated/models/mailbox_typed_changes_response.rb +0 -223
  137. data/lib/sendmux_mailbox_generated/models/mailbox_typed_changes_types.rb +0 -192
  138. data/lib/sendmux_mailbox_generated/models/mailbox_usage.rb +0 -192
  139. data/lib/sendmux_mailbox_generated/models/mailbox_usage_resource.rb +0 -408
  140. data/lib/sendmux_mailbox_generated/models/mailbox_usage_response.rb +0 -223
  141. data/lib/sendmux_mailbox_generated/models/mailbox_usage_states.rb +0 -150
  142. data/lib/sendmux_mailbox_generated/models/patch_mailbox_folder_body.rb +0 -166
  143. data/lib/sendmux_mailbox_generated/models/patch_mailbox_message_body.rb +0 -168
  144. data/lib/sendmux_mailbox_generated/models/response_meta.rb +0 -164
  145. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body.rb +0 -293
  146. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body_attachments_inner.rb +0 -103
  147. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of.rb +0 -217
  148. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of1.rb +0 -217
  149. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_result.rb +0 -214
  150. data/lib/sendmux_mailbox_generated/models/success_envelope.rb +0 -192
  151. data/lib/sendmux_mailbox_generated/models/update_mailbox_identity_body.rb +0 -216
  152. data/lib/sendmux_mailbox_generated/version.rb +0 -15
  153. data/lib/sendmux_mailbox_generated.rb +0 -185
@@ -1,205 +0,0 @@
1
- =begin
2
- #Sendmux API
3
-
4
- #Programmatic access to your Sendmux 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 Sendmux::Mailbox::Generated
17
- class BatchDeleteMailboxMessagesBody < ApiModelBase
18
- # Message IDs to delete, maximum 100.
19
- attr_accessor :ids
20
-
21
- # Optional message state token for stale-write protection.
22
- attr_accessor :if_in_state
23
-
24
- # When true, permanently deletes instead of moving to Trash.
25
- attr_accessor :permanent
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'ids' => :'ids',
31
- :'if_in_state' => :'if_in_state',
32
- :'permanent' => :'permanent'
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
- :'ids' => :'Array<String>',
50
- :'if_in_state' => :'String',
51
- :'permanent' => :'Boolean'
52
- }
53
- end
54
-
55
- # List of attributes with nullable: true
56
- def self.openapi_nullable
57
- Set.new([
58
- ])
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::BatchDeleteMailboxMessagesBody` initialize method"
66
- end
67
-
68
- # check to see if the attribute exists and convert string to symbol for hash key
69
- acceptable_attribute_map = self.class.acceptable_attribute_map
70
- attributes = attributes.each_with_object({}) { |(k, v), h|
71
- if (!acceptable_attribute_map.key?(k.to_sym))
72
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::BatchDeleteMailboxMessagesBody`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
- end
74
- h[k.to_sym] = v
75
- }
76
-
77
- if attributes.key?(:'ids')
78
- if (value = attributes[:'ids']).is_a?(Array)
79
- self.ids = value
80
- end
81
- else
82
- self.ids = nil
83
- end
84
-
85
- if attributes.key?(:'if_in_state')
86
- self.if_in_state = attributes[:'if_in_state']
87
- end
88
-
89
- if attributes.key?(:'permanent')
90
- self.permanent = attributes[:'permanent']
91
- end
92
- end
93
-
94
- # Show invalid properties with the reasons. Usually used together with valid?
95
- # @return Array for valid properties with the reasons
96
- def list_invalid_properties
97
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
- invalid_properties = Array.new
99
- if @ids.nil?
100
- invalid_properties.push('invalid value for "ids", ids cannot be nil.')
101
- end
102
-
103
- if @ids.length > 100
104
- invalid_properties.push('invalid value for "ids", number of items must be less than or equal to 100.')
105
- end
106
-
107
- if @ids.length < 1
108
- invalid_properties.push('invalid value for "ids", number of items must be greater than or equal to 1.')
109
- end
110
-
111
- invalid_properties
112
- end
113
-
114
- # Check to see if the all the properties in the model are valid
115
- # @return true if the model is valid
116
- def valid?
117
- warn '[DEPRECATED] the `valid?` method is obsolete'
118
- return false if @ids.nil?
119
- return false if @ids.length > 100
120
- return false if @ids.length < 1
121
- true
122
- end
123
-
124
- # Custom attribute writer method with validation
125
- # @param [Object] ids Value to be assigned
126
- def ids=(ids)
127
- if ids.nil?
128
- fail ArgumentError, 'ids cannot be nil'
129
- end
130
-
131
- if ids.length > 100
132
- fail ArgumentError, 'invalid value for "ids", number of items must be less than or equal to 100.'
133
- end
134
-
135
- if ids.length < 1
136
- fail ArgumentError, 'invalid value for "ids", number of items must be greater than or equal to 1.'
137
- end
138
-
139
- @ids = ids
140
- end
141
-
142
- # Checks equality by comparing each attribute.
143
- # @param [Object] Object to be compared
144
- def ==(o)
145
- return true if self.equal?(o)
146
- self.class == o.class &&
147
- ids == o.ids &&
148
- if_in_state == o.if_in_state &&
149
- permanent == o.permanent
150
- end
151
-
152
- # @see the `==` method
153
- # @param [Object] Object to be compared
154
- def eql?(o)
155
- self == o
156
- end
157
-
158
- # Calculates hash code according to all attributes.
159
- # @return [Integer] Hash code
160
- def hash
161
- [ids, if_in_state, permanent].hash
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 self.build_from_hash(attributes)
168
- return nil unless attributes.is_a?(Hash)
169
- attributes = attributes.transform_keys(&:to_sym)
170
- transformed_hash = {}
171
- openapi_types.each_pair do |key, type|
172
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
173
- transformed_hash["#{key}"] = nil
174
- elsif type =~ /\AArray<(.*)>/i
175
- # check to ensure the input is an array given that the attribute
176
- # is documented as an array but the input is not
177
- if attributes[attribute_map[key]].is_a?(Array)
178
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
179
- end
180
- elsif !attributes[attribute_map[key]].nil?
181
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
182
- end
183
- end
184
- new(transformed_hash)
185
- end
186
-
187
- # Returns the object in the form of hash
188
- # @return [Hash] Returns the object in the form of hash
189
- def to_hash
190
- hash = {}
191
- self.class.attribute_map.each_pair do |attr, param|
192
- value = self.send(attr)
193
- if value.nil?
194
- is_nullable = self.class.openapi_nullable.include?(attr)
195
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
- end
197
-
198
- hash[param] = _to_hash(value)
199
- end
200
- hash
201
- end
202
-
203
- end
204
-
205
- end
@@ -1,227 +0,0 @@
1
- =begin
2
- #Sendmux API
3
-
4
- #Programmatic access to your Sendmux 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 Sendmux::Mailbox::Generated
17
- class BatchUpdateMailboxMessagesBody < ApiModelBase
18
- # Set or clear the flagged marker.
19
- attr_accessor :flagged
20
-
21
- # Message IDs to update, maximum 100.
22
- attr_accessor :ids
23
-
24
- # Optional message state token for stale-write protection.
25
- attr_accessor :if_in_state
26
-
27
- # Map of message keyword names to booleans. `true` sets the keyword; `false` clears it. Keyword names are normalised to lowercase. Lifecycle keywords such as `$draft` are read-only.
28
- attr_accessor :keywords
29
-
30
- # Set or clear the seen flag.
31
- attr_accessor :seen
32
-
33
- # Attribute mapping from ruby-style variable name to JSON key.
34
- def self.attribute_map
35
- {
36
- :'flagged' => :'flagged',
37
- :'ids' => :'ids',
38
- :'if_in_state' => :'if_in_state',
39
- :'keywords' => :'keywords',
40
- :'seen' => :'seen'
41
- }
42
- end
43
-
44
- # Returns attribute mapping this model knows about
45
- def self.acceptable_attribute_map
46
- attribute_map
47
- end
48
-
49
- # Returns all the JSON keys this model knows about
50
- def self.acceptable_attributes
51
- acceptable_attribute_map.values
52
- end
53
-
54
- # Attribute type mapping.
55
- def self.openapi_types
56
- {
57
- :'flagged' => :'Boolean',
58
- :'ids' => :'Array<String>',
59
- :'if_in_state' => :'String',
60
- :'keywords' => :'Hash<String, Boolean>',
61
- :'seen' => :'Boolean'
62
- }
63
- end
64
-
65
- # List of attributes with nullable: true
66
- def self.openapi_nullable
67
- Set.new([
68
- ])
69
- end
70
-
71
- # Initializes the object
72
- # @param [Hash] attributes Model attributes in the form of hash
73
- def initialize(attributes = {})
74
- if (!attributes.is_a?(Hash))
75
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::BatchUpdateMailboxMessagesBody` initialize method"
76
- end
77
-
78
- # check to see if the attribute exists and convert string to symbol for hash key
79
- acceptable_attribute_map = self.class.acceptable_attribute_map
80
- attributes = attributes.each_with_object({}) { |(k, v), h|
81
- if (!acceptable_attribute_map.key?(k.to_sym))
82
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::BatchUpdateMailboxMessagesBody`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
- end
84
- h[k.to_sym] = v
85
- }
86
-
87
- if attributes.key?(:'flagged')
88
- self.flagged = attributes[:'flagged']
89
- end
90
-
91
- if attributes.key?(:'ids')
92
- if (value = attributes[:'ids']).is_a?(Array)
93
- self.ids = value
94
- end
95
- else
96
- self.ids = nil
97
- end
98
-
99
- if attributes.key?(:'if_in_state')
100
- self.if_in_state = attributes[:'if_in_state']
101
- end
102
-
103
- if attributes.key?(:'keywords')
104
- if (value = attributes[:'keywords']).is_a?(Hash)
105
- self.keywords = value
106
- end
107
- end
108
-
109
- if attributes.key?(:'seen')
110
- self.seen = attributes[:'seen']
111
- end
112
- end
113
-
114
- # Show invalid properties with the reasons. Usually used together with valid?
115
- # @return Array for valid properties with the reasons
116
- def list_invalid_properties
117
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
118
- invalid_properties = Array.new
119
- if @ids.nil?
120
- invalid_properties.push('invalid value for "ids", ids cannot be nil.')
121
- end
122
-
123
- if @ids.length > 100
124
- invalid_properties.push('invalid value for "ids", number of items must be less than or equal to 100.')
125
- end
126
-
127
- if @ids.length < 1
128
- invalid_properties.push('invalid value for "ids", number of items must be greater than or equal to 1.')
129
- end
130
-
131
- invalid_properties
132
- end
133
-
134
- # Check to see if the all the properties in the model are valid
135
- # @return true if the model is valid
136
- def valid?
137
- warn '[DEPRECATED] the `valid?` method is obsolete'
138
- return false if @ids.nil?
139
- return false if @ids.length > 100
140
- return false if @ids.length < 1
141
- true
142
- end
143
-
144
- # Custom attribute writer method with validation
145
- # @param [Object] ids Value to be assigned
146
- def ids=(ids)
147
- if ids.nil?
148
- fail ArgumentError, 'ids cannot be nil'
149
- end
150
-
151
- if ids.length > 100
152
- fail ArgumentError, 'invalid value for "ids", number of items must be less than or equal to 100.'
153
- end
154
-
155
- if ids.length < 1
156
- fail ArgumentError, 'invalid value for "ids", number of items must be greater than or equal to 1.'
157
- end
158
-
159
- @ids = ids
160
- end
161
-
162
- # Checks equality by comparing each attribute.
163
- # @param [Object] Object to be compared
164
- def ==(o)
165
- return true if self.equal?(o)
166
- self.class == o.class &&
167
- flagged == o.flagged &&
168
- ids == o.ids &&
169
- if_in_state == o.if_in_state &&
170
- keywords == o.keywords &&
171
- seen == o.seen
172
- end
173
-
174
- # @see the `==` method
175
- # @param [Object] Object to be compared
176
- def eql?(o)
177
- self == o
178
- end
179
-
180
- # Calculates hash code according to all attributes.
181
- # @return [Integer] Hash code
182
- def hash
183
- [flagged, ids, if_in_state, keywords, seen].hash
184
- end
185
-
186
- # Builds the object from hash
187
- # @param [Hash] attributes Model attributes in the form of hash
188
- # @return [Object] Returns the model itself
189
- def self.build_from_hash(attributes)
190
- return nil unless attributes.is_a?(Hash)
191
- attributes = attributes.transform_keys(&:to_sym)
192
- transformed_hash = {}
193
- openapi_types.each_pair do |key, type|
194
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
195
- transformed_hash["#{key}"] = nil
196
- elsif type =~ /\AArray<(.*)>/i
197
- # check to ensure the input is an array given that the attribute
198
- # is documented as an array but the input is not
199
- if attributes[attribute_map[key]].is_a?(Array)
200
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
201
- end
202
- elsif !attributes[attribute_map[key]].nil?
203
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
204
- end
205
- end
206
- new(transformed_hash)
207
- end
208
-
209
- # Returns the object in the form of hash
210
- # @return [Hash] Returns the object in the form of hash
211
- def to_hash
212
- hash = {}
213
- self.class.attribute_map.each_pair do |attr, param|
214
- value = self.send(attr)
215
- if value.nil?
216
- is_nullable = self.class.openapi_nullable.include?(attr)
217
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
218
- end
219
-
220
- hash[param] = _to_hash(value)
221
- end
222
- hash
223
- end
224
-
225
- end
226
-
227
- end
@@ -1,273 +0,0 @@
1
- =begin
2
- #Sendmux API
3
-
4
- #Programmatic access to your Sendmux 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 Sendmux::Mailbox::Generated
17
- class Connection < ApiModelBase
18
- attr_accessor :credential
19
-
20
- # Display label for this connection.
21
- attr_accessor :label
22
-
23
- attr_accessor :mailboxes
24
-
25
- attr_accessor :permissions
26
-
27
- attr_accessor :team
28
-
29
- # Attribute mapping from ruby-style variable name to JSON key.
30
- def self.attribute_map
31
- {
32
- :'credential' => :'credential',
33
- :'label' => :'label',
34
- :'mailboxes' => :'mailboxes',
35
- :'permissions' => :'permissions',
36
- :'team' => :'team'
37
- }
38
- end
39
-
40
- # Returns attribute mapping this model knows about
41
- def self.acceptable_attribute_map
42
- attribute_map
43
- end
44
-
45
- # Returns all the JSON keys this model knows about
46
- def self.acceptable_attributes
47
- acceptable_attribute_map.values
48
- end
49
-
50
- # Attribute type mapping.
51
- def self.openapi_types
52
- {
53
- :'credential' => :'ConnectionCredential',
54
- :'label' => :'String',
55
- :'mailboxes' => :'Array<ConnectionMailboxesInner>',
56
- :'permissions' => :'Array<String>',
57
- :'team' => :'ConnectionTeam'
58
- }
59
- end
60
-
61
- # List of attributes with nullable: true
62
- def self.openapi_nullable
63
- Set.new([
64
- ])
65
- end
66
-
67
- # Initializes the object
68
- # @param [Hash] attributes Model attributes in the form of hash
69
- def initialize(attributes = {})
70
- if (!attributes.is_a?(Hash))
71
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::Connection` initialize method"
72
- end
73
-
74
- # check to see if the attribute exists and convert string to symbol for hash key
75
- acceptable_attribute_map = self.class.acceptable_attribute_map
76
- attributes = attributes.each_with_object({}) { |(k, v), h|
77
- if (!acceptable_attribute_map.key?(k.to_sym))
78
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::Connection`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
- end
80
- h[k.to_sym] = v
81
- }
82
-
83
- if attributes.key?(:'credential')
84
- self.credential = attributes[:'credential']
85
- else
86
- self.credential = nil
87
- end
88
-
89
- if attributes.key?(:'label')
90
- self.label = attributes[:'label']
91
- else
92
- self.label = nil
93
- end
94
-
95
- if attributes.key?(:'mailboxes')
96
- if (value = attributes[:'mailboxes']).is_a?(Array)
97
- self.mailboxes = value
98
- end
99
- else
100
- self.mailboxes = nil
101
- end
102
-
103
- if attributes.key?(:'permissions')
104
- if (value = attributes[:'permissions']).is_a?(Array)
105
- self.permissions = value
106
- end
107
- else
108
- self.permissions = nil
109
- end
110
-
111
- if attributes.key?(:'team')
112
- self.team = attributes[:'team']
113
- else
114
- self.team = nil
115
- end
116
- end
117
-
118
- # Show invalid properties with the reasons. Usually used together with valid?
119
- # @return Array for valid properties with the reasons
120
- def list_invalid_properties
121
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
122
- invalid_properties = Array.new
123
- if @credential.nil?
124
- invalid_properties.push('invalid value for "credential", credential cannot be nil.')
125
- end
126
-
127
- if @label.nil?
128
- invalid_properties.push('invalid value for "label", label cannot be nil.')
129
- end
130
-
131
- if @mailboxes.nil?
132
- invalid_properties.push('invalid value for "mailboxes", mailboxes cannot be nil.')
133
- end
134
-
135
- if @permissions.nil?
136
- invalid_properties.push('invalid value for "permissions", permissions cannot be nil.')
137
- end
138
-
139
- if @team.nil?
140
- invalid_properties.push('invalid value for "team", team cannot be nil.')
141
- end
142
-
143
- invalid_properties
144
- end
145
-
146
- # Check to see if the all the properties in the model are valid
147
- # @return true if the model is valid
148
- def valid?
149
- warn '[DEPRECATED] the `valid?` method is obsolete'
150
- return false if @credential.nil?
151
- return false if @label.nil?
152
- return false if @mailboxes.nil?
153
- return false if @permissions.nil?
154
- return false if @team.nil?
155
- true
156
- end
157
-
158
- # Custom attribute writer method with validation
159
- # @param [Object] credential Value to be assigned
160
- def credential=(credential)
161
- if credential.nil?
162
- fail ArgumentError, 'credential cannot be nil'
163
- end
164
-
165
- @credential = credential
166
- end
167
-
168
- # Custom attribute writer method with validation
169
- # @param [Object] label Value to be assigned
170
- def label=(label)
171
- if label.nil?
172
- fail ArgumentError, 'label cannot be nil'
173
- end
174
-
175
- @label = label
176
- end
177
-
178
- # Custom attribute writer method with validation
179
- # @param [Object] mailboxes Value to be assigned
180
- def mailboxes=(mailboxes)
181
- if mailboxes.nil?
182
- fail ArgumentError, 'mailboxes cannot be nil'
183
- end
184
-
185
- @mailboxes = mailboxes
186
- end
187
-
188
- # Custom attribute writer method with validation
189
- # @param [Object] permissions Value to be assigned
190
- def permissions=(permissions)
191
- if permissions.nil?
192
- fail ArgumentError, 'permissions cannot be nil'
193
- end
194
-
195
- @permissions = permissions
196
- end
197
-
198
- # Custom attribute writer method with validation
199
- # @param [Object] team Value to be assigned
200
- def team=(team)
201
- if team.nil?
202
- fail ArgumentError, 'team cannot be nil'
203
- end
204
-
205
- @team = team
206
- end
207
-
208
- # Checks equality by comparing each attribute.
209
- # @param [Object] Object to be compared
210
- def ==(o)
211
- return true if self.equal?(o)
212
- self.class == o.class &&
213
- credential == o.credential &&
214
- label == o.label &&
215
- mailboxes == o.mailboxes &&
216
- permissions == o.permissions &&
217
- team == o.team
218
- end
219
-
220
- # @see the `==` method
221
- # @param [Object] Object to be compared
222
- def eql?(o)
223
- self == o
224
- end
225
-
226
- # Calculates hash code according to all attributes.
227
- # @return [Integer] Hash code
228
- def hash
229
- [credential, label, mailboxes, permissions, team].hash
230
- end
231
-
232
- # Builds the object from hash
233
- # @param [Hash] attributes Model attributes in the form of hash
234
- # @return [Object] Returns the model itself
235
- def self.build_from_hash(attributes)
236
- return nil unless attributes.is_a?(Hash)
237
- attributes = attributes.transform_keys(&:to_sym)
238
- transformed_hash = {}
239
- openapi_types.each_pair do |key, type|
240
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
241
- transformed_hash["#{key}"] = nil
242
- elsif type =~ /\AArray<(.*)>/i
243
- # check to ensure the input is an array given that the attribute
244
- # is documented as an array but the input is not
245
- if attributes[attribute_map[key]].is_a?(Array)
246
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
247
- end
248
- elsif !attributes[attribute_map[key]].nil?
249
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
250
- end
251
- end
252
- new(transformed_hash)
253
- end
254
-
255
- # Returns the object in the form of hash
256
- # @return [Hash] Returns the object in the form of hash
257
- def to_hash
258
- hash = {}
259
- self.class.attribute_map.each_pair do |attr, param|
260
- value = self.send(attr)
261
- if value.nil?
262
- is_nullable = self.class.openapi_nullable.include?(attr)
263
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
264
- end
265
-
266
- hash[param] = _to_hash(value)
267
- end
268
- hash
269
- end
270
-
271
- end
272
-
273
- end