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,162 +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 MailboxMessageContentDates < ApiModelBase
18
- attr_accessor :received_at
19
-
20
- attr_accessor :sent_at
21
-
22
- # Attribute mapping from ruby-style variable name to JSON key.
23
- def self.attribute_map
24
- {
25
- :'received_at' => :'received_at',
26
- :'sent_at' => :'sent_at'
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
- :'received_at' => :'String',
44
- :'sent_at' => :'String'
45
- }
46
- end
47
-
48
- # List of attributes with nullable: true
49
- def self.openapi_nullable
50
- Set.new([
51
- :'received_at',
52
- :'sent_at'
53
- ])
54
- end
55
-
56
- # Initializes the object
57
- # @param [Hash] attributes Model attributes in the form of hash
58
- def initialize(attributes = {})
59
- if (!attributes.is_a?(Hash))
60
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxMessageContentDates` initialize method"
61
- end
62
-
63
- # check to see if the attribute exists and convert string to symbol for hash key
64
- acceptable_attribute_map = self.class.acceptable_attribute_map
65
- attributes = attributes.each_with_object({}) { |(k, v), h|
66
- if (!acceptable_attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxMessageContentDates`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
- end
69
- h[k.to_sym] = v
70
- }
71
-
72
- if attributes.key?(:'received_at')
73
- self.received_at = attributes[:'received_at']
74
- else
75
- self.received_at = nil
76
- end
77
-
78
- if attributes.key?(:'sent_at')
79
- self.sent_at = attributes[:'sent_at']
80
- else
81
- self.sent_at = 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
- invalid_properties
91
- end
92
-
93
- # Check to see if the all the properties in the model are valid
94
- # @return true if the model is valid
95
- def valid?
96
- warn '[DEPRECATED] the `valid?` method is obsolete'
97
- true
98
- end
99
-
100
- # Checks equality by comparing each attribute.
101
- # @param [Object] Object to be compared
102
- def ==(o)
103
- return true if self.equal?(o)
104
- self.class == o.class &&
105
- received_at == o.received_at &&
106
- sent_at == o.sent_at
107
- end
108
-
109
- # @see the `==` method
110
- # @param [Object] Object to be compared
111
- def eql?(o)
112
- self == o
113
- end
114
-
115
- # Calculates hash code according to all attributes.
116
- # @return [Integer] Hash code
117
- def hash
118
- [received_at, sent_at].hash
119
- end
120
-
121
- # Builds the object from hash
122
- # @param [Hash] attributes Model attributes in the form of hash
123
- # @return [Object] Returns the model itself
124
- def self.build_from_hash(attributes)
125
- return nil unless attributes.is_a?(Hash)
126
- attributes = attributes.transform_keys(&:to_sym)
127
- transformed_hash = {}
128
- openapi_types.each_pair do |key, type|
129
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
130
- transformed_hash["#{key}"] = nil
131
- elsif type =~ /\AArray<(.*)>/i
132
- # check to ensure the input is an array given that the attribute
133
- # is documented as an array but the input is not
134
- if attributes[attribute_map[key]].is_a?(Array)
135
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
136
- end
137
- elsif !attributes[attribute_map[key]].nil?
138
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
139
- end
140
- end
141
- new(transformed_hash)
142
- end
143
-
144
- # Returns the object in the form of hash
145
- # @return [Hash] Returns the object in the form of hash
146
- def to_hash
147
- hash = {}
148
- self.class.attribute_map.each_pair do |attr, param|
149
- value = self.send(attr)
150
- if value.nil?
151
- is_nullable = self.class.openapi_nullable.include?(attr)
152
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
153
- end
154
-
155
- hash[param] = _to_hash(value)
156
- end
157
- hash
158
- end
159
-
160
- end
161
-
162
- end
@@ -1,262 +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 MailboxMessageContentParticipants < ApiModelBase
18
- attr_accessor :bcc
19
-
20
- attr_accessor :cc
21
-
22
- attr_accessor :from
23
-
24
- attr_accessor :reply_to
25
-
26
- attr_accessor :to
27
-
28
- # Attribute mapping from ruby-style variable name to JSON key.
29
- def self.attribute_map
30
- {
31
- :'bcc' => :'bcc',
32
- :'cc' => :'cc',
33
- :'from' => :'from',
34
- :'reply_to' => :'reply_to',
35
- :'to' => :'to'
36
- }
37
- end
38
-
39
- # Returns attribute mapping this model knows about
40
- def self.acceptable_attribute_map
41
- attribute_map
42
- end
43
-
44
- # Returns all the JSON keys this model knows about
45
- def self.acceptable_attributes
46
- acceptable_attribute_map.values
47
- end
48
-
49
- # Attribute type mapping.
50
- def self.openapi_types
51
- {
52
- :'bcc' => :'Array<MailboxAddress>',
53
- :'cc' => :'Array<MailboxAddress>',
54
- :'from' => :'MailboxAddress',
55
- :'reply_to' => :'Array<MailboxAddress>',
56
- :'to' => :'Array<MailboxAddress>'
57
- }
58
- end
59
-
60
- # List of attributes with nullable: true
61
- def self.openapi_nullable
62
- Set.new([
63
- :'from',
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::MailboxMessageContentParticipants` 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::MailboxMessageContentParticipants`. 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?(:'bcc')
84
- if (value = attributes[:'bcc']).is_a?(Array)
85
- self.bcc = value
86
- end
87
- else
88
- self.bcc = nil
89
- end
90
-
91
- if attributes.key?(:'cc')
92
- if (value = attributes[:'cc']).is_a?(Array)
93
- self.cc = value
94
- end
95
- else
96
- self.cc = nil
97
- end
98
-
99
- if attributes.key?(:'from')
100
- self.from = attributes[:'from']
101
- else
102
- self.from = nil
103
- end
104
-
105
- if attributes.key?(:'reply_to')
106
- if (value = attributes[:'reply_to']).is_a?(Array)
107
- self.reply_to = value
108
- end
109
- else
110
- self.reply_to = nil
111
- end
112
-
113
- if attributes.key?(:'to')
114
- if (value = attributes[:'to']).is_a?(Array)
115
- self.to = value
116
- end
117
- else
118
- self.to = nil
119
- end
120
- end
121
-
122
- # Show invalid properties with the reasons. Usually used together with valid?
123
- # @return Array for valid properties with the reasons
124
- def list_invalid_properties
125
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
126
- invalid_properties = Array.new
127
- if @bcc.nil?
128
- invalid_properties.push('invalid value for "bcc", bcc cannot be nil.')
129
- end
130
-
131
- if @cc.nil?
132
- invalid_properties.push('invalid value for "cc", cc cannot be nil.')
133
- end
134
-
135
- if @reply_to.nil?
136
- invalid_properties.push('invalid value for "reply_to", reply_to cannot be nil.')
137
- end
138
-
139
- if @to.nil?
140
- invalid_properties.push('invalid value for "to", to 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 @bcc.nil?
151
- return false if @cc.nil?
152
- return false if @reply_to.nil?
153
- return false if @to.nil?
154
- true
155
- end
156
-
157
- # Custom attribute writer method with validation
158
- # @param [Object] bcc Value to be assigned
159
- def bcc=(bcc)
160
- if bcc.nil?
161
- fail ArgumentError, 'bcc cannot be nil'
162
- end
163
-
164
- @bcc = bcc
165
- end
166
-
167
- # Custom attribute writer method with validation
168
- # @param [Object] cc Value to be assigned
169
- def cc=(cc)
170
- if cc.nil?
171
- fail ArgumentError, 'cc cannot be nil'
172
- end
173
-
174
- @cc = cc
175
- end
176
-
177
- # Custom attribute writer method with validation
178
- # @param [Object] reply_to Value to be assigned
179
- def reply_to=(reply_to)
180
- if reply_to.nil?
181
- fail ArgumentError, 'reply_to cannot be nil'
182
- end
183
-
184
- @reply_to = reply_to
185
- end
186
-
187
- # Custom attribute writer method with validation
188
- # @param [Object] to Value to be assigned
189
- def to=(to)
190
- if to.nil?
191
- fail ArgumentError, 'to cannot be nil'
192
- end
193
-
194
- @to = to
195
- end
196
-
197
- # Checks equality by comparing each attribute.
198
- # @param [Object] Object to be compared
199
- def ==(o)
200
- return true if self.equal?(o)
201
- self.class == o.class &&
202
- bcc == o.bcc &&
203
- cc == o.cc &&
204
- from == o.from &&
205
- reply_to == o.reply_to &&
206
- to == o.to
207
- end
208
-
209
- # @see the `==` method
210
- # @param [Object] Object to be compared
211
- def eql?(o)
212
- self == o
213
- end
214
-
215
- # Calculates hash code according to all attributes.
216
- # @return [Integer] Hash code
217
- def hash
218
- [bcc, cc, from, reply_to, to].hash
219
- end
220
-
221
- # Builds the object from hash
222
- # @param [Hash] attributes Model attributes in the form of hash
223
- # @return [Object] Returns the model itself
224
- def self.build_from_hash(attributes)
225
- return nil unless attributes.is_a?(Hash)
226
- attributes = attributes.transform_keys(&:to_sym)
227
- transformed_hash = {}
228
- openapi_types.each_pair do |key, type|
229
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
230
- transformed_hash["#{key}"] = nil
231
- elsif type =~ /\AArray<(.*)>/i
232
- # check to ensure the input is an array given that the attribute
233
- # is documented as an array but the input is not
234
- if attributes[attribute_map[key]].is_a?(Array)
235
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
236
- end
237
- elsif !attributes[attribute_map[key]].nil?
238
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
239
- end
240
- end
241
- new(transformed_hash)
242
- end
243
-
244
- # Returns the object in the form of hash
245
- # @return [Hash] Returns the object in the form of hash
246
- def to_hash
247
- hash = {}
248
- self.class.attribute_map.each_pair do |attr, param|
249
- value = self.send(attr)
250
- if value.nil?
251
- is_nullable = self.class.openapi_nullable.include?(attr)
252
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
253
- end
254
-
255
- hash[param] = _to_hash(value)
256
- end
257
- hash
258
- end
259
-
260
- end
261
-
262
- end
@@ -1,223 +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 MailboxMessageContentResponse < ApiModelBase
18
- attr_accessor :meta
19
-
20
- attr_accessor :ok
21
-
22
- attr_accessor :data
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'meta' => :'meta',
28
- :'ok' => :'ok',
29
- :'data' => :'data'
30
- }
31
- end
32
-
33
- # Returns attribute mapping this model knows about
34
- def self.acceptable_attribute_map
35
- attribute_map
36
- end
37
-
38
- # Returns all the JSON keys this model knows about
39
- def self.acceptable_attributes
40
- acceptable_attribute_map.values
41
- end
42
-
43
- # Attribute type mapping.
44
- def self.openapi_types
45
- {
46
- :'meta' => :'ResponseMeta',
47
- :'ok' => :'Boolean',
48
- :'data' => :'MailboxMessageContent'
49
- }
50
- end
51
-
52
- # List of attributes with nullable: true
53
- def self.openapi_nullable
54
- Set.new([
55
- ])
56
- end
57
-
58
- # List of class defined in allOf (OpenAPI v3)
59
- def self.openapi_all_of
60
- [
61
- :'SuccessEnvelope'
62
- ]
63
- end
64
-
65
- # Initializes the object
66
- # @param [Hash] attributes Model attributes in the form of hash
67
- def initialize(attributes = {})
68
- if (!attributes.is_a?(Hash))
69
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Mailbox::Generated::MailboxMessageContentResponse` initialize method"
70
- end
71
-
72
- # check to see if the attribute exists and convert string to symbol for hash key
73
- acceptable_attribute_map = self.class.acceptable_attribute_map
74
- attributes = attributes.each_with_object({}) { |(k, v), h|
75
- if (!acceptable_attribute_map.key?(k.to_sym))
76
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Mailbox::Generated::MailboxMessageContentResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
77
- end
78
- h[k.to_sym] = v
79
- }
80
-
81
- if attributes.key?(:'meta')
82
- self.meta = attributes[:'meta']
83
- else
84
- self.meta = nil
85
- end
86
-
87
- if attributes.key?(:'ok')
88
- self.ok = attributes[:'ok']
89
- else
90
- self.ok = nil
91
- end
92
-
93
- if attributes.key?(:'data')
94
- self.data = attributes[:'data']
95
- else
96
- self.data = nil
97
- end
98
- end
99
-
100
- # Show invalid properties with the reasons. Usually used together with valid?
101
- # @return Array for valid properties with the reasons
102
- def list_invalid_properties
103
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
- invalid_properties = Array.new
105
- if @meta.nil?
106
- invalid_properties.push('invalid value for "meta", meta cannot be nil.')
107
- end
108
-
109
- if @ok.nil?
110
- invalid_properties.push('invalid value for "ok", ok cannot be nil.')
111
- end
112
-
113
- if @data.nil?
114
- invalid_properties.push('invalid value for "data", data cannot be nil.')
115
- end
116
-
117
- invalid_properties
118
- end
119
-
120
- # Check to see if the all the properties in the model are valid
121
- # @return true if the model is valid
122
- def valid?
123
- warn '[DEPRECATED] the `valid?` method is obsolete'
124
- return false if @meta.nil?
125
- return false if @ok.nil?
126
- return false if @data.nil?
127
- true
128
- end
129
-
130
- # Custom attribute writer method with validation
131
- # @param [Object] meta Value to be assigned
132
- def meta=(meta)
133
- if meta.nil?
134
- fail ArgumentError, 'meta cannot be nil'
135
- end
136
-
137
- @meta = meta
138
- end
139
-
140
- # Custom attribute writer method with validation
141
- # @param [Object] ok Value to be assigned
142
- def ok=(ok)
143
- if ok.nil?
144
- fail ArgumentError, 'ok cannot be nil'
145
- end
146
-
147
- @ok = ok
148
- end
149
-
150
- # Custom attribute writer method with validation
151
- # @param [Object] data Value to be assigned
152
- def data=(data)
153
- if data.nil?
154
- fail ArgumentError, 'data cannot be nil'
155
- end
156
-
157
- @data = data
158
- end
159
-
160
- # Checks equality by comparing each attribute.
161
- # @param [Object] Object to be compared
162
- def ==(o)
163
- return true if self.equal?(o)
164
- self.class == o.class &&
165
- meta == o.meta &&
166
- ok == o.ok &&
167
- data == o.data
168
- end
169
-
170
- # @see the `==` method
171
- # @param [Object] Object to be compared
172
- def eql?(o)
173
- self == o
174
- end
175
-
176
- # Calculates hash code according to all attributes.
177
- # @return [Integer] Hash code
178
- def hash
179
- [meta, ok, data].hash
180
- end
181
-
182
- # Builds the object from hash
183
- # @param [Hash] attributes Model attributes in the form of hash
184
- # @return [Object] Returns the model itself
185
- def self.build_from_hash(attributes)
186
- return nil unless attributes.is_a?(Hash)
187
- attributes = attributes.transform_keys(&:to_sym)
188
- transformed_hash = {}
189
- openapi_types.each_pair do |key, type|
190
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
191
- transformed_hash["#{key}"] = nil
192
- elsif type =~ /\AArray<(.*)>/i
193
- # check to ensure the input is an array given that the attribute
194
- # is documented as an array but the input is not
195
- if attributes[attribute_map[key]].is_a?(Array)
196
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
197
- end
198
- elsif !attributes[attribute_map[key]].nil?
199
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
200
- end
201
- end
202
- new(transformed_hash)
203
- end
204
-
205
- # Returns the object in the form of hash
206
- # @return [Hash] Returns the object in the form of hash
207
- def to_hash
208
- hash = {}
209
- self.class.attribute_map.each_pair do |attr, param|
210
- value = self.send(attr)
211
- if value.nil?
212
- is_nullable = self.class.openapi_nullable.include?(attr)
213
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
- end
215
-
216
- hash[param] = _to_hash(value)
217
- end
218
- hash
219
- end
220
-
221
- end
222
-
223
- end