sendmux-management 2.0.0 → 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 -73
  4. data/LICENSE +0 -21
  5. data/README.md +0 -157
  6. data/lib/sendmux/management/client.rb +0 -77
  7. data/lib/sendmux/management/version.rb +0 -7
  8. data/lib/sendmux/management.rb +0 -12
  9. data/lib/sendmux_management_generated/api/billing_api.rb +0 -221
  10. data/lib/sendmux_management_generated/api/connection_api.rb +0 -82
  11. data/lib/sendmux_management_generated/api/domain_filters_api.rb +0 -161
  12. data/lib/sendmux_management_generated/api/domains_api.rb +0 -492
  13. data/lib/sendmux_management_generated/api/emails_api.rb +0 -258
  14. data/lib/sendmux_management_generated/api/inboxes_api.rb +0 -175
  15. data/lib/sendmux_management_generated/api/mailbox_filters_api.rb +0 -161
  16. data/lib/sendmux_management_generated/api/mailboxes_api.rb +0 -723
  17. data/lib/sendmux_management_generated/api/sending_accounts_api.rb +0 -1009
  18. data/lib/sendmux_management_generated/api/webhooks_api.rb +0 -666
  19. data/lib/sendmux_management_generated/api_client.rb +0 -447
  20. data/lib/sendmux_management_generated/api_error.rb +0 -58
  21. data/lib/sendmux_management_generated/api_model_base.rb +0 -88
  22. data/lib/sendmux_management_generated/configuration.rb +0 -400
  23. data/lib/sendmux_management_generated/models/api_error_detail.rb +0 -219
  24. data/lib/sendmux_management_generated/models/api_error_error.rb +0 -275
  25. data/lib/sendmux_management_generated/models/api_error_meta.rb +0 -164
  26. data/lib/sendmux_management_generated/models/api_error_response.rb +0 -216
  27. data/lib/sendmux_management_generated/models/balance.rb +0 -293
  28. data/lib/sendmux_management_generated/models/balance_auto_topup.rb +0 -226
  29. data/lib/sendmux_management_generated/models/balance_response.rb +0 -223
  30. data/lib/sendmux_management_generated/models/connection.rb +0 -273
  31. data/lib/sendmux_management_generated/models/connection_credential.rb +0 -226
  32. data/lib/sendmux_management_generated/models/connection_mailboxes_inner.rb +0 -190
  33. data/lib/sendmux_management_generated/models/connection_response.rb +0 -223
  34. data/lib/sendmux_management_generated/models/connection_team.rb +0 -190
  35. data/lib/sendmux_management_generated/models/cursor_pagination.rb +0 -173
  36. data/lib/sendmux_management_generated/models/delivery_log_detail.rb +0 -573
  37. data/lib/sendmux_management_generated/models/delivery_log_item.rb +0 -543
  38. data/lib/sendmux_management_generated/models/delivery_log_item_cursor_list_response.rb +0 -251
  39. data/lib/sendmux_management_generated/models/delivery_log_item_response.rb +0 -223
  40. data/lib/sendmux_management_generated/models/delivery_log_recipient.rb +0 -254
  41. data/lib/sendmux_management_generated/models/domain_deleted_response.rb +0 -223
  42. data/lib/sendmux_management_generated/models/domain_deleted_response_all_of_data.rb +0 -190
  43. data/lib/sendmux_management_generated/models/domain_item_cursor_list_response.rb +0 -251
  44. data/lib/sendmux_management_generated/models/domain_item_response.rb +0 -223
  45. data/lib/sendmux_management_generated/models/domain_verify_response.rb +0 -223
  46. data/lib/sendmux_management_generated/models/email_metrics.rb +0 -218
  47. data/lib/sendmux_management_generated/models/email_metrics_comparison.rb +0 -294
  48. data/lib/sendmux_management_generated/models/email_metrics_comparison_change_pct.rb +0 -268
  49. data/lib/sendmux_management_generated/models/email_metrics_response.rb +0 -223
  50. data/lib/sendmux_management_generated/models/email_metrics_summary.rb +0 -268
  51. data/lib/sendmux_management_generated/models/email_metrics_timeseries_inner.rb +0 -294
  52. data/lib/sendmux_management_generated/models/filter_rule.rb +0 -242
  53. data/lib/sendmux_management_generated/models/filter_state.rb +0 -218
  54. data/lib/sendmux_management_generated/models/filter_state_response.rb +0 -223
  55. data/lib/sendmux_management_generated/models/incoming_log_item.rb +0 -465
  56. data/lib/sendmux_management_generated/models/incoming_log_item_cursor_list_response.rb +0 -251
  57. data/lib/sendmux_management_generated/models/incoming_log_item_response.rb +0 -223
  58. data/lib/sendmux_management_generated/models/mailbox.rb +0 -284
  59. data/lib/sendmux_management_generated/models/mailbox_app_password_result.rb +0 -164
  60. data/lib/sendmux_management_generated/models/mailbox_app_password_result_credential.rb +0 -359
  61. data/lib/sendmux_management_generated/models/mailbox_app_password_result_response.rb +0 -223
  62. data/lib/sendmux_management_generated/models/mailbox_availability_reason.rb +0 -45
  63. data/lib/sendmux_management_generated/models/mailbox_availability_response.rb +0 -223
  64. data/lib/sendmux_management_generated/models/mailbox_availability_result.rb +0 -240
  65. data/lib/sendmux_management_generated/models/mailbox_create_result.rb +0 -189
  66. data/lib/sendmux_management_generated/models/mailbox_create_result_response.rb +0 -223
  67. data/lib/sendmux_management_generated/models/mailbox_credential.rb +0 -353
  68. data/lib/sendmux_management_generated/models/mailbox_deleted_response.rb +0 -223
  69. data/lib/sendmux_management_generated/models/mailbox_domain.rb +0 -452
  70. data/lib/sendmux_management_generated/models/mailbox_domain_dns_records.rb +0 -303
  71. data/lib/sendmux_management_generated/models/mailbox_domain_mail_from_records.rb +0 -191
  72. data/lib/sendmux_management_generated/models/mailbox_domain_mx_record.rb +0 -190
  73. data/lib/sendmux_management_generated/models/mailbox_domain_name_value_record.rb +0 -191
  74. data/lib/sendmux_management_generated/models/mailbox_domain_named_mx_record.rb +0 -217
  75. data/lib/sendmux_management_generated/models/mailbox_domain_verify_checks.rb +0 -300
  76. data/lib/sendmux_management_generated/models/mailbox_domain_verify_result.rb +0 -377
  77. data/lib/sendmux_management_generated/models/mailbox_item_cursor_list_response.rb +0 -251
  78. data/lib/sendmux_management_generated/models/mailbox_item_response.rb +0 -223
  79. data/lib/sendmux_management_generated/models/mailbox_key_deleted_response.rb +0 -223
  80. data/lib/sendmux_management_generated/models/mailbox_send_scope.rb +0 -213
  81. data/lib/sendmux_management_generated/models/management_create_domain_request.rb +0 -209
  82. data/lib/sendmux_management_generated/models/management_create_mailbox_key_request.rb +0 -183
  83. data/lib/sendmux_management_generated/models/management_create_mailbox_request.rb +0 -270
  84. data/lib/sendmux_management_generated/models/management_create_mailbox_request_send_scope.rb +0 -214
  85. data/lib/sendmux_management_generated/models/management_test_webhook200_response.rb +0 -223
  86. data/lib/sendmux_management_generated/models/management_update_domain_request.rb +0 -189
  87. data/lib/sendmux_management_generated/models/provider_allowed_actions.rb +0 -294
  88. data/lib/sendmux_management_generated/models/provider_create_body.rb +0 -611
  89. data/lib/sendmux_management_generated/models/provider_create_body_quotas.rb +0 -174
  90. data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day.rb +0 -104
  91. data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day_any_of.rb +0 -215
  92. data/lib/sendmux_management_generated/models/provider_deleted.rb +0 -190
  93. data/lib/sendmux_management_generated/models/provider_deleted_response.rb +0 -223
  94. data/lib/sendmux_management_generated/models/provider_item.rb +0 -733
  95. data/lib/sendmux_management_generated/models/provider_item_cursor_list_response.rb +0 -251
  96. data/lib/sendmux_management_generated/models/provider_item_response.rb +0 -223
  97. data/lib/sendmux_management_generated/models/provider_limits.rb +0 -190
  98. data/lib/sendmux_management_generated/models/provider_limits_response.rb +0 -223
  99. data/lib/sendmux_management_generated/models/provider_list_item.rb +0 -695
  100. data/lib/sendmux_management_generated/models/provider_quota_range.rb +0 -208
  101. data/lib/sendmux_management_generated/models/provider_quotas.rb +0 -186
  102. data/lib/sendmux_management_generated/models/provider_stats.rb +0 -325
  103. data/lib/sendmux_management_generated/models/provider_stats_response.rb +0 -223
  104. data/lib/sendmux_management_generated/models/provider_status_counts.rb +0 -242
  105. data/lib/sendmux_management_generated/models/provider_test_result.rb +0 -251
  106. data/lib/sendmux_management_generated/models/provider_test_result_response.rb +0 -223
  107. data/lib/sendmux_management_generated/models/provider_type_counts.rb +0 -246
  108. data/lib/sendmux_management_generated/models/provider_update_body.rb +0 -569
  109. data/lib/sendmux_management_generated/models/provider_usage.rb +0 -216
  110. data/lib/sendmux_management_generated/models/provider_usage_item.rb +0 -374
  111. data/lib/sendmux_management_generated/models/provider_usage_response.rb +0 -223
  112. data/lib/sendmux_management_generated/models/resource_limit_snapshot.rb +0 -420
  113. data/lib/sendmux_management_generated/models/response_meta.rb +0 -164
  114. data/lib/sendmux_management_generated/models/sending_account_limit_request.rb +0 -190
  115. data/lib/sendmux_management_generated/models/sending_account_limit_request_response.rb +0 -223
  116. data/lib/sendmux_management_generated/models/set_filter_state_body.rb +0 -226
  117. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit.rb +0 -315
  118. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request.rb +0 -361
  119. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel.rb +0 -190
  120. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel_response.rb +0 -223
  121. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create.rb +0 -190
  122. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_response.rb +0 -223
  123. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page.rb +0 -176
  124. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page_response.rb +0 -223
  125. data/lib/sendmux_management_generated/models/spend_summary.rb +0 -292
  126. data/lib/sendmux_management_generated/models/spend_summary_response.rb +0 -223
  127. data/lib/sendmux_management_generated/models/success_envelope.rb +0 -192
  128. data/lib/sendmux_management_generated/models/transaction.rb +0 -332
  129. data/lib/sendmux_management_generated/models/transaction_cursor_list_response.rb +0 -251
  130. data/lib/sendmux_management_generated/models/update_mailbox_body.rb +0 -211
  131. data/lib/sendmux_management_generated/models/update_mailbox_body_send_scope.rb +0 -214
  132. data/lib/sendmux_management_generated/models/webhook_create_body.rb +0 -269
  133. data/lib/sendmux_management_generated/models/webhook_deleted_response.rb +0 -223
  134. data/lib/sendmux_management_generated/models/webhook_delivery_attempt.rb +0 -562
  135. data/lib/sendmux_management_generated/models/webhook_delivery_attempt_cursor_list_response.rb +0 -251
  136. data/lib/sendmux_management_generated/models/webhook_delivery_payload.rb +0 -359
  137. data/lib/sendmux_management_generated/models/webhook_delivery_payload_response.rb +0 -223
  138. data/lib/sendmux_management_generated/models/webhook_event_data.rb +0 -395
  139. data/lib/sendmux_management_generated/models/webhook_event_payload.rb +0 -297
  140. data/lib/sendmux_management_generated/models/webhook_filters.rb +0 -168
  141. data/lib/sendmux_management_generated/models/webhook_subscription.rb +0 -380
  142. data/lib/sendmux_management_generated/models/webhook_subscription_cursor_list_response.rb +0 -251
  143. data/lib/sendmux_management_generated/models/webhook_subscription_response.rb +0 -223
  144. data/lib/sendmux_management_generated/models/webhook_subscription_with_secret.rb +0 -414
  145. data/lib/sendmux_management_generated/models/webhook_subscription_with_secret_response.rb +0 -223
  146. data/lib/sendmux_management_generated/models/webhook_test_response.rb +0 -165
  147. data/lib/sendmux_management_generated/models/webhook_update_body.rb +0 -233
  148. data/lib/sendmux_management_generated/version.rb +0 -15
  149. data/lib/sendmux_management_generated.rb +0 -175
@@ -1,303 +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::Management::Generated
17
- class MailboxDomainDnsRecords < ApiModelBase
18
- # Three Amazon SES DKIM CNAME records
19
- attr_accessor :dkim
20
-
21
- # DMARC enforcement record (quarantine, no reporting)
22
- attr_accessor :dmarc
23
-
24
- attr_accessor :mail_from
25
-
26
- # MX records the customer must place. All point at Sendmux's inbound mail servers.
27
- attr_accessor :mx
28
-
29
- # SPF TXT record covering Amazon SES sending
30
- attr_accessor :spf
31
-
32
- # Ownership-proof TXT record (Sendmux-specific)
33
- attr_accessor :verification
34
-
35
- # Attribute mapping from ruby-style variable name to JSON key.
36
- def self.attribute_map
37
- {
38
- :'dkim' => :'dkim',
39
- :'dmarc' => :'dmarc',
40
- :'mail_from' => :'mail_from',
41
- :'mx' => :'mx',
42
- :'spf' => :'spf',
43
- :'verification' => :'verification'
44
- }
45
- end
46
-
47
- # Returns attribute mapping this model knows about
48
- def self.acceptable_attribute_map
49
- attribute_map
50
- end
51
-
52
- # Returns all the JSON keys this model knows about
53
- def self.acceptable_attributes
54
- acceptable_attribute_map.values
55
- end
56
-
57
- # Attribute type mapping.
58
- def self.openapi_types
59
- {
60
- :'dkim' => :'Array<MailboxDomainNameValueRecord>',
61
- :'dmarc' => :'MailboxDomainNameValueRecord',
62
- :'mail_from' => :'MailboxDomainMailFromRecords',
63
- :'mx' => :'Array<MailboxDomainMxRecord>',
64
- :'spf' => :'MailboxDomainNameValueRecord',
65
- :'verification' => :'MailboxDomainNameValueRecord'
66
- }
67
- end
68
-
69
- # List of attributes with nullable: true
70
- def self.openapi_nullable
71
- Set.new([
72
- ])
73
- end
74
-
75
- # Initializes the object
76
- # @param [Hash] attributes Model attributes in the form of hash
77
- def initialize(attributes = {})
78
- if (!attributes.is_a?(Hash))
79
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::MailboxDomainDnsRecords` initialize method"
80
- end
81
-
82
- # check to see if the attribute exists and convert string to symbol for hash key
83
- acceptable_attribute_map = self.class.acceptable_attribute_map
84
- attributes = attributes.each_with_object({}) { |(k, v), h|
85
- if (!acceptable_attribute_map.key?(k.to_sym))
86
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::MailboxDomainDnsRecords`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
- end
88
- h[k.to_sym] = v
89
- }
90
-
91
- if attributes.key?(:'dkim')
92
- if (value = attributes[:'dkim']).is_a?(Array)
93
- self.dkim = value
94
- end
95
- else
96
- self.dkim = nil
97
- end
98
-
99
- if attributes.key?(:'dmarc')
100
- self.dmarc = attributes[:'dmarc']
101
- else
102
- self.dmarc = nil
103
- end
104
-
105
- if attributes.key?(:'mail_from')
106
- self.mail_from = attributes[:'mail_from']
107
- else
108
- self.mail_from = nil
109
- end
110
-
111
- if attributes.key?(:'mx')
112
- if (value = attributes[:'mx']).is_a?(Array)
113
- self.mx = value
114
- end
115
- else
116
- self.mx = nil
117
- end
118
-
119
- if attributes.key?(:'spf')
120
- self.spf = attributes[:'spf']
121
- else
122
- self.spf = nil
123
- end
124
-
125
- if attributes.key?(:'verification')
126
- self.verification = attributes[:'verification']
127
- else
128
- self.verification = nil
129
- end
130
- end
131
-
132
- # Show invalid properties with the reasons. Usually used together with valid?
133
- # @return Array for valid properties with the reasons
134
- def list_invalid_properties
135
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
136
- invalid_properties = Array.new
137
- if @dkim.nil?
138
- invalid_properties.push('invalid value for "dkim", dkim cannot be nil.')
139
- end
140
-
141
- if @dmarc.nil?
142
- invalid_properties.push('invalid value for "dmarc", dmarc cannot be nil.')
143
- end
144
-
145
- if @mail_from.nil?
146
- invalid_properties.push('invalid value for "mail_from", mail_from cannot be nil.')
147
- end
148
-
149
- if @mx.nil?
150
- invalid_properties.push('invalid value for "mx", mx cannot be nil.')
151
- end
152
-
153
- if @spf.nil?
154
- invalid_properties.push('invalid value for "spf", spf cannot be nil.')
155
- end
156
-
157
- if @verification.nil?
158
- invalid_properties.push('invalid value for "verification", verification cannot be nil.')
159
- end
160
-
161
- invalid_properties
162
- end
163
-
164
- # Check to see if the all the properties in the model are valid
165
- # @return true if the model is valid
166
- def valid?
167
- warn '[DEPRECATED] the `valid?` method is obsolete'
168
- return false if @dkim.nil?
169
- return false if @dmarc.nil?
170
- return false if @mail_from.nil?
171
- return false if @mx.nil?
172
- return false if @spf.nil?
173
- return false if @verification.nil?
174
- true
175
- end
176
-
177
- # Custom attribute writer method with validation
178
- # @param [Object] dkim Value to be assigned
179
- def dkim=(dkim)
180
- if dkim.nil?
181
- fail ArgumentError, 'dkim cannot be nil'
182
- end
183
-
184
- @dkim = dkim
185
- end
186
-
187
- # Custom attribute writer method with validation
188
- # @param [Object] dmarc Value to be assigned
189
- def dmarc=(dmarc)
190
- if dmarc.nil?
191
- fail ArgumentError, 'dmarc cannot be nil'
192
- end
193
-
194
- @dmarc = dmarc
195
- end
196
-
197
- # Custom attribute writer method with validation
198
- # @param [Object] mail_from Value to be assigned
199
- def mail_from=(mail_from)
200
- if mail_from.nil?
201
- fail ArgumentError, 'mail_from cannot be nil'
202
- end
203
-
204
- @mail_from = mail_from
205
- end
206
-
207
- # Custom attribute writer method with validation
208
- # @param [Object] mx Value to be assigned
209
- def mx=(mx)
210
- if mx.nil?
211
- fail ArgumentError, 'mx cannot be nil'
212
- end
213
-
214
- @mx = mx
215
- end
216
-
217
- # Custom attribute writer method with validation
218
- # @param [Object] spf Value to be assigned
219
- def spf=(spf)
220
- if spf.nil?
221
- fail ArgumentError, 'spf cannot be nil'
222
- end
223
-
224
- @spf = spf
225
- end
226
-
227
- # Custom attribute writer method with validation
228
- # @param [Object] verification Value to be assigned
229
- def verification=(verification)
230
- if verification.nil?
231
- fail ArgumentError, 'verification cannot be nil'
232
- end
233
-
234
- @verification = verification
235
- end
236
-
237
- # Checks equality by comparing each attribute.
238
- # @param [Object] Object to be compared
239
- def ==(o)
240
- return true if self.equal?(o)
241
- self.class == o.class &&
242
- dkim == o.dkim &&
243
- dmarc == o.dmarc &&
244
- mail_from == o.mail_from &&
245
- mx == o.mx &&
246
- spf == o.spf &&
247
- verification == o.verification
248
- end
249
-
250
- # @see the `==` method
251
- # @param [Object] Object to be compared
252
- def eql?(o)
253
- self == o
254
- end
255
-
256
- # Calculates hash code according to all attributes.
257
- # @return [Integer] Hash code
258
- def hash
259
- [dkim, dmarc, mail_from, mx, spf, verification].hash
260
- end
261
-
262
- # Builds the object from hash
263
- # @param [Hash] attributes Model attributes in the form of hash
264
- # @return [Object] Returns the model itself
265
- def self.build_from_hash(attributes)
266
- return nil unless attributes.is_a?(Hash)
267
- attributes = attributes.transform_keys(&:to_sym)
268
- transformed_hash = {}
269
- openapi_types.each_pair do |key, type|
270
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
271
- transformed_hash["#{key}"] = nil
272
- elsif type =~ /\AArray<(.*)>/i
273
- # check to ensure the input is an array given that the attribute
274
- # is documented as an array but the input is not
275
- if attributes[attribute_map[key]].is_a?(Array)
276
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
277
- end
278
- elsif !attributes[attribute_map[key]].nil?
279
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
280
- end
281
- end
282
- new(transformed_hash)
283
- end
284
-
285
- # Returns the object in the form of hash
286
- # @return [Hash] Returns the object in the form of hash
287
- def to_hash
288
- hash = {}
289
- self.class.attribute_map.each_pair do |attr, param|
290
- value = self.send(attr)
291
- if value.nil?
292
- is_nullable = self.class.openapi_nullable.include?(attr)
293
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
294
- end
295
-
296
- hash[param] = _to_hash(value)
297
- end
298
- hash
299
- end
300
-
301
- end
302
-
303
- end
@@ -1,191 +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::Management::Generated
17
- # Custom MAIL FROM records for Amazon SES bounce handling
18
- class MailboxDomainMailFromRecords < ApiModelBase
19
- attr_accessor :mx
20
-
21
- attr_accessor :spf
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'mx' => :'mx',
27
- :'spf' => :'spf'
28
- }
29
- end
30
-
31
- # Returns attribute mapping this model knows about
32
- def self.acceptable_attribute_map
33
- attribute_map
34
- end
35
-
36
- # Returns all the JSON keys this model knows about
37
- def self.acceptable_attributes
38
- acceptable_attribute_map.values
39
- end
40
-
41
- # Attribute type mapping.
42
- def self.openapi_types
43
- {
44
- :'mx' => :'MailboxDomainNamedMxRecord',
45
- :'spf' => :'MailboxDomainNameValueRecord'
46
- }
47
- end
48
-
49
- # List of attributes with nullable: true
50
- def self.openapi_nullable
51
- Set.new([
52
- ])
53
- end
54
-
55
- # Initializes the object
56
- # @param [Hash] attributes Model attributes in the form of hash
57
- def initialize(attributes = {})
58
- if (!attributes.is_a?(Hash))
59
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::MailboxDomainMailFromRecords` initialize method"
60
- end
61
-
62
- # check to see if the attribute exists and convert string to symbol for hash key
63
- acceptable_attribute_map = self.class.acceptable_attribute_map
64
- attributes = attributes.each_with_object({}) { |(k, v), h|
65
- if (!acceptable_attribute_map.key?(k.to_sym))
66
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::MailboxDomainMailFromRecords`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
- end
68
- h[k.to_sym] = v
69
- }
70
-
71
- if attributes.key?(:'mx')
72
- self.mx = attributes[:'mx']
73
- else
74
- self.mx = nil
75
- end
76
-
77
- if attributes.key?(:'spf')
78
- self.spf = attributes[:'spf']
79
- else
80
- self.spf = nil
81
- end
82
- end
83
-
84
- # Show invalid properties with the reasons. Usually used together with valid?
85
- # @return Array for valid properties with the reasons
86
- def list_invalid_properties
87
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
88
- invalid_properties = Array.new
89
- if @mx.nil?
90
- invalid_properties.push('invalid value for "mx", mx cannot be nil.')
91
- end
92
-
93
- if @spf.nil?
94
- invalid_properties.push('invalid value for "spf", spf cannot be nil.')
95
- end
96
-
97
- invalid_properties
98
- end
99
-
100
- # Check to see if the all the properties in the model are valid
101
- # @return true if the model is valid
102
- def valid?
103
- warn '[DEPRECATED] the `valid?` method is obsolete'
104
- return false if @mx.nil?
105
- return false if @spf.nil?
106
- true
107
- end
108
-
109
- # Custom attribute writer method with validation
110
- # @param [Object] mx Value to be assigned
111
- def mx=(mx)
112
- if mx.nil?
113
- fail ArgumentError, 'mx cannot be nil'
114
- end
115
-
116
- @mx = mx
117
- end
118
-
119
- # Custom attribute writer method with validation
120
- # @param [Object] spf Value to be assigned
121
- def spf=(spf)
122
- if spf.nil?
123
- fail ArgumentError, 'spf cannot be nil'
124
- end
125
-
126
- @spf = spf
127
- end
128
-
129
- # Checks equality by comparing each attribute.
130
- # @param [Object] Object to be compared
131
- def ==(o)
132
- return true if self.equal?(o)
133
- self.class == o.class &&
134
- mx == o.mx &&
135
- spf == o.spf
136
- end
137
-
138
- # @see the `==` method
139
- # @param [Object] Object to be compared
140
- def eql?(o)
141
- self == o
142
- end
143
-
144
- # Calculates hash code according to all attributes.
145
- # @return [Integer] Hash code
146
- def hash
147
- [mx, spf].hash
148
- end
149
-
150
- # Builds the object from hash
151
- # @param [Hash] attributes Model attributes in the form of hash
152
- # @return [Object] Returns the model itself
153
- def self.build_from_hash(attributes)
154
- return nil unless attributes.is_a?(Hash)
155
- attributes = attributes.transform_keys(&:to_sym)
156
- transformed_hash = {}
157
- openapi_types.each_pair do |key, type|
158
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
159
- transformed_hash["#{key}"] = nil
160
- elsif type =~ /\AArray<(.*)>/i
161
- # check to ensure the input is an array given that the attribute
162
- # is documented as an array but the input is not
163
- if attributes[attribute_map[key]].is_a?(Array)
164
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
165
- end
166
- elsif !attributes[attribute_map[key]].nil?
167
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
168
- end
169
- end
170
- new(transformed_hash)
171
- end
172
-
173
- # Returns the object in the form of hash
174
- # @return [Hash] Returns the object in the form of hash
175
- def to_hash
176
- hash = {}
177
- self.class.attribute_map.each_pair do |attr, param|
178
- value = self.send(attr)
179
- if value.nil?
180
- is_nullable = self.class.openapi_nullable.include?(attr)
181
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
- end
183
-
184
- hash[param] = _to_hash(value)
185
- end
186
- hash
187
- end
188
-
189
- end
190
-
191
- end
@@ -1,190 +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::Management::Generated
17
- class MailboxDomainMxRecord < ApiModelBase
18
- attr_accessor :priority
19
-
20
- attr_accessor :target
21
-
22
- # Attribute mapping from ruby-style variable name to JSON key.
23
- def self.attribute_map
24
- {
25
- :'priority' => :'priority',
26
- :'target' => :'target'
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
- :'priority' => :'Integer',
44
- :'target' => :'String'
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::Management::Generated::MailboxDomainMxRecord` 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::Management::Generated::MailboxDomainMxRecord`. 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?(:'priority')
71
- self.priority = attributes[:'priority']
72
- else
73
- self.priority = nil
74
- end
75
-
76
- if attributes.key?(:'target')
77
- self.target = attributes[:'target']
78
- else
79
- self.target = nil
80
- end
81
- end
82
-
83
- # Show invalid properties with the reasons. Usually used together with valid?
84
- # @return Array for valid properties with the reasons
85
- def list_invalid_properties
86
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
- invalid_properties = Array.new
88
- if @priority.nil?
89
- invalid_properties.push('invalid value for "priority", priority cannot be nil.')
90
- end
91
-
92
- if @target.nil?
93
- invalid_properties.push('invalid value for "target", target cannot be nil.')
94
- end
95
-
96
- invalid_properties
97
- end
98
-
99
- # Check to see if the all the properties in the model are valid
100
- # @return true if the model is valid
101
- def valid?
102
- warn '[DEPRECATED] the `valid?` method is obsolete'
103
- return false if @priority.nil?
104
- return false if @target.nil?
105
- true
106
- end
107
-
108
- # Custom attribute writer method with validation
109
- # @param [Object] priority Value to be assigned
110
- def priority=(priority)
111
- if priority.nil?
112
- fail ArgumentError, 'priority cannot be nil'
113
- end
114
-
115
- @priority = priority
116
- end
117
-
118
- # Custom attribute writer method with validation
119
- # @param [Object] target Value to be assigned
120
- def target=(target)
121
- if target.nil?
122
- fail ArgumentError, 'target cannot be nil'
123
- end
124
-
125
- @target = target
126
- end
127
-
128
- # Checks equality by comparing each attribute.
129
- # @param [Object] Object to be compared
130
- def ==(o)
131
- return true if self.equal?(o)
132
- self.class == o.class &&
133
- priority == o.priority &&
134
- target == o.target
135
- end
136
-
137
- # @see the `==` method
138
- # @param [Object] Object to be compared
139
- def eql?(o)
140
- self == o
141
- end
142
-
143
- # Calculates hash code according to all attributes.
144
- # @return [Integer] Hash code
145
- def hash
146
- [priority, target].hash
147
- end
148
-
149
- # Builds the object from hash
150
- # @param [Hash] attributes Model attributes in the form of hash
151
- # @return [Object] Returns the model itself
152
- def self.build_from_hash(attributes)
153
- return nil unless attributes.is_a?(Hash)
154
- attributes = attributes.transform_keys(&:to_sym)
155
- transformed_hash = {}
156
- openapi_types.each_pair do |key, type|
157
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
158
- transformed_hash["#{key}"] = nil
159
- elsif type =~ /\AArray<(.*)>/i
160
- # check to ensure the input is an array given that the attribute
161
- # is documented as an array but the input is not
162
- if attributes[attribute_map[key]].is_a?(Array)
163
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
- end
165
- elsif !attributes[attribute_map[key]].nil?
166
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
- end
168
- end
169
- new(transformed_hash)
170
- end
171
-
172
- # Returns the object in the form of hash
173
- # @return [Hash] Returns the object in the form of hash
174
- def to_hash
175
- hash = {}
176
- self.class.attribute_map.each_pair do |attr, param|
177
- value = self.send(attr)
178
- if value.nil?
179
- is_nullable = self.class.openapi_nullable.include?(attr)
180
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
181
- end
182
-
183
- hash[param] = _to_hash(value)
184
- end
185
- hash
186
- end
187
-
188
- end
189
-
190
- end