sendmux-management 1.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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +12 -0
- data/README.md +3 -0
- data/lib/sendmux/management/client.rb +66 -0
- data/lib/sendmux/management/version.rb +7 -0
- data/lib/sendmux/management.rb +12 -0
- data/lib/sendmux_management_generated/api/billing_api.rb +221 -0
- data/lib/sendmux_management_generated/api/domain_filters_api.rb +161 -0
- data/lib/sendmux_management_generated/api/domains_api.rb +419 -0
- data/lib/sendmux_management_generated/api/emails_api.rb +258 -0
- data/lib/sendmux_management_generated/api/inboxes_api.rb +175 -0
- data/lib/sendmux_management_generated/api/mailbox_filters_api.rb +161 -0
- data/lib/sendmux_management_generated/api/mailboxes_api.rb +659 -0
- data/lib/sendmux_management_generated/api/sending_accounts_api.rb +946 -0
- data/lib/sendmux_management_generated/api/webhooks_api.rb +666 -0
- data/lib/sendmux_management_generated/api_client.rb +441 -0
- data/lib/sendmux_management_generated/api_error.rb +58 -0
- data/lib/sendmux_management_generated/api_model_base.rb +88 -0
- data/lib/sendmux_management_generated/configuration.rb +393 -0
- data/lib/sendmux_management_generated/models/api_error_detail.rb +219 -0
- data/lib/sendmux_management_generated/models/api_error_error.rb +275 -0
- data/lib/sendmux_management_generated/models/api_error_meta.rb +164 -0
- data/lib/sendmux_management_generated/models/api_error_response.rb +216 -0
- data/lib/sendmux_management_generated/models/balance.rb +293 -0
- data/lib/sendmux_management_generated/models/balance_auto_topup.rb +226 -0
- data/lib/sendmux_management_generated/models/balance_response.rb +223 -0
- data/lib/sendmux_management_generated/models/cursor_pagination.rb +173 -0
- data/lib/sendmux_management_generated/models/delivery_log_item.rb +393 -0
- data/lib/sendmux_management_generated/models/delivery_log_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/delivery_log_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/domain_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/domain_deleted_response_all_of_data.rb +190 -0
- data/lib/sendmux_management_generated/models/domain_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/domain_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/domain_verify_response.rb +223 -0
- data/lib/sendmux_management_generated/models/email_metrics.rb +218 -0
- data/lib/sendmux_management_generated/models/email_metrics_comparison.rb +294 -0
- data/lib/sendmux_management_generated/models/email_metrics_comparison_change_pct.rb +268 -0
- data/lib/sendmux_management_generated/models/email_metrics_response.rb +223 -0
- data/lib/sendmux_management_generated/models/email_metrics_summary.rb +268 -0
- data/lib/sendmux_management_generated/models/email_metrics_timeseries_inner.rb +294 -0
- data/lib/sendmux_management_generated/models/filter_rule.rb +242 -0
- data/lib/sendmux_management_generated/models/filter_state.rb +218 -0
- data/lib/sendmux_management_generated/models/filter_state_response.rb +223 -0
- data/lib/sendmux_management_generated/models/incoming_log_item.rb +465 -0
- data/lib/sendmux_management_generated/models/incoming_log_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/incoming_log_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox.rb +284 -0
- data/lib/sendmux_management_generated/models/mailbox_app_password_result.rb +164 -0
- data/lib/sendmux_management_generated/models/mailbox_app_password_result_credential.rb +359 -0
- data/lib/sendmux_management_generated/models/mailbox_app_password_result_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_create_result.rb +189 -0
- data/lib/sendmux_management_generated/models/mailbox_create_result_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_credential.rb +353 -0
- data/lib/sendmux_management_generated/models/mailbox_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_domain.rb +358 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_dns_records.rb +276 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_mx_record.rb +190 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_name_value_record.rb +191 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_checks.rb +246 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_result.rb +242 -0
- data/lib/sendmux_management_generated/models/mailbox_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/mailbox_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_key_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_send_scope.rb +213 -0
- data/lib/sendmux_management_generated/models/management_create_domain_request.rb +165 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_key_request.rb +182 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_request.rb +257 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_request_send_scope.rb +210 -0
- data/lib/sendmux_management_generated/models/management_test_webhook200_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_allowed_actions.rb +268 -0
- data/lib/sendmux_management_generated/models/provider_create_body.rb +579 -0
- data/lib/sendmux_management_generated/models/provider_create_body_quotas.rb +174 -0
- data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day.rb +104 -0
- data/lib/sendmux_management_generated/models/provider_create_body_quotas_per_day_any_of.rb +215 -0
- data/lib/sendmux_management_generated/models/provider_deleted.rb +190 -0
- data/lib/sendmux_management_generated/models/provider_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_item.rb +695 -0
- data/lib/sendmux_management_generated/models/provider_item_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/provider_item_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_limits.rb +190 -0
- data/lib/sendmux_management_generated/models/provider_limits_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_quota_range.rb +208 -0
- data/lib/sendmux_management_generated/models/provider_quotas.rb +186 -0
- data/lib/sendmux_management_generated/models/provider_stats.rb +325 -0
- data/lib/sendmux_management_generated/models/provider_stats_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_status_counts.rb +242 -0
- data/lib/sendmux_management_generated/models/provider_test_result.rb +251 -0
- data/lib/sendmux_management_generated/models/provider_test_result_response.rb +223 -0
- data/lib/sendmux_management_generated/models/provider_type_counts.rb +246 -0
- data/lib/sendmux_management_generated/models/provider_update_body.rb +537 -0
- data/lib/sendmux_management_generated/models/provider_usage.rb +216 -0
- data/lib/sendmux_management_generated/models/provider_usage_item.rb +374 -0
- data/lib/sendmux_management_generated/models/provider_usage_response.rb +223 -0
- data/lib/sendmux_management_generated/models/resource_limit_snapshot.rb +420 -0
- data/lib/sendmux_management_generated/models/response_meta.rb +164 -0
- data/lib/sendmux_management_generated/models/sending_account_limit_request.rb +190 -0
- data/lib/sendmux_management_generated/models/sending_account_limit_request_response.rb +223 -0
- data/lib/sendmux_management_generated/models/set_filter_state_body.rb +226 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit.rb +315 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request.rb +361 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create.rb +190 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_request.rb +368 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_response.rb +223 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page.rb +176 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_page_response.rb +223 -0
- data/lib/sendmux_management_generated/models/spend_summary.rb +292 -0
- data/lib/sendmux_management_generated/models/spend_summary_response.rb +223 -0
- data/lib/sendmux_management_generated/models/success_envelope.rb +192 -0
- data/lib/sendmux_management_generated/models/transaction.rb +332 -0
- data/lib/sendmux_management_generated/models/transaction_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/update_mailbox_body.rb +210 -0
- data/lib/sendmux_management_generated/models/webhook_create_body.rb +269 -0
- data/lib/sendmux_management_generated/models/webhook_deleted_response.rb +223 -0
- data/lib/sendmux_management_generated/models/webhook_delivery_attempt.rb +562 -0
- data/lib/sendmux_management_generated/models/webhook_delivery_attempt_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/webhook_delivery_payload.rb +359 -0
- data/lib/sendmux_management_generated/models/webhook_delivery_payload_response.rb +223 -0
- data/lib/sendmux_management_generated/models/webhook_event_data.rb +395 -0
- data/lib/sendmux_management_generated/models/webhook_event_payload.rb +297 -0
- data/lib/sendmux_management_generated/models/webhook_filters.rb +168 -0
- data/lib/sendmux_management_generated/models/webhook_subscription.rb +380 -0
- data/lib/sendmux_management_generated/models/webhook_subscription_cursor_list_response.rb +251 -0
- data/lib/sendmux_management_generated/models/webhook_subscription_response.rb +223 -0
- data/lib/sendmux_management_generated/models/webhook_subscription_with_secret.rb +414 -0
- data/lib/sendmux_management_generated/models/webhook_subscription_with_secret_response.rb +223 -0
- data/lib/sendmux_management_generated/models/webhook_test_response.rb +165 -0
- data/lib/sendmux_management_generated/models/webhook_update_body.rb +233 -0
- data/lib/sendmux_management_generated/version.rb +15 -0
- data/lib/sendmux_management_generated.rb +158 -0
- metadata +247 -0
|
@@ -0,0 +1,223 @@
|
|
|
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 IncomingLogItemResponse < 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' => :'IncomingLogItem'
|
|
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::IncomingLogItemResponse` 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::IncomingLogItemResponse`. 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
|
|
@@ -0,0 +1,284 @@
|
|
|
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 Mailbox < ApiModelBase
|
|
18
|
+
# ISO 8601 creation timestamp
|
|
19
|
+
attr_accessor :created_at
|
|
20
|
+
|
|
21
|
+
# Optional display name shown in outbound From headers
|
|
22
|
+
attr_accessor :display_name
|
|
23
|
+
|
|
24
|
+
# Mailbox email address (lowercase)
|
|
25
|
+
attr_accessor :email
|
|
26
|
+
|
|
27
|
+
# Public ID
|
|
28
|
+
attr_accessor :id
|
|
29
|
+
|
|
30
|
+
# Storage quota in bytes. Current writable tiers are 1 GB, 5 GB, and 50 GB.
|
|
31
|
+
attr_accessor :quota_bytes
|
|
32
|
+
|
|
33
|
+
attr_accessor :send_scope
|
|
34
|
+
|
|
35
|
+
# active | suspended | deleted
|
|
36
|
+
attr_accessor :status
|
|
37
|
+
|
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
|
+
def self.attribute_map
|
|
40
|
+
{
|
|
41
|
+
:'created_at' => :'created_at',
|
|
42
|
+
:'display_name' => :'display_name',
|
|
43
|
+
:'email' => :'email',
|
|
44
|
+
:'id' => :'id',
|
|
45
|
+
:'quota_bytes' => :'quota_bytes',
|
|
46
|
+
:'send_scope' => :'send_scope',
|
|
47
|
+
:'status' => :'status'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns attribute mapping this model knows about
|
|
52
|
+
def self.acceptable_attribute_map
|
|
53
|
+
attribute_map
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns all the JSON keys this model knows about
|
|
57
|
+
def self.acceptable_attributes
|
|
58
|
+
acceptable_attribute_map.values
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute type mapping.
|
|
62
|
+
def self.openapi_types
|
|
63
|
+
{
|
|
64
|
+
:'created_at' => :'String',
|
|
65
|
+
:'display_name' => :'String',
|
|
66
|
+
:'email' => :'String',
|
|
67
|
+
:'id' => :'String',
|
|
68
|
+
:'quota_bytes' => :'Integer',
|
|
69
|
+
:'send_scope' => :'MailboxSendScope',
|
|
70
|
+
:'status' => :'String'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# List of attributes with nullable: true
|
|
75
|
+
def self.openapi_nullable
|
|
76
|
+
Set.new([
|
|
77
|
+
:'display_name',
|
|
78
|
+
:'quota_bytes',
|
|
79
|
+
:'send_scope',
|
|
80
|
+
])
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Initializes the object
|
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
85
|
+
def initialize(attributes = {})
|
|
86
|
+
if (!attributes.is_a?(Hash))
|
|
87
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::Mailbox` initialize method"
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
91
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
92
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
93
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
94
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::Mailbox`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
95
|
+
end
|
|
96
|
+
h[k.to_sym] = v
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'created_at')
|
|
100
|
+
self.created_at = attributes[:'created_at']
|
|
101
|
+
else
|
|
102
|
+
self.created_at = nil
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'display_name')
|
|
106
|
+
self.display_name = attributes[:'display_name']
|
|
107
|
+
else
|
|
108
|
+
self.display_name = nil
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'email')
|
|
112
|
+
self.email = attributes[:'email']
|
|
113
|
+
else
|
|
114
|
+
self.email = nil
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'id')
|
|
118
|
+
self.id = attributes[:'id']
|
|
119
|
+
else
|
|
120
|
+
self.id = nil
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'quota_bytes')
|
|
124
|
+
self.quota_bytes = attributes[:'quota_bytes']
|
|
125
|
+
else
|
|
126
|
+
self.quota_bytes = nil
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'send_scope')
|
|
130
|
+
self.send_scope = attributes[:'send_scope']
|
|
131
|
+
else
|
|
132
|
+
self.send_scope = nil
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'status')
|
|
136
|
+
self.status = attributes[:'status']
|
|
137
|
+
else
|
|
138
|
+
self.status = nil
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
143
|
+
# @return Array for valid properties with the reasons
|
|
144
|
+
def list_invalid_properties
|
|
145
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
146
|
+
invalid_properties = Array.new
|
|
147
|
+
if @created_at.nil?
|
|
148
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if @email.nil?
|
|
152
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if @id.nil?
|
|
156
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if @status.nil?
|
|
160
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
invalid_properties
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Check to see if the all the properties in the model are valid
|
|
167
|
+
# @return true if the model is valid
|
|
168
|
+
def valid?
|
|
169
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
170
|
+
return false if @created_at.nil?
|
|
171
|
+
return false if @email.nil?
|
|
172
|
+
return false if @id.nil?
|
|
173
|
+
return false if @status.nil?
|
|
174
|
+
true
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Custom attribute writer method with validation
|
|
178
|
+
# @param [Object] created_at Value to be assigned
|
|
179
|
+
def created_at=(created_at)
|
|
180
|
+
if created_at.nil?
|
|
181
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
@created_at = created_at
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Custom attribute writer method with validation
|
|
188
|
+
# @param [Object] email Value to be assigned
|
|
189
|
+
def email=(email)
|
|
190
|
+
if email.nil?
|
|
191
|
+
fail ArgumentError, 'email cannot be nil'
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
@email = email
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Custom attribute writer method with validation
|
|
198
|
+
# @param [Object] id Value to be assigned
|
|
199
|
+
def id=(id)
|
|
200
|
+
if id.nil?
|
|
201
|
+
fail ArgumentError, 'id cannot be nil'
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
@id = id
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Custom attribute writer method with validation
|
|
208
|
+
# @param [Object] status Value to be assigned
|
|
209
|
+
def status=(status)
|
|
210
|
+
if status.nil?
|
|
211
|
+
fail ArgumentError, 'status cannot be nil'
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
@status = status
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Checks equality by comparing each attribute.
|
|
218
|
+
# @param [Object] Object to be compared
|
|
219
|
+
def ==(o)
|
|
220
|
+
return true if self.equal?(o)
|
|
221
|
+
self.class == o.class &&
|
|
222
|
+
created_at == o.created_at &&
|
|
223
|
+
display_name == o.display_name &&
|
|
224
|
+
email == o.email &&
|
|
225
|
+
id == o.id &&
|
|
226
|
+
quota_bytes == o.quota_bytes &&
|
|
227
|
+
send_scope == o.send_scope &&
|
|
228
|
+
status == o.status
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# @see the `==` method
|
|
232
|
+
# @param [Object] Object to be compared
|
|
233
|
+
def eql?(o)
|
|
234
|
+
self == o
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Calculates hash code according to all attributes.
|
|
238
|
+
# @return [Integer] Hash code
|
|
239
|
+
def hash
|
|
240
|
+
[created_at, display_name, email, id, quota_bytes, send_scope, status].hash
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Builds the object from hash
|
|
244
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
245
|
+
# @return [Object] Returns the model itself
|
|
246
|
+
def self.build_from_hash(attributes)
|
|
247
|
+
return nil unless attributes.is_a?(Hash)
|
|
248
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
249
|
+
transformed_hash = {}
|
|
250
|
+
openapi_types.each_pair do |key, type|
|
|
251
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
252
|
+
transformed_hash["#{key}"] = nil
|
|
253
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
254
|
+
# check to ensure the input is an array given that the attribute
|
|
255
|
+
# is documented as an array but the input is not
|
|
256
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
257
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
258
|
+
end
|
|
259
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
260
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
new(transformed_hash)
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Returns the object in the form of hash
|
|
267
|
+
# @return [Hash] Returns the object in the form of hash
|
|
268
|
+
def to_hash
|
|
269
|
+
hash = {}
|
|
270
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
271
|
+
value = self.send(attr)
|
|
272
|
+
if value.nil?
|
|
273
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
274
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
hash[param] = _to_hash(value)
|
|
278
|
+
end
|
|
279
|
+
hash
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
end
|
|
@@ -0,0 +1,164 @@
|
|
|
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 MailboxAppPasswordResult < ApiModelBase
|
|
18
|
+
attr_accessor :credential
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'credential' => :'credential'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'credential' => :'MailboxAppPasswordResultCredential'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Management::Generated::MailboxAppPasswordResult` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Management::Generated::MailboxAppPasswordResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'credential')
|
|
67
|
+
self.credential = attributes[:'credential']
|
|
68
|
+
else
|
|
69
|
+
self.credential = nil
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
if @credential.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "credential", credential cannot be nil.')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
invalid_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Check to see if the all the properties in the model are valid
|
|
86
|
+
# @return true if the model is valid
|
|
87
|
+
def valid?
|
|
88
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
|
+
return false if @credential.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] credential Value to be assigned
|
|
95
|
+
def credential=(credential)
|
|
96
|
+
if credential.nil?
|
|
97
|
+
fail ArgumentError, 'credential cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@credential = credential
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
credential == o.credential
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see the `==` method
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def eql?(o)
|
|
114
|
+
self == o
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Calculates hash code according to all attributes.
|
|
118
|
+
# @return [Integer] Hash code
|
|
119
|
+
def hash
|
|
120
|
+
[credential].hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def self.build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
+
transformed_hash = {}
|
|
130
|
+
openapi_types.each_pair do |key, type|
|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = nil
|
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
134
|
+
# check to ensure the input is an array given that the attribute
|
|
135
|
+
# is documented as an array but the input is not
|
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
138
|
+
end
|
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
new(transformed_hash)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Returns the object in the form of hash
|
|
147
|
+
# @return [Hash] Returns the object in the form of hash
|
|
148
|
+
def to_hash
|
|
149
|
+
hash = {}
|
|
150
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
151
|
+
value = self.send(attr)
|
|
152
|
+
if value.nil?
|
|
153
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
154
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
hash[param] = _to_hash(value)
|
|
158
|
+
end
|
|
159
|
+
hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|