Class: Emailguard::EmailDetectData
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Emailguard::EmailDetectData
- Defined in:
- lib/emailguard_sdk/models/email_detect_data.rb
Instance Attribute Summary collapse
-
#detection_source ⇒ Object
Returns the value of attribute detection_source.
-
#disposable ⇒ Object
Returns the value of attribute disposable.
-
#disposable_provider ⇒ Object
Returns the value of attribute disposable_provider.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#email ⇒ Object
Returns the value of attribute email.
-
#normalized ⇒ Object
Returns the value of attribute normalized.
-
#public_domain ⇒ Object
Returns the value of attribute public_domain.
-
#relay_domain ⇒ Object
Returns the value of attribute relay_domain.
-
#relay_provider ⇒ Object
Returns the value of attribute relay_provider.
-
#role_address ⇒ Object
Returns the value of attribute role_address.
-
#subaddressing ⇒ Object
Returns the value of attribute subaddressing.
-
#suggested_domain ⇒ Object
Corrected domain candidate when a domain or TLD typo rule matches.
-
#suggested_email ⇒ Object
Corrected email candidate when a domain or TLD typo rule matches.
-
#syntax_validation ⇒ Object
Returns the value of attribute syntax_validation.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.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.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ EmailDetectData
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ EmailDetectData
Initializes the object
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 135 136 137 138 139 140 141 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 173 174 175 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 106 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Emailguard::EmailDetectData` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Emailguard::EmailDetectData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'detection_source') self.detection_source = attributes[:'detection_source'] end if attributes.key?(:'disposable') self.disposable = attributes[:'disposable'] end if attributes.key?(:'disposable_provider') self.disposable_provider = attributes[:'disposable_provider'] end if attributes.key?(:'domain') self.domain = attributes[:'domain'] end if attributes.key?(:'email') self.email = attributes[:'email'] end if attributes.key?(:'normalized') self.normalized = attributes[:'normalized'] end if attributes.key?(:'public_domain') self.public_domain = attributes[:'public_domain'] end if attributes.key?(:'relay_domain') self.relay_domain = attributes[:'relay_domain'] end if attributes.key?(:'relay_provider') self.relay_provider = attributes[:'relay_provider'] end if attributes.key?(:'role_address') self.role_address = attributes[:'role_address'] end if attributes.key?(:'subaddressing') self.subaddressing = attributes[:'subaddressing'] end if attributes.key?(:'suggested_domain') self.suggested_domain = attributes[:'suggested_domain'] end if attributes.key?(:'suggested_email') self.suggested_email = attributes[:'suggested_email'] end if attributes.key?(:'syntax_validation') self.syntax_validation = attributes[:'syntax_validation'] end end |
Instance Attribute Details
#detection_source ⇒ Object
Returns the value of attribute detection_source.
18 19 20 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 18 def detection_source @detection_source end |
#disposable ⇒ Object
Returns the value of attribute disposable.
20 21 22 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 20 def disposable @disposable end |
#disposable_provider ⇒ Object
Returns the value of attribute disposable_provider.
22 23 24 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 22 def disposable_provider @disposable_provider end |
#domain ⇒ Object
Returns the value of attribute domain.
24 25 26 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 24 def domain @domain end |
#email ⇒ Object
Returns the value of attribute email.
26 27 28 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 26 def email @email end |
#normalized ⇒ Object
Returns the value of attribute normalized.
28 29 30 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 28 def normalized @normalized end |
#public_domain ⇒ Object
Returns the value of attribute public_domain.
30 31 32 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 30 def public_domain @public_domain end |
#relay_domain ⇒ Object
Returns the value of attribute relay_domain.
32 33 34 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 32 def relay_domain @relay_domain end |
#relay_provider ⇒ Object
Returns the value of attribute relay_provider.
34 35 36 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 34 def relay_provider @relay_provider end |
#role_address ⇒ Object
Returns the value of attribute role_address.
36 37 38 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 36 def role_address @role_address end |
#subaddressing ⇒ Object
Returns the value of attribute subaddressing.
38 39 40 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 38 def subaddressing @subaddressing end |
#suggested_domain ⇒ Object
Corrected domain candidate when a domain or TLD typo rule matches.
41 42 43 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 41 def suggested_domain @suggested_domain end |
#suggested_email ⇒ Object
Corrected email candidate when a domain or TLD typo rule matches.
44 45 46 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 44 def suggested_email @suggested_email end |
#syntax_validation ⇒ Object
Returns the value of attribute syntax_validation.
46 47 48 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 46 def syntax_validation @syntax_validation end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
69 70 71 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 69 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
74 75 76 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 74 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 49 def self.attribute_map { :'detection_source' => :'detection_source', :'disposable' => :'disposable', :'disposable_provider' => :'disposable_provider', :'domain' => :'domain', :'email' => :'email', :'normalized' => :'normalized', :'public_domain' => :'public_domain', :'relay_domain' => :'relay_domain', :'relay_provider' => :'relay_provider', :'role_address' => :'role_address', :'subaddressing' => :'subaddressing', :'suggested_domain' => :'suggested_domain', :'suggested_email' => :'suggested_email', :'syntax_validation' => :'syntax_validation' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 228 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
99 100 101 102 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 99 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 79 def self.openapi_types { :'detection_source' => :'String', :'disposable' => :'Boolean', :'disposable_provider' => :'String', :'domain' => :'String', :'email' => :'String', :'normalized' => :'String', :'public_domain' => :'Boolean', :'relay_domain' => :'Boolean', :'relay_provider' => :'String', :'role_address' => :'Boolean', :'subaddressing' => :'Boolean', :'suggested_domain' => :'String', :'suggested_email' => :'String', :'syntax_validation' => :'Boolean' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 194 def ==(o) return true if self.equal?(o) self.class == o.class && detection_source == o.detection_source && disposable == o.disposable && disposable_provider == o.disposable_provider && domain == o.domain && email == o.email && normalized == o.normalized && public_domain == o.public_domain && relay_domain == o.relay_domain && relay_provider == o.relay_provider && role_address == o.role_address && subaddressing == o.subaddressing && suggested_domain == o.suggested_domain && suggested_email == o.suggested_email && syntax_validation == o.syntax_validation end |
#eql?(o) ⇒ Boolean
215 216 217 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 215 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
221 222 223 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 221 def hash [detection_source, disposable, disposable_provider, domain, email, normalized, public_domain, relay_domain, relay_provider, role_address, subaddressing, suggested_domain, suggested_email, syntax_validation].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
179 180 181 182 183 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 179 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 250 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 |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
187 188 189 190 |
# File 'lib/emailguard_sdk/models/email_detect_data.rb', line 187 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |