sendmux-management 2.0.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. metadata +13 -224
  3. data/CHANGELOG.md +0 -92
  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_response.rb +0 -223
  61. data/lib/sendmux_management_generated/models/mailbox_availability_reason.rb +0 -45
  62. data/lib/sendmux_management_generated/models/mailbox_availability_response.rb +0 -223
  63. data/lib/sendmux_management_generated/models/mailbox_availability_result.rb +0 -240
  64. data/lib/sendmux_management_generated/models/mailbox_create_result.rb +0 -190
  65. data/lib/sendmux_management_generated/models/mailbox_create_result_response.rb +0 -223
  66. data/lib/sendmux_management_generated/models/mailbox_credential.rb +0 -352
  67. data/lib/sendmux_management_generated/models/mailbox_deleted_response.rb +0 -223
  68. data/lib/sendmux_management_generated/models/mailbox_domain.rb +0 -452
  69. data/lib/sendmux_management_generated/models/mailbox_domain_dns_records.rb +0 -303
  70. data/lib/sendmux_management_generated/models/mailbox_domain_mail_from_records.rb +0 -191
  71. data/lib/sendmux_management_generated/models/mailbox_domain_mx_record.rb +0 -190
  72. data/lib/sendmux_management_generated/models/mailbox_domain_name_value_record.rb +0 -191
  73. data/lib/sendmux_management_generated/models/mailbox_domain_named_mx_record.rb +0 -217
  74. data/lib/sendmux_management_generated/models/mailbox_domain_verify_checks.rb +0 -300
  75. data/lib/sendmux_management_generated/models/mailbox_domain_verify_result.rb +0 -377
  76. data/lib/sendmux_management_generated/models/mailbox_item_cursor_list_response.rb +0 -251
  77. data/lib/sendmux_management_generated/models/mailbox_item_response.rb +0 -223
  78. data/lib/sendmux_management_generated/models/mailbox_key_deleted_response.rb +0 -223
  79. data/lib/sendmux_management_generated/models/mailbox_send_scope.rb +0 -213
  80. data/lib/sendmux_management_generated/models/management_create_domain_request.rb +0 -209
  81. data/lib/sendmux_management_generated/models/management_create_mailbox_key_request.rb +0 -183
  82. data/lib/sendmux_management_generated/models/management_create_mailbox_request.rb +0 -270
  83. data/lib/sendmux_management_generated/models/management_create_mailbox_request_send_scope.rb +0 -214
  84. data/lib/sendmux_management_generated/models/management_test_webhook200_response.rb +0 -223
  85. data/lib/sendmux_management_generated/models/management_update_domain_request.rb +0 -189
  86. data/lib/sendmux_management_generated/models/provider_allowed_actions.rb +0 -294
  87. data/lib/sendmux_management_generated/models/provider_create_body.rb +0 -611
  88. data/lib/sendmux_management_generated/models/provider_create_body_quotas.rb +0 -174
  89. data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day.rb +0 -104
  90. data/lib/sendmux_management_generated/models/provider_deleted.rb +0 -190
  91. data/lib/sendmux_management_generated/models/provider_deleted_response.rb +0 -223
  92. data/lib/sendmux_management_generated/models/provider_item.rb +0 -733
  93. data/lib/sendmux_management_generated/models/provider_item_cursor_list_response.rb +0 -251
  94. data/lib/sendmux_management_generated/models/provider_item_response.rb +0 -223
  95. data/lib/sendmux_management_generated/models/provider_limits.rb +0 -190
  96. data/lib/sendmux_management_generated/models/provider_limits_response.rb +0 -223
  97. data/lib/sendmux_management_generated/models/provider_list_item.rb +0 -695
  98. data/lib/sendmux_management_generated/models/provider_quota_range.rb +0 -208
  99. data/lib/sendmux_management_generated/models/provider_quotas.rb +0 -186
  100. data/lib/sendmux_management_generated/models/provider_stats.rb +0 -325
  101. data/lib/sendmux_management_generated/models/provider_stats_response.rb +0 -223
  102. data/lib/sendmux_management_generated/models/provider_status_counts.rb +0 -242
  103. data/lib/sendmux_management_generated/models/provider_test_result.rb +0 -251
  104. data/lib/sendmux_management_generated/models/provider_test_result_response.rb +0 -223
  105. data/lib/sendmux_management_generated/models/provider_type_counts.rb +0 -246
  106. data/lib/sendmux_management_generated/models/provider_update_body.rb +0 -569
  107. data/lib/sendmux_management_generated/models/provider_usage.rb +0 -216
  108. data/lib/sendmux_management_generated/models/provider_usage_item.rb +0 -374
  109. data/lib/sendmux_management_generated/models/provider_usage_response.rb +0 -223
  110. data/lib/sendmux_management_generated/models/resource_limit_snapshot.rb +0 -420
  111. data/lib/sendmux_management_generated/models/response_meta.rb +0 -164
  112. data/lib/sendmux_management_generated/models/sending_account_limit_request.rb +0 -190
  113. data/lib/sendmux_management_generated/models/sending_account_limit_request_response.rb +0 -223
  114. data/lib/sendmux_management_generated/models/set_filter_state_body.rb +0 -226
  115. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit.rb +0 -315
  116. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request.rb +0 -361
  117. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel.rb +0 -190
  118. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel_response.rb +0 -223
  119. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create.rb +0 -190
  120. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_response.rb +0 -223
  121. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page.rb +0 -176
  122. data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page_response.rb +0 -223
  123. data/lib/sendmux_management_generated/models/spend_summary.rb +0 -292
  124. data/lib/sendmux_management_generated/models/spend_summary_response.rb +0 -223
  125. data/lib/sendmux_management_generated/models/success_envelope.rb +0 -192
  126. data/lib/sendmux_management_generated/models/transaction.rb +0 -332
  127. data/lib/sendmux_management_generated/models/transaction_cursor_list_response.rb +0 -251
  128. data/lib/sendmux_management_generated/models/update_mailbox_body.rb +0 -211
  129. data/lib/sendmux_management_generated/models/update_mailbox_body_send_scope.rb +0 -214
  130. data/lib/sendmux_management_generated/models/webhook_create_body.rb +0 -269
  131. data/lib/sendmux_management_generated/models/webhook_deleted_response.rb +0 -223
  132. data/lib/sendmux_management_generated/models/webhook_delivery_attempt.rb +0 -562
  133. data/lib/sendmux_management_generated/models/webhook_delivery_attempt_cursor_list_response.rb +0 -251
  134. data/lib/sendmux_management_generated/models/webhook_delivery_payload.rb +0 -359
  135. data/lib/sendmux_management_generated/models/webhook_delivery_payload_response.rb +0 -223
  136. data/lib/sendmux_management_generated/models/webhook_event_data.rb +0 -395
  137. data/lib/sendmux_management_generated/models/webhook_event_payload.rb +0 -297
  138. data/lib/sendmux_management_generated/models/webhook_filters.rb +0 -168
  139. data/lib/sendmux_management_generated/models/webhook_subscription.rb +0 -380
  140. data/lib/sendmux_management_generated/models/webhook_subscription_cursor_list_response.rb +0 -251
  141. data/lib/sendmux_management_generated/models/webhook_subscription_response.rb +0 -223
  142. data/lib/sendmux_management_generated/models/webhook_subscription_with_secret.rb +0 -407
  143. data/lib/sendmux_management_generated/models/webhook_subscription_with_secret_response.rb +0 -223
  144. data/lib/sendmux_management_generated/models/webhook_test_response.rb +0 -165
  145. data/lib/sendmux_management_generated/models/webhook_update_body.rb +0 -233
  146. data/lib/sendmux_management_generated/version.rb +0 -15
  147. data/lib/sendmux_management_generated.rb +0 -181
@@ -1,240 +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 MailboxAvailabilityResult < ApiModelBase
18
- # Whether this address can be reserved for mailbox creation.
19
- attr_accessor :available
20
-
21
- # Normalised mailbox email address checked.
22
- attr_accessor :email
23
-
24
- attr_accessor :reason
25
-
26
- class EnumAttributeValidator
27
- attr_reader :datatype
28
- attr_reader :allowable_values
29
-
30
- def initialize(datatype, allowable_values)
31
- @allowable_values = allowable_values.map do |value|
32
- case datatype.to_s
33
- when /Integer/i
34
- value.to_i
35
- when /Float/i
36
- value.to_f
37
- else
38
- value
39
- end
40
- end
41
- end
42
-
43
- def valid?(value)
44
- !value || allowable_values.include?(value)
45
- end
46
- end
47
-
48
- # Attribute mapping from ruby-style variable name to JSON key.
49
- def self.attribute_map
50
- {
51
- :'available' => :'available',
52
- :'email' => :'email',
53
- :'reason' => :'reason'
54
- }
55
- end
56
-
57
- # Returns attribute mapping this model knows about
58
- def self.acceptable_attribute_map
59
- attribute_map
60
- end
61
-
62
- # Returns all the JSON keys this model knows about
63
- def self.acceptable_attributes
64
- acceptable_attribute_map.values
65
- end
66
-
67
- # Attribute type mapping.
68
- def self.openapi_types
69
- {
70
- :'available' => :'Boolean',
71
- :'email' => :'String',
72
- :'reason' => :'MailboxAvailabilityReason'
73
- }
74
- end
75
-
76
- # List of attributes with nullable: true
77
- def self.openapi_nullable
78
- Set.new([
79
- ])
80
- end
81
-
82
- # Initializes the object
83
- # @param [Hash] attributes Model attributes in the form of hash
84
- def initialize(attributes = {})
85
- if (!attributes.is_a?(Hash))
86
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::MailboxAvailabilityResult` initialize method"
87
- end
88
-
89
- # check to see if the attribute exists and convert string to symbol for hash key
90
- acceptable_attribute_map = self.class.acceptable_attribute_map
91
- attributes = attributes.each_with_object({}) { |(k, v), h|
92
- if (!acceptable_attribute_map.key?(k.to_sym))
93
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::MailboxAvailabilityResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
- end
95
- h[k.to_sym] = v
96
- }
97
-
98
- if attributes.key?(:'available')
99
- self.available = attributes[:'available']
100
- else
101
- self.available = nil
102
- end
103
-
104
- if attributes.key?(:'email')
105
- self.email = attributes[:'email']
106
- else
107
- self.email = nil
108
- end
109
-
110
- if attributes.key?(:'reason')
111
- self.reason = attributes[:'reason']
112
- else
113
- self.reason = nil
114
- end
115
- end
116
-
117
- # Show invalid properties with the reasons. Usually used together with valid?
118
- # @return Array for valid properties with the reasons
119
- def list_invalid_properties
120
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
121
- invalid_properties = Array.new
122
- if @available.nil?
123
- invalid_properties.push('invalid value for "available", available cannot be nil.')
124
- end
125
-
126
- if @email.nil?
127
- invalid_properties.push('invalid value for "email", email cannot be nil.')
128
- end
129
-
130
- if @reason.nil?
131
- invalid_properties.push('invalid value for "reason", reason cannot be nil.')
132
- end
133
-
134
- invalid_properties
135
- end
136
-
137
- # Check to see if the all the properties in the model are valid
138
- # @return true if the model is valid
139
- def valid?
140
- warn '[DEPRECATED] the `valid?` method is obsolete'
141
- return false if @available.nil?
142
- return false if @email.nil?
143
- return false if @reason.nil?
144
- true
145
- end
146
-
147
- # Custom attribute writer method with validation
148
- # @param [Object] available Value to be assigned
149
- def available=(available)
150
- if available.nil?
151
- fail ArgumentError, 'available cannot be nil'
152
- end
153
-
154
- @available = available
155
- end
156
-
157
- # Custom attribute writer method with validation
158
- # @param [Object] email Value to be assigned
159
- def email=(email)
160
- if email.nil?
161
- fail ArgumentError, 'email cannot be nil'
162
- end
163
-
164
- @email = email
165
- end
166
-
167
- # Custom attribute writer method with validation
168
- # @param [Object] reason Value to be assigned
169
- def reason=(reason)
170
- if reason.nil?
171
- fail ArgumentError, 'reason cannot be nil'
172
- end
173
-
174
- @reason = reason
175
- end
176
-
177
- # Checks equality by comparing each attribute.
178
- # @param [Object] Object to be compared
179
- def ==(o)
180
- return true if self.equal?(o)
181
- self.class == o.class &&
182
- available == o.available &&
183
- email == o.email &&
184
- reason == o.reason
185
- end
186
-
187
- # @see the `==` method
188
- # @param [Object] Object to be compared
189
- def eql?(o)
190
- self == o
191
- end
192
-
193
- # Calculates hash code according to all attributes.
194
- # @return [Integer] Hash code
195
- def hash
196
- [available, email, reason].hash
197
- end
198
-
199
- # Builds the object from hash
200
- # @param [Hash] attributes Model attributes in the form of hash
201
- # @return [Object] Returns the model itself
202
- def self.build_from_hash(attributes)
203
- return nil unless attributes.is_a?(Hash)
204
- attributes = attributes.transform_keys(&:to_sym)
205
- transformed_hash = {}
206
- openapi_types.each_pair do |key, type|
207
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
208
- transformed_hash["#{key}"] = nil
209
- elsif type =~ /\AArray<(.*)>/i
210
- # check to ensure the input is an array given that the attribute
211
- # is documented as an array but the input is not
212
- if attributes[attribute_map[key]].is_a?(Array)
213
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
214
- end
215
- elsif !attributes[attribute_map[key]].nil?
216
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
217
- end
218
- end
219
- new(transformed_hash)
220
- end
221
-
222
- # Returns the object in the form of hash
223
- # @return [Hash] Returns the object in the form of hash
224
- def to_hash
225
- hash = {}
226
- self.class.attribute_map.each_pair do |attr, param|
227
- value = self.send(attr)
228
- if value.nil?
229
- is_nullable = self.class.openapi_nullable.include?(attr)
230
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
231
- end
232
-
233
- hash[param] = _to_hash(value)
234
- end
235
- hash
236
- end
237
-
238
- end
239
-
240
- 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 MailboxCreateResult < ApiModelBase
18
- # Initial credential for the mailbox. `null` if credential generation failed — call POST /mailboxes/{id}/keys to retry.
19
- attr_accessor :credential
20
-
21
- attr_accessor :mailbox
22
-
23
- # Optional warning string when the mailbox was created without an initial credential
24
- attr_accessor :warning
25
-
26
- # Attribute mapping from ruby-style variable name to JSON key.
27
- def self.attribute_map
28
- {
29
- :'credential' => :'credential',
30
- :'mailbox' => :'mailbox',
31
- :'warning' => :'warning'
32
- }
33
- end
34
-
35
- # Returns attribute mapping this model knows about
36
- def self.acceptable_attribute_map
37
- attribute_map
38
- end
39
-
40
- # Returns all the JSON keys this model knows about
41
- def self.acceptable_attributes
42
- acceptable_attribute_map.values
43
- end
44
-
45
- # Attribute type mapping.
46
- def self.openapi_types
47
- {
48
- :'credential' => :'MailboxCredential',
49
- :'mailbox' => :'Mailbox',
50
- :'warning' => :'String'
51
- }
52
- end
53
-
54
- # List of attributes with nullable: true
55
- def self.openapi_nullable
56
- Set.new([
57
- :'credential',
58
- :'warning'
59
- ])
60
- end
61
-
62
- # Initializes the object
63
- # @param [Hash] attributes Model attributes in the form of hash
64
- def initialize(attributes = {})
65
- if (!attributes.is_a?(Hash))
66
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::MailboxCreateResult` initialize method"
67
- end
68
-
69
- # check to see if the attribute exists and convert string to symbol for hash key
70
- acceptable_attribute_map = self.class.acceptable_attribute_map
71
- attributes = attributes.each_with_object({}) { |(k, v), h|
72
- if (!acceptable_attribute_map.key?(k.to_sym))
73
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::MailboxCreateResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
- end
75
- h[k.to_sym] = v
76
- }
77
-
78
- if attributes.key?(:'credential')
79
- self.credential = attributes[:'credential']
80
- else
81
- self.credential = nil
82
- end
83
-
84
- if attributes.key?(:'mailbox')
85
- self.mailbox = attributes[:'mailbox']
86
- else
87
- self.mailbox = nil
88
- end
89
-
90
- if attributes.key?(:'warning')
91
- self.warning = attributes[:'warning']
92
- else
93
- self.warning = nil
94
- end
95
- end
96
-
97
- # Show invalid properties with the reasons. Usually used together with valid?
98
- # @return Array for valid properties with the reasons
99
- def list_invalid_properties
100
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
- invalid_properties = Array.new
102
- if @mailbox.nil?
103
- invalid_properties.push('invalid value for "mailbox", mailbox cannot be nil.')
104
- end
105
-
106
- invalid_properties
107
- end
108
-
109
- # Check to see if the all the properties in the model are valid
110
- # @return true if the model is valid
111
- def valid?
112
- warn '[DEPRECATED] the `valid?` method is obsolete'
113
- return false if @mailbox.nil?
114
- true
115
- end
116
-
117
- # Custom attribute writer method with validation
118
- # @param [Object] mailbox Value to be assigned
119
- def mailbox=(mailbox)
120
- if mailbox.nil?
121
- fail ArgumentError, 'mailbox cannot be nil'
122
- end
123
-
124
- @mailbox = mailbox
125
- end
126
-
127
- # Checks equality by comparing each attribute.
128
- # @param [Object] Object to be compared
129
- def ==(o)
130
- return true if self.equal?(o)
131
- self.class == o.class &&
132
- credential == o.credential &&
133
- mailbox == o.mailbox &&
134
- warning == o.warning
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
- [credential, mailbox, warning].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
@@ -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::Management::Generated
17
- class MailboxCreateResultResponse < 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' => :'MailboxCreateResult'
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::Management::Generated::MailboxCreateResultResponse` 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::Management::Generated::MailboxCreateResultResponse`. 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