Class: MailSlurpClient::CheckEmailAuthStackResults

Inherits:
Object
  • Object
show all
Defined in:
lib/mailslurp_client/models/check_email_auth_stack_results.rb

Overview

Combined authentication and deliverability DNS results for a domain

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CheckEmailAuthStackResults

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 124

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::CheckEmailAuthStackResults` 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 `MailSlurpClient::CheckEmailAuthStackResults`. 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?(:'domain')
    self.domain = attributes[:'domain']
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.key?(:'health_score')
    self.health_score = attributes[:'health_score']
  end

  if attributes.key?(:'total_checks')
    self.total_checks = attributes[:'total_checks']
  end

  if attributes.key?(:'passing_checks')
    self.passing_checks = attributes[:'passing_checks']
  end

  if attributes.key?(:'failing_checks')
    self.failing_checks = attributes[:'failing_checks']
  end

  if attributes.key?(:'spf')
    self.spf = attributes[:'spf']
  end

  if attributes.key?(:'dmarc')
    self.dmarc = attributes[:'dmarc']
  end

  if attributes.key?(:'dkim')
    self.dkim = attributes[:'dkim']
  end

  if attributes.key?(:'bimi')
    self.bimi = attributes[:'bimi']
  end

  if attributes.key?(:'mx')
    self.mx = attributes[:'mx']
  end

  if attributes.key?(:'mta_sts')
    self.mta_sts = attributes[:'mta_sts']
  end

  if attributes.key?(:'tls_reporting')
    self.tls_reporting = attributes[:'tls_reporting']
  end

  if attributes.key?(:'insights')
    if (value = attributes[:'insights']).is_a?(Array)
      self.insights = value
    end
  end

  if attributes.key?(:'warnings')
    if (value = attributes[:'warnings']).is_a?(Array)
      self.warnings = value
    end
  end

  if attributes.key?(:'errors')
    if (value = attributes[:'errors']).is_a?(Array)
      self.errors = value
    end
  end
end

Instance Attribute Details

#bimiObject

Returns the value of attribute bimi.



36
37
38
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 36

def bimi
  @bimi
end

#dkimObject

Returns the value of attribute dkim.



34
35
36
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 34

def dkim
  @dkim
end

#dmarcObject

Returns the value of attribute dmarc.



32
33
34
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 32

def dmarc
  @dmarc
end

#domainObject

Returns the value of attribute domain.



18
19
20
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 18

def domain
  @domain
end

#errorsObject

Returns the value of attribute errors.



48
49
50
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 48

def errors
  @errors
end

#failing_checksObject

Returns the value of attribute failing_checks.



28
29
30
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 28

def failing_checks
  @failing_checks
end

#health_scoreObject

Returns the value of attribute health_score.



22
23
24
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 22

def health_score
  @health_score
end

#insightsObject

Returns the value of attribute insights.



44
45
46
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 44

def insights
  @insights
end

#mta_stsObject

Returns the value of attribute mta_sts.



40
41
42
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 40

def mta_sts
  @mta_sts
end

#mxObject

Returns the value of attribute mx.



38
39
40
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 38

def mx
  @mx
end

#passing_checksObject

Returns the value of attribute passing_checks.



26
27
28
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 26

def passing_checks
  @passing_checks
end

#spfObject

Returns the value of attribute spf.



30
31
32
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 30

def spf
  @spf
end

#statusObject

Returns the value of attribute status.



20
21
22
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 20

def status
  @status
end

#tls_reportingObject

Returns the value of attribute tls_reporting.



42
43
44
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 42

def tls_reporting
  @tls_reporting
end

#total_checksObject

Returns the value of attribute total_checks.



24
25
26
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 24

def total_checks
  @total_checks
end

#warningsObject

Returns the value of attribute warnings.



46
47
48
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 46

def warnings
  @warnings
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 73

def self.attribute_map
  {
    :'domain' => :'domain',
    :'status' => :'status',
    :'health_score' => :'healthScore',
    :'total_checks' => :'totalChecks',
    :'passing_checks' => :'passingChecks',
    :'failing_checks' => :'failingChecks',
    :'spf' => :'spf',
    :'dmarc' => :'dmarc',
    :'dkim' => :'dkim',
    :'bimi' => :'bimi',
    :'mx' => :'mx',
    :'mta_sts' => :'mtaSts',
    :'tls_reporting' => :'tlsReporting',
    :'insights' => :'insights',
    :'warnings' => :'warnings',
    :'errors' => :'errors'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



351
352
353
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 351

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



117
118
119
120
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 117

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 95

def self.openapi_types
  {
    :'domain' => :'String',
    :'status' => :'String',
    :'health_score' => :'Integer',
    :'total_checks' => :'Integer',
    :'passing_checks' => :'Integer',
    :'failing_checks' => :'Integer',
    :'spf' => :'LookupSpfDomainResults',
    :'dmarc' => :'LookupDmarcDomainResults',
    :'dkim' => :'LookupDkimDomainResults',
    :'bimi' => :'LookupBimiDomainResults',
    :'mx' => :'LookupMxRecordsResults',
    :'mta_sts' => :'LookupMtaStsDomainResults',
    :'tls_reporting' => :'LookupTlsReportingDomainResults',
    :'insights' => :'Array<String>',
    :'warnings' => :'Array<String>',
    :'errors' => :'Array<String>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 315

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      domain == o.domain &&
      status == o.status &&
      health_score == o.health_score &&
      total_checks == o.total_checks &&
      passing_checks == o.passing_checks &&
      failing_checks == o.failing_checks &&
      spf == o.spf &&
      dmarc == o.dmarc &&
      dkim == o.dkim &&
      bimi == o.bimi &&
      mx == o.mx &&
      mta_sts == o.mta_sts &&
      tls_reporting == o.tls_reporting &&
      insights == o.insights &&
      warnings == o.warnings &&
      errors == o.errors
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



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
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 379

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.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
    MailSlurpClient.const_get(type).build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



448
449
450
451
452
453
454
455
456
457
458
459
460
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 448

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

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 358

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.openapi_types.each_pair do |key, type|
    if 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[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


338
339
340
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 338

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



344
345
346
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 344

def hash
  [domain, status, health_score, total_checks, passing_checks, failing_checks, spf, dmarc, dkim, bimi, mx, mta_sts, tls_reporting, insights, warnings, errors].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 210

def list_invalid_properties
  invalid_properties = Array.new
  if @domain.nil?
    invalid_properties.push('invalid value for "domain", domain cannot be nil.')
  end

  if @status.nil?
    invalid_properties.push('invalid value for "status", status cannot be nil.')
  end

  if @health_score.nil?
    invalid_properties.push('invalid value for "health_score", health_score cannot be nil.')
  end

  if @total_checks.nil?
    invalid_properties.push('invalid value for "total_checks", total_checks cannot be nil.')
  end

  if @passing_checks.nil?
    invalid_properties.push('invalid value for "passing_checks", passing_checks cannot be nil.')
  end

  if @failing_checks.nil?
    invalid_properties.push('invalid value for "failing_checks", failing_checks cannot be nil.')
  end

  if @spf.nil?
    invalid_properties.push('invalid value for "spf", spf cannot be nil.')
  end

  if @dmarc.nil?
    invalid_properties.push('invalid value for "dmarc", dmarc cannot be nil.')
  end

  if @dkim.nil?
    invalid_properties.push('invalid value for "dkim", dkim cannot be nil.')
  end

  if @bimi.nil?
    invalid_properties.push('invalid value for "bimi", bimi cannot be nil.')
  end

  if @mx.nil?
    invalid_properties.push('invalid value for "mx", mx cannot be nil.')
  end

  if @mta_sts.nil?
    invalid_properties.push('invalid value for "mta_sts", mta_sts cannot be nil.')
  end

  if @tls_reporting.nil?
    invalid_properties.push('invalid value for "tls_reporting", tls_reporting cannot be nil.')
  end

  if @insights.nil?
    invalid_properties.push('invalid value for "insights", insights cannot be nil.')
  end

  if @warnings.nil?
    invalid_properties.push('invalid value for "warnings", warnings cannot be nil.')
  end

  if @errors.nil?
    invalid_properties.push('invalid value for "errors", errors cannot be nil.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



424
425
426
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 424

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



430
431
432
433
434
435
436
437
438
439
440
441
442
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 430

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



418
419
420
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 418

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/mailslurp_client/models/check_email_auth_stack_results.rb', line 281

def valid?
  return false if @domain.nil?
  return false if @status.nil?
  status_validator = EnumAttributeValidator.new('String', ["HEALTHY", "DEGRADED", "CRITICAL", "FAILED"])
  return false unless status_validator.valid?(@status)
  return false if @health_score.nil?
  return false if @total_checks.nil?
  return false if @passing_checks.nil?
  return false if @failing_checks.nil?
  return false if @spf.nil?
  return false if @dmarc.nil?
  return false if @dkim.nil?
  return false if @bimi.nil?
  return false if @mx.nil?
  return false if @mta_sts.nil?
  return false if @tls_reporting.nil?
  return false if @insights.nil?
  return false if @warnings.nil?
  return false if @errors.nil?
  true
end