qubrics-management 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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +100 -0
- data/LICENSE +21 -0
- data/README.md +157 -0
- data/lib/qubrics/management/client.rb +99 -0
- data/lib/qubrics/management/version.rb +7 -0
- data/lib/qubrics/management.rb +12 -0
- data/lib/qubrics_management_generated/api/billing_api.rb +221 -0
- data/lib/qubrics_management_generated/api/connection_api.rb +82 -0
- data/lib/qubrics_management_generated/api/domain_filters_api.rb +161 -0
- data/lib/qubrics_management_generated/api/domains_api.rb +492 -0
- data/lib/qubrics_management_generated/api/emails_api.rb +258 -0
- data/lib/qubrics_management_generated/api/inboxes_api.rb +175 -0
- data/lib/qubrics_management_generated/api/mailbox_filters_api.rb +161 -0
- data/lib/qubrics_management_generated/api/mailboxes_api.rb +996 -0
- data/lib/qubrics_management_generated/api/sending_accounts_api.rb +1009 -0
- data/lib/qubrics_management_generated/api/webhooks_api.rb +666 -0
- data/lib/qubrics_management_generated/api_client.rb +447 -0
- data/lib/qubrics_management_generated/api_error.rb +58 -0
- data/lib/qubrics_management_generated/api_model_base.rb +95 -0
- data/lib/qubrics_management_generated/configuration.rb +400 -0
- data/lib/qubrics_management_generated/models/api_error_detail.rb +219 -0
- data/lib/qubrics_management_generated/models/api_error_error.rb +275 -0
- data/lib/qubrics_management_generated/models/api_error_meta.rb +164 -0
- data/lib/qubrics_management_generated/models/api_error_response.rb +216 -0
- data/lib/qubrics_management_generated/models/balance.rb +293 -0
- data/lib/qubrics_management_generated/models/balance_auto_topup.rb +226 -0
- data/lib/qubrics_management_generated/models/balance_response.rb +223 -0
- data/lib/qubrics_management_generated/models/connection.rb +273 -0
- data/lib/qubrics_management_generated/models/connection_credential.rb +226 -0
- data/lib/qubrics_management_generated/models/connection_mailboxes_inner.rb +190 -0
- data/lib/qubrics_management_generated/models/connection_response.rb +223 -0
- data/lib/qubrics_management_generated/models/connection_team.rb +190 -0
- data/lib/qubrics_management_generated/models/cursor_pagination.rb +173 -0
- data/lib/qubrics_management_generated/models/delivery_log_detail.rb +573 -0
- data/lib/qubrics_management_generated/models/delivery_log_item.rb +543 -0
- data/lib/qubrics_management_generated/models/delivery_log_item_cursor_list_response.rb +251 -0
- data/lib/qubrics_management_generated/models/delivery_log_item_response.rb +223 -0
- data/lib/qubrics_management_generated/models/delivery_log_recipient.rb +254 -0
- data/lib/qubrics_management_generated/models/domain_deleted_response.rb +223 -0
- data/lib/qubrics_management_generated/models/domain_deleted_response_all_of_data.rb +190 -0
- data/lib/qubrics_management_generated/models/domain_item_cursor_list_response.rb +251 -0
- data/lib/qubrics_management_generated/models/domain_item_response.rb +223 -0
- data/lib/qubrics_management_generated/models/domain_verify_response.rb +223 -0
- data/lib/qubrics_management_generated/models/email_metrics.rb +218 -0
- data/lib/qubrics_management_generated/models/email_metrics_comparison.rb +294 -0
- data/lib/qubrics_management_generated/models/email_metrics_comparison_change_pct.rb +268 -0
- data/lib/qubrics_management_generated/models/email_metrics_response.rb +223 -0
- data/lib/qubrics_management_generated/models/email_metrics_summary.rb +268 -0
- data/lib/qubrics_management_generated/models/email_metrics_timeseries_inner.rb +294 -0
- data/lib/qubrics_management_generated/models/filter_rule.rb +242 -0
- data/lib/qubrics_management_generated/models/filter_state.rb +218 -0
- data/lib/qubrics_management_generated/models/filter_state_response.rb +223 -0
- data/lib/qubrics_management_generated/models/incoming_log_item.rb +465 -0
- data/lib/qubrics_management_generated/models/incoming_log_item_cursor_list_response.rb +251 -0
- data/lib/qubrics_management_generated/models/incoming_log_item_response.rb +223 -0
- data/lib/qubrics_management_generated/models/mail_webhook_event_payload.rb +296 -0
- data/lib/qubrics_management_generated/models/mailbox.rb +284 -0
- data/lib/qubrics_management_generated/models/mailbox_app_password_result.rb +164 -0
- data/lib/qubrics_management_generated/models/mailbox_app_password_result_response.rb +223 -0
- data/lib/qubrics_management_generated/models/mailbox_availability_reason.rb +45 -0
- data/lib/qubrics_management_generated/models/mailbox_availability_response.rb +223 -0
- data/lib/qubrics_management_generated/models/mailbox_availability_result.rb +240 -0
- data/lib/qubrics_management_generated/models/mailbox_cost_usage.rb +409 -0
- data/lib/qubrics_management_generated/models/mailbox_cost_usage_incoming.rb +422 -0
- data/lib/qubrics_management_generated/models/mailbox_cost_usage_response.rb +223 -0
- data/lib/qubrics_management_generated/models/mailbox_cost_usage_storage.rb +299 -0
- data/lib/qubrics_management_generated/models/mailbox_create_result.rb +190 -0
- data/lib/qubrics_management_generated/models/mailbox_create_result_response.rb +223 -0
- data/lib/qubrics_management_generated/models/mailbox_credential.rb +352 -0
- data/lib/qubrics_management_generated/models/mailbox_deleted_response.rb +223 -0
- data/lib/qubrics_management_generated/models/mailbox_domain.rb +452 -0
- data/lib/qubrics_management_generated/models/mailbox_domain_dns_records.rb +303 -0
- data/lib/qubrics_management_generated/models/mailbox_domain_mail_from_records.rb +191 -0
- data/lib/qubrics_management_generated/models/mailbox_domain_mx_record.rb +190 -0
- data/lib/qubrics_management_generated/models/mailbox_domain_name_value_record.rb +191 -0
- data/lib/qubrics_management_generated/models/mailbox_domain_named_mx_record.rb +217 -0
- data/lib/qubrics_management_generated/models/mailbox_domain_verify_checks.rb +300 -0
- data/lib/qubrics_management_generated/models/mailbox_domain_verify_result.rb +377 -0
- data/lib/qubrics_management_generated/models/mailbox_item_cursor_list_response.rb +251 -0
- data/lib/qubrics_management_generated/models/mailbox_item_response.rb +223 -0
- data/lib/qubrics_management_generated/models/mailbox_key_deleted_response.rb +223 -0
- data/lib/qubrics_management_generated/models/mailbox_send_policy.rb +196 -0
- data/lib/qubrics_management_generated/models/mailbox_send_policy_allowed_from.rb +213 -0
- data/lib/qubrics_management_generated/models/mailbox_send_policy_allowed_reply_to.rb +213 -0
- data/lib/qubrics_management_generated/models/mailbox_send_policy_recipients.rb +158 -0
- data/lib/qubrics_management_generated/models/mailbox_send_policy_recipients_allow.rb +201 -0
- data/lib/qubrics_management_generated/models/mailbox_send_policy_recipients_deny.rb +201 -0
- data/lib/qubrics_management_generated/models/mailbox_send_policy_response.rb +223 -0
- data/lib/qubrics_management_generated/models/mailbox_send_policy_snapshot.rb +202 -0
- data/lib/qubrics_management_generated/models/mailbox_send_scope.rb +213 -0
- data/lib/qubrics_management_generated/models/management_create_domain_request.rb +209 -0
- data/lib/qubrics_management_generated/models/management_create_mailbox_key_request.rb +183 -0
- data/lib/qubrics_management_generated/models/management_create_mailbox_request.rb +270 -0
- data/lib/qubrics_management_generated/models/management_create_mailbox_request_send_scope.rb +214 -0
- data/lib/qubrics_management_generated/models/management_test_webhook200_response.rb +223 -0
- data/lib/qubrics_management_generated/models/management_update_domain_request.rb +189 -0
- data/lib/qubrics_management_generated/models/provider_allowed_actions.rb +294 -0
- data/lib/qubrics_management_generated/models/provider_create_body.rb +611 -0
- data/lib/qubrics_management_generated/models/provider_create_body_quotas.rb +174 -0
- data/lib/qubrics_management_generated/models/provider_create_body_quotas_per_day.rb +104 -0
- data/lib/qubrics_management_generated/models/provider_deleted.rb +190 -0
- data/lib/qubrics_management_generated/models/provider_deleted_response.rb +223 -0
- data/lib/qubrics_management_generated/models/provider_item.rb +733 -0
- data/lib/qubrics_management_generated/models/provider_item_cursor_list_response.rb +251 -0
- data/lib/qubrics_management_generated/models/provider_item_response.rb +223 -0
- data/lib/qubrics_management_generated/models/provider_limits.rb +190 -0
- data/lib/qubrics_management_generated/models/provider_limits_response.rb +223 -0
- data/lib/qubrics_management_generated/models/provider_list_item.rb +695 -0
- data/lib/qubrics_management_generated/models/provider_quota_range.rb +208 -0
- data/lib/qubrics_management_generated/models/provider_quotas.rb +186 -0
- data/lib/qubrics_management_generated/models/provider_stats.rb +325 -0
- data/lib/qubrics_management_generated/models/provider_stats_response.rb +223 -0
- data/lib/qubrics_management_generated/models/provider_status_counts.rb +242 -0
- data/lib/qubrics_management_generated/models/provider_test_result.rb +251 -0
- data/lib/qubrics_management_generated/models/provider_test_result_response.rb +223 -0
- data/lib/qubrics_management_generated/models/provider_type_counts.rb +246 -0
- data/lib/qubrics_management_generated/models/provider_update_body.rb +569 -0
- data/lib/qubrics_management_generated/models/provider_usage.rb +216 -0
- data/lib/qubrics_management_generated/models/provider_usage_item.rb +374 -0
- data/lib/qubrics_management_generated/models/provider_usage_response.rb +223 -0
- data/lib/qubrics_management_generated/models/replace_mailbox_send_policy.rb +165 -0
- data/lib/qubrics_management_generated/models/resource_limit_snapshot.rb +420 -0
- data/lib/qubrics_management_generated/models/response_meta.rb +164 -0
- data/lib/qubrics_management_generated/models/sending_account_limit_request.rb +190 -0
- data/lib/qubrics_management_generated/models/sending_account_limit_request_response.rb +223 -0
- data/lib/qubrics_management_generated/models/set_filter_state_body.rb +226 -0
- data/lib/qubrics_management_generated/models/shared_amazon_ses_limit.rb +315 -0
- data/lib/qubrics_management_generated/models/shared_amazon_ses_limit_request.rb +361 -0
- data/lib/qubrics_management_generated/models/shared_amazon_ses_limit_request_cancel.rb +190 -0
- data/lib/qubrics_management_generated/models/shared_amazon_ses_limit_request_cancel_response.rb +223 -0
- data/lib/qubrics_management_generated/models/shared_amazon_ses_limit_request_create.rb +190 -0
- data/lib/qubrics_management_generated/models/shared_amazon_ses_limit_request_create_response.rb +223 -0
- data/lib/qubrics_management_generated/models/shared_amazon_ses_limit_request_page.rb +176 -0
- data/lib/qubrics_management_generated/models/shared_amazon_ses_limit_request_page_response.rb +223 -0
- data/lib/qubrics_management_generated/models/spend_summary.rb +292 -0
- data/lib/qubrics_management_generated/models/spend_summary_response.rb +223 -0
- data/lib/qubrics_management_generated/models/success_envelope.rb +192 -0
- data/lib/qubrics_management_generated/models/transaction.rb +332 -0
- data/lib/qubrics_management_generated/models/transaction_cursor_list_response.rb +251 -0
- data/lib/qubrics_management_generated/models/update_mailbox_body.rb +211 -0
- data/lib/qubrics_management_generated/models/update_mailbox_body_send_scope.rb +214 -0
- data/lib/qubrics_management_generated/models/webhook_create_body.rb +269 -0
- data/lib/qubrics_management_generated/models/webhook_deleted_response.rb +223 -0
- data/lib/qubrics_management_generated/models/webhook_delivery_attempt.rb +560 -0
- data/lib/qubrics_management_generated/models/webhook_delivery_attempt_cursor_list_response.rb +251 -0
- data/lib/qubrics_management_generated/models/webhook_delivery_payload.rb +337 -0
- data/lib/qubrics_management_generated/models/webhook_delivery_payload_response.rb +223 -0
- data/lib/qubrics_management_generated/models/webhook_event_data.rb +406 -0
- data/lib/qubrics_management_generated/models/webhook_event_payload.rb +304 -0
- data/lib/qubrics_management_generated/models/webhook_filters.rb +168 -0
- data/lib/qubrics_management_generated/models/webhook_subscription.rb +368 -0
- data/lib/qubrics_management_generated/models/webhook_subscription_cursor_list_response.rb +251 -0
- data/lib/qubrics_management_generated/models/webhook_subscription_response.rb +223 -0
- data/lib/qubrics_management_generated/models/webhook_subscription_with_secret.rb +395 -0
- data/lib/qubrics_management_generated/models/webhook_subscription_with_secret_response.rb +223 -0
- data/lib/qubrics_management_generated/models/webhook_test_response.rb +165 -0
- data/lib/qubrics_management_generated/models/webhook_update_body.rb +233 -0
- data/lib/qubrics_management_generated/version.rb +15 -0
- data/lib/qubrics_management_generated.rb +195 -0
- metadata +283 -0
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Qubrics API
|
|
3
|
+
|
|
4
|
+
#Programmatic access to your Qubrics 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 Qubrics::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 Qubrics' 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 (Qubrics-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 `Qubrics::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 `Qubrics::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
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Qubrics API
|
|
3
|
+
|
|
4
|
+
#Programmatic access to your Qubrics 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 Qubrics::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 `Qubrics::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 `Qubrics::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
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Qubrics API
|
|
3
|
+
|
|
4
|
+
#Programmatic access to your Qubrics 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 Qubrics::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 `Qubrics::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 `Qubrics::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
|