mailslurp_client 17.1.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 (267) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/api_audit_log_controller_api.rb +237 -0
  3. data/lib/mailslurp_client/api/attachment_controller_api.rb +66 -0
  4. data/lib/mailslurp_client/api/bounce_controller_api.rb +126 -0
  5. data/lib/mailslurp_client/api/campaign_probe_controller_api.rb +802 -0
  6. data/lib/mailslurp_client/api/deliverability_test_controller_api.rb +1496 -0
  7. data/lib/mailslurp_client/api/device_previews_controller_api.rb +1012 -0
  8. data/lib/mailslurp_client/api/domain_controller_api.rb +63 -0
  9. data/lib/mailslurp_client/api/domain_monitor_controller_api.rb +1112 -0
  10. data/lib/mailslurp_client/api/email_audit_controller_api.rb +334 -0
  11. data/lib/mailslurp_client/api/email_controller_api.rb +394 -138
  12. data/lib/mailslurp_client/api/inbox_controller_api.rb +144 -4
  13. data/lib/mailslurp_client/api/missed_sms_controller_api.rb +221 -0
  14. data/lib/mailslurp_client/api/phone_controller_api.rb +1314 -83
  15. data/lib/mailslurp_client/api/sms_controller_api.rb +191 -0
  16. data/lib/mailslurp_client/api/tools_controller_api.rb +806 -0
  17. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +15 -15
  18. data/lib/mailslurp_client/models/acquire_phone_pool_lease_options.rb +233 -0
  19. data/lib/mailslurp_client/models/add_phone_pool_numbers_options.rb +213 -0
  20. data/lib/mailslurp_client/models/ai_transform_mapping_projection.rb +39 -39
  21. data/lib/mailslurp_client/models/ai_transform_projection.rb +28 -28
  22. data/lib/mailslurp_client/models/alias_projection.rb +48 -48
  23. data/lib/mailslurp_client/models/alias_thread_projection.rb +44 -44
  24. data/lib/mailslurp_client/models/analyze_dmarc_report_options.rb +248 -0
  25. data/lib/mailslurp_client/models/analyze_dmarc_report_results.rb +386 -0
  26. data/lib/mailslurp_client/models/analyze_email_headers_options.rb +240 -0
  27. data/lib/mailslurp_client/models/analyze_email_headers_results.rb +275 -0
  28. data/lib/mailslurp_client/models/attachment_projection.rb +50 -50
  29. data/lib/mailslurp_client/models/audit_log_event_dto.rb +343 -0
  30. data/lib/mailslurp_client/models/audit_log_page_dto.rb +222 -0
  31. data/lib/mailslurp_client/models/audit_log_search_options.rb +323 -0
  32. data/lib/mailslurp_client/models/available_phone_number_dto.rb +325 -0
  33. data/lib/mailslurp_client/models/available_phone_numbers_result.rb +236 -0
  34. data/lib/mailslurp_client/models/bounce_projection.rb +14 -14
  35. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +10 -10
  36. data/lib/mailslurp_client/models/campaign_probe_dto.rb +411 -0
  37. data/lib/mailslurp_client/models/campaign_probe_insights_dto.rb +408 -0
  38. data/lib/mailslurp_client/models/campaign_probe_run_comparison_dto.rb +397 -0
  39. data/lib/mailslurp_client/models/campaign_probe_run_dto.rb +644 -0
  40. data/lib/mailslurp_client/models/campaign_probe_run_due_result.rb +315 -0
  41. data/lib/mailslurp_client/models/campaign_probe_run_now_result.rb +225 -0
  42. data/lib/mailslurp_client/models/campaign_probe_series_dto.rb +303 -0
  43. data/lib/mailslurp_client/models/campaign_probe_series_point_dto.rb +295 -0
  44. data/lib/mailslurp_client/models/cancel_device_preview_run_options.rb +206 -0
  45. data/lib/mailslurp_client/models/cancel_device_preview_run_result.rb +248 -0
  46. data/lib/mailslurp_client/models/check_campaign_probe_options.rb +371 -0
  47. data/lib/mailslurp_client/models/check_campaign_probe_results.rb +482 -0
  48. data/lib/mailslurp_client/models/check_dns_propagation_options.rb +297 -0
  49. data/lib/mailslurp_client/models/check_dns_propagation_results.rb +361 -0
  50. data/lib/mailslurp_client/models/check_domain_monitor_options.rb +243 -0
  51. data/lib/mailslurp_client/models/check_domain_monitor_results.rb +398 -0
  52. data/lib/mailslurp_client/models/check_email_audit_options.rb +405 -0
  53. data/lib/mailslurp_client/models/check_email_auth_stack_options.rb +248 -0
  54. data/lib/mailslurp_client/models/check_email_auth_stack_results.rb +462 -0
  55. data/lib/mailslurp_client/models/check_email_blacklist_options.rb +241 -0
  56. data/lib/mailslurp_client/models/check_email_blacklist_results.rb +366 -0
  57. data/lib/mailslurp_client/models/code_candidate.rb +303 -0
  58. data/lib/mailslurp_client/models/connector_event_projection.rb +33 -33
  59. data/lib/mailslurp_client/models/connector_projection.rb +42 -42
  60. data/lib/mailslurp_client/models/contact_projection.rb +24 -24
  61. data/lib/mailslurp_client/models/create_campaign_probe_options.rb +290 -0
  62. data/lib/mailslurp_client/models/create_campaign_probe_run_options.rb +264 -0
  63. data/lib/mailslurp_client/models/create_deliverability_simulation_job_options.rb +345 -0
  64. data/lib/mailslurp_client/models/create_deliverability_test_options.rb +372 -0
  65. data/lib/mailslurp_client/models/create_device_preview_feedback_options.rb +405 -0
  66. data/lib/mailslurp_client/models/create_device_preview_options.rb +241 -0
  67. data/lib/mailslurp_client/models/create_device_preview_run_result.rb +225 -0
  68. data/lib/mailslurp_client/models/create_domain_monitor_alert_sink_options.rb +308 -0
  69. data/lib/mailslurp_client/models/create_domain_monitor_options.rb +299 -0
  70. data/lib/mailslurp_client/models/create_email_audit_options.rb +394 -0
  71. data/lib/mailslurp_client/models/create_phone_number_options.rb +25 -4
  72. data/lib/mailslurp_client/models/create_phone_pool_options.rb +220 -0
  73. data/lib/mailslurp_client/models/create_phone_provisioning_job_item_options.rb +256 -0
  74. data/lib/mailslurp_client/models/create_phone_provisioning_job_options.rb +284 -0
  75. data/lib/mailslurp_client/models/delete_device_preview_run_result.rb +253 -0
  76. data/lib/mailslurp_client/models/delete_result.rb +245 -0
  77. data/lib/mailslurp_client/models/deliverability_analytics_run_dto.rb +426 -0
  78. data/lib/mailslurp_client/models/deliverability_analytics_series_dto.rb +342 -0
  79. data/lib/mailslurp_client/models/deliverability_analytics_series_point_dto.rb +240 -0
  80. data/lib/mailslurp_client/models/deliverability_analytics_summary_dto.rb +380 -0
  81. data/lib/mailslurp_client/models/deliverability_entity_result_dto.rb +360 -0
  82. data/lib/mailslurp_client/models/deliverability_entity_result_page_dto.rb +318 -0
  83. data/lib/mailslurp_client/models/deliverability_expectation.rb +276 -0
  84. data/lib/mailslurp_client/models/deliverability_expectation_result_dto.rb +294 -0
  85. data/lib/mailslurp_client/models/deliverability_failure_entity_hotspot_dto.rb +360 -0
  86. data/lib/mailslurp_client/models/deliverability_failure_hotspots_dto.rb +302 -0
  87. data/lib/mailslurp_client/models/deliverability_failure_phone_dimension_hotspot_dto.rb +306 -0
  88. data/lib/mailslurp_client/models/deliverability_poll_status_result_dto.rb +250 -0
  89. data/lib/mailslurp_client/models/deliverability_selector_options.rb +307 -0
  90. data/lib/mailslurp_client/models/deliverability_simulation_email_options.rb +231 -0
  91. data/lib/mailslurp_client/models/deliverability_simulation_job_config_dto.rb +300 -0
  92. data/lib/mailslurp_client/models/deliverability_simulation_job_dto.rb +494 -0
  93. data/lib/mailslurp_client/models/deliverability_simulation_job_error_summary_dto.rb +224 -0
  94. data/lib/mailslurp_client/models/deliverability_simulation_job_event_dto.rb +344 -0
  95. data/lib/mailslurp_client/models/deliverability_simulation_job_event_page_dto.rb +284 -0
  96. data/lib/mailslurp_client/models/deliverability_simulation_job_top_error_dto.rb +226 -0
  97. data/lib/mailslurp_client/models/deliverability_simulation_sms_options.rb +209 -0
  98. data/lib/mailslurp_client/models/deliverability_test_dto.rb +558 -0
  99. data/lib/mailslurp_client/models/deliverability_test_page_dto.rb +270 -0
  100. data/lib/mailslurp_client/models/device_preview_feedback_dto.rb +456 -0
  101. data/lib/mailslurp_client/models/device_preview_feedback_list_dto.rb +255 -0
  102. data/lib/mailslurp_client/models/device_preview_provider_progress_dto.rb +387 -0
  103. data/lib/mailslurp_client/models/device_preview_run_dto.rb +382 -0
  104. data/lib/mailslurp_client/models/device_preview_run_results_dto.rb +243 -0
  105. data/lib/mailslurp_client/models/device_preview_screenshot_dto.rb +389 -0
  106. data/lib/mailslurp_client/models/device_preview_target_dto.rb +368 -0
  107. data/lib/mailslurp_client/models/dmarc_report_metadata.rb +308 -0
  108. data/lib/mailslurp_client/models/dmarc_report_source_summary.rb +274 -0
  109. data/lib/mailslurp_client/models/dns_propagation_resolver_result.rb +252 -0
  110. data/lib/mailslurp_client/models/domain_monitor_alert_sink_dto.rb +369 -0
  111. data/lib/mailslurp_client/models/domain_monitor_dto.rb +383 -0
  112. data/lib/mailslurp_client/models/domain_monitor_insights_dto.rb +422 -0
  113. data/lib/mailslurp_client/models/domain_monitor_run_comparison_dto.rb +369 -0
  114. data/lib/mailslurp_client/models/domain_monitor_run_dto.rb +492 -0
  115. data/lib/mailslurp_client/models/domain_monitor_run_due_result.rb +287 -0
  116. data/lib/mailslurp_client/models/domain_monitor_run_now_result.rb +225 -0
  117. data/lib/mailslurp_client/models/domain_monitor_series_dto.rb +303 -0
  118. data/lib/mailslurp_client/models/domain_monitor_series_point_dto.rb +309 -0
  119. data/lib/mailslurp_client/models/domain_monitor_summary_dto.rb +248 -0
  120. data/lib/mailslurp_client/models/domain_region_group.rb +261 -0
  121. data/lib/mailslurp_client/models/domain_region_groups_dto.rb +214 -0
  122. data/lib/mailslurp_client/models/domain_region_information.rb +338 -0
  123. data/lib/mailslurp_client/models/email_audit_analysis_result.rb +620 -0
  124. data/lib/mailslurp_client/models/email_audit_comparison_dto.rb +411 -0
  125. data/lib/mailslurp_client/models/email_audit_dto.rb +308 -0
  126. data/lib/mailslurp_client/models/email_audit_spelling_issue.rb +276 -0
  127. data/lib/mailslurp_client/models/email_audit_url_issue.rb +236 -0
  128. data/lib/mailslurp_client/models/email_blacklist_ip_result.rb +242 -0
  129. data/lib/mailslurp_client/models/email_blacklist_listing_result.rb +258 -0
  130. data/lib/mailslurp_client/models/email_header_analysis_summary.rb +242 -0
  131. data/lib/mailslurp_client/models/email_header_received_hop.rb +242 -0
  132. data/lib/mailslurp_client/models/email_projection.rb +66 -66
  133. data/lib/mailslurp_client/models/email_signature.rb +254 -0
  134. data/lib/mailslurp_client/models/email_signature_parse_result.rb +223 -0
  135. data/lib/mailslurp_client/models/email_thread_projection.rb +78 -78
  136. data/lib/mailslurp_client/models/entity_automation_item_projection.rb +27 -27
  137. data/lib/mailslurp_client/models/entity_event_item_projection.rb +45 -45
  138. data/lib/mailslurp_client/models/entity_favourite_item_projection.rb +29 -29
  139. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +27 -27
  140. data/lib/mailslurp_client/models/extract_attachment_text_options.rb +268 -0
  141. data/lib/mailslurp_client/models/extract_attachment_text_result.rb +297 -0
  142. data/lib/mailslurp_client/models/extract_codes_options.rb +304 -0
  143. data/lib/mailslurp_client/models/extract_codes_result.rb +303 -0
  144. data/lib/mailslurp_client/models/generate_spf_record_options.rb +357 -0
  145. data/lib/mailslurp_client/models/generate_spf_record_results.rb +318 -0
  146. data/lib/mailslurp_client/models/get_or_create_phone_pool_options.rb +220 -0
  147. data/lib/mailslurp_client/models/group_projection.rb +15 -15
  148. data/lib/mailslurp_client/models/guest_portal_user_projection.rb +50 -50
  149. data/lib/mailslurp_client/models/imap_email_projection.rb +18 -18
  150. data/lib/mailslurp_client/models/inbox_dto.rb +2 -2
  151. data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +21 -21
  152. data/lib/mailslurp_client/models/inbox_preview.rb +2 -2
  153. data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +33 -33
  154. data/lib/mailslurp_client/models/list_unsubscribe_recipient_projection.rb +19 -19
  155. data/lib/mailslurp_client/models/lookup_dkim_domain_options.rb +275 -0
  156. data/lib/mailslurp_client/models/lookup_dkim_domain_results.rb +304 -0
  157. data/lib/mailslurp_client/models/lookup_ptr_options.rb +241 -0
  158. data/lib/mailslurp_client/models/lookup_ptr_results.rb +305 -0
  159. data/lib/mailslurp_client/models/lookup_spf_domain_options.rb +240 -0
  160. data/lib/mailslurp_client/models/lookup_spf_domain_results.rb +305 -0
  161. data/lib/mailslurp_client/models/missed_email_projection.rb +28 -28
  162. data/lib/mailslurp_client/models/missed_sms_dto.rb +320 -0
  163. data/lib/mailslurp_client/models/missed_sms_projection.rb +282 -0
  164. data/lib/mailslurp_client/models/opt_in_identity_projection.rb +24 -24
  165. data/lib/mailslurp_client/models/organization_inbox_projection.rb +2 -2
  166. data/lib/mailslurp_client/models/page_ai_transform_mapping_projection.rb +19 -19
  167. data/lib/mailslurp_client/models/page_ai_transform_projection.rb +19 -19
  168. data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +19 -19
  169. data/lib/mailslurp_client/models/page_alias.rb +19 -19
  170. data/lib/mailslurp_client/models/page_alias_thread_projection.rb +19 -19
  171. data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
  172. data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
  173. data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
  174. data/lib/mailslurp_client/models/page_complaint.rb +19 -19
  175. data/lib/mailslurp_client/models/page_connector.rb +19 -19
  176. data/lib/mailslurp_client/models/page_connector_events.rb +19 -19
  177. data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
  178. data/lib/mailslurp_client/models/page_delivery_status.rb +19 -19
  179. data/lib/mailslurp_client/models/page_device_preview_run_projection.rb +309 -0
  180. data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
  181. data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
  182. data/lib/mailslurp_client/models/page_email_thread_projection.rb +19 -19
  183. data/lib/mailslurp_client/models/page_email_validation_request.rb +19 -19
  184. data/lib/mailslurp_client/models/page_entity_automation_items.rb +19 -19
  185. data/lib/mailslurp_client/models/page_entity_event_items.rb +19 -19
  186. data/lib/mailslurp_client/models/page_entity_favourite_items.rb +19 -19
  187. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
  188. data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
  189. data/lib/mailslurp_client/models/page_guest_portal_users.rb +19 -19
  190. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
  191. data/lib/mailslurp_client/models/page_inbox_forwarder_events.rb +19 -19
  192. data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
  193. data/lib/mailslurp_client/models/page_inbox_replier_dto.rb +19 -19
  194. data/lib/mailslurp_client/models/page_inbox_replier_events.rb +19 -19
  195. data/lib/mailslurp_client/models/page_inbox_tags.rb +19 -19
  196. data/lib/mailslurp_client/models/page_list_unsubscribe_recipients.rb +19 -19
  197. data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
  198. data/lib/mailslurp_client/models/page_missed_sms_projection.rb +309 -0
  199. data/lib/mailslurp_client/models/page_opt_in_identity_projection.rb +19 -19
  200. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
  201. data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +19 -19
  202. data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +19 -19
  203. data/lib/mailslurp_client/models/page_phone_number_projection.rb +19 -19
  204. data/lib/mailslurp_client/models/page_phone_number_release_projection.rb +19 -19
  205. data/lib/mailslurp_client/models/page_plus_address_projection.rb +19 -19
  206. data/lib/mailslurp_client/models/page_reputation_items.rb +19 -19
  207. data/lib/mailslurp_client/models/page_ruleset_dto.rb +19 -19
  208. data/lib/mailslurp_client/models/page_scheduled_jobs.rb +19 -19
  209. data/lib/mailslurp_client/models/page_sent_email_projection.rb +19 -19
  210. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +19 -19
  211. data/lib/mailslurp_client/models/page_sent_sms_projection.rb +19 -19
  212. data/lib/mailslurp_client/models/page_sms_projection.rb +19 -19
  213. data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
  214. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
  215. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
  216. data/lib/mailslurp_client/models/page_webhook_endpoint_projection.rb +19 -19
  217. data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
  218. data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
  219. data/lib/mailslurp_client/models/pageable_object.rb +22 -22
  220. data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +18 -18
  221. data/lib/mailslurp_client/models/phone_number_dto.rb +49 -4
  222. data/lib/mailslurp_client/models/phone_number_line_type_intelligence_dto.rb +242 -0
  223. data/lib/mailslurp_client/models/phone_number_line_type_lookup_dto.rb +286 -0
  224. data/lib/mailslurp_client/models/phone_number_projection.rb +81 -36
  225. data/lib/mailslurp_client/models/phone_number_release_projection.rb +39 -39
  226. data/lib/mailslurp_client/models/phone_pool_detail_dto.rb +334 -0
  227. data/lib/mailslurp_client/models/phone_pool_dto.rb +318 -0
  228. data/lib/mailslurp_client/models/phone_pool_lease_dto.rb +351 -0
  229. data/lib/mailslurp_client/models/phone_pool_member_dto.rb +333 -0
  230. data/lib/mailslurp_client/models/phone_provider_capabilities_result.rb +284 -0
  231. data/lib/mailslurp_client/models/phone_provisioning_job_dto.rb +434 -0
  232. data/lib/mailslurp_client/models/phone_provisioning_job_item_dto.rb +336 -0
  233. data/lib/mailslurp_client/models/phone_sms_prepaid_credit_dto.rb +340 -0
  234. data/lib/mailslurp_client/models/phone_sms_prepaid_credits_dto.rb +241 -0
  235. data/lib/mailslurp_client/models/plus_address_projection.rb +32 -32
  236. data/lib/mailslurp_client/models/recipient_projection.rb +13 -13
  237. data/lib/mailslurp_client/models/reputation_item_projection.rb +41 -41
  238. data/lib/mailslurp_client/models/search_available_phone_numbers_options.rb +377 -0
  239. data/lib/mailslurp_client/models/search_inboxes_options.rb +1 -1
  240. data/lib/mailslurp_client/models/sender_projection.rb +13 -13
  241. data/lib/mailslurp_client/models/sent_email_projection.rb +50 -50
  242. data/lib/mailslurp_client/models/sent_sms_projection.rb +18 -18
  243. data/lib/mailslurp_client/models/sms_projection.rb +18 -18
  244. data/lib/mailslurp_client/models/smtp_auth_diagnostic_result.rb +235 -0
  245. data/lib/mailslurp_client/models/smtp_diagnostic_step.rb +236 -0
  246. data/lib/mailslurp_client/models/smtp_tls_diagnostic_result.rb +245 -0
  247. data/lib/mailslurp_client/models/sort_object.rb +10 -10
  248. data/lib/mailslurp_client/models/spf_mechanism_result.rb +229 -0
  249. data/lib/mailslurp_client/models/template_projection.rb +41 -41
  250. data/lib/mailslurp_client/models/tenant_reputation_finding_dto.rb +322 -0
  251. data/lib/mailslurp_client/models/tenant_reputation_findings_dto.rb +241 -0
  252. data/lib/mailslurp_client/models/tenant_reputation_status_row_dto.rb +372 -0
  253. data/lib/mailslurp_client/models/tenant_reputation_status_summary_dto.rb +241 -0
  254. data/lib/mailslurp_client/models/test_smtp_server_options.rb +337 -0
  255. data/lib/mailslurp_client/models/test_smtp_server_results.rb +297 -0
  256. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +27 -27
  257. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +27 -27
  258. data/lib/mailslurp_client/models/update_campaign_probe_options.rb +290 -0
  259. data/lib/mailslurp_client/models/update_deliverability_test_options.rb +327 -0
  260. data/lib/mailslurp_client/models/update_device_preview_feedback_options.rb +314 -0
  261. data/lib/mailslurp_client/models/update_domain_monitor_options.rb +266 -0
  262. data/lib/mailslurp_client/models/update_phone_pool_options.rb +215 -0
  263. data/lib/mailslurp_client/models/validation_dto.rb +1 -5
  264. data/lib/mailslurp_client/models/webhook_projection.rb +39 -39
  265. data/lib/mailslurp_client/version.rb +1 -1
  266. data/lib/mailslurp_client.rb +156 -0
  267. metadata +158 -2
@@ -0,0 +1,299 @@
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
+ # Create options for a domain monitor
17
+ class CreateDomainMonitorOptions
18
+ attr_accessor :domain
19
+
20
+ # Optional display name
21
+ attr_accessor :name
22
+
23
+ # Check interval in seconds
24
+ attr_accessor :interval_seconds
25
+
26
+ # Whether scheduled monitor runs are enabled (legacy alias for schedulingEnabled)
27
+ attr_accessor :enabled
28
+
29
+ # Whether scheduled monitor runs are enabled. Direct run-now is always permitted.
30
+ attr_accessor :scheduling_enabled
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'domain' => :'domain',
36
+ :'name' => :'name',
37
+ :'interval_seconds' => :'intervalSeconds',
38
+ :'enabled' => :'enabled',
39
+ :'scheduling_enabled' => :'schedulingEnabled'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'domain' => :'String',
47
+ :'name' => :'String',
48
+ :'interval_seconds' => :'Integer',
49
+ :'enabled' => :'Boolean',
50
+ :'scheduling_enabled' => :'Boolean'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ :'name',
58
+ :'interval_seconds',
59
+ :'enabled',
60
+ :'scheduling_enabled'
61
+ ])
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::CreateDomainMonitorOptions` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!self.class.attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::CreateDomainMonitorOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'domain')
80
+ self.domain = attributes[:'domain']
81
+ end
82
+
83
+ if attributes.key?(:'name')
84
+ self.name = attributes[:'name']
85
+ end
86
+
87
+ if attributes.key?(:'interval_seconds')
88
+ self.interval_seconds = attributes[:'interval_seconds']
89
+ end
90
+
91
+ if attributes.key?(:'enabled')
92
+ self.enabled = attributes[:'enabled']
93
+ end
94
+
95
+ if attributes.key?(:'scheduling_enabled')
96
+ self.scheduling_enabled = attributes[:'scheduling_enabled']
97
+ end
98
+ end
99
+
100
+ # Show invalid properties with the reasons. Usually used together with valid?
101
+ # @return Array for valid properties with the reasons
102
+ def list_invalid_properties
103
+ invalid_properties = Array.new
104
+ if @domain.nil?
105
+ invalid_properties.push('invalid value for "domain", domain cannot be nil.')
106
+ end
107
+
108
+ if @domain.to_s.length < 1
109
+ invalid_properties.push('invalid value for "domain", the character length must be great than or equal to 1.')
110
+ end
111
+
112
+ if !@interval_seconds.nil? && @interval_seconds > 604800
113
+ invalid_properties.push('invalid value for "interval_seconds", must be smaller than or equal to 604800.')
114
+ end
115
+
116
+ if !@interval_seconds.nil? && @interval_seconds < 60
117
+ invalid_properties.push('invalid value for "interval_seconds", must be greater than or equal to 60.')
118
+ end
119
+
120
+ invalid_properties
121
+ end
122
+
123
+ # Check to see if the all the properties in the model are valid
124
+ # @return true if the model is valid
125
+ def valid?
126
+ return false if @domain.nil?
127
+ return false if @domain.to_s.length < 1
128
+ return false if !@interval_seconds.nil? && @interval_seconds > 604800
129
+ return false if !@interval_seconds.nil? && @interval_seconds < 60
130
+ true
131
+ end
132
+
133
+ # Custom attribute writer method with validation
134
+ # @param [Object] domain Value to be assigned
135
+ def domain=(domain)
136
+ if domain.nil?
137
+ fail ArgumentError, 'domain cannot be nil'
138
+ end
139
+
140
+ if domain.to_s.length < 1
141
+ fail ArgumentError, 'invalid value for "domain", the character length must be great than or equal to 1.'
142
+ end
143
+
144
+ @domain = domain
145
+ end
146
+
147
+ # Custom attribute writer method with validation
148
+ # @param [Object] interval_seconds Value to be assigned
149
+ def interval_seconds=(interval_seconds)
150
+ if !interval_seconds.nil? && interval_seconds > 604800
151
+ fail ArgumentError, 'invalid value for "interval_seconds", must be smaller than or equal to 604800.'
152
+ end
153
+
154
+ if !interval_seconds.nil? && interval_seconds < 60
155
+ fail ArgumentError, 'invalid value for "interval_seconds", must be greater than or equal to 60.'
156
+ end
157
+
158
+ @interval_seconds = interval_seconds
159
+ end
160
+
161
+ # Checks equality by comparing each attribute.
162
+ # @param [Object] Object to be compared
163
+ def ==(o)
164
+ return true if self.equal?(o)
165
+ self.class == o.class &&
166
+ domain == o.domain &&
167
+ name == o.name &&
168
+ interval_seconds == o.interval_seconds &&
169
+ enabled == o.enabled &&
170
+ scheduling_enabled == o.scheduling_enabled
171
+ end
172
+
173
+ # @see the `==` method
174
+ # @param [Object] Object to be compared
175
+ def eql?(o)
176
+ self == o
177
+ end
178
+
179
+ # Calculates hash code according to all attributes.
180
+ # @return [Integer] Hash code
181
+ def hash
182
+ [domain, name, interval_seconds, enabled, scheduling_enabled].hash
183
+ end
184
+
185
+ # Builds the object from hash
186
+ # @param [Hash] attributes Model attributes in the form of hash
187
+ # @return [Object] Returns the model itself
188
+ def self.build_from_hash(attributes)
189
+ new.build_from_hash(attributes)
190
+ end
191
+
192
+ # Builds the object from hash
193
+ # @param [Hash] attributes Model attributes in the form of hash
194
+ # @return [Object] Returns the model itself
195
+ def build_from_hash(attributes)
196
+ return nil unless attributes.is_a?(Hash)
197
+ self.class.openapi_types.each_pair do |key, type|
198
+ if type =~ /\AArray<(.*)>/i
199
+ # check to ensure the input is an array given that the attribute
200
+ # is documented as an array but the input is not
201
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
202
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
203
+ end
204
+ elsif !attributes[self.class.attribute_map[key]].nil?
205
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
206
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
207
+ end
208
+
209
+ self
210
+ end
211
+
212
+ # Deserializes the data based on type
213
+ # @param string type Data type
214
+ # @param string value Value to be deserialized
215
+ # @return [Object] Deserialized data
216
+ def _deserialize(type, value)
217
+ case type.to_sym
218
+ when :DateTime
219
+ DateTime.parse(value)
220
+ when :Date
221
+ Date.parse(value)
222
+ when :String
223
+ value.to_s
224
+ when :Integer
225
+ value.to_i
226
+ when :Float
227
+ value.to_f
228
+ when :Boolean
229
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
230
+ true
231
+ else
232
+ false
233
+ end
234
+ when :Object
235
+ # generic object (usually a Hash), return directly
236
+ value
237
+ when /\AArray<(?<inner_type>.+)>\z/
238
+ inner_type = Regexp.last_match[:inner_type]
239
+ value.map { |v| _deserialize(inner_type, v) }
240
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
241
+ k_type = Regexp.last_match[:k_type]
242
+ v_type = Regexp.last_match[:v_type]
243
+ {}.tap do |hash|
244
+ value.each do |k, v|
245
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
246
+ end
247
+ end
248
+ else # model
249
+ MailSlurpClient.const_get(type).build_from_hash(value)
250
+ end
251
+ end
252
+
253
+ # Returns the string representation of the object
254
+ # @return [String] String presentation of the object
255
+ def to_s
256
+ to_hash.to_s
257
+ end
258
+
259
+ # to_body is an alias to to_hash (backward compatibility)
260
+ # @return [Hash] Returns the object in the form of hash
261
+ def to_body
262
+ to_hash
263
+ end
264
+
265
+ # Returns the object in the form of hash
266
+ # @return [Hash] Returns the object in the form of hash
267
+ def to_hash
268
+ hash = {}
269
+ self.class.attribute_map.each_pair do |attr, param|
270
+ value = self.send(attr)
271
+ if value.nil?
272
+ is_nullable = self.class.openapi_nullable.include?(attr)
273
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
274
+ end
275
+
276
+ hash[param] = _to_hash(value)
277
+ end
278
+ hash
279
+ end
280
+
281
+ # Outputs non-array value in the form of hash
282
+ # For object, use to_hash. Otherwise, just return the value
283
+ # @param [Object] value Any valid value
284
+ # @return [Hash] Returns the value in the form of hash
285
+ def _to_hash(value)
286
+ if value.is_a?(Array)
287
+ value.compact.map { |v| _to_hash(v) }
288
+ elsif value.is_a?(Hash)
289
+ {}.tap do |hash|
290
+ value.each { |k, v| hash[k] = _to_hash(v) }
291
+ end
292
+ elsif value.respond_to? :to_hash
293
+ value.to_hash
294
+ else
295
+ value
296
+ end
297
+ end
298
+ end
299
+ end
@@ -0,0 +1,394 @@
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
+ # Authenticated saved email audit request
17
+ class CreateEmailAuditOptions
18
+ # Optional sender address context
19
+ attr_accessor :from_address
20
+
21
+ # Optional recipient context
22
+ attr_accessor :recipient
23
+
24
+ # Optional subject line context
25
+ attr_accessor :subject
26
+
27
+ # Optional HTML email body
28
+ attr_accessor :html_body
29
+
30
+ # Optional text email body
31
+ attr_accessor :text_body
32
+
33
+ attr_accessor :email_analysis
34
+
35
+ # Whether the source email included attachments
36
+ attr_accessor :has_attachments
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'from_address' => :'fromAddress',
42
+ :'recipient' => :'recipient',
43
+ :'subject' => :'subject',
44
+ :'html_body' => :'htmlBody',
45
+ :'text_body' => :'textBody',
46
+ :'email_analysis' => :'emailAnalysis',
47
+ :'has_attachments' => :'hasAttachments'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'from_address' => :'String',
55
+ :'recipient' => :'String',
56
+ :'subject' => :'String',
57
+ :'html_body' => :'String',
58
+ :'text_body' => :'String',
59
+ :'email_analysis' => :'EmailAnalysis',
60
+ :'has_attachments' => :'Boolean'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ :'from_address',
68
+ :'recipient',
69
+ :'subject',
70
+ :'html_body',
71
+ :'text_body',
72
+ :'email_analysis',
73
+ :'has_attachments'
74
+ ])
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::CreateEmailAuditOptions` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!self.class.attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::CreateEmailAuditOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'from_address')
93
+ self.from_address = attributes[:'from_address']
94
+ end
95
+
96
+ if attributes.key?(:'recipient')
97
+ self.recipient = attributes[:'recipient']
98
+ end
99
+
100
+ if attributes.key?(:'subject')
101
+ self.subject = attributes[:'subject']
102
+ end
103
+
104
+ if attributes.key?(:'html_body')
105
+ self.html_body = attributes[:'html_body']
106
+ end
107
+
108
+ if attributes.key?(:'text_body')
109
+ self.text_body = attributes[:'text_body']
110
+ end
111
+
112
+ if attributes.key?(:'email_analysis')
113
+ self.email_analysis = attributes[:'email_analysis']
114
+ end
115
+
116
+ if attributes.key?(:'has_attachments')
117
+ self.has_attachments = attributes[:'has_attachments']
118
+ end
119
+ end
120
+
121
+ # Show invalid properties with the reasons. Usually used together with valid?
122
+ # @return Array for valid properties with the reasons
123
+ def list_invalid_properties
124
+ invalid_properties = Array.new
125
+ if !@from_address.nil? && @from_address.to_s.length > 320
126
+ invalid_properties.push('invalid value for "from_address", the character length must be smaller than or equal to 320.')
127
+ end
128
+
129
+ if !@from_address.nil? && @from_address.to_s.length < 0
130
+ invalid_properties.push('invalid value for "from_address", the character length must be great than or equal to 0.')
131
+ end
132
+
133
+ if !@recipient.nil? && @recipient.to_s.length > 320
134
+ invalid_properties.push('invalid value for "recipient", the character length must be smaller than or equal to 320.')
135
+ end
136
+
137
+ if !@recipient.nil? && @recipient.to_s.length < 0
138
+ invalid_properties.push('invalid value for "recipient", the character length must be great than or equal to 0.')
139
+ end
140
+
141
+ if !@subject.nil? && @subject.to_s.length > 998
142
+ invalid_properties.push('invalid value for "subject", the character length must be smaller than or equal to 998.')
143
+ end
144
+
145
+ if !@subject.nil? && @subject.to_s.length < 0
146
+ invalid_properties.push('invalid value for "subject", the character length must be great than or equal to 0.')
147
+ end
148
+
149
+ if !@html_body.nil? && @html_body.to_s.length > 200000
150
+ invalid_properties.push('invalid value for "html_body", the character length must be smaller than or equal to 200000.')
151
+ end
152
+
153
+ if !@html_body.nil? && @html_body.to_s.length < 0
154
+ invalid_properties.push('invalid value for "html_body", the character length must be great than or equal to 0.')
155
+ end
156
+
157
+ if !@text_body.nil? && @text_body.to_s.length > 200000
158
+ invalid_properties.push('invalid value for "text_body", the character length must be smaller than or equal to 200000.')
159
+ end
160
+
161
+ if !@text_body.nil? && @text_body.to_s.length < 0
162
+ invalid_properties.push('invalid value for "text_body", the character length must be great than or equal to 0.')
163
+ end
164
+
165
+ invalid_properties
166
+ end
167
+
168
+ # Check to see if the all the properties in the model are valid
169
+ # @return true if the model is valid
170
+ def valid?
171
+ return false if !@from_address.nil? && @from_address.to_s.length > 320
172
+ return false if !@from_address.nil? && @from_address.to_s.length < 0
173
+ return false if !@recipient.nil? && @recipient.to_s.length > 320
174
+ return false if !@recipient.nil? && @recipient.to_s.length < 0
175
+ return false if !@subject.nil? && @subject.to_s.length > 998
176
+ return false if !@subject.nil? && @subject.to_s.length < 0
177
+ return false if !@html_body.nil? && @html_body.to_s.length > 200000
178
+ return false if !@html_body.nil? && @html_body.to_s.length < 0
179
+ return false if !@text_body.nil? && @text_body.to_s.length > 200000
180
+ return false if !@text_body.nil? && @text_body.to_s.length < 0
181
+ true
182
+ end
183
+
184
+ # Custom attribute writer method with validation
185
+ # @param [Object] from_address Value to be assigned
186
+ def from_address=(from_address)
187
+ if !from_address.nil? && from_address.to_s.length > 320
188
+ fail ArgumentError, 'invalid value for "from_address", the character length must be smaller than or equal to 320.'
189
+ end
190
+
191
+ if !from_address.nil? && from_address.to_s.length < 0
192
+ fail ArgumentError, 'invalid value for "from_address", the character length must be great than or equal to 0.'
193
+ end
194
+
195
+ @from_address = from_address
196
+ end
197
+
198
+ # Custom attribute writer method with validation
199
+ # @param [Object] recipient Value to be assigned
200
+ def recipient=(recipient)
201
+ if !recipient.nil? && recipient.to_s.length > 320
202
+ fail ArgumentError, 'invalid value for "recipient", the character length must be smaller than or equal to 320.'
203
+ end
204
+
205
+ if !recipient.nil? && recipient.to_s.length < 0
206
+ fail ArgumentError, 'invalid value for "recipient", the character length must be great than or equal to 0.'
207
+ end
208
+
209
+ @recipient = recipient
210
+ end
211
+
212
+ # Custom attribute writer method with validation
213
+ # @param [Object] subject Value to be assigned
214
+ def subject=(subject)
215
+ if !subject.nil? && subject.to_s.length > 998
216
+ fail ArgumentError, 'invalid value for "subject", the character length must be smaller than or equal to 998.'
217
+ end
218
+
219
+ if !subject.nil? && subject.to_s.length < 0
220
+ fail ArgumentError, 'invalid value for "subject", the character length must be great than or equal to 0.'
221
+ end
222
+
223
+ @subject = subject
224
+ end
225
+
226
+ # Custom attribute writer method with validation
227
+ # @param [Object] html_body Value to be assigned
228
+ def html_body=(html_body)
229
+ if !html_body.nil? && html_body.to_s.length > 200000
230
+ fail ArgumentError, 'invalid value for "html_body", the character length must be smaller than or equal to 200000.'
231
+ end
232
+
233
+ if !html_body.nil? && html_body.to_s.length < 0
234
+ fail ArgumentError, 'invalid value for "html_body", the character length must be great than or equal to 0.'
235
+ end
236
+
237
+ @html_body = html_body
238
+ end
239
+
240
+ # Custom attribute writer method with validation
241
+ # @param [Object] text_body Value to be assigned
242
+ def text_body=(text_body)
243
+ if !text_body.nil? && text_body.to_s.length > 200000
244
+ fail ArgumentError, 'invalid value for "text_body", the character length must be smaller than or equal to 200000.'
245
+ end
246
+
247
+ if !text_body.nil? && text_body.to_s.length < 0
248
+ fail ArgumentError, 'invalid value for "text_body", the character length must be great than or equal to 0.'
249
+ end
250
+
251
+ @text_body = text_body
252
+ end
253
+
254
+ # Checks equality by comparing each attribute.
255
+ # @param [Object] Object to be compared
256
+ def ==(o)
257
+ return true if self.equal?(o)
258
+ self.class == o.class &&
259
+ from_address == o.from_address &&
260
+ recipient == o.recipient &&
261
+ subject == o.subject &&
262
+ html_body == o.html_body &&
263
+ text_body == o.text_body &&
264
+ email_analysis == o.email_analysis &&
265
+ has_attachments == o.has_attachments
266
+ end
267
+
268
+ # @see the `==` method
269
+ # @param [Object] Object to be compared
270
+ def eql?(o)
271
+ self == o
272
+ end
273
+
274
+ # Calculates hash code according to all attributes.
275
+ # @return [Integer] Hash code
276
+ def hash
277
+ [from_address, recipient, subject, html_body, text_body, email_analysis, has_attachments].hash
278
+ end
279
+
280
+ # Builds the object from hash
281
+ # @param [Hash] attributes Model attributes in the form of hash
282
+ # @return [Object] Returns the model itself
283
+ def self.build_from_hash(attributes)
284
+ new.build_from_hash(attributes)
285
+ end
286
+
287
+ # Builds the object from hash
288
+ # @param [Hash] attributes Model attributes in the form of hash
289
+ # @return [Object] Returns the model itself
290
+ def build_from_hash(attributes)
291
+ return nil unless attributes.is_a?(Hash)
292
+ self.class.openapi_types.each_pair do |key, type|
293
+ if type =~ /\AArray<(.*)>/i
294
+ # check to ensure the input is an array given that the attribute
295
+ # is documented as an array but the input is not
296
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
297
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
298
+ end
299
+ elsif !attributes[self.class.attribute_map[key]].nil?
300
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
301
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
302
+ end
303
+
304
+ self
305
+ end
306
+
307
+ # Deserializes the data based on type
308
+ # @param string type Data type
309
+ # @param string value Value to be deserialized
310
+ # @return [Object] Deserialized data
311
+ def _deserialize(type, value)
312
+ case type.to_sym
313
+ when :DateTime
314
+ DateTime.parse(value)
315
+ when :Date
316
+ Date.parse(value)
317
+ when :String
318
+ value.to_s
319
+ when :Integer
320
+ value.to_i
321
+ when :Float
322
+ value.to_f
323
+ when :Boolean
324
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
325
+ true
326
+ else
327
+ false
328
+ end
329
+ when :Object
330
+ # generic object (usually a Hash), return directly
331
+ value
332
+ when /\AArray<(?<inner_type>.+)>\z/
333
+ inner_type = Regexp.last_match[:inner_type]
334
+ value.map { |v| _deserialize(inner_type, v) }
335
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
336
+ k_type = Regexp.last_match[:k_type]
337
+ v_type = Regexp.last_match[:v_type]
338
+ {}.tap do |hash|
339
+ value.each do |k, v|
340
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
341
+ end
342
+ end
343
+ else # model
344
+ MailSlurpClient.const_get(type).build_from_hash(value)
345
+ end
346
+ end
347
+
348
+ # Returns the string representation of the object
349
+ # @return [String] String presentation of the object
350
+ def to_s
351
+ to_hash.to_s
352
+ end
353
+
354
+ # to_body is an alias to to_hash (backward compatibility)
355
+ # @return [Hash] Returns the object in the form of hash
356
+ def to_body
357
+ to_hash
358
+ end
359
+
360
+ # Returns the object in the form of hash
361
+ # @return [Hash] Returns the object in the form of hash
362
+ def to_hash
363
+ hash = {}
364
+ self.class.attribute_map.each_pair do |attr, param|
365
+ value = self.send(attr)
366
+ if value.nil?
367
+ is_nullable = self.class.openapi_nullable.include?(attr)
368
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
369
+ end
370
+
371
+ hash[param] = _to_hash(value)
372
+ end
373
+ hash
374
+ end
375
+
376
+ # Outputs non-array value in the form of hash
377
+ # For object, use to_hash. Otherwise, just return the value
378
+ # @param [Object] value Any valid value
379
+ # @return [Hash] Returns the value in the form of hash
380
+ def _to_hash(value)
381
+ if value.is_a?(Array)
382
+ value.compact.map { |v| _to_hash(v) }
383
+ elsif value.is_a?(Hash)
384
+ {}.tap do |hash|
385
+ value.each { |k, v| hash[k] = _to_hash(v) }
386
+ end
387
+ elsif value.respond_to? :to_hash
388
+ value.to_hash
389
+ else
390
+ value
391
+ end
392
+ end
393
+ end
394
+ end