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