mailslurp_client 17.2.0 → 17.3.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.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/campaign_probe_controller_api.rb +138 -0
  3. data/lib/mailslurp_client/api/domain_monitor_controller_api.rb +264 -0
  4. data/lib/mailslurp_client/api/email_audit_controller_api.rb +334 -0
  5. data/lib/mailslurp_client/api/email_controller_api.rb +124 -0
  6. data/lib/mailslurp_client/api/inbox_controller_api.rb +4 -4
  7. data/lib/mailslurp_client/api/phone_controller_api.rb +1312 -81
  8. data/lib/mailslurp_client/api/sms_controller_api.rb +125 -0
  9. data/lib/mailslurp_client/api/tools_controller_api.rb +806 -0
  10. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +15 -15
  11. data/lib/mailslurp_client/models/acquire_phone_pool_lease_options.rb +233 -0
  12. data/lib/mailslurp_client/models/add_phone_pool_numbers_options.rb +213 -0
  13. data/lib/mailslurp_client/models/ai_transform_mapping_projection.rb +27 -27
  14. data/lib/mailslurp_client/models/ai_transform_projection.rb +28 -28
  15. data/lib/mailslurp_client/models/alias_projection.rb +45 -45
  16. data/lib/mailslurp_client/models/alias_thread_projection.rb +42 -42
  17. data/lib/mailslurp_client/models/analyze_dmarc_report_options.rb +248 -0
  18. data/lib/mailslurp_client/models/analyze_dmarc_report_results.rb +386 -0
  19. data/lib/mailslurp_client/models/analyze_email_headers_options.rb +240 -0
  20. data/lib/mailslurp_client/models/analyze_email_headers_results.rb +275 -0
  21. data/lib/mailslurp_client/models/attachment_projection.rb +50 -50
  22. data/lib/mailslurp_client/models/available_phone_number_dto.rb +325 -0
  23. data/lib/mailslurp_client/models/available_phone_numbers_result.rb +236 -0
  24. data/lib/mailslurp_client/models/bounce_projection.rb +28 -28
  25. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +10 -10
  26. data/lib/mailslurp_client/models/campaign_probe_run_comparison_dto.rb +397 -0
  27. data/lib/mailslurp_client/models/check_campaign_probe_options.rb +371 -0
  28. data/lib/mailslurp_client/models/check_campaign_probe_results.rb +482 -0
  29. data/lib/mailslurp_client/models/check_dns_propagation_options.rb +297 -0
  30. data/lib/mailslurp_client/models/check_dns_propagation_results.rb +361 -0
  31. data/lib/mailslurp_client/models/check_domain_monitor_options.rb +243 -0
  32. data/lib/mailslurp_client/models/check_domain_monitor_results.rb +398 -0
  33. data/lib/mailslurp_client/models/check_email_audit_options.rb +405 -0
  34. data/lib/mailslurp_client/models/check_email_auth_stack_options.rb +248 -0
  35. data/lib/mailslurp_client/models/check_email_auth_stack_results.rb +462 -0
  36. data/lib/mailslurp_client/models/check_email_blacklist_options.rb +241 -0
  37. data/lib/mailslurp_client/models/check_email_blacklist_results.rb +366 -0
  38. data/lib/mailslurp_client/models/connector_event_projection.rb +42 -42
  39. data/lib/mailslurp_client/models/connector_projection.rb +42 -42
  40. data/lib/mailslurp_client/models/contact_projection.rb +15 -15
  41. data/lib/mailslurp_client/models/create_email_audit_options.rb +394 -0
  42. data/lib/mailslurp_client/models/create_phone_number_options.rb +25 -4
  43. data/lib/mailslurp_client/models/create_phone_pool_options.rb +220 -0
  44. data/lib/mailslurp_client/models/create_phone_provisioning_job_item_options.rb +256 -0
  45. data/lib/mailslurp_client/models/create_phone_provisioning_job_options.rb +284 -0
  46. data/lib/mailslurp_client/models/dmarc_report_metadata.rb +308 -0
  47. data/lib/mailslurp_client/models/dmarc_report_source_summary.rb +274 -0
  48. data/lib/mailslurp_client/models/dns_propagation_resolver_result.rb +252 -0
  49. data/lib/mailslurp_client/models/domain_monitor_run_comparison_dto.rb +369 -0
  50. data/lib/mailslurp_client/models/domain_monitor_summary_dto.rb +248 -0
  51. data/lib/mailslurp_client/models/email_audit_analysis_result.rb +620 -0
  52. data/lib/mailslurp_client/models/email_audit_comparison_dto.rb +411 -0
  53. data/lib/mailslurp_client/models/email_audit_dto.rb +308 -0
  54. data/lib/mailslurp_client/models/email_audit_spelling_issue.rb +276 -0
  55. data/lib/mailslurp_client/models/email_audit_url_issue.rb +236 -0
  56. data/lib/mailslurp_client/models/email_blacklist_ip_result.rb +242 -0
  57. data/lib/mailslurp_client/models/email_blacklist_listing_result.rb +258 -0
  58. data/lib/mailslurp_client/models/email_header_analysis_summary.rb +242 -0
  59. data/lib/mailslurp_client/models/email_header_received_hop.rb +242 -0
  60. data/lib/mailslurp_client/models/email_projection.rb +88 -88
  61. data/lib/mailslurp_client/models/email_thread_projection.rb +54 -54
  62. data/lib/mailslurp_client/models/entity_automation_item_projection.rb +33 -33
  63. data/lib/mailslurp_client/models/entity_event_item_projection.rb +42 -42
  64. data/lib/mailslurp_client/models/entity_favourite_item_projection.rb +29 -29
  65. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +27 -27
  66. data/lib/mailslurp_client/models/generate_spf_record_options.rb +357 -0
  67. data/lib/mailslurp_client/models/generate_spf_record_results.rb +318 -0
  68. data/lib/mailslurp_client/models/get_or_create_phone_pool_options.rb +220 -0
  69. data/lib/mailslurp_client/models/group_projection.rb +15 -15
  70. data/lib/mailslurp_client/models/guest_portal_user_projection.rb +47 -47
  71. data/lib/mailslurp_client/models/imap_email_projection.rb +18 -18
  72. data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +21 -21
  73. data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +33 -33
  74. data/lib/mailslurp_client/models/list_unsubscribe_recipient_projection.rb +19 -19
  75. data/lib/mailslurp_client/models/lookup_dkim_domain_options.rb +275 -0
  76. data/lib/mailslurp_client/models/lookup_dkim_domain_results.rb +304 -0
  77. data/lib/mailslurp_client/models/lookup_ptr_options.rb +241 -0
  78. data/lib/mailslurp_client/models/lookup_ptr_results.rb +305 -0
  79. data/lib/mailslurp_client/models/lookup_spf_domain_options.rb +240 -0
  80. data/lib/mailslurp_client/models/lookup_spf_domain_results.rb +305 -0
  81. data/lib/mailslurp_client/models/missed_email_projection.rb +28 -28
  82. data/lib/mailslurp_client/models/missed_sms_projection.rb +32 -32
  83. data/lib/mailslurp_client/models/opt_in_identity_projection.rb +18 -18
  84. data/lib/mailslurp_client/models/page_ai_transform_mapping_projection.rb +19 -19
  85. data/lib/mailslurp_client/models/page_ai_transform_projection.rb +19 -19
  86. data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +19 -19
  87. data/lib/mailslurp_client/models/page_alias.rb +19 -19
  88. data/lib/mailslurp_client/models/page_alias_thread_projection.rb +19 -19
  89. data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
  90. data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
  91. data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
  92. data/lib/mailslurp_client/models/page_complaint.rb +19 -19
  93. data/lib/mailslurp_client/models/page_connector.rb +19 -19
  94. data/lib/mailslurp_client/models/page_connector_events.rb +19 -19
  95. data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
  96. data/lib/mailslurp_client/models/page_delivery_status.rb +19 -19
  97. data/lib/mailslurp_client/models/page_device_preview_run_projection.rb +19 -19
  98. data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
  99. data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
  100. data/lib/mailslurp_client/models/page_email_thread_projection.rb +19 -19
  101. data/lib/mailslurp_client/models/page_email_validation_request.rb +19 -19
  102. data/lib/mailslurp_client/models/page_entity_automation_items.rb +19 -19
  103. data/lib/mailslurp_client/models/page_entity_event_items.rb +19 -19
  104. data/lib/mailslurp_client/models/page_entity_favourite_items.rb +19 -19
  105. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
  106. data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
  107. data/lib/mailslurp_client/models/page_guest_portal_users.rb +19 -19
  108. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
  109. data/lib/mailslurp_client/models/page_inbox_forwarder_events.rb +19 -19
  110. data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
  111. data/lib/mailslurp_client/models/page_inbox_replier_dto.rb +19 -19
  112. data/lib/mailslurp_client/models/page_inbox_replier_events.rb +19 -19
  113. data/lib/mailslurp_client/models/page_inbox_tags.rb +19 -19
  114. data/lib/mailslurp_client/models/page_list_unsubscribe_recipients.rb +19 -19
  115. data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
  116. data/lib/mailslurp_client/models/page_missed_sms_projection.rb +19 -19
  117. data/lib/mailslurp_client/models/page_opt_in_identity_projection.rb +19 -19
  118. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
  119. data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +19 -19
  120. data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +19 -19
  121. data/lib/mailslurp_client/models/page_phone_number_projection.rb +19 -19
  122. data/lib/mailslurp_client/models/page_phone_number_release_projection.rb +19 -19
  123. data/lib/mailslurp_client/models/page_plus_address_projection.rb +19 -19
  124. data/lib/mailslurp_client/models/page_reputation_items.rb +19 -19
  125. data/lib/mailslurp_client/models/page_ruleset_dto.rb +19 -19
  126. data/lib/mailslurp_client/models/page_scheduled_jobs.rb +19 -19
  127. data/lib/mailslurp_client/models/page_sent_email_projection.rb +19 -19
  128. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +19 -19
  129. data/lib/mailslurp_client/models/page_sent_sms_projection.rb +19 -19
  130. data/lib/mailslurp_client/models/page_sms_projection.rb +19 -19
  131. data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
  132. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
  133. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
  134. data/lib/mailslurp_client/models/page_webhook_endpoint_projection.rb +19 -19
  135. data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
  136. data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
  137. data/lib/mailslurp_client/models/pageable_object.rb +22 -22
  138. data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +18 -18
  139. data/lib/mailslurp_client/models/phone_number_dto.rb +49 -4
  140. data/lib/mailslurp_client/models/phone_number_line_type_intelligence_dto.rb +242 -0
  141. data/lib/mailslurp_client/models/phone_number_line_type_lookup_dto.rb +286 -0
  142. data/lib/mailslurp_client/models/phone_number_projection.rb +80 -35
  143. data/lib/mailslurp_client/models/phone_number_release_projection.rb +39 -39
  144. data/lib/mailslurp_client/models/phone_pool_detail_dto.rb +334 -0
  145. data/lib/mailslurp_client/models/phone_pool_dto.rb +318 -0
  146. data/lib/mailslurp_client/models/phone_pool_lease_dto.rb +351 -0
  147. data/lib/mailslurp_client/models/phone_pool_member_dto.rb +333 -0
  148. data/lib/mailslurp_client/models/phone_provider_capabilities_result.rb +284 -0
  149. data/lib/mailslurp_client/models/phone_provisioning_job_dto.rb +434 -0
  150. data/lib/mailslurp_client/models/phone_provisioning_job_item_dto.rb +336 -0
  151. data/lib/mailslurp_client/models/phone_sms_prepaid_credit_dto.rb +340 -0
  152. data/lib/mailslurp_client/models/phone_sms_prepaid_credits_dto.rb +241 -0
  153. data/lib/mailslurp_client/models/plus_address_projection.rb +27 -27
  154. data/lib/mailslurp_client/models/recipient_projection.rb +13 -13
  155. data/lib/mailslurp_client/models/reputation_item_projection.rb +41 -41
  156. data/lib/mailslurp_client/models/search_available_phone_numbers_options.rb +377 -0
  157. data/lib/mailslurp_client/models/sender_projection.rb +13 -13
  158. data/lib/mailslurp_client/models/sent_email_projection.rb +63 -63
  159. data/lib/mailslurp_client/models/sent_sms_projection.rb +18 -18
  160. data/lib/mailslurp_client/models/sms_projection.rb +18 -18
  161. data/lib/mailslurp_client/models/smtp_auth_diagnostic_result.rb +235 -0
  162. data/lib/mailslurp_client/models/smtp_diagnostic_step.rb +236 -0
  163. data/lib/mailslurp_client/models/smtp_tls_diagnostic_result.rb +245 -0
  164. data/lib/mailslurp_client/models/sort_object.rb +10 -10
  165. data/lib/mailslurp_client/models/spf_mechanism_result.rb +229 -0
  166. data/lib/mailslurp_client/models/template_projection.rb +41 -41
  167. data/lib/mailslurp_client/models/test_smtp_server_options.rb +337 -0
  168. data/lib/mailslurp_client/models/test_smtp_server_results.rb +297 -0
  169. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +27 -27
  170. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +27 -27
  171. data/lib/mailslurp_client/models/update_phone_pool_options.rb +215 -0
  172. data/lib/mailslurp_client/models/validation_dto.rb +1 -5
  173. data/lib/mailslurp_client/models/webhook_projection.rb +45 -45
  174. data/lib/mailslurp_client/version.rb +1 -1
  175. data/lib/mailslurp_client.rb +67 -0
  176. metadata +69 -2
@@ -15,38 +15,38 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # List unsubscribe recipient
17
17
  class ListUnsubscribeRecipientProjection
18
- attr_accessor :domain_id
18
+ attr_accessor :id
19
19
 
20
20
  attr_accessor :email_address
21
21
 
22
22
  attr_accessor :created_at
23
23
 
24
- attr_accessor :id
24
+ attr_accessor :domain_id
25
25
 
26
26
  # Attribute mapping from ruby-style variable name to JSON key.
27
27
  def self.attribute_map
28
28
  {
29
- :'domain_id' => :'domainId',
29
+ :'id' => :'id',
30
30
  :'email_address' => :'emailAddress',
31
31
  :'created_at' => :'createdAt',
32
- :'id' => :'id'
32
+ :'domain_id' => :'domainId'
33
33
  }
34
34
  end
35
35
 
36
36
  # Attribute type mapping.
37
37
  def self.openapi_types
38
38
  {
39
- :'domain_id' => :'String',
39
+ :'id' => :'String',
40
40
  :'email_address' => :'String',
41
41
  :'created_at' => :'DateTime',
42
- :'id' => :'String'
42
+ :'domain_id' => :'String'
43
43
  }
44
44
  end
45
45
 
46
46
  # List of attributes with nullable: true
47
47
  def self.openapi_nullable
48
48
  Set.new([
49
- :'domain_id',
49
+ :'domain_id'
50
50
  ])
51
51
  end
52
52
 
@@ -65,8 +65,8 @@ module MailSlurpClient
65
65
  h[k.to_sym] = v
66
66
  }
67
67
 
68
- if attributes.key?(:'domain_id')
69
- self.domain_id = attributes[:'domain_id']
68
+ if attributes.key?(:'id')
69
+ self.id = attributes[:'id']
70
70
  end
71
71
 
72
72
  if attributes.key?(:'email_address')
@@ -77,8 +77,8 @@ module MailSlurpClient
77
77
  self.created_at = attributes[:'created_at']
78
78
  end
79
79
 
80
- if attributes.key?(:'id')
81
- self.id = attributes[:'id']
80
+ if attributes.key?(:'domain_id')
81
+ self.domain_id = attributes[:'domain_id']
82
82
  end
83
83
  end
84
84
 
@@ -86,6 +86,10 @@ module MailSlurpClient
86
86
  # @return Array for valid properties with the reasons
87
87
  def list_invalid_properties
88
88
  invalid_properties = Array.new
89
+ if @id.nil?
90
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
91
+ end
92
+
89
93
  if @email_address.nil?
90
94
  invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
91
95
  end
@@ -94,19 +98,15 @@ module MailSlurpClient
94
98
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
95
99
  end
96
100
 
97
- if @id.nil?
98
- invalid_properties.push('invalid value for "id", id cannot be nil.')
99
- end
100
-
101
101
  invalid_properties
102
102
  end
103
103
 
104
104
  # Check to see if the all the properties in the model are valid
105
105
  # @return true if the model is valid
106
106
  def valid?
107
+ return false if @id.nil?
107
108
  return false if @email_address.nil?
108
109
  return false if @created_at.nil?
109
- return false if @id.nil?
110
110
  true
111
111
  end
112
112
 
@@ -115,10 +115,10 @@ module MailSlurpClient
115
115
  def ==(o)
116
116
  return true if self.equal?(o)
117
117
  self.class == o.class &&
118
- domain_id == o.domain_id &&
118
+ id == o.id &&
119
119
  email_address == o.email_address &&
120
120
  created_at == o.created_at &&
121
- id == o.id
121
+ domain_id == o.domain_id
122
122
  end
123
123
 
124
124
  # @see the `==` method
@@ -130,7 +130,7 @@ module MailSlurpClient
130
130
  # Calculates hash code according to all attributes.
131
131
  # @return [Integer] Hash code
132
132
  def hash
133
- [domain_id, email_address, created_at, id].hash
133
+ [id, email_address, created_at, domain_id].hash
134
134
  end
135
135
 
136
136
  # Builds the object from hash
@@ -0,0 +1,275 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+ Contact: contact@mailslurp.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MailSlurpClient
16
+ class LookupDkimDomainOptions
17
+ # Domain to inspect for DKIM
18
+ attr_accessor :host
19
+
20
+ # Optional selector. If omitted, common selectors are probed.
21
+ attr_accessor :selector
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'host' => :'host',
27
+ :'selector' => :'selector'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.openapi_types
33
+ {
34
+ :'host' => :'String',
35
+ :'selector' => :'String'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ :'selector'
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::LookupDkimDomainOptions` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::LookupDkimDomainOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'host')
62
+ self.host = attributes[:'host']
63
+ end
64
+
65
+ if attributes.key?(:'selector')
66
+ self.selector = attributes[:'selector']
67
+ end
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properties with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = Array.new
74
+ if @host.nil?
75
+ invalid_properties.push('invalid value for "host", host cannot be nil.')
76
+ end
77
+
78
+ if @host.to_s.length > 253
79
+ invalid_properties.push('invalid value for "host", the character length must be smaller than or equal to 253.')
80
+ end
81
+
82
+ if @host.to_s.length < 0
83
+ invalid_properties.push('invalid value for "host", the character length must be great than or equal to 0.')
84
+ end
85
+
86
+ if !@selector.nil? && @selector.to_s.length > 63
87
+ invalid_properties.push('invalid value for "selector", the character length must be smaller than or equal to 63.')
88
+ end
89
+
90
+ if !@selector.nil? && @selector.to_s.length < 0
91
+ invalid_properties.push('invalid value for "selector", the character length must be great than or equal to 0.')
92
+ end
93
+
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ return false if @host.nil?
101
+ return false if @host.to_s.length > 253
102
+ return false if @host.to_s.length < 0
103
+ return false if !@selector.nil? && @selector.to_s.length > 63
104
+ return false if !@selector.nil? && @selector.to_s.length < 0
105
+ true
106
+ end
107
+
108
+ # Custom attribute writer method with validation
109
+ # @param [Object] host Value to be assigned
110
+ def host=(host)
111
+ if host.nil?
112
+ fail ArgumentError, 'host cannot be nil'
113
+ end
114
+
115
+ if host.to_s.length > 253
116
+ fail ArgumentError, 'invalid value for "host", the character length must be smaller than or equal to 253.'
117
+ end
118
+
119
+ if host.to_s.length < 0
120
+ fail ArgumentError, 'invalid value for "host", the character length must be great than or equal to 0.'
121
+ end
122
+
123
+ @host = host
124
+ end
125
+
126
+ # Custom attribute writer method with validation
127
+ # @param [Object] selector Value to be assigned
128
+ def selector=(selector)
129
+ if !selector.nil? && selector.to_s.length > 63
130
+ fail ArgumentError, 'invalid value for "selector", the character length must be smaller than or equal to 63.'
131
+ end
132
+
133
+ if !selector.nil? && selector.to_s.length < 0
134
+ fail ArgumentError, 'invalid value for "selector", the character length must be great than or equal to 0.'
135
+ end
136
+
137
+ @selector = selector
138
+ end
139
+
140
+ # Checks equality by comparing each attribute.
141
+ # @param [Object] Object to be compared
142
+ def ==(o)
143
+ return true if self.equal?(o)
144
+ self.class == o.class &&
145
+ host == o.host &&
146
+ selector == o.selector
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [host, selector].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ new.build_from_hash(attributes)
166
+ end
167
+
168
+ # Builds the object from hash
169
+ # @param [Hash] attributes Model attributes in the form of hash
170
+ # @return [Object] Returns the model itself
171
+ def build_from_hash(attributes)
172
+ return nil unless attributes.is_a?(Hash)
173
+ self.class.openapi_types.each_pair do |key, type|
174
+ if type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
178
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
179
+ end
180
+ elsif !attributes[self.class.attribute_map[key]].nil?
181
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
182
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
183
+ end
184
+
185
+ self
186
+ end
187
+
188
+ # Deserializes the data based on type
189
+ # @param string type Data type
190
+ # @param string value Value to be deserialized
191
+ # @return [Object] Deserialized data
192
+ def _deserialize(type, value)
193
+ case type.to_sym
194
+ when :DateTime
195
+ DateTime.parse(value)
196
+ when :Date
197
+ Date.parse(value)
198
+ when :String
199
+ value.to_s
200
+ when :Integer
201
+ value.to_i
202
+ when :Float
203
+ value.to_f
204
+ when :Boolean
205
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
206
+ true
207
+ else
208
+ false
209
+ end
210
+ when :Object
211
+ # generic object (usually a Hash), return directly
212
+ value
213
+ when /\AArray<(?<inner_type>.+)>\z/
214
+ inner_type = Regexp.last_match[:inner_type]
215
+ value.map { |v| _deserialize(inner_type, v) }
216
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
217
+ k_type = Regexp.last_match[:k_type]
218
+ v_type = Regexp.last_match[:v_type]
219
+ {}.tap do |hash|
220
+ value.each do |k, v|
221
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
222
+ end
223
+ end
224
+ else # model
225
+ MailSlurpClient.const_get(type).build_from_hash(value)
226
+ end
227
+ end
228
+
229
+ # Returns the string representation of the object
230
+ # @return [String] String presentation of the object
231
+ def to_s
232
+ to_hash.to_s
233
+ end
234
+
235
+ # to_body is an alias to to_hash (backward compatibility)
236
+ # @return [Hash] Returns the object in the form of hash
237
+ def to_body
238
+ to_hash
239
+ end
240
+
241
+ # Returns the object in the form of hash
242
+ # @return [Hash] Returns the object in the form of hash
243
+ def to_hash
244
+ hash = {}
245
+ self.class.attribute_map.each_pair do |attr, param|
246
+ value = self.send(attr)
247
+ if value.nil?
248
+ is_nullable = self.class.openapi_nullable.include?(attr)
249
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
250
+ end
251
+
252
+ hash[param] = _to_hash(value)
253
+ end
254
+ hash
255
+ end
256
+
257
+ # Outputs non-array value in the form of hash
258
+ # For object, use to_hash. Otherwise, just return the value
259
+ # @param [Object] value Any valid value
260
+ # @return [Hash] Returns the value in the form of hash
261
+ def _to_hash(value)
262
+ if value.is_a?(Array)
263
+ value.compact.map { |v| _to_hash(v) }
264
+ elsif value.is_a?(Hash)
265
+ {}.tap do |hash|
266
+ value.each { |k, v| hash[k] = _to_hash(v) }
267
+ end
268
+ elsif value.respond_to? :to_hash
269
+ value.to_hash
270
+ else
271
+ value
272
+ end
273
+ end
274
+ end
275
+ end
@@ -0,0 +1,304 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+ Contact: contact@mailslurp.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MailSlurpClient
16
+ class LookupDkimDomainResults
17
+ attr_accessor :valid
18
+
19
+ attr_accessor :queried_name
20
+
21
+ attr_accessor :selector
22
+
23
+ attr_accessor :record
24
+
25
+ attr_accessor :algorithm
26
+
27
+ attr_accessor :key_length
28
+
29
+ attr_accessor :checked_names
30
+
31
+ attr_accessor :warnings
32
+
33
+ attr_accessor :errors
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'valid' => :'valid',
39
+ :'queried_name' => :'queriedName',
40
+ :'selector' => :'selector',
41
+ :'record' => :'record',
42
+ :'algorithm' => :'algorithm',
43
+ :'key_length' => :'keyLength',
44
+ :'checked_names' => :'checkedNames',
45
+ :'warnings' => :'warnings',
46
+ :'errors' => :'errors'
47
+ }
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'valid' => :'Boolean',
54
+ :'queried_name' => :'String',
55
+ :'selector' => :'String',
56
+ :'record' => :'String',
57
+ :'algorithm' => :'String',
58
+ :'key_length' => :'Integer',
59
+ :'checked_names' => :'Array<String>',
60
+ :'warnings' => :'Array<String>',
61
+ :'errors' => :'Array<String>'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::LookupDkimDomainResults` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::LookupDkimDomainResults`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'valid')
87
+ self.valid = attributes[:'valid']
88
+ end
89
+
90
+ if attributes.key?(:'queried_name')
91
+ self.queried_name = attributes[:'queried_name']
92
+ end
93
+
94
+ if attributes.key?(:'selector')
95
+ self.selector = attributes[:'selector']
96
+ end
97
+
98
+ if attributes.key?(:'record')
99
+ self.record = attributes[:'record']
100
+ end
101
+
102
+ if attributes.key?(:'algorithm')
103
+ self.algorithm = attributes[:'algorithm']
104
+ end
105
+
106
+ if attributes.key?(:'key_length')
107
+ self.key_length = attributes[:'key_length']
108
+ end
109
+
110
+ if attributes.key?(:'checked_names')
111
+ if (value = attributes[:'checked_names']).is_a?(Array)
112
+ self.checked_names = value
113
+ end
114
+ end
115
+
116
+ if attributes.key?(:'warnings')
117
+ if (value = attributes[:'warnings']).is_a?(Array)
118
+ self.warnings = value
119
+ end
120
+ end
121
+
122
+ if attributes.key?(:'errors')
123
+ if (value = attributes[:'errors']).is_a?(Array)
124
+ self.errors = value
125
+ end
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ invalid_properties = Array.new
133
+ if @valid.nil?
134
+ invalid_properties.push('invalid value for "valid", valid cannot be nil.')
135
+ end
136
+
137
+ if @checked_names.nil?
138
+ invalid_properties.push('invalid value for "checked_names", checked_names cannot be nil.')
139
+ end
140
+
141
+ if @warnings.nil?
142
+ invalid_properties.push('invalid value for "warnings", warnings cannot be nil.')
143
+ end
144
+
145
+ if @errors.nil?
146
+ invalid_properties.push('invalid value for "errors", errors cannot be nil.')
147
+ end
148
+
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ return false if @valid.nil?
156
+ return false if @checked_names.nil?
157
+ return false if @warnings.nil?
158
+ return false if @errors.nil?
159
+ true
160
+ end
161
+
162
+ # Checks equality by comparing each attribute.
163
+ # @param [Object] Object to be compared
164
+ def ==(o)
165
+ return true if self.equal?(o)
166
+ self.class == o.class &&
167
+ valid == o.valid &&
168
+ queried_name == o.queried_name &&
169
+ selector == o.selector &&
170
+ record == o.record &&
171
+ algorithm == o.algorithm &&
172
+ key_length == o.key_length &&
173
+ checked_names == o.checked_names &&
174
+ warnings == o.warnings &&
175
+ errors == o.errors
176
+ end
177
+
178
+ # @see the `==` method
179
+ # @param [Object] Object to be compared
180
+ def eql?(o)
181
+ self == o
182
+ end
183
+
184
+ # Calculates hash code according to all attributes.
185
+ # @return [Integer] Hash code
186
+ def hash
187
+ [valid, queried_name, selector, record, algorithm, key_length, checked_names, warnings, errors].hash
188
+ end
189
+
190
+ # Builds the object from hash
191
+ # @param [Hash] attributes Model attributes in the form of hash
192
+ # @return [Object] Returns the model itself
193
+ def self.build_from_hash(attributes)
194
+ new.build_from_hash(attributes)
195
+ end
196
+
197
+ # Builds the object from hash
198
+ # @param [Hash] attributes Model attributes in the form of hash
199
+ # @return [Object] Returns the model itself
200
+ def build_from_hash(attributes)
201
+ return nil unless attributes.is_a?(Hash)
202
+ self.class.openapi_types.each_pair do |key, type|
203
+ if type =~ /\AArray<(.*)>/i
204
+ # check to ensure the input is an array given that the attribute
205
+ # is documented as an array but the input is not
206
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
207
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
208
+ end
209
+ elsif !attributes[self.class.attribute_map[key]].nil?
210
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
211
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
212
+ end
213
+
214
+ self
215
+ end
216
+
217
+ # Deserializes the data based on type
218
+ # @param string type Data type
219
+ # @param string value Value to be deserialized
220
+ # @return [Object] Deserialized data
221
+ def _deserialize(type, value)
222
+ case type.to_sym
223
+ when :DateTime
224
+ DateTime.parse(value)
225
+ when :Date
226
+ Date.parse(value)
227
+ when :String
228
+ value.to_s
229
+ when :Integer
230
+ value.to_i
231
+ when :Float
232
+ value.to_f
233
+ when :Boolean
234
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
235
+ true
236
+ else
237
+ false
238
+ end
239
+ when :Object
240
+ # generic object (usually a Hash), return directly
241
+ value
242
+ when /\AArray<(?<inner_type>.+)>\z/
243
+ inner_type = Regexp.last_match[:inner_type]
244
+ value.map { |v| _deserialize(inner_type, v) }
245
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
246
+ k_type = Regexp.last_match[:k_type]
247
+ v_type = Regexp.last_match[:v_type]
248
+ {}.tap do |hash|
249
+ value.each do |k, v|
250
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
251
+ end
252
+ end
253
+ else # model
254
+ MailSlurpClient.const_get(type).build_from_hash(value)
255
+ end
256
+ end
257
+
258
+ # Returns the string representation of the object
259
+ # @return [String] String presentation of the object
260
+ def to_s
261
+ to_hash.to_s
262
+ end
263
+
264
+ # to_body is an alias to to_hash (backward compatibility)
265
+ # @return [Hash] Returns the object in the form of hash
266
+ def to_body
267
+ to_hash
268
+ end
269
+
270
+ # Returns the object in the form of hash
271
+ # @return [Hash] Returns the object in the form of hash
272
+ def to_hash
273
+ hash = {}
274
+ self.class.attribute_map.each_pair do |attr, param|
275
+ value = self.send(attr)
276
+ if value.nil?
277
+ is_nullable = self.class.openapi_nullable.include?(attr)
278
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
279
+ end
280
+
281
+ hash[param] = _to_hash(value)
282
+ end
283
+ hash
284
+ end
285
+
286
+ # Outputs non-array value in the form of hash
287
+ # For object, use to_hash. Otherwise, just return the value
288
+ # @param [Object] value Any valid value
289
+ # @return [Hash] Returns the value in the form of hash
290
+ def _to_hash(value)
291
+ if value.is_a?(Array)
292
+ value.compact.map { |v| _to_hash(v) }
293
+ elsif value.is_a?(Hash)
294
+ {}.tap do |hash|
295
+ value.each { |k, v| hash[k] = _to_hash(v) }
296
+ end
297
+ elsif value.respond_to? :to_hash
298
+ value.to_hash
299
+ else
300
+ value
301
+ end
302
+ end
303
+ end
304
+ end