mailsafepro 1.0.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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +256 -0
- data/Rakefile +10 -0
- data/docs/APIKeyCreateRequest.md +20 -0
- data/docs/APIKeyListResponse.md +22 -0
- data/docs/APIKeyMeta.md +34 -0
- data/docs/APIKeysApi.md +1241 -0
- data/docs/AuthenticationApi.md +1171 -0
- data/docs/BatchEmailResponse.md +28 -0
- data/docs/BatchValidationRequest.md +26 -0
- data/docs/BillingApi.md +689 -0
- data/docs/BodyChangePlanBillingBillingChangePlanPost.md +18 -0
- data/docs/CheckoutRequest.md +18 -0
- data/docs/CheckoutSessionResponse.md +18 -0
- data/docs/DNSInfo.md +26 -0
- data/docs/DNSRecordDKIM.md +26 -0
- data/docs/DNSRecordDMARC.md +24 -0
- data/docs/DNSRecordSPF.md +24 -0
- data/docs/DefaultApi.md +141 -0
- data/docs/DeveloperToolsApi.md +154 -0
- data/docs/EmailResponse.md +46 -0
- data/docs/EmailValidationApi.md +479 -0
- data/docs/EmailValidationRequest.md +26 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/HealthApi.md +937 -0
- data/docs/JobCreateRequest.md +32 -0
- data/docs/JobCreateResponse.md +22 -0
- data/docs/JobResultEntry.md +34 -0
- data/docs/JobResultsPage.md +26 -0
- data/docs/JobStatusResponse.md +28 -0
- data/docs/JobsApi.md +433 -0
- data/docs/KeyRotationRequest.md +22 -0
- data/docs/LogsApi.md +154 -0
- data/docs/PlanEnum.md +15 -0
- data/docs/PriorityEnum.md +15 -0
- data/docs/RegisterEndpoint.md +18 -0
- data/docs/ResponseTestNotificationBillingBillingTestNotificationPostValue.md +15 -0
- data/docs/RiskLevelEnum.md +15 -0
- data/docs/RotateSecret.md +18 -0
- data/docs/SMTPInfo.md +26 -0
- data/docs/SubscriptionResponse.md +24 -0
- data/docs/UserLogin.md +20 -0
- data/docs/UserRegister.md +22 -0
- data/docs/ValidationApi.md +479 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/WebhookCreate.md +24 -0
- data/docs/WebhookResponse.md +22 -0
- data/docs/WebhookUpdate.md +24 -0
- data/docs/WebhooksApi.md +776 -0
- data/docs/WebhooksManagementApi.md +500 -0
- data/git_push.sh +57 -0
- data/lib/mailsafepro/api/api_keys_api.rb +1148 -0
- data/lib/mailsafepro/api/authentication_api.rb +1114 -0
- data/lib/mailsafepro/api/billing_api.rb +670 -0
- data/lib/mailsafepro/api/default_api.rb +149 -0
- data/lib/mailsafepro/api/developer_tools_api.rb +155 -0
- data/lib/mailsafepro/api/email_validation_api.rb +486 -0
- data/lib/mailsafepro/api/health_api.rb +877 -0
- data/lib/mailsafepro/api/jobs_api.rb +452 -0
- data/lib/mailsafepro/api/logs_api.rb +155 -0
- data/lib/mailsafepro/api/validation_api.rb +486 -0
- data/lib/mailsafepro/api/webhooks_api.rb +768 -0
- data/lib/mailsafepro/api/webhooks_management_api.rb +480 -0
- data/lib/mailsafepro/api_client.rb +397 -0
- data/lib/mailsafepro/api_error.rb +58 -0
- data/lib/mailsafepro/api_model_base.rb +88 -0
- data/lib/mailsafepro/configuration.rb +316 -0
- data/lib/mailsafepro/models/api_key_create_request.rb +185 -0
- data/lib/mailsafepro/models/api_key_list_response.rb +240 -0
- data/lib/mailsafepro/models/api_key_meta.rb +338 -0
- data/lib/mailsafepro/models/batch_email_response.rb +348 -0
- data/lib/mailsafepro/models/batch_validation_request.rb +290 -0
- data/lib/mailsafepro/models/body_change_plan_billing_billing_change_plan_post.rb +164 -0
- data/lib/mailsafepro/models/checkout_request.rb +166 -0
- data/lib/mailsafepro/models/checkout_session_response.rb +165 -0
- data/lib/mailsafepro/models/dns_info.rb +193 -0
- data/lib/mailsafepro/models/dns_record_dkim.rb +189 -0
- data/lib/mailsafepro/models/dns_record_dmarc.rb +179 -0
- data/lib/mailsafepro/models/dns_record_spf.rb +179 -0
- data/lib/mailsafepro/models/email_response.rb +454 -0
- data/lib/mailsafepro/models/email_validation_request.rb +252 -0
- data/lib/mailsafepro/models/http_validation_error.rb +149 -0
- data/lib/mailsafepro/models/job_create_request.rb +251 -0
- data/lib/mailsafepro/models/job_create_response.rb +216 -0
- data/lib/mailsafepro/models/job_result_entry.rb +257 -0
- data/lib/mailsafepro/models/job_results_page.rb +270 -0
- data/lib/mailsafepro/models/job_status_response.rb +231 -0
- data/lib/mailsafepro/models/key_rotation_request.rb +269 -0
- data/lib/mailsafepro/models/plan_enum.rb +41 -0
- data/lib/mailsafepro/models/priority_enum.rb +41 -0
- data/lib/mailsafepro/models/register_endpoint.rb +173 -0
- data/lib/mailsafepro/models/response_test_notification_billing_billing_test_notification_post_value.rb +103 -0
- data/lib/mailsafepro/models/risk_level_enum.rb +42 -0
- data/lib/mailsafepro/models/rotate_secret.rb +164 -0
- data/lib/mailsafepro/models/smtp_info.rb +206 -0
- data/lib/mailsafepro/models/subscription_response.rb +196 -0
- data/lib/mailsafepro/models/user_login.rb +211 -0
- data/lib/mailsafepro/models/user_register.rb +243 -0
- data/lib/mailsafepro/models/validation_error.rb +218 -0
- data/lib/mailsafepro/models/validation_error_loc_inner.rb +103 -0
- data/lib/mailsafepro/models/webhook_create.rb +213 -0
- data/lib/mailsafepro/models/webhook_response.rb +185 -0
- data/lib/mailsafepro/models/webhook_update.rb +204 -0
- data/lib/mailsafepro/version.rb +15 -0
- data/lib/mailsafepro.rb +88 -0
- data/mailsafepro.gemspec +39 -0
- data/spec/api/api_keys_api_spec.rb +245 -0
- data/spec/api/authentication_api_spec.rb +239 -0
- data/spec/api/billing_api_spec.rb +155 -0
- data/spec/api/default_api_spec.rb +60 -0
- data/spec/api/developer_tools_api_spec.rb +62 -0
- data/spec/api/email_validation_api_spec.rb +125 -0
- data/spec/api/health_api_spec.rb +200 -0
- data/spec/api/jobs_api_spec.rb +119 -0
- data/spec/api/logs_api_spec.rb +62 -0
- data/spec/api/validation_api_spec.rb +125 -0
- data/spec/api/webhooks_api_spec.rb +172 -0
- data/spec/api/webhooks_management_api_spec.rb +120 -0
- data/spec/models/api_key_create_request_spec.rb +42 -0
- data/spec/models/api_key_list_response_spec.rb +48 -0
- data/spec/models/api_key_meta_spec.rb +84 -0
- data/spec/models/batch_email_response_spec.rb +66 -0
- data/spec/models/batch_validation_request_spec.rb +60 -0
- data/spec/models/body_change_plan_billing_billing_change_plan_post_spec.rb +36 -0
- data/spec/models/checkout_request_spec.rb +36 -0
- data/spec/models/checkout_session_response_spec.rb +36 -0
- data/spec/models/dns_info_spec.rb +60 -0
- data/spec/models/dns_record_dkim_spec.rb +60 -0
- data/spec/models/dns_record_dmarc_spec.rb +54 -0
- data/spec/models/dns_record_spf_spec.rb +54 -0
- data/spec/models/email_response_spec.rb +120 -0
- data/spec/models/email_validation_request_spec.rb +60 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/job_create_request_spec.rb +78 -0
- data/spec/models/job_create_response_spec.rb +48 -0
- data/spec/models/job_result_entry_spec.rb +84 -0
- data/spec/models/job_results_page_spec.rb +60 -0
- data/spec/models/job_status_response_spec.rb +66 -0
- data/spec/models/key_rotation_request_spec.rb +48 -0
- data/spec/models/plan_enum_spec.rb +30 -0
- data/spec/models/priority_enum_spec.rb +30 -0
- data/spec/models/register_endpoint_spec.rb +36 -0
- data/spec/models/response_test_notification_billing_billing_test_notification_post_value_spec.rb +21 -0
- data/spec/models/risk_level_enum_spec.rb +30 -0
- data/spec/models/rotate_secret_spec.rb +36 -0
- data/spec/models/smtp_info_spec.rb +60 -0
- data/spec/models/subscription_response_spec.rb +54 -0
- data/spec/models/user_login_spec.rb +42 -0
- data/spec/models/user_register_spec.rb +48 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/webhook_create_spec.rb +54 -0
- data/spec/models/webhook_response_spec.rb +48 -0
- data/spec/models/webhook_update_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +291 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Email Validation API — Enterprise-grade Email Verification
|
|
3
|
+
|
|
4
|
+
#API robusta y segura para validación y verificación de correos electrónicos. Soporta verificación individual y en lote, detección de brechas, y autenticación JWT. Cumple con GDPR y dispone de planes de pago flexibles. **🔗 Enlaces importantes:** - [Estado del sistema](https://mailsafepro.betteruptime.com) - [Documentación completa](https://email-validation-api-jlra.onrender.com/redoc) **📧 Contacto:** mailsafepro1@gmail.com
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.5.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.18.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module MailSafePro
|
|
17
|
+
class JobResultEntry < ApiModelBase
|
|
18
|
+
attr_accessor :email
|
|
19
|
+
|
|
20
|
+
attr_accessor :valid
|
|
21
|
+
|
|
22
|
+
attr_accessor :riskscore
|
|
23
|
+
|
|
24
|
+
attr_accessor :qualityscore
|
|
25
|
+
|
|
26
|
+
attr_accessor :provider
|
|
27
|
+
|
|
28
|
+
attr_accessor :reputation
|
|
29
|
+
|
|
30
|
+
attr_accessor :smtp
|
|
31
|
+
|
|
32
|
+
attr_accessor :dns
|
|
33
|
+
|
|
34
|
+
attr_accessor :metadata
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'email' => :'email',
|
|
40
|
+
:'valid' => :'valid',
|
|
41
|
+
:'riskscore' => :'riskscore',
|
|
42
|
+
:'qualityscore' => :'qualityscore',
|
|
43
|
+
:'provider' => :'provider',
|
|
44
|
+
:'reputation' => :'reputation',
|
|
45
|
+
:'smtp' => :'smtp',
|
|
46
|
+
:'dns' => :'dns',
|
|
47
|
+
:'metadata' => :'metadata'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Returns attribute mapping this model knows about
|
|
52
|
+
def self.acceptable_attribute_map
|
|
53
|
+
attribute_map
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns all the JSON keys this model knows about
|
|
57
|
+
def self.acceptable_attributes
|
|
58
|
+
acceptable_attribute_map.values
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute type mapping.
|
|
62
|
+
def self.openapi_types
|
|
63
|
+
{
|
|
64
|
+
:'email' => :'String',
|
|
65
|
+
:'valid' => :'Boolean',
|
|
66
|
+
:'riskscore' => :'Float',
|
|
67
|
+
:'qualityscore' => :'Float',
|
|
68
|
+
:'provider' => :'String',
|
|
69
|
+
:'reputation' => :'Float',
|
|
70
|
+
:'smtp' => :'Object',
|
|
71
|
+
:'dns' => :'Object',
|
|
72
|
+
:'metadata' => :'Object'
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# List of attributes with nullable: true
|
|
77
|
+
def self.openapi_nullable
|
|
78
|
+
Set.new([
|
|
79
|
+
:'riskscore',
|
|
80
|
+
:'qualityscore',
|
|
81
|
+
:'provider',
|
|
82
|
+
:'reputation',
|
|
83
|
+
])
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Initializes the object
|
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
88
|
+
def initialize(attributes = {})
|
|
89
|
+
if (!attributes.is_a?(Hash))
|
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSafePro::JobResultEntry` initialize method"
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
94
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
95
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
96
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSafePro::JobResultEntry`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
98
|
+
end
|
|
99
|
+
h[k.to_sym] = v
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'email')
|
|
103
|
+
self.email = attributes[:'email']
|
|
104
|
+
else
|
|
105
|
+
self.email = nil
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'valid')
|
|
109
|
+
self.valid = attributes[:'valid']
|
|
110
|
+
else
|
|
111
|
+
self.valid = nil
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'riskscore')
|
|
115
|
+
self.riskscore = attributes[:'riskscore']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'qualityscore')
|
|
119
|
+
self.qualityscore = attributes[:'qualityscore']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'provider')
|
|
123
|
+
self.provider = attributes[:'provider']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'reputation')
|
|
127
|
+
self.reputation = attributes[:'reputation']
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'smtp')
|
|
131
|
+
self.smtp = attributes[:'smtp']
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'dns')
|
|
135
|
+
self.dns = attributes[:'dns']
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'metadata')
|
|
139
|
+
self.metadata = attributes[:'metadata']
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
144
|
+
# @return Array for valid properties with the reasons
|
|
145
|
+
def list_invalid_properties
|
|
146
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
147
|
+
invalid_properties = Array.new
|
|
148
|
+
if @email.nil?
|
|
149
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if @valid.nil?
|
|
153
|
+
invalid_properties.push('invalid value for "valid", valid cannot be nil.')
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
invalid_properties
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Check to see if the all the properties in the model are valid
|
|
160
|
+
# @return true if the model is valid
|
|
161
|
+
def valid?
|
|
162
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
163
|
+
return false if @email.nil?
|
|
164
|
+
return false if @valid.nil?
|
|
165
|
+
true
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Custom attribute writer method with validation
|
|
169
|
+
# @param [Object] email Value to be assigned
|
|
170
|
+
def email=(email)
|
|
171
|
+
if email.nil?
|
|
172
|
+
fail ArgumentError, 'email cannot be nil'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
@email = email
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Custom attribute writer method with validation
|
|
179
|
+
# @param [Object] valid Value to be assigned
|
|
180
|
+
def valid=(valid)
|
|
181
|
+
if valid.nil?
|
|
182
|
+
fail ArgumentError, 'valid cannot be nil'
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
@valid = valid
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Checks equality by comparing each attribute.
|
|
189
|
+
# @param [Object] Object to be compared
|
|
190
|
+
def ==(o)
|
|
191
|
+
return true if self.equal?(o)
|
|
192
|
+
self.class == o.class &&
|
|
193
|
+
email == o.email &&
|
|
194
|
+
valid == o.valid &&
|
|
195
|
+
riskscore == o.riskscore &&
|
|
196
|
+
qualityscore == o.qualityscore &&
|
|
197
|
+
provider == o.provider &&
|
|
198
|
+
reputation == o.reputation &&
|
|
199
|
+
smtp == o.smtp &&
|
|
200
|
+
dns == o.dns &&
|
|
201
|
+
metadata == o.metadata
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# @see the `==` method
|
|
205
|
+
# @param [Object] Object to be compared
|
|
206
|
+
def eql?(o)
|
|
207
|
+
self == o
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Calculates hash code according to all attributes.
|
|
211
|
+
# @return [Integer] Hash code
|
|
212
|
+
def hash
|
|
213
|
+
[email, valid, riskscore, qualityscore, provider, reputation, smtp, dns, metadata].hash
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Builds the object from hash
|
|
217
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
218
|
+
# @return [Object] Returns the model itself
|
|
219
|
+
def self.build_from_hash(attributes)
|
|
220
|
+
return nil unless attributes.is_a?(Hash)
|
|
221
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
222
|
+
transformed_hash = {}
|
|
223
|
+
openapi_types.each_pair do |key, type|
|
|
224
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
225
|
+
transformed_hash["#{key}"] = nil
|
|
226
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
227
|
+
# check to ensure the input is an array given that the attribute
|
|
228
|
+
# is documented as an array but the input is not
|
|
229
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
230
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
231
|
+
end
|
|
232
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
233
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
new(transformed_hash)
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Returns the object in the form of hash
|
|
240
|
+
# @return [Hash] Returns the object in the form of hash
|
|
241
|
+
def to_hash
|
|
242
|
+
hash = {}
|
|
243
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
244
|
+
value = self.send(attr)
|
|
245
|
+
if value.nil?
|
|
246
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
247
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
hash[param] = _to_hash(value)
|
|
251
|
+
end
|
|
252
|
+
hash
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
end
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Email Validation API — Enterprise-grade Email Verification
|
|
3
|
+
|
|
4
|
+
#API robusta y segura para validación y verificación de correos electrónicos. Soporta verificación individual y en lote, detección de brechas, y autenticación JWT. Cumple con GDPR y dispone de planes de pago flexibles. **🔗 Enlaces importantes:** - [Estado del sistema](https://mailsafepro.betteruptime.com) - [Documentación completa](https://email-validation-api-jlra.onrender.com/redoc) **📧 Contacto:** mailsafepro1@gmail.com
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.5.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.18.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module MailSafePro
|
|
17
|
+
class JobResultsPage < ApiModelBase
|
|
18
|
+
attr_accessor :job_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :page
|
|
21
|
+
|
|
22
|
+
attr_accessor :size
|
|
23
|
+
|
|
24
|
+
attr_accessor :total_pages
|
|
25
|
+
|
|
26
|
+
attr_accessor :results
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'job_id' => :'job_id',
|
|
32
|
+
:'page' => :'page',
|
|
33
|
+
:'size' => :'size',
|
|
34
|
+
:'total_pages' => :'total_pages',
|
|
35
|
+
:'results' => :'results'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'job_id' => :'String',
|
|
53
|
+
:'page' => :'Integer',
|
|
54
|
+
:'size' => :'Integer',
|
|
55
|
+
:'total_pages' => :'Integer',
|
|
56
|
+
:'results' => :'Array<JobResultEntry>'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSafePro::JobResultsPage` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSafePro::JobResultsPage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'job_id')
|
|
83
|
+
self.job_id = attributes[:'job_id']
|
|
84
|
+
else
|
|
85
|
+
self.job_id = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'page')
|
|
89
|
+
self.page = attributes[:'page']
|
|
90
|
+
else
|
|
91
|
+
self.page = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'size')
|
|
95
|
+
self.size = attributes[:'size']
|
|
96
|
+
else
|
|
97
|
+
self.size = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'total_pages')
|
|
101
|
+
self.total_pages = attributes[:'total_pages']
|
|
102
|
+
else
|
|
103
|
+
self.total_pages = nil
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'results')
|
|
107
|
+
if (value = attributes[:'results']).is_a?(Array)
|
|
108
|
+
self.results = value
|
|
109
|
+
end
|
|
110
|
+
else
|
|
111
|
+
self.results = nil
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
116
|
+
# @return Array for valid properties with the reasons
|
|
117
|
+
def list_invalid_properties
|
|
118
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
119
|
+
invalid_properties = Array.new
|
|
120
|
+
if @job_id.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "job_id", job_id cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @page.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "page", page cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if @size.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "size", size cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if @total_pages.nil?
|
|
133
|
+
invalid_properties.push('invalid value for "total_pages", total_pages cannot be nil.')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if @results.nil?
|
|
137
|
+
invalid_properties.push('invalid value for "results", results cannot be nil.')
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
invalid_properties
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Check to see if the all the properties in the model are valid
|
|
144
|
+
# @return true if the model is valid
|
|
145
|
+
def valid?
|
|
146
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
147
|
+
return false if @job_id.nil?
|
|
148
|
+
return false if @page.nil?
|
|
149
|
+
return false if @size.nil?
|
|
150
|
+
return false if @total_pages.nil?
|
|
151
|
+
return false if @results.nil?
|
|
152
|
+
true
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Custom attribute writer method with validation
|
|
156
|
+
# @param [Object] job_id Value to be assigned
|
|
157
|
+
def job_id=(job_id)
|
|
158
|
+
if job_id.nil?
|
|
159
|
+
fail ArgumentError, 'job_id cannot be nil'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
@job_id = job_id
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Custom attribute writer method with validation
|
|
166
|
+
# @param [Object] page Value to be assigned
|
|
167
|
+
def page=(page)
|
|
168
|
+
if page.nil?
|
|
169
|
+
fail ArgumentError, 'page cannot be nil'
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
@page = page
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Custom attribute writer method with validation
|
|
176
|
+
# @param [Object] size Value to be assigned
|
|
177
|
+
def size=(size)
|
|
178
|
+
if size.nil?
|
|
179
|
+
fail ArgumentError, 'size cannot be nil'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
@size = size
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Custom attribute writer method with validation
|
|
186
|
+
# @param [Object] total_pages Value to be assigned
|
|
187
|
+
def total_pages=(total_pages)
|
|
188
|
+
if total_pages.nil?
|
|
189
|
+
fail ArgumentError, 'total_pages cannot be nil'
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
@total_pages = total_pages
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Custom attribute writer method with validation
|
|
196
|
+
# @param [Object] results Value to be assigned
|
|
197
|
+
def results=(results)
|
|
198
|
+
if results.nil?
|
|
199
|
+
fail ArgumentError, 'results cannot be nil'
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
@results = results
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Checks equality by comparing each attribute.
|
|
206
|
+
# @param [Object] Object to be compared
|
|
207
|
+
def ==(o)
|
|
208
|
+
return true if self.equal?(o)
|
|
209
|
+
self.class == o.class &&
|
|
210
|
+
job_id == o.job_id &&
|
|
211
|
+
page == o.page &&
|
|
212
|
+
size == o.size &&
|
|
213
|
+
total_pages == o.total_pages &&
|
|
214
|
+
results == o.results
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# @see the `==` method
|
|
218
|
+
# @param [Object] Object to be compared
|
|
219
|
+
def eql?(o)
|
|
220
|
+
self == o
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Calculates hash code according to all attributes.
|
|
224
|
+
# @return [Integer] Hash code
|
|
225
|
+
def hash
|
|
226
|
+
[job_id, page, size, total_pages, results].hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Builds the object from hash
|
|
230
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
231
|
+
# @return [Object] Returns the model itself
|
|
232
|
+
def self.build_from_hash(attributes)
|
|
233
|
+
return nil unless attributes.is_a?(Hash)
|
|
234
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
235
|
+
transformed_hash = {}
|
|
236
|
+
openapi_types.each_pair do |key, type|
|
|
237
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
238
|
+
transformed_hash["#{key}"] = nil
|
|
239
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
240
|
+
# check to ensure the input is an array given that the attribute
|
|
241
|
+
# is documented as an array but the input is not
|
|
242
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
243
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
244
|
+
end
|
|
245
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
246
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
new(transformed_hash)
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Returns the object in the form of hash
|
|
253
|
+
# @return [Hash] Returns the object in the form of hash
|
|
254
|
+
def to_hash
|
|
255
|
+
hash = {}
|
|
256
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
257
|
+
value = self.send(attr)
|
|
258
|
+
if value.nil?
|
|
259
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
260
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
hash[param] = _to_hash(value)
|
|
264
|
+
end
|
|
265
|
+
hash
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
end
|