Class: Norbelys::SenderDetail
- Inherits:
-
Object
- Object
- Norbelys::SenderDetail
- Defined in:
- lib/norbelys/models/sender_detail.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#archived_at ⇒ Object
Returns the value of attribute archived_at.
-
#bcc_crm_email ⇒ Object
Returns the value of attribute bcc_crm_email.
-
#client_label ⇒ Object
Returns the value of attribute client_label.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#daily_limit ⇒ Object
Max sends per day for this mailbox.
-
#from_email ⇒ Object
The sending address.
-
#from_name ⇒ Object
Display name.
-
#health_updated_at ⇒ Object
Returns the value of attribute health_updated_at.
-
#id ⇒ Object
The sender id.
-
#imap_host ⇒ Object
Returns the value of attribute imap_host.
-
#imap_port ⇒ Object
Returns the value of attribute imap_port.
-
#imap_security ⇒ Object
Returns the value of attribute imap_security.
-
#min_gap_minutes ⇒ Object
Minimum gap between sends from this mailbox.
-
#object ⇒ Object
Returns the value of attribute object.
-
#reply_to ⇒ Object
Returns the value of attribute reply_to.
-
#reputation ⇒ Object
System-computed reputation tier:
good,warning, orbad. -
#sending_domain_id ⇒ Object
The sending domain this mailbox lives under.
-
#signature_html ⇒ Object
Returns the value of attribute signature_html.
-
#smtp_host ⇒ Object
Returns the value of attribute smtp_host.
-
#smtp_port ⇒ Object
Returns the value of attribute smtp_port.
-
#smtp_security ⇒ Object
Returns the value of attribute smtp_security.
-
#state ⇒ Object
Operational state:
healthy,throttled, orpaused. -
#transport_mode ⇒ Object
How messages are carried:
smtp,provider_api,self_hosted, orvoice. -
#transport_provider ⇒ Object
Returns the value of attribute transport_provider.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#usage ⇒ Object
Returns the value of attribute usage.
-
#warmup ⇒ Object
Returns the value of attribute warmup.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ SenderDetail
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ SenderDetail
Initializes the object
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/norbelys/models/sender_detail.rb', line 198 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Norbelys::SenderDetail` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Norbelys::SenderDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'archived_at') self.archived_at = attributes[:'archived_at'] end if attributes.key?(:'bcc_crm_email') self.bcc_crm_email = attributes[:'bcc_crm_email'] else self.bcc_crm_email = nil end if attributes.key?(:'client_label') self.client_label = attributes[:'client_label'] else self.client_label = nil end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'daily_limit') self.daily_limit = attributes[:'daily_limit'] else self.daily_limit = nil end if attributes.key?(:'from_email') self.from_email = attributes[:'from_email'] else self.from_email = nil end if attributes.key?(:'from_name') self.from_name = attributes[:'from_name'] else self.from_name = nil end if attributes.key?(:'health_updated_at') self.health_updated_at = attributes[:'health_updated_at'] end if attributes.key?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'imap_host') self.imap_host = attributes[:'imap_host'] else self.imap_host = nil end if attributes.key?(:'imap_port') self.imap_port = attributes[:'imap_port'] else self.imap_port = nil end if attributes.key?(:'imap_security') self.imap_security = attributes[:'imap_security'] else self.imap_security = nil end if attributes.key?(:'min_gap_minutes') self.min_gap_minutes = attributes[:'min_gap_minutes'] else self.min_gap_minutes = nil end if attributes.key?(:'object') self.object = attributes[:'object'] end if attributes.key?(:'reply_to') self.reply_to = attributes[:'reply_to'] else self.reply_to = nil end if attributes.key?(:'reputation') self.reputation = attributes[:'reputation'] else self.reputation = nil end if attributes.key?(:'sending_domain_id') self.sending_domain_id = attributes[:'sending_domain_id'] else self.sending_domain_id = nil end if attributes.key?(:'signature_html') self.signature_html = attributes[:'signature_html'] else self.signature_html = nil end if attributes.key?(:'smtp_host') self.smtp_host = attributes[:'smtp_host'] else self.smtp_host = nil end if attributes.key?(:'smtp_port') self.smtp_port = attributes[:'smtp_port'] else self.smtp_port = nil end if attributes.key?(:'smtp_security') self.smtp_security = attributes[:'smtp_security'] else self.smtp_security = nil end if attributes.key?(:'state') self.state = attributes[:'state'] else self.state = nil end if attributes.key?(:'transport_mode') self.transport_mode = attributes[:'transport_mode'] else self.transport_mode = nil end if attributes.key?(:'transport_provider') self.transport_provider = attributes[:'transport_provider'] else self.transport_provider = nil end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end if attributes.key?(:'usage') self.usage = attributes[:'usage'] end if attributes.key?(:'warmup') self.warmup = attributes[:'warmup'] end end |
Instance Attribute Details
#archived_at ⇒ Object
Returns the value of attribute archived_at.
18 19 20 |
# File 'lib/norbelys/models/sender_detail.rb', line 18 def archived_at @archived_at end |
#bcc_crm_email ⇒ Object
Returns the value of attribute bcc_crm_email.
20 21 22 |
# File 'lib/norbelys/models/sender_detail.rb', line 20 def bcc_crm_email @bcc_crm_email end |
#client_label ⇒ Object
Returns the value of attribute client_label.
22 23 24 |
# File 'lib/norbelys/models/sender_detail.rb', line 22 def client_label @client_label end |
#created_at ⇒ Object
Returns the value of attribute created_at.
24 25 26 |
# File 'lib/norbelys/models/sender_detail.rb', line 24 def created_at @created_at end |
#daily_limit ⇒ Object
Max sends per day for this mailbox.
27 28 29 |
# File 'lib/norbelys/models/sender_detail.rb', line 27 def daily_limit @daily_limit end |
#from_email ⇒ Object
The sending address.
30 31 32 |
# File 'lib/norbelys/models/sender_detail.rb', line 30 def from_email @from_email end |
#from_name ⇒ Object
Display name.
33 34 35 |
# File 'lib/norbelys/models/sender_detail.rb', line 33 def from_name @from_name end |
#health_updated_at ⇒ Object
Returns the value of attribute health_updated_at.
35 36 37 |
# File 'lib/norbelys/models/sender_detail.rb', line 35 def health_updated_at @health_updated_at end |
#id ⇒ Object
The sender id.
38 39 40 |
# File 'lib/norbelys/models/sender_detail.rb', line 38 def id @id end |
#imap_host ⇒ Object
Returns the value of attribute imap_host.
40 41 42 |
# File 'lib/norbelys/models/sender_detail.rb', line 40 def imap_host @imap_host end |
#imap_port ⇒ Object
Returns the value of attribute imap_port.
42 43 44 |
# File 'lib/norbelys/models/sender_detail.rb', line 42 def imap_port @imap_port end |
#imap_security ⇒ Object
Returns the value of attribute imap_security.
44 45 46 |
# File 'lib/norbelys/models/sender_detail.rb', line 44 def imap_security @imap_security end |
#min_gap_minutes ⇒ Object
Minimum gap between sends from this mailbox.
47 48 49 |
# File 'lib/norbelys/models/sender_detail.rb', line 47 def min_gap_minutes @min_gap_minutes end |
#object ⇒ Object
Returns the value of attribute object.
49 50 51 |
# File 'lib/norbelys/models/sender_detail.rb', line 49 def object @object end |
#reply_to ⇒ Object
Returns the value of attribute reply_to.
51 52 53 |
# File 'lib/norbelys/models/sender_detail.rb', line 51 def reply_to @reply_to end |
#reputation ⇒ Object
System-computed reputation tier: good, warning, or bad.
54 55 56 |
# File 'lib/norbelys/models/sender_detail.rb', line 54 def reputation @reputation end |
#sending_domain_id ⇒ Object
The sending domain this mailbox lives under.
57 58 59 |
# File 'lib/norbelys/models/sender_detail.rb', line 57 def sending_domain_id @sending_domain_id end |
#signature_html ⇒ Object
Returns the value of attribute signature_html.
59 60 61 |
# File 'lib/norbelys/models/sender_detail.rb', line 59 def signature_html @signature_html end |
#smtp_host ⇒ Object
Returns the value of attribute smtp_host.
61 62 63 |
# File 'lib/norbelys/models/sender_detail.rb', line 61 def smtp_host @smtp_host end |
#smtp_port ⇒ Object
Returns the value of attribute smtp_port.
63 64 65 |
# File 'lib/norbelys/models/sender_detail.rb', line 63 def smtp_port @smtp_port end |
#smtp_security ⇒ Object
Returns the value of attribute smtp_security.
65 66 67 |
# File 'lib/norbelys/models/sender_detail.rb', line 65 def smtp_security @smtp_security end |
#state ⇒ Object
Operational state: healthy, throttled, or paused.
68 69 70 |
# File 'lib/norbelys/models/sender_detail.rb', line 68 def state @state end |
#transport_mode ⇒ Object
How messages are carried: smtp, provider_api, self_hosted, or voice.
71 72 73 |
# File 'lib/norbelys/models/sender_detail.rb', line 71 def transport_mode @transport_mode end |
#transport_provider ⇒ Object
Returns the value of attribute transport_provider.
73 74 75 |
# File 'lib/norbelys/models/sender_detail.rb', line 73 def transport_provider @transport_provider end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
75 76 77 |
# File 'lib/norbelys/models/sender_detail.rb', line 75 def updated_at @updated_at end |
#usage ⇒ Object
Returns the value of attribute usage.
77 78 79 |
# File 'lib/norbelys/models/sender_detail.rb', line 77 def usage @usage end |
#warmup ⇒ Object
Returns the value of attribute warmup.
79 80 81 |
# File 'lib/norbelys/models/sender_detail.rb', line 79 def warmup @warmup end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 |
# File 'lib/norbelys/models/sender_detail.rb', line 639 def self._deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Norbelys.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
137 138 139 |
# File 'lib/norbelys/models/sender_detail.rb', line 137 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/norbelys/models/sender_detail.rb', line 104 def self.attribute_map { :'archived_at' => :'archivedAt', :'bcc_crm_email' => :'bccCrmEmail', :'client_label' => :'clientLabel', :'created_at' => :'createdAt', :'daily_limit' => :'dailyLimit', :'from_email' => :'fromEmail', :'from_name' => :'fromName', :'health_updated_at' => :'healthUpdatedAt', :'id' => :'id', :'imap_host' => :'imapHost', :'imap_port' => :'imapPort', :'imap_security' => :'imapSecurity', :'min_gap_minutes' => :'minGapMinutes', :'object' => :'object', :'reply_to' => :'replyTo', :'reputation' => :'reputation', :'sending_domain_id' => :'sendingDomainId', :'signature_html' => :'signatureHtml', :'smtp_host' => :'smtpHost', :'smtp_port' => :'smtpPort', :'smtp_security' => :'smtpSecurity', :'state' => :'state', :'transport_mode' => :'transportMode', :'transport_provider' => :'transportProvider', :'updated_at' => :'updatedAt', :'usage' => :'usage', :'warmup' => :'warmup' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 |
# File 'lib/norbelys/models/sender_detail.rb', line 615 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/norbelys/models/sender_detail.rb', line 175 def self.openapi_nullable Set.new([ :'archived_at', :'bcc_crm_email', :'client_label', :'created_at', :'health_updated_at', :'imap_host', :'imap_port', :'imap_security', :'object', :'reply_to', :'signature_html', :'smtp_host', :'smtp_port', :'smtp_security', :'transport_provider', :'updated_at', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/norbelys/models/sender_detail.rb', line 142 def self.openapi_types { :'archived_at' => :'Object', :'bcc_crm_email' => :'String', :'client_label' => :'String', :'created_at' => :'Object', :'daily_limit' => :'Integer', :'from_email' => :'String', :'from_name' => :'String', :'health_updated_at' => :'Object', :'id' => :'String', :'imap_host' => :'String', :'imap_port' => :'Integer', :'imap_security' => :'String', :'min_gap_minutes' => :'Integer', :'object' => :'Object', :'reply_to' => :'String', :'reputation' => :'String', :'sending_domain_id' => :'String', :'signature_html' => :'String', :'smtp_host' => :'String', :'smtp_port' => :'Integer', :'smtp_security' => :'String', :'state' => :'String', :'transport_mode' => :'String', :'transport_provider' => :'String', :'updated_at' => :'Object', :'usage' => :'SenderUsage', :'warmup' => :'SenderWarmupStatus' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 |
# File 'lib/norbelys/models/sender_detail.rb', line 568 def ==(o) return true if self.equal?(o) self.class == o.class && archived_at == o.archived_at && bcc_crm_email == o.bcc_crm_email && client_label == o.client_label && created_at == o.created_at && daily_limit == o.daily_limit && from_email == o.from_email && from_name == o.from_name && health_updated_at == o.health_updated_at && id == o.id && imap_host == o.imap_host && imap_port == o.imap_port && imap_security == o.imap_security && min_gap_minutes == o.min_gap_minutes && object == o.object && reply_to == o.reply_to && reputation == o.reputation && sending_domain_id == o.sending_domain_id && signature_html == o.signature_html && smtp_host == o.smtp_host && smtp_port == o.smtp_port && smtp_security == o.smtp_security && state == o.state && transport_mode == o.transport_mode && transport_provider == o.transport_provider && updated_at == o.updated_at && usage == o.usage && warmup == o.warmup end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
710 711 712 713 714 715 716 717 718 719 720 721 722 |
# File 'lib/norbelys/models/sender_detail.rb', line 710 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#eql?(o) ⇒ Boolean
602 603 604 |
# File 'lib/norbelys/models/sender_detail.rb', line 602 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
608 609 610 |
# File 'lib/norbelys/models/sender_detail.rb', line 608 def hash [archived_at, bcc_crm_email, client_label, created_at, daily_limit, from_email, from_name, health_updated_at, id, imap_host, imap_port, imap_security, min_gap_minutes, object, reply_to, reputation, sending_domain_id, signature_html, smtp_host, smtp_port, smtp_security, state, transport_mode, transport_provider, updated_at, usage, warmup].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/norbelys/models/sender_detail.rb', line 362 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @daily_limit.nil? invalid_properties.push('invalid value for "daily_limit", daily_limit cannot be nil.') end if @daily_limit < 0 invalid_properties.push('invalid value for "daily_limit", must be greater than or equal to 0.') end if @from_email.nil? invalid_properties.push('invalid value for "from_email", from_email cannot be nil.') end if @from_name.nil? invalid_properties.push('invalid value for "from_name", from_name cannot be nil.') end if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @imap_port > 65535 invalid_properties.push('invalid value for "imap_port", must be smaller than or equal to 65535.') end if @imap_port < 1 invalid_properties.push('invalid value for "imap_port", must be greater than or equal to 1.') end if @min_gap_minutes.nil? invalid_properties.push('invalid value for "min_gap_minutes", min_gap_minutes cannot be nil.') end if @min_gap_minutes < 0 invalid_properties.push('invalid value for "min_gap_minutes", must be greater than or equal to 0.') end if @reputation.nil? invalid_properties.push('invalid value for "reputation", reputation cannot be nil.') end if @sending_domain_id.nil? invalid_properties.push('invalid value for "sending_domain_id", sending_domain_id cannot be nil.') end if @smtp_port > 65535 invalid_properties.push('invalid value for "smtp_port", must be smaller than or equal to 65535.') end if @smtp_port < 1 invalid_properties.push('invalid value for "smtp_port", must be greater than or equal to 1.') end if @state.nil? invalid_properties.push('invalid value for "state", state cannot be nil.') end if @transport_mode.nil? invalid_properties.push('invalid value for "transport_mode", transport_mode cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
686 687 688 |
# File 'lib/norbelys/models/sender_detail.rb', line 686 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
692 693 694 695 696 697 698 699 700 701 702 703 704 |
# File 'lib/norbelys/models/sender_detail.rb', line 692 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
680 681 682 |
# File 'lib/norbelys/models/sender_detail.rb', line 680 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
# File 'lib/norbelys/models/sender_detail.rb', line 430 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @daily_limit.nil? return false if @daily_limit < 0 return false if @from_email.nil? return false if @from_name.nil? return false if @id.nil? return false if @imap_port > 65535 return false if @imap_port < 1 imap_security_validator = EnumAttributeValidator.new('String', ["ssl", "tls", "none"]) return false unless imap_security_validator.valid?(@imap_security) return false if @min_gap_minutes.nil? return false if @min_gap_minutes < 0 return false if @reputation.nil? reputation_validator = EnumAttributeValidator.new('String', ["good", "warning", "bad"]) return false unless reputation_validator.valid?(@reputation) return false if @sending_domain_id.nil? return false if @smtp_port > 65535 return false if @smtp_port < 1 smtp_security_validator = EnumAttributeValidator.new('String', ["ssl", "tls", "none"]) return false unless smtp_security_validator.valid?(@smtp_security) return false if @state.nil? state_validator = EnumAttributeValidator.new('String', ["healthy", "throttled", "paused"]) return false unless state_validator.valid?(@state) return false if @transport_mode.nil? transport_mode_validator = EnumAttributeValidator.new('String', ["smtp", "provider_api", "self_hosted", "voice"]) return false unless transport_mode_validator.valid?(@transport_mode) true end |