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
@@ -0,0 +1,318 @@
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 GenerateSpfRecordResults
17
+ attr_accessor :name
18
+
19
+ # Domain Name Server Record Types
20
+ attr_accessor :type
21
+
22
+ attr_accessor :ttl
23
+
24
+ attr_accessor :value
25
+
26
+ attr_accessor :estimated_lookup_count
27
+
28
+ attr_accessor :warnings
29
+
30
+ class EnumAttributeValidator
31
+ attr_reader :datatype
32
+ attr_reader :allowable_values
33
+
34
+ def initialize(datatype, allowable_values)
35
+ @allowable_values = allowable_values.map do |value|
36
+ case datatype.to_s
37
+ when /Integer/i
38
+ value.to_i
39
+ when /Float/i
40
+ value.to_f
41
+ else
42
+ value
43
+ end
44
+ end
45
+ end
46
+
47
+ def valid?(value)
48
+ !value || allowable_values.include?(value)
49
+ end
50
+ end
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'name' => :'name',
56
+ :'type' => :'type',
57
+ :'ttl' => :'ttl',
58
+ :'value' => :'value',
59
+ :'estimated_lookup_count' => :'estimatedLookupCount',
60
+ :'warnings' => :'warnings'
61
+ }
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.openapi_types
66
+ {
67
+ :'name' => :'String',
68
+ :'type' => :'String',
69
+ :'ttl' => :'Integer',
70
+ :'value' => :'String',
71
+ :'estimated_lookup_count' => :'Integer',
72
+ :'warnings' => :'Array<String>'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ ])
80
+ end
81
+
82
+ # Initializes the object
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ def initialize(attributes = {})
85
+ if (!attributes.is_a?(Hash))
86
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::GenerateSpfRecordResults` initialize method"
87
+ end
88
+
89
+ # check to see if the attribute exists and convert string to symbol for hash key
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!self.class.attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::GenerateSpfRecordResults`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'name')
98
+ self.name = attributes[:'name']
99
+ end
100
+
101
+ if attributes.key?(:'type')
102
+ self.type = attributes[:'type']
103
+ end
104
+
105
+ if attributes.key?(:'ttl')
106
+ self.ttl = attributes[:'ttl']
107
+ end
108
+
109
+ if attributes.key?(:'value')
110
+ self.value = attributes[:'value']
111
+ end
112
+
113
+ if attributes.key?(:'estimated_lookup_count')
114
+ self.estimated_lookup_count = attributes[:'estimated_lookup_count']
115
+ end
116
+
117
+ if attributes.key?(:'warnings')
118
+ if (value = attributes[:'warnings']).is_a?(Array)
119
+ self.warnings = value
120
+ end
121
+ end
122
+ end
123
+
124
+ # Show invalid properties with the reasons. Usually used together with valid?
125
+ # @return Array for valid properties with the reasons
126
+ def list_invalid_properties
127
+ invalid_properties = Array.new
128
+ if @name.nil?
129
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
130
+ end
131
+
132
+ if @type.nil?
133
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
134
+ end
135
+
136
+ if @ttl.nil?
137
+ invalid_properties.push('invalid value for "ttl", ttl cannot be nil.')
138
+ end
139
+
140
+ if @value.nil?
141
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
142
+ end
143
+
144
+ if @estimated_lookup_count.nil?
145
+ invalid_properties.push('invalid value for "estimated_lookup_count", estimated_lookup_count cannot be nil.')
146
+ end
147
+
148
+ if @warnings.nil?
149
+ invalid_properties.push('invalid value for "warnings", warnings cannot be nil.')
150
+ end
151
+
152
+ invalid_properties
153
+ end
154
+
155
+ # Check to see if the all the properties in the model are valid
156
+ # @return true if the model is valid
157
+ def valid?
158
+ return false if @name.nil?
159
+ return false if @type.nil?
160
+ type_validator = EnumAttributeValidator.new('String', ["A", "NS", "MD", "MF", "CNAME", "SOA", "MB", "MG", "MR", "NULL", "WKS", "PTR", "HINFO", "MINFO", "MX", "TXT", "RP", "AFSDB", "X25", "ISDN", "RT", "NSAP", "NSAP_PTR", "SIG", "KEY", "PX", "GPOS", "AAAA", "LOC", "NXT", "EID", "NIMLOC", "SRV", "ATMA", "NAPTR", "KX", "CERT", "A6", "DNAME", "SINK", "OPT", "APL", "DS", "SSHFP", "IPSECKEY", "RRSIG", "NSEC", "DNSKEY", "DHCID", "NSEC3", "NSEC3PARAM", "TLSA", "SMIMEA", "HIP", "NINFO", "RKEY", "TALINK", "CDS", "CDNSKEY", "OPENPGPKEY", "CSYNC", "ZONEMD", "SVCB", "HTTPS", "SPF", "UINFO", "UID", "GID", "UNSPEC", "NID", "L32", "L64", "LP", "EUI48", "EUI64", "TKEY", "TSIG", "IXFR", "AXFR", "MAILB", "MAILA", "ANY", "URI", "CAA", "AVC", "DOA", "AMTRELAY", "TA", "DLV"])
161
+ return false unless type_validator.valid?(@type)
162
+ return false if @ttl.nil?
163
+ return false if @value.nil?
164
+ return false if @estimated_lookup_count.nil?
165
+ return false if @warnings.nil?
166
+ true
167
+ end
168
+
169
+ # Custom attribute writer method checking allowed values (enum).
170
+ # @param [Object] type Object to be assigned
171
+ def type=(type)
172
+ validator = EnumAttributeValidator.new('String', ["A", "NS", "MD", "MF", "CNAME", "SOA", "MB", "MG", "MR", "NULL", "WKS", "PTR", "HINFO", "MINFO", "MX", "TXT", "RP", "AFSDB", "X25", "ISDN", "RT", "NSAP", "NSAP_PTR", "SIG", "KEY", "PX", "GPOS", "AAAA", "LOC", "NXT", "EID", "NIMLOC", "SRV", "ATMA", "NAPTR", "KX", "CERT", "A6", "DNAME", "SINK", "OPT", "APL", "DS", "SSHFP", "IPSECKEY", "RRSIG", "NSEC", "DNSKEY", "DHCID", "NSEC3", "NSEC3PARAM", "TLSA", "SMIMEA", "HIP", "NINFO", "RKEY", "TALINK", "CDS", "CDNSKEY", "OPENPGPKEY", "CSYNC", "ZONEMD", "SVCB", "HTTPS", "SPF", "UINFO", "UID", "GID", "UNSPEC", "NID", "L32", "L64", "LP", "EUI48", "EUI64", "TKEY", "TSIG", "IXFR", "AXFR", "MAILB", "MAILA", "ANY", "URI", "CAA", "AVC", "DOA", "AMTRELAY", "TA", "DLV"])
173
+ unless validator.valid?(type)
174
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
175
+ end
176
+ @type = type
177
+ end
178
+
179
+ # Checks equality by comparing each attribute.
180
+ # @param [Object] Object to be compared
181
+ def ==(o)
182
+ return true if self.equal?(o)
183
+ self.class == o.class &&
184
+ name == o.name &&
185
+ type == o.type &&
186
+ ttl == o.ttl &&
187
+ value == o.value &&
188
+ estimated_lookup_count == o.estimated_lookup_count &&
189
+ warnings == o.warnings
190
+ end
191
+
192
+ # @see the `==` method
193
+ # @param [Object] Object to be compared
194
+ def eql?(o)
195
+ self == o
196
+ end
197
+
198
+ # Calculates hash code according to all attributes.
199
+ # @return [Integer] Hash code
200
+ def hash
201
+ [name, type, ttl, value, estimated_lookup_count, warnings].hash
202
+ end
203
+
204
+ # Builds the object from hash
205
+ # @param [Hash] attributes Model attributes in the form of hash
206
+ # @return [Object] Returns the model itself
207
+ def self.build_from_hash(attributes)
208
+ new.build_from_hash(attributes)
209
+ end
210
+
211
+ # Builds the object from hash
212
+ # @param [Hash] attributes Model attributes in the form of hash
213
+ # @return [Object] Returns the model itself
214
+ def build_from_hash(attributes)
215
+ return nil unless attributes.is_a?(Hash)
216
+ self.class.openapi_types.each_pair do |key, type|
217
+ if type =~ /\AArray<(.*)>/i
218
+ # check to ensure the input is an array given that the attribute
219
+ # is documented as an array but the input is not
220
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
221
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
222
+ end
223
+ elsif !attributes[self.class.attribute_map[key]].nil?
224
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
225
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
226
+ end
227
+
228
+ self
229
+ end
230
+
231
+ # Deserializes the data based on type
232
+ # @param string type Data type
233
+ # @param string value Value to be deserialized
234
+ # @return [Object] Deserialized data
235
+ def _deserialize(type, value)
236
+ case type.to_sym
237
+ when :DateTime
238
+ DateTime.parse(value)
239
+ when :Date
240
+ Date.parse(value)
241
+ when :String
242
+ value.to_s
243
+ when :Integer
244
+ value.to_i
245
+ when :Float
246
+ value.to_f
247
+ when :Boolean
248
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
249
+ true
250
+ else
251
+ false
252
+ end
253
+ when :Object
254
+ # generic object (usually a Hash), return directly
255
+ value
256
+ when /\AArray<(?<inner_type>.+)>\z/
257
+ inner_type = Regexp.last_match[:inner_type]
258
+ value.map { |v| _deserialize(inner_type, v) }
259
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
260
+ k_type = Regexp.last_match[:k_type]
261
+ v_type = Regexp.last_match[:v_type]
262
+ {}.tap do |hash|
263
+ value.each do |k, v|
264
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
265
+ end
266
+ end
267
+ else # model
268
+ MailSlurpClient.const_get(type).build_from_hash(value)
269
+ end
270
+ end
271
+
272
+ # Returns the string representation of the object
273
+ # @return [String] String presentation of the object
274
+ def to_s
275
+ to_hash.to_s
276
+ end
277
+
278
+ # to_body is an alias to to_hash (backward compatibility)
279
+ # @return [Hash] Returns the object in the form of hash
280
+ def to_body
281
+ to_hash
282
+ end
283
+
284
+ # Returns the object in the form of hash
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_hash
287
+ hash = {}
288
+ self.class.attribute_map.each_pair do |attr, param|
289
+ value = self.send(attr)
290
+ if value.nil?
291
+ is_nullable = self.class.openapi_nullable.include?(attr)
292
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
293
+ end
294
+
295
+ hash[param] = _to_hash(value)
296
+ end
297
+ hash
298
+ end
299
+
300
+ # Outputs non-array value in the form of hash
301
+ # For object, use to_hash. Otherwise, just return the value
302
+ # @param [Object] value Any valid value
303
+ # @return [Hash] Returns the value in the form of hash
304
+ def _to_hash(value)
305
+ if value.is_a?(Array)
306
+ value.compact.map { |v| _to_hash(v) }
307
+ elsif value.is_a?(Hash)
308
+ {}.tap do |hash|
309
+ value.each { |k, v| hash[k] = _to_hash(v) }
310
+ end
311
+ elsif value.respond_to? :to_hash
312
+ value.to_hash
313
+ else
314
+ value
315
+ end
316
+ end
317
+ end
318
+ end
@@ -0,0 +1,220 @@
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 GetOrCreatePhonePoolOptions
17
+ attr_accessor :name
18
+
19
+ attr_accessor :description
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'name' => :'name',
25
+ :'description' => :'description'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'name' => :'String',
33
+ :'description' => :'String'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::GetOrCreatePhonePoolOptions` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::GetOrCreatePhonePoolOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'name')
59
+ self.name = attributes[:'name']
60
+ end
61
+
62
+ if attributes.key?(:'description')
63
+ self.description = attributes[:'description']
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ if @name.nil?
72
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
73
+ end
74
+
75
+ invalid_properties
76
+ end
77
+
78
+ # Check to see if the all the properties in the model are valid
79
+ # @return true if the model is valid
80
+ def valid?
81
+ return false if @name.nil?
82
+ true
83
+ end
84
+
85
+ # Checks equality by comparing each attribute.
86
+ # @param [Object] Object to be compared
87
+ def ==(o)
88
+ return true if self.equal?(o)
89
+ self.class == o.class &&
90
+ name == o.name &&
91
+ description == o.description
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [name, description].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ new.build_from_hash(attributes)
111
+ end
112
+
113
+ # Builds the object from hash
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ # @return [Object] Returns the model itself
116
+ def build_from_hash(attributes)
117
+ return nil unless attributes.is_a?(Hash)
118
+ self.class.openapi_types.each_pair do |key, type|
119
+ if type =~ /\AArray<(.*)>/i
120
+ # check to ensure the input is an array given that the attribute
121
+ # is documented as an array but the input is not
122
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
123
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
124
+ end
125
+ elsif !attributes[self.class.attribute_map[key]].nil?
126
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
128
+ end
129
+
130
+ self
131
+ end
132
+
133
+ # Deserializes the data based on type
134
+ # @param string type Data type
135
+ # @param string value Value to be deserialized
136
+ # @return [Object] Deserialized data
137
+ def _deserialize(type, value)
138
+ case type.to_sym
139
+ when :DateTime
140
+ DateTime.parse(value)
141
+ when :Date
142
+ Date.parse(value)
143
+ when :String
144
+ value.to_s
145
+ when :Integer
146
+ value.to_i
147
+ when :Float
148
+ value.to_f
149
+ when :Boolean
150
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
151
+ true
152
+ else
153
+ false
154
+ end
155
+ when :Object
156
+ # generic object (usually a Hash), return directly
157
+ value
158
+ when /\AArray<(?<inner_type>.+)>\z/
159
+ inner_type = Regexp.last_match[:inner_type]
160
+ value.map { |v| _deserialize(inner_type, v) }
161
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
162
+ k_type = Regexp.last_match[:k_type]
163
+ v_type = Regexp.last_match[:v_type]
164
+ {}.tap do |hash|
165
+ value.each do |k, v|
166
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
167
+ end
168
+ end
169
+ else # model
170
+ MailSlurpClient.const_get(type).build_from_hash(value)
171
+ end
172
+ end
173
+
174
+ # Returns the string representation of the object
175
+ # @return [String] String presentation of the object
176
+ def to_s
177
+ to_hash.to_s
178
+ end
179
+
180
+ # to_body is an alias to to_hash (backward compatibility)
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_body
183
+ to_hash
184
+ end
185
+
186
+ # Returns the object in the form of hash
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_hash
189
+ hash = {}
190
+ self.class.attribute_map.each_pair do |attr, param|
191
+ value = self.send(attr)
192
+ if value.nil?
193
+ is_nullable = self.class.openapi_nullable.include?(attr)
194
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
195
+ end
196
+
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map { |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+ end
220
+ end
@@ -15,20 +15,20 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Data for contact group
17
17
  class GroupProjection
18
- attr_accessor :created_at
19
-
20
18
  attr_accessor :name
21
19
 
22
20
  attr_accessor :id
23
21
 
22
+ attr_accessor :created_at
23
+
24
24
  attr_accessor :description
25
25
 
26
26
  # Attribute mapping from ruby-style variable name to JSON key.
27
27
  def self.attribute_map
28
28
  {
29
- :'created_at' => :'createdAt',
30
29
  :'name' => :'name',
31
30
  :'id' => :'id',
31
+ :'created_at' => :'createdAt',
32
32
  :'description' => :'description'
33
33
  }
34
34
  end
@@ -36,9 +36,9 @@ module MailSlurpClient
36
36
  # Attribute type mapping.
37
37
  def self.openapi_types
38
38
  {
39
- :'created_at' => :'DateTime',
40
39
  :'name' => :'String',
41
40
  :'id' => :'String',
41
+ :'created_at' => :'DateTime',
42
42
  :'description' => :'String'
43
43
  }
44
44
  end
@@ -65,10 +65,6 @@ module MailSlurpClient
65
65
  h[k.to_sym] = v
66
66
  }
67
67
 
68
- if attributes.key?(:'created_at')
69
- self.created_at = attributes[:'created_at']
70
- end
71
-
72
68
  if attributes.key?(:'name')
73
69
  self.name = attributes[:'name']
74
70
  end
@@ -77,6 +73,10 @@ module MailSlurpClient
77
73
  self.id = attributes[:'id']
78
74
  end
79
75
 
76
+ if attributes.key?(:'created_at')
77
+ self.created_at = attributes[:'created_at']
78
+ end
79
+
80
80
  if attributes.key?(:'description')
81
81
  self.description = attributes[:'description']
82
82
  end
@@ -86,10 +86,6 @@ 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 @created_at.nil?
90
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
91
- end
92
-
93
89
  if @name.nil?
94
90
  invalid_properties.push('invalid value for "name", name cannot be nil.')
95
91
  end
@@ -98,15 +94,19 @@ module MailSlurpClient
98
94
  invalid_properties.push('invalid value for "id", id cannot be nil.')
99
95
  end
100
96
 
97
+ if @created_at.nil?
98
+ invalid_properties.push('invalid value for "created_at", created_at 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 @created_at.nil?
108
107
  return false if @name.nil?
109
108
  return false if @id.nil?
109
+ return false if @created_at.nil?
110
110
  true
111
111
  end
112
112
 
@@ -115,9 +115,9 @@ module MailSlurpClient
115
115
  def ==(o)
116
116
  return true if self.equal?(o)
117
117
  self.class == o.class &&
118
- created_at == o.created_at &&
119
118
  name == o.name &&
120
119
  id == o.id &&
120
+ created_at == o.created_at &&
121
121
  description == o.description
122
122
  end
123
123
 
@@ -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
- [created_at, name, id, description].hash
133
+ [name, id, created_at, description].hash
134
134
  end
135
135
 
136
136
  # Builds the object from hash