sendmux-mailbox 2.0.2 → 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 (149) hide show
  1. checksums.yaml +4 -4
  2. metadata +13 -226
  3. data/CHANGELOG.md +0 -101
  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 -594
  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_states.rb +0 -176
  75. data/lib/sendmux_mailbox_generated/models/mailbox_message_count.rb +0 -176
  76. data/lib/sendmux_mailbox_generated/models/mailbox_message_count_response.rb +0 -223
  77. data/lib/sendmux_mailbox_generated/models/mailbox_message_deleted_response.rb +0 -223
  78. data/lib/sendmux_mailbox_generated/models/mailbox_message_detail_response.rb +0 -223
  79. data/lib/sendmux_mailbox_generated/models/mailbox_message_flags.rb +0 -242
  80. data/lib/sendmux_mailbox_generated/models/mailbox_message_query_changes.rb +0 -270
  81. data/lib/sendmux_mailbox_generated/models/mailbox_message_query_changes_response.rb +0 -223
  82. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary.rb +0 -454
  83. data/lib/sendmux_mailbox_generated/models/mailbox_message_summary_cursor_list_response.rb +0 -251
  84. data/lib/sendmux_mailbox_generated/models/mailbox_query_meta.rb +0 -173
  85. data/lib/sendmux_mailbox_generated/models/mailbox_quota.rb +0 -359
  86. data/lib/sendmux_mailbox_generated/models/mailbox_quota_cursor_list_response.rb +0 -251
  87. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body.rb +0 -279
  88. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body_body.rb +0 -200
  89. data/lib/sendmux_mailbox_generated/models/mailbox_raw_body_response.rb +0 -223
  90. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_event.rb +0 -366
  91. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message.rb +0 -492
  92. data/lib/sendmux_mailbox_generated/models/mailbox_realtime_message_body.rb +0 -214
  93. data/lib/sendmux_mailbox_generated/models/mailbox_search_snippet.rb +0 -190
  94. data/lib/sendmux_mailbox_generated/models/mailbox_search_snippets_result.rb +0 -206
  95. data/lib/sendmux_mailbox_generated/models/mailbox_search_snippets_result_response.rb +0 -223
  96. data/lib/sendmux_mailbox_generated/models/mailbox_send_result_response.rb +0 -223
  97. data/lib/sendmux_mailbox_generated/models/mailbox_send_scope.rb +0 -213
  98. data/lib/sendmux_mailbox_generated/models/mailbox_session.rb +0 -294
  99. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities.rb +0 -346
  100. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_attachments.rb +0 -294
  101. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_folders.rb +0 -320
  102. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_identities.rb +0 -268
  103. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_messages.rb +0 -516
  104. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_quotas.rb +0 -242
  105. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_submissions.rb +0 -242
  106. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_sync.rb +0 -222
  107. data/lib/sendmux_mailbox_generated/models/mailbox_session_capabilities_threads.rb +0 -268
  108. data/lib/sendmux_mailbox_generated/models/mailbox_session_endpoints.rb +0 -334
  109. data/lib/sendmux_mailbox_generated/models/mailbox_session_gated.rb +0 -451
  110. data/lib/sendmux_mailbox_generated/models/mailbox_session_limits.rb +0 -398
  111. data/lib/sendmux_mailbox_generated/models/mailbox_session_mailbox.rb +0 -203
  112. data/lib/sendmux_mailbox_generated/models/mailbox_session_response.rb +0 -223
  113. data/lib/sendmux_mailbox_generated/models/mailbox_session_states.rb +0 -294
  114. data/lib/sendmux_mailbox_generated/models/mailbox_submission.rb +0 -321
  115. data/lib/sendmux_mailbox_generated/models/mailbox_submission_cursor_list_response.rb +0 -251
  116. data/lib/sendmux_mailbox_generated/models/mailbox_submission_delivery_status.rb +0 -200
  117. data/lib/sendmux_mailbox_generated/models/mailbox_submission_envelope.rb +0 -178
  118. data/lib/sendmux_mailbox_generated/models/mailbox_submission_envelope_address.rb +0 -178
  119. data/lib/sendmux_mailbox_generated/models/mailbox_submission_response.rb +0 -223
  120. data/lib/sendmux_mailbox_generated/models/mailbox_sync_meta.rb +0 -173
  121. data/lib/sendmux_mailbox_generated/models/mailbox_thread.rb +0 -377
  122. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_meta.rb +0 -244
  123. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_meta_states.rb +0 -188
  124. data/lib/sendmux_mailbox_generated/models/mailbox_thread_content_response.rb +0 -251
  125. data/lib/sendmux_mailbox_generated/models/mailbox_thread_detail_response.rb +0 -223
  126. data/lib/sendmux_mailbox_generated/models/mailbox_thread_message_summary_cursor_list_response.rb +0 -251
  127. data/lib/sendmux_mailbox_generated/models/mailbox_thread_messages_meta.rb +0 -199
  128. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary.rb +0 -349
  129. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_cursor_list_response.rb +0 -251
  130. data/lib/sendmux_mailbox_generated/models/mailbox_thread_summary_states.rb +0 -162
  131. data/lib/sendmux_mailbox_generated/models/mailbox_typed_changes.rb +0 -164
  132. data/lib/sendmux_mailbox_generated/models/mailbox_typed_changes_response.rb +0 -223
  133. data/lib/sendmux_mailbox_generated/models/mailbox_typed_changes_types.rb +0 -192
  134. data/lib/sendmux_mailbox_generated/models/mailbox_usage.rb +0 -192
  135. data/lib/sendmux_mailbox_generated/models/mailbox_usage_resource.rb +0 -408
  136. data/lib/sendmux_mailbox_generated/models/mailbox_usage_response.rb +0 -223
  137. data/lib/sendmux_mailbox_generated/models/mailbox_usage_states.rb +0 -150
  138. data/lib/sendmux_mailbox_generated/models/patch_mailbox_folder_body.rb +0 -166
  139. data/lib/sendmux_mailbox_generated/models/patch_mailbox_message_body.rb +0 -168
  140. data/lib/sendmux_mailbox_generated/models/response_meta.rb +0 -164
  141. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body.rb +0 -293
  142. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body_attachments_inner.rb +0 -103
  143. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of.rb +0 -217
  144. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_body_attachments_inner_any_of1.rb +0 -217
  145. data/lib/sendmux_mailbox_generated/models/send_mailbox_message_result.rb +0 -214
  146. data/lib/sendmux_mailbox_generated/models/success_envelope.rb +0 -192
  147. data/lib/sendmux_mailbox_generated/models/update_mailbox_identity_body.rb +0 -216
  148. data/lib/sendmux_mailbox_generated/version.rb +0 -15
  149. data/lib/sendmux_mailbox_generated.rb +0 -189
@@ -1,217 +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 SendMailboxMessageBodyAttachmentsInnerAnyOf1 < ApiModelBase
18
- # Blob ID returned by /mailbox/attachments:upload.
19
- attr_accessor :blob_id
20
-
21
- attr_accessor :content_type
22
-
23
- attr_accessor :filename
24
-
25
- # Attribute mapping from ruby-style variable name to JSON key.
26
- def self.attribute_map
27
- {
28
- :'blob_id' => :'blob_id',
29
- :'content_type' => :'content_type',
30
- :'filename' => :'filename'
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
- :'blob_id' => :'String',
48
- :'content_type' => :'String',
49
- :'filename' => :'String'
50
- }
51
- end
52
-
53
- # List of attributes with nullable: true
54
- def self.openapi_nullable
55
- Set.new([
56
- ])
57
- end
58
-
59
- # Initializes the object
60
- # @param [Hash] attributes Model attributes in the form of hash
61
- def initialize(attributes = {})
62
- if (!attributes.is_a?(Hash))
63
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::SendMailboxMessageBodyAttachmentsInnerAnyOf1` initialize method"
64
- end
65
-
66
- # check to see if the attribute exists and convert string to symbol for hash key
67
- acceptable_attribute_map = self.class.acceptable_attribute_map
68
- attributes = attributes.each_with_object({}) { |(k, v), h|
69
- if (!acceptable_attribute_map.key?(k.to_sym))
70
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::SendMailboxMessageBodyAttachmentsInnerAnyOf1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
- end
72
- h[k.to_sym] = v
73
- }
74
-
75
- if attributes.key?(:'blob_id')
76
- self.blob_id = attributes[:'blob_id']
77
- else
78
- self.blob_id = nil
79
- end
80
-
81
- if attributes.key?(:'content_type')
82
- self.content_type = attributes[:'content_type']
83
- else
84
- self.content_type = nil
85
- end
86
-
87
- if attributes.key?(:'filename')
88
- self.filename = attributes[:'filename']
89
- else
90
- self.filename = nil
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 @blob_id.nil?
100
- invalid_properties.push('invalid value for "blob_id", blob_id cannot be nil.')
101
- end
102
-
103
- if @content_type.nil?
104
- invalid_properties.push('invalid value for "content_type", content_type cannot be nil.')
105
- end
106
-
107
- if @filename.nil?
108
- invalid_properties.push('invalid value for "filename", filename cannot be nil.')
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 @blob_id.nil?
119
- return false if @content_type.nil?
120
- return false if @filename.nil?
121
- true
122
- end
123
-
124
- # Custom attribute writer method with validation
125
- # @param [Object] blob_id Value to be assigned
126
- def blob_id=(blob_id)
127
- if blob_id.nil?
128
- fail ArgumentError, 'blob_id cannot be nil'
129
- end
130
-
131
- @blob_id = blob_id
132
- end
133
-
134
- # Custom attribute writer method with validation
135
- # @param [Object] content_type Value to be assigned
136
- def content_type=(content_type)
137
- if content_type.nil?
138
- fail ArgumentError, 'content_type cannot be nil'
139
- end
140
-
141
- @content_type = content_type
142
- end
143
-
144
- # Custom attribute writer method with validation
145
- # @param [Object] filename Value to be assigned
146
- def filename=(filename)
147
- if filename.nil?
148
- fail ArgumentError, 'filename cannot be nil'
149
- end
150
-
151
- @filename = filename
152
- end
153
-
154
- # Checks equality by comparing each attribute.
155
- # @param [Object] Object to be compared
156
- def ==(o)
157
- return true if self.equal?(o)
158
- self.class == o.class &&
159
- blob_id == o.blob_id &&
160
- content_type == o.content_type &&
161
- filename == o.filename
162
- end
163
-
164
- # @see the `==` method
165
- # @param [Object] Object to be compared
166
- def eql?(o)
167
- self == o
168
- end
169
-
170
- # Calculates hash code according to all attributes.
171
- # @return [Integer] Hash code
172
- def hash
173
- [blob_id, content_type, filename].hash
174
- end
175
-
176
- # Builds the object from hash
177
- # @param [Hash] attributes Model attributes in the form of hash
178
- # @return [Object] Returns the model itself
179
- def self.build_from_hash(attributes)
180
- return nil unless attributes.is_a?(Hash)
181
- attributes = attributes.transform_keys(&:to_sym)
182
- transformed_hash = {}
183
- openapi_types.each_pair do |key, type|
184
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
185
- transformed_hash["#{key}"] = nil
186
- elsif type =~ /\AArray<(.*)>/i
187
- # check to ensure the input is an array given that the attribute
188
- # is documented as an array but the input is not
189
- if attributes[attribute_map[key]].is_a?(Array)
190
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
191
- end
192
- elsif !attributes[attribute_map[key]].nil?
193
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
194
- end
195
- end
196
- new(transformed_hash)
197
- end
198
-
199
- # Returns the object in the form of hash
200
- # @return [Hash] Returns the object in the form of hash
201
- def to_hash
202
- hash = {}
203
- self.class.attribute_map.each_pair do |attr, param|
204
- value = self.send(attr)
205
- if value.nil?
206
- is_nullable = self.class.openapi_nullable.include?(attr)
207
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
- end
209
-
210
- hash[param] = _to_hash(value)
211
- end
212
- hash
213
- end
214
-
215
- end
216
-
217
- end
@@ -1,214 +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 SendMailboxMessageResult < ApiModelBase
18
- attr_accessor :message_id
19
-
20
- attr_accessor :status
21
-
22
- class EnumAttributeValidator
23
- attr_reader :datatype
24
- attr_reader :allowable_values
25
-
26
- def initialize(datatype, allowable_values)
27
- @allowable_values = allowable_values.map do |value|
28
- case datatype.to_s
29
- when /Integer/i
30
- value.to_i
31
- when /Float/i
32
- value.to_f
33
- else
34
- value
35
- end
36
- end
37
- end
38
-
39
- def valid?(value)
40
- !value || allowable_values.include?(value)
41
- end
42
- end
43
-
44
- # Attribute mapping from ruby-style variable name to JSON key.
45
- def self.attribute_map
46
- {
47
- :'message_id' => :'message_id',
48
- :'status' => :'status'
49
- }
50
- end
51
-
52
- # Returns attribute mapping this model knows about
53
- def self.acceptable_attribute_map
54
- attribute_map
55
- end
56
-
57
- # Returns all the JSON keys this model knows about
58
- def self.acceptable_attributes
59
- acceptable_attribute_map.values
60
- end
61
-
62
- # Attribute type mapping.
63
- def self.openapi_types
64
- {
65
- :'message_id' => :'String',
66
- :'status' => :'String'
67
- }
68
- end
69
-
70
- # List of attributes with nullable: true
71
- def self.openapi_nullable
72
- Set.new([
73
- ])
74
- end
75
-
76
- # Initializes the object
77
- # @param [Hash] attributes Model attributes in the form of hash
78
- def initialize(attributes = {})
79
- if (!attributes.is_a?(Hash))
80
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::SendMailboxMessageResult` initialize method"
81
- end
82
-
83
- # check to see if the attribute exists and convert string to symbol for hash key
84
- acceptable_attribute_map = self.class.acceptable_attribute_map
85
- attributes = attributes.each_with_object({}) { |(k, v), h|
86
- if (!acceptable_attribute_map.key?(k.to_sym))
87
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::SendMailboxMessageResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
- end
89
- h[k.to_sym] = v
90
- }
91
-
92
- if attributes.key?(:'message_id')
93
- self.message_id = attributes[:'message_id']
94
- else
95
- self.message_id = nil
96
- end
97
-
98
- if attributes.key?(:'status')
99
- self.status = attributes[:'status']
100
- else
101
- self.status = nil
102
- end
103
- end
104
-
105
- # Show invalid properties with the reasons. Usually used together with valid?
106
- # @return Array for valid properties with the reasons
107
- def list_invalid_properties
108
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
109
- invalid_properties = Array.new
110
- if @message_id.nil?
111
- invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
112
- end
113
-
114
- if @status.nil?
115
- invalid_properties.push('invalid value for "status", status 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 @message_id.nil?
126
- return false if @status.nil?
127
- status_validator = EnumAttributeValidator.new('String', ["queued", "unknown_default_open_api"])
128
- return false unless status_validator.valid?(@status)
129
- true
130
- end
131
-
132
- # Custom attribute writer method with validation
133
- # @param [Object] message_id Value to be assigned
134
- def message_id=(message_id)
135
- if message_id.nil?
136
- fail ArgumentError, 'message_id cannot be nil'
137
- end
138
-
139
- @message_id = message_id
140
- end
141
-
142
- # Custom attribute writer method checking allowed values (enum).
143
- # @param [Object] status Object to be assigned
144
- def status=(status)
145
- validator = EnumAttributeValidator.new('String', ["queued", "unknown_default_open_api"])
146
- unless validator.valid?(status)
147
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
148
- end
149
- @status = status
150
- end
151
-
152
- # Checks equality by comparing each attribute.
153
- # @param [Object] Object to be compared
154
- def ==(o)
155
- return true if self.equal?(o)
156
- self.class == o.class &&
157
- message_id == o.message_id &&
158
- status == o.status
159
- end
160
-
161
- # @see the `==` method
162
- # @param [Object] Object to be compared
163
- def eql?(o)
164
- self == o
165
- end
166
-
167
- # Calculates hash code according to all attributes.
168
- # @return [Integer] Hash code
169
- def hash
170
- [message_id, status].hash
171
- end
172
-
173
- # Builds the object from hash
174
- # @param [Hash] attributes Model attributes in the form of hash
175
- # @return [Object] Returns the model itself
176
- def self.build_from_hash(attributes)
177
- return nil unless attributes.is_a?(Hash)
178
- attributes = attributes.transform_keys(&:to_sym)
179
- transformed_hash = {}
180
- openapi_types.each_pair do |key, type|
181
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
182
- transformed_hash["#{key}"] = nil
183
- elsif type =~ /\AArray<(.*)>/i
184
- # check to ensure the input is an array given that the attribute
185
- # is documented as an array but the input is not
186
- if attributes[attribute_map[key]].is_a?(Array)
187
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
188
- end
189
- elsif !attributes[attribute_map[key]].nil?
190
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
191
- end
192
- end
193
- new(transformed_hash)
194
- end
195
-
196
- # Returns the object in the form of hash
197
- # @return [Hash] Returns the object in the form of hash
198
- def to_hash
199
- hash = {}
200
- self.class.attribute_map.each_pair do |attr, param|
201
- value = self.send(attr)
202
- if value.nil?
203
- is_nullable = self.class.openapi_nullable.include?(attr)
204
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
- end
206
-
207
- hash[param] = _to_hash(value)
208
- end
209
- hash
210
- end
211
-
212
- end
213
-
214
- end
@@ -1,192 +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 SuccessEnvelope < ApiModelBase
18
- attr_accessor :meta
19
-
20
- attr_accessor :ok
21
-
22
- # Attribute mapping from ruby-style variable name to JSON key.
23
- def self.attribute_map
24
- {
25
- :'meta' => :'meta',
26
- :'ok' => :'ok'
27
- }
28
- end
29
-
30
- # Returns attribute mapping this model knows about
31
- def self.acceptable_attribute_map
32
- attribute_map
33
- end
34
-
35
- # Returns all the JSON keys this model knows about
36
- def self.acceptable_attributes
37
- acceptable_attribute_map.values
38
- end
39
-
40
- # Attribute type mapping.
41
- def self.openapi_types
42
- {
43
- :'meta' => :'Hash<String, Object>',
44
- :'ok' => :'Boolean'
45
- }
46
- end
47
-
48
- # List of attributes with nullable: true
49
- def self.openapi_nullable
50
- Set.new([
51
- ])
52
- end
53
-
54
- # Initializes the object
55
- # @param [Hash] attributes Model attributes in the form of hash
56
- def initialize(attributes = {})
57
- if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::SuccessEnvelope` initialize method"
59
- end
60
-
61
- # check to see if the attribute exists and convert string to symbol for hash key
62
- acceptable_attribute_map = self.class.acceptable_attribute_map
63
- attributes = attributes.each_with_object({}) { |(k, v), h|
64
- if (!acceptable_attribute_map.key?(k.to_sym))
65
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::SuccessEnvelope`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
- end
67
- h[k.to_sym] = v
68
- }
69
-
70
- if attributes.key?(:'meta')
71
- if (value = attributes[:'meta']).is_a?(Hash)
72
- self.meta = value
73
- end
74
- else
75
- self.meta = nil
76
- end
77
-
78
- if attributes.key?(:'ok')
79
- self.ok = attributes[:'ok']
80
- else
81
- self.ok = nil
82
- end
83
- end
84
-
85
- # Show invalid properties with the reasons. Usually used together with valid?
86
- # @return Array for valid properties with the reasons
87
- def list_invalid_properties
88
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
- invalid_properties = Array.new
90
- if @meta.nil?
91
- invalid_properties.push('invalid value for "meta", meta cannot be nil.')
92
- end
93
-
94
- if @ok.nil?
95
- invalid_properties.push('invalid value for "ok", ok cannot be nil.')
96
- end
97
-
98
- invalid_properties
99
- end
100
-
101
- # Check to see if the all the properties in the model are valid
102
- # @return true if the model is valid
103
- def valid?
104
- warn '[DEPRECATED] the `valid?` method is obsolete'
105
- return false if @meta.nil?
106
- return false if @ok.nil?
107
- true
108
- end
109
-
110
- # Custom attribute writer method with validation
111
- # @param [Object] meta Value to be assigned
112
- def meta=(meta)
113
- if meta.nil?
114
- fail ArgumentError, 'meta cannot be nil'
115
- end
116
-
117
- @meta = meta
118
- end
119
-
120
- # Custom attribute writer method with validation
121
- # @param [Object] ok Value to be assigned
122
- def ok=(ok)
123
- if ok.nil?
124
- fail ArgumentError, 'ok cannot be nil'
125
- end
126
-
127
- @ok = ok
128
- end
129
-
130
- # Checks equality by comparing each attribute.
131
- # @param [Object] Object to be compared
132
- def ==(o)
133
- return true if self.equal?(o)
134
- self.class == o.class &&
135
- meta == o.meta &&
136
- ok == o.ok
137
- end
138
-
139
- # @see the `==` method
140
- # @param [Object] Object to be compared
141
- def eql?(o)
142
- self == o
143
- end
144
-
145
- # Calculates hash code according to all attributes.
146
- # @return [Integer] Hash code
147
- def hash
148
- [meta, ok].hash
149
- end
150
-
151
- # Builds the object from hash
152
- # @param [Hash] attributes Model attributes in the form of hash
153
- # @return [Object] Returns the model itself
154
- def self.build_from_hash(attributes)
155
- return nil unless attributes.is_a?(Hash)
156
- attributes = attributes.transform_keys(&:to_sym)
157
- transformed_hash = {}
158
- openapi_types.each_pair do |key, type|
159
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
160
- transformed_hash["#{key}"] = nil
161
- elsif type =~ /\AArray<(.*)>/i
162
- # check to ensure the input is an array given that the attribute
163
- # is documented as an array but the input is not
164
- if attributes[attribute_map[key]].is_a?(Array)
165
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
166
- end
167
- elsif !attributes[attribute_map[key]].nil?
168
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
169
- end
170
- end
171
- new(transformed_hash)
172
- end
173
-
174
- # Returns the object in the form of hash
175
- # @return [Hash] Returns the object in the form of hash
176
- def to_hash
177
- hash = {}
178
- self.class.attribute_map.each_pair do |attr, param|
179
- value = self.send(attr)
180
- if value.nil?
181
- is_nullable = self.class.openapi_nullable.include?(attr)
182
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
- end
184
-
185
- hash[param] = _to_hash(value)
186
- end
187
- hash
188
- end
189
-
190
- end
191
-
192
- end