sendmux-management 1.0.0 → 1.1.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 +4 -4
- data/CHANGELOG.md +7 -0
- data/LICENSE +21 -0
- data/README.md +103 -0
- data/lib/sendmux/management/version.rb +1 -1
- data/lib/sendmux_management_generated/api/domain_filters_api.rb +4 -4
- data/lib/sendmux_management_generated/api/domains_api.rb +77 -4
- data/lib/sendmux_management_generated/api/mailboxes_api.rb +64 -0
- data/lib/sendmux_management_generated/api/sending_accounts_api.rb +63 -0
- data/lib/sendmux_management_generated/api_client.rb +7 -1
- data/lib/sendmux_management_generated/models/filter_rule.rb +1 -1
- data/lib/sendmux_management_generated/models/mailbox_availability_reason.rb +45 -0
- data/lib/sendmux_management_generated/models/mailbox_availability_response.rb +223 -0
- data/lib/sendmux_management_generated/models/mailbox_availability_result.rb +240 -0
- data/lib/sendmux_management_generated/models/mailbox_domain.rb +44 -2
- data/lib/sendmux_management_generated/models/mailbox_domain_dns_records.rb +29 -2
- data/lib/sendmux_management_generated/models/mailbox_domain_mail_from_records.rb +191 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_name_value_record.rb +1 -1
- data/lib/sendmux_management_generated/models/mailbox_domain_named_mx_record.rb +217 -0
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_checks.rb +56 -2
- data/lib/sendmux_management_generated/models/mailbox_domain_verify_result.rb +29 -2
- data/lib/sendmux_management_generated/models/management_create_domain_request.rb +48 -4
- data/lib/sendmux_management_generated/models/management_create_mailbox_key_request.rb +1 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_request.rb +2 -0
- data/lib/sendmux_management_generated/models/management_create_mailbox_request_send_scope.rb +4 -0
- data/lib/sendmux_management_generated/models/management_update_domain_request.rb +189 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request.rb +2 -2
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel.rb +190 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_cancel_response.rb +223 -0
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create.rb +1 -1
- data/lib/sendmux_management_generated/models/update_mailbox_body.rb +2 -1
- data/lib/sendmux_management_generated/models/update_mailbox_body_send_scope.rb +214 -0
- data/lib/sendmux_management_generated.rb +9 -1
- metadata +12 -3
- data/lib/sendmux_management_generated/models/shared_amazon_ses_limit_request_create_request.rb +0 -368
|
@@ -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 MailboxAvailabilityResponse < 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' => :'MailboxAvailabilityResult'
|
|
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::MailboxAvailabilityResponse` 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::MailboxAvailabilityResponse`. 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,240 @@
|
|
|
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
|
|
@@ -29,9 +29,15 @@ module Sendmux::Management::Generated
|
|
|
29
29
|
# Active mailboxes currently using this domain
|
|
30
30
|
attr_accessor :mailbox_count
|
|
31
31
|
|
|
32
|
-
#
|
|
32
|
+
# `send_only` verifies outbound DNS only. `send_receive` also verifies MX records and can host mailboxes.
|
|
33
|
+
attr_accessor :mode
|
|
34
|
+
|
|
35
|
+
# Amazon SES DKIM status (pending/success/failed/temporary_failure/not_started)
|
|
33
36
|
attr_accessor :ses_dkim_status
|
|
34
37
|
|
|
38
|
+
# Amazon SES MAIL FROM status (pending/success/failed/temporary_failure/not_started)
|
|
39
|
+
attr_accessor :ses_mail_from_status
|
|
40
|
+
|
|
35
41
|
# Current verification state
|
|
36
42
|
attr_accessor :verification_status
|
|
37
43
|
|
|
@@ -68,7 +74,9 @@ module Sendmux::Management::Generated
|
|
|
68
74
|
:'domain' => :'domain',
|
|
69
75
|
:'id' => :'id',
|
|
70
76
|
:'mailbox_count' => :'mailbox_count',
|
|
77
|
+
:'mode' => :'mode',
|
|
71
78
|
:'ses_dkim_status' => :'ses_dkim_status',
|
|
79
|
+
:'ses_mail_from_status' => :'ses_mail_from_status',
|
|
72
80
|
:'verification_status' => :'verification_status',
|
|
73
81
|
:'verified_at' => :'verified_at'
|
|
74
82
|
}
|
|
@@ -92,7 +100,9 @@ module Sendmux::Management::Generated
|
|
|
92
100
|
:'domain' => :'String',
|
|
93
101
|
:'id' => :'String',
|
|
94
102
|
:'mailbox_count' => :'Integer',
|
|
103
|
+
:'mode' => :'String',
|
|
95
104
|
:'ses_dkim_status' => :'String',
|
|
105
|
+
:'ses_mail_from_status' => :'String',
|
|
96
106
|
:'verification_status' => :'String',
|
|
97
107
|
:'verified_at' => :'String'
|
|
98
108
|
}
|
|
@@ -102,6 +112,7 @@ module Sendmux::Management::Generated
|
|
|
102
112
|
def self.openapi_nullable
|
|
103
113
|
Set.new([
|
|
104
114
|
:'ses_dkim_status',
|
|
115
|
+
:'ses_mail_from_status',
|
|
105
116
|
:'verified_at'
|
|
106
117
|
])
|
|
107
118
|
end
|
|
@@ -152,12 +163,24 @@ module Sendmux::Management::Generated
|
|
|
152
163
|
self.mailbox_count = nil
|
|
153
164
|
end
|
|
154
165
|
|
|
166
|
+
if attributes.key?(:'mode')
|
|
167
|
+
self.mode = attributes[:'mode']
|
|
168
|
+
else
|
|
169
|
+
self.mode = nil
|
|
170
|
+
end
|
|
171
|
+
|
|
155
172
|
if attributes.key?(:'ses_dkim_status')
|
|
156
173
|
self.ses_dkim_status = attributes[:'ses_dkim_status']
|
|
157
174
|
else
|
|
158
175
|
self.ses_dkim_status = nil
|
|
159
176
|
end
|
|
160
177
|
|
|
178
|
+
if attributes.key?(:'ses_mail_from_status')
|
|
179
|
+
self.ses_mail_from_status = attributes[:'ses_mail_from_status']
|
|
180
|
+
else
|
|
181
|
+
self.ses_mail_from_status = nil
|
|
182
|
+
end
|
|
183
|
+
|
|
161
184
|
if attributes.key?(:'verification_status')
|
|
162
185
|
self.verification_status = attributes[:'verification_status']
|
|
163
186
|
else
|
|
@@ -200,6 +223,10 @@ module Sendmux::Management::Generated
|
|
|
200
223
|
invalid_properties.push('invalid value for "mailbox_count", must be greater than or equal to 0.')
|
|
201
224
|
end
|
|
202
225
|
|
|
226
|
+
if @mode.nil?
|
|
227
|
+
invalid_properties.push('invalid value for "mode", mode cannot be nil.')
|
|
228
|
+
end
|
|
229
|
+
|
|
203
230
|
if @verification_status.nil?
|
|
204
231
|
invalid_properties.push('invalid value for "verification_status", verification_status cannot be nil.')
|
|
205
232
|
end
|
|
@@ -217,6 +244,9 @@ module Sendmux::Management::Generated
|
|
|
217
244
|
return false if @id.nil?
|
|
218
245
|
return false if @mailbox_count.nil?
|
|
219
246
|
return false if @mailbox_count < 0
|
|
247
|
+
return false if @mode.nil?
|
|
248
|
+
mode_validator = EnumAttributeValidator.new('String', ["send_only", "send_receive", "unknown_default_open_api"])
|
|
249
|
+
return false unless mode_validator.valid?(@mode)
|
|
220
250
|
return false if @verification_status.nil?
|
|
221
251
|
verification_status_validator = EnumAttributeValidator.new('String', ["pending", "verified", "failed", "unknown_default_open_api"])
|
|
222
252
|
return false unless verification_status_validator.valid?(@verification_status)
|
|
@@ -277,6 +307,16 @@ module Sendmux::Management::Generated
|
|
|
277
307
|
@mailbox_count = mailbox_count
|
|
278
308
|
end
|
|
279
309
|
|
|
310
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
311
|
+
# @param [Object] mode Object to be assigned
|
|
312
|
+
def mode=(mode)
|
|
313
|
+
validator = EnumAttributeValidator.new('String', ["send_only", "send_receive", "unknown_default_open_api"])
|
|
314
|
+
unless validator.valid?(mode)
|
|
315
|
+
fail ArgumentError, "invalid value for \"mode\", must be one of #{validator.allowable_values}."
|
|
316
|
+
end
|
|
317
|
+
@mode = mode
|
|
318
|
+
end
|
|
319
|
+
|
|
280
320
|
# Custom attribute writer method checking allowed values (enum).
|
|
281
321
|
# @param [Object] verification_status Object to be assigned
|
|
282
322
|
def verification_status=(verification_status)
|
|
@@ -297,7 +337,9 @@ module Sendmux::Management::Generated
|
|
|
297
337
|
domain == o.domain &&
|
|
298
338
|
id == o.id &&
|
|
299
339
|
mailbox_count == o.mailbox_count &&
|
|
340
|
+
mode == o.mode &&
|
|
300
341
|
ses_dkim_status == o.ses_dkim_status &&
|
|
342
|
+
ses_mail_from_status == o.ses_mail_from_status &&
|
|
301
343
|
verification_status == o.verification_status &&
|
|
302
344
|
verified_at == o.verified_at
|
|
303
345
|
end
|
|
@@ -311,7 +353,7 @@ module Sendmux::Management::Generated
|
|
|
311
353
|
# Calculates hash code according to all attributes.
|
|
312
354
|
# @return [Integer] Hash code
|
|
313
355
|
def hash
|
|
314
|
-
[created_at, dns_records, domain, id, mailbox_count, ses_dkim_status, verification_status, verified_at].hash
|
|
356
|
+
[created_at, dns_records, domain, id, mailbox_count, mode, ses_dkim_status, ses_mail_from_status, verification_status, verified_at].hash
|
|
315
357
|
end
|
|
316
358
|
|
|
317
359
|
# Builds the object from hash
|
|
@@ -15,15 +15,18 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Sendmux::Management::Generated
|
|
17
17
|
class MailboxDomainDnsRecords < ApiModelBase
|
|
18
|
-
# Three SES DKIM CNAME records
|
|
18
|
+
# Three Amazon SES DKIM CNAME records
|
|
19
19
|
attr_accessor :dkim
|
|
20
20
|
|
|
21
21
|
# DMARC enforcement record (quarantine, no reporting)
|
|
22
22
|
attr_accessor :dmarc
|
|
23
23
|
|
|
24
|
+
attr_accessor :mail_from
|
|
25
|
+
|
|
24
26
|
# MX records the customer must place. All point at Sendmux's inbound mail servers.
|
|
25
27
|
attr_accessor :mx
|
|
26
28
|
|
|
29
|
+
# SPF TXT record covering Amazon SES sending
|
|
27
30
|
attr_accessor :spf
|
|
28
31
|
|
|
29
32
|
# Ownership-proof TXT record (Sendmux-specific)
|
|
@@ -34,6 +37,7 @@ module Sendmux::Management::Generated
|
|
|
34
37
|
{
|
|
35
38
|
:'dkim' => :'dkim',
|
|
36
39
|
:'dmarc' => :'dmarc',
|
|
40
|
+
:'mail_from' => :'mail_from',
|
|
37
41
|
:'mx' => :'mx',
|
|
38
42
|
:'spf' => :'spf',
|
|
39
43
|
:'verification' => :'verification'
|
|
@@ -55,6 +59,7 @@ module Sendmux::Management::Generated
|
|
|
55
59
|
{
|
|
56
60
|
:'dkim' => :'Array<MailboxDomainNameValueRecord>',
|
|
57
61
|
:'dmarc' => :'MailboxDomainNameValueRecord',
|
|
62
|
+
:'mail_from' => :'MailboxDomainMailFromRecords',
|
|
58
63
|
:'mx' => :'Array<MailboxDomainMxRecord>',
|
|
59
64
|
:'spf' => :'MailboxDomainNameValueRecord',
|
|
60
65
|
:'verification' => :'MailboxDomainNameValueRecord'
|
|
@@ -97,6 +102,12 @@ module Sendmux::Management::Generated
|
|
|
97
102
|
self.dmarc = nil
|
|
98
103
|
end
|
|
99
104
|
|
|
105
|
+
if attributes.key?(:'mail_from')
|
|
106
|
+
self.mail_from = attributes[:'mail_from']
|
|
107
|
+
else
|
|
108
|
+
self.mail_from = nil
|
|
109
|
+
end
|
|
110
|
+
|
|
100
111
|
if attributes.key?(:'mx')
|
|
101
112
|
if (value = attributes[:'mx']).is_a?(Array)
|
|
102
113
|
self.mx = value
|
|
@@ -131,6 +142,10 @@ module Sendmux::Management::Generated
|
|
|
131
142
|
invalid_properties.push('invalid value for "dmarc", dmarc cannot be nil.')
|
|
132
143
|
end
|
|
133
144
|
|
|
145
|
+
if @mail_from.nil?
|
|
146
|
+
invalid_properties.push('invalid value for "mail_from", mail_from cannot be nil.')
|
|
147
|
+
end
|
|
148
|
+
|
|
134
149
|
if @mx.nil?
|
|
135
150
|
invalid_properties.push('invalid value for "mx", mx cannot be nil.')
|
|
136
151
|
end
|
|
@@ -152,6 +167,7 @@ module Sendmux::Management::Generated
|
|
|
152
167
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
153
168
|
return false if @dkim.nil?
|
|
154
169
|
return false if @dmarc.nil?
|
|
170
|
+
return false if @mail_from.nil?
|
|
155
171
|
return false if @mx.nil?
|
|
156
172
|
return false if @spf.nil?
|
|
157
173
|
return false if @verification.nil?
|
|
@@ -178,6 +194,16 @@ module Sendmux::Management::Generated
|
|
|
178
194
|
@dmarc = dmarc
|
|
179
195
|
end
|
|
180
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
|
+
|
|
181
207
|
# Custom attribute writer method with validation
|
|
182
208
|
# @param [Object] mx Value to be assigned
|
|
183
209
|
def mx=(mx)
|
|
@@ -215,6 +241,7 @@ module Sendmux::Management::Generated
|
|
|
215
241
|
self.class == o.class &&
|
|
216
242
|
dkim == o.dkim &&
|
|
217
243
|
dmarc == o.dmarc &&
|
|
244
|
+
mail_from == o.mail_from &&
|
|
218
245
|
mx == o.mx &&
|
|
219
246
|
spf == o.spf &&
|
|
220
247
|
verification == o.verification
|
|
@@ -229,7 +256,7 @@ module Sendmux::Management::Generated
|
|
|
229
256
|
# Calculates hash code according to all attributes.
|
|
230
257
|
# @return [Integer] Hash code
|
|
231
258
|
def hash
|
|
232
|
-
[dkim, dmarc, mx, spf, verification].hash
|
|
259
|
+
[dkim, dmarc, mail_from, mx, spf, verification].hash
|
|
233
260
|
end
|
|
234
261
|
|
|
235
262
|
# Builds the object from hash
|