late-sdk 0.0.596 → 0.0.597

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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/docs/AdInsightsApi.md +155 -9
  4. data/docs/GenerateKeywordHistoricalMetrics200Response.md +22 -0
  5. data/docs/GenerateKeywordHistoricalMetricsRequest.md +32 -0
  6. data/docs/GenerateKeywordIdeas200Response.md +24 -0
  7. data/docs/GenerateKeywordIdeas200ResponsePaging.md +18 -0
  8. data/docs/GenerateKeywordIdeasRequest.md +36 -0
  9. data/docs/GetAdsActivityLog200Response.md +1 -1
  10. data/docs/GetAdsActivityLog200ResponsePaging.md +18 -0
  11. data/docs/ListAdCreatives200Response.md +1 -1
  12. data/docs/ListAdImages200Response.md +1 -1
  13. data/docs/ListAdLabels200Response.md +1 -1
  14. data/docs/ListAdStudies200Response.md +1 -1
  15. data/docs/ListHighDemandPeriods200Response.md +1 -1
  16. data/docs/ListMetaBusinesses200Response.md +1 -1
  17. data/docs/QueryAdInsights200Response.md +5 -1
  18. data/docs/QueryAdInsights200ResponsePaging.md +4 -2
  19. data/lib/zernio-sdk/api/ad_insights_api.rb +158 -13
  20. data/lib/zernio-sdk/models/generate_keyword_historical_metrics200_response.rb +169 -0
  21. data/lib/zernio-sdk/models/generate_keyword_historical_metrics_request.rb +337 -0
  22. data/lib/zernio-sdk/models/generate_keyword_ideas200_response.rb +178 -0
  23. data/lib/zernio-sdk/models/generate_keyword_ideas200_response_paging.rb +149 -0
  24. data/lib/zernio-sdk/models/generate_keyword_ideas_request.rb +378 -0
  25. data/lib/zernio-sdk/models/get_ads_activity_log200_response.rb +1 -1
  26. data/lib/zernio-sdk/models/get_ads_activity_log200_response_paging.rb +149 -0
  27. data/lib/zernio-sdk/models/list_ad_creatives200_response.rb +1 -1
  28. data/lib/zernio-sdk/models/list_ad_images200_response.rb +1 -1
  29. data/lib/zernio-sdk/models/list_ad_labels200_response.rb +1 -1
  30. data/lib/zernio-sdk/models/list_ad_studies200_response.rb +1 -1
  31. data/lib/zernio-sdk/models/list_high_demand_periods200_response.rb +1 -1
  32. data/lib/zernio-sdk/models/list_meta_businesses200_response.rb +1 -1
  33. data/lib/zernio-sdk/models/query_ad_insights200_response.rb +23 -1
  34. data/lib/zernio-sdk/models/query_ad_insights200_response_paging.rb +17 -6
  35. data/lib/zernio-sdk/version.rb +1 -1
  36. data/lib/zernio-sdk.rb +6 -0
  37. data/openapi.yaml +129 -18
  38. data/spec/api/ad_insights_api_spec.rb +30 -3
  39. data/spec/models/generate_keyword_historical_metrics200_response_spec.rb +48 -0
  40. data/spec/models/generate_keyword_historical_metrics_request_spec.rb +82 -0
  41. data/spec/models/generate_keyword_ideas200_response_paging_spec.rb +36 -0
  42. data/spec/models/generate_keyword_ideas200_response_spec.rb +54 -0
  43. data/spec/models/generate_keyword_ideas_request_spec.rb +94 -0
  44. data/spec/models/get_ads_activity_log200_response_paging_spec.rb +36 -0
  45. data/spec/models/query_ad_insights200_response_paging_spec.rb +6 -0
  46. data/spec/models/query_ad_insights200_response_spec.rb +12 -0
  47. data/zernio-sdk-0.0.597.gem +0 -0
  48. metadata +26 -2
  49. data/zernio-sdk-0.0.596.gem +0 -0
@@ -0,0 +1,337 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GenerateKeywordHistoricalMetricsRequest < ApiModelBase
18
+ # Zernio googleads SocialAccount id.
19
+ attr_accessor :account_id
20
+
21
+ # Numeric Google Ads customer id (no dashes); only needed when the connection has several accounts.
22
+ attr_accessor :customer_id
23
+
24
+ attr_accessor :keywords
25
+
26
+ # ISO 3166-1 alpha-2 country codes. Omitted = worldwide.
27
+ attr_accessor :countries
28
+
29
+ # Google languageConstant id (1000 = English).
30
+ attr_accessor :language_constant_id
31
+
32
+ attr_accessor :network
33
+
34
+ attr_accessor :include_adult_keywords
35
+
36
+ # Adds averageCpcMicros to each row's keywordMetrics.
37
+ attr_accessor :include_average_cpc
38
+
39
+ class EnumAttributeValidator
40
+ attr_reader :datatype
41
+ attr_reader :allowable_values
42
+
43
+ def initialize(datatype, allowable_values)
44
+ @allowable_values = allowable_values.map do |value|
45
+ case datatype.to_s
46
+ when /Integer/i
47
+ value.to_i
48
+ when /Float/i
49
+ value.to_f
50
+ else
51
+ value
52
+ end
53
+ end
54
+ end
55
+
56
+ def valid?(value)
57
+ !value || allowable_values.include?(value)
58
+ end
59
+ end
60
+
61
+ # Attribute mapping from ruby-style variable name to JSON key.
62
+ def self.attribute_map
63
+ {
64
+ :'account_id' => :'accountId',
65
+ :'customer_id' => :'customerId',
66
+ :'keywords' => :'keywords',
67
+ :'countries' => :'countries',
68
+ :'language_constant_id' => :'languageConstantId',
69
+ :'network' => :'network',
70
+ :'include_adult_keywords' => :'includeAdultKeywords',
71
+ :'include_average_cpc' => :'includeAverageCpc'
72
+ }
73
+ end
74
+
75
+ # Returns attribute mapping this model knows about
76
+ def self.acceptable_attribute_map
77
+ attribute_map
78
+ end
79
+
80
+ # Returns all the JSON keys this model knows about
81
+ def self.acceptable_attributes
82
+ acceptable_attribute_map.values
83
+ end
84
+
85
+ # Attribute type mapping.
86
+ def self.openapi_types
87
+ {
88
+ :'account_id' => :'String',
89
+ :'customer_id' => :'String',
90
+ :'keywords' => :'Array<String>',
91
+ :'countries' => :'Array<String>',
92
+ :'language_constant_id' => :'String',
93
+ :'network' => :'String',
94
+ :'include_adult_keywords' => :'Boolean',
95
+ :'include_average_cpc' => :'Boolean'
96
+ }
97
+ end
98
+
99
+ # List of attributes with nullable: true
100
+ def self.openapi_nullable
101
+ Set.new([
102
+ ])
103
+ end
104
+
105
+ # Initializes the object
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ def initialize(attributes = {})
108
+ if (!attributes.is_a?(Hash))
109
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GenerateKeywordHistoricalMetricsRequest` initialize method"
110
+ end
111
+
112
+ # check to see if the attribute exists and convert string to symbol for hash key
113
+ acceptable_attribute_map = self.class.acceptable_attribute_map
114
+ attributes = attributes.each_with_object({}) { |(k, v), h|
115
+ if (!acceptable_attribute_map.key?(k.to_sym))
116
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GenerateKeywordHistoricalMetricsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
117
+ end
118
+ h[k.to_sym] = v
119
+ }
120
+
121
+ if attributes.key?(:'account_id')
122
+ self.account_id = attributes[:'account_id']
123
+ else
124
+ self.account_id = nil
125
+ end
126
+
127
+ if attributes.key?(:'customer_id')
128
+ self.customer_id = attributes[:'customer_id']
129
+ end
130
+
131
+ if attributes.key?(:'keywords')
132
+ if (value = attributes[:'keywords']).is_a?(Array)
133
+ self.keywords = value
134
+ end
135
+ else
136
+ self.keywords = nil
137
+ end
138
+
139
+ if attributes.key?(:'countries')
140
+ if (value = attributes[:'countries']).is_a?(Array)
141
+ self.countries = value
142
+ end
143
+ end
144
+
145
+ if attributes.key?(:'language_constant_id')
146
+ self.language_constant_id = attributes[:'language_constant_id']
147
+ else
148
+ self.language_constant_id = '1000'
149
+ end
150
+
151
+ if attributes.key?(:'network')
152
+ self.network = attributes[:'network']
153
+ else
154
+ self.network = 'GOOGLE_SEARCH'
155
+ end
156
+
157
+ if attributes.key?(:'include_adult_keywords')
158
+ self.include_adult_keywords = attributes[:'include_adult_keywords']
159
+ end
160
+
161
+ if attributes.key?(:'include_average_cpc')
162
+ self.include_average_cpc = attributes[:'include_average_cpc']
163
+ end
164
+ end
165
+
166
+ # Show invalid properties with the reasons. Usually used together with valid?
167
+ # @return Array for valid properties with the reasons
168
+ def list_invalid_properties
169
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
170
+ invalid_properties = Array.new
171
+ if @account_id.nil?
172
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
173
+ end
174
+
175
+ if @keywords.nil?
176
+ invalid_properties.push('invalid value for "keywords", keywords cannot be nil.')
177
+ end
178
+
179
+ if @keywords.length > 1000
180
+ invalid_properties.push('invalid value for "keywords", number of items must be less than or equal to 1000.')
181
+ end
182
+
183
+ if @keywords.length < 1
184
+ invalid_properties.push('invalid value for "keywords", number of items must be greater than or equal to 1.')
185
+ end
186
+
187
+ if !@countries.nil? && @countries.length > 10
188
+ invalid_properties.push('invalid value for "countries", number of items must be less than or equal to 10.')
189
+ end
190
+
191
+ if !@countries.nil? && @countries.length < 1
192
+ invalid_properties.push('invalid value for "countries", number of items must be greater than or equal to 1.')
193
+ end
194
+
195
+ invalid_properties
196
+ end
197
+
198
+ # Check to see if the all the properties in the model are valid
199
+ # @return true if the model is valid
200
+ def valid?
201
+ warn '[DEPRECATED] the `valid?` method is obsolete'
202
+ return false if @account_id.nil?
203
+ return false if @keywords.nil?
204
+ return false if @keywords.length > 1000
205
+ return false if @keywords.length < 1
206
+ return false if !@countries.nil? && @countries.length > 10
207
+ return false if !@countries.nil? && @countries.length < 1
208
+ network_validator = EnumAttributeValidator.new('String', ["GOOGLE_SEARCH", "GOOGLE_SEARCH_AND_PARTNERS"])
209
+ return false unless network_validator.valid?(@network)
210
+ true
211
+ end
212
+
213
+ # Custom attribute writer method with validation
214
+ # @param [Object] account_id Value to be assigned
215
+ def account_id=(account_id)
216
+ if account_id.nil?
217
+ fail ArgumentError, 'account_id cannot be nil'
218
+ end
219
+
220
+ @account_id = account_id
221
+ end
222
+
223
+ # Custom attribute writer method with validation
224
+ # @param [Object] keywords Value to be assigned
225
+ def keywords=(keywords)
226
+ if keywords.nil?
227
+ fail ArgumentError, 'keywords cannot be nil'
228
+ end
229
+
230
+ if keywords.length > 1000
231
+ fail ArgumentError, 'invalid value for "keywords", number of items must be less than or equal to 1000.'
232
+ end
233
+
234
+ if keywords.length < 1
235
+ fail ArgumentError, 'invalid value for "keywords", number of items must be greater than or equal to 1.'
236
+ end
237
+
238
+ @keywords = keywords
239
+ end
240
+
241
+ # Custom attribute writer method with validation
242
+ # @param [Object] countries Value to be assigned
243
+ def countries=(countries)
244
+ if countries.nil?
245
+ fail ArgumentError, 'countries cannot be nil'
246
+ end
247
+
248
+ if countries.length > 10
249
+ fail ArgumentError, 'invalid value for "countries", number of items must be less than or equal to 10.'
250
+ end
251
+
252
+ if countries.length < 1
253
+ fail ArgumentError, 'invalid value for "countries", number of items must be greater than or equal to 1.'
254
+ end
255
+
256
+ @countries = countries
257
+ end
258
+
259
+ # Custom attribute writer method checking allowed values (enum).
260
+ # @param [Object] network Object to be assigned
261
+ def network=(network)
262
+ validator = EnumAttributeValidator.new('String', ["GOOGLE_SEARCH", "GOOGLE_SEARCH_AND_PARTNERS"])
263
+ unless validator.valid?(network)
264
+ fail ArgumentError, "invalid value for \"network\", must be one of #{validator.allowable_values}."
265
+ end
266
+ @network = network
267
+ end
268
+
269
+ # Checks equality by comparing each attribute.
270
+ # @param [Object] Object to be compared
271
+ def ==(o)
272
+ return true if self.equal?(o)
273
+ self.class == o.class &&
274
+ account_id == o.account_id &&
275
+ customer_id == o.customer_id &&
276
+ keywords == o.keywords &&
277
+ countries == o.countries &&
278
+ language_constant_id == o.language_constant_id &&
279
+ network == o.network &&
280
+ include_adult_keywords == o.include_adult_keywords &&
281
+ include_average_cpc == o.include_average_cpc
282
+ end
283
+
284
+ # @see the `==` method
285
+ # @param [Object] Object to be compared
286
+ def eql?(o)
287
+ self == o
288
+ end
289
+
290
+ # Calculates hash code according to all attributes.
291
+ # @return [Integer] Hash code
292
+ def hash
293
+ [account_id, customer_id, keywords, countries, language_constant_id, network, include_adult_keywords, include_average_cpc].hash
294
+ end
295
+
296
+ # Builds the object from hash
297
+ # @param [Hash] attributes Model attributes in the form of hash
298
+ # @return [Object] Returns the model itself
299
+ def self.build_from_hash(attributes)
300
+ return nil unless attributes.is_a?(Hash)
301
+ attributes = attributes.transform_keys(&:to_sym)
302
+ transformed_hash = {}
303
+ openapi_types.each_pair do |key, type|
304
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
305
+ transformed_hash["#{key}"] = nil
306
+ elsif type =~ /\AArray<(.*)>/i
307
+ # check to ensure the input is an array given that the attribute
308
+ # is documented as an array but the input is not
309
+ if attributes[attribute_map[key]].is_a?(Array)
310
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
311
+ end
312
+ elsif !attributes[attribute_map[key]].nil?
313
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
314
+ end
315
+ end
316
+ new(transformed_hash)
317
+ end
318
+
319
+ # Returns the object in the form of hash
320
+ # @return [Hash] Returns the object in the form of hash
321
+ def to_hash
322
+ hash = {}
323
+ self.class.attribute_map.each_pair do |attr, param|
324
+ value = self.send(attr)
325
+ if value.nil?
326
+ is_nullable = self.class.openapi_nullable.include?(attr)
327
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
328
+ end
329
+
330
+ hash[param] = _to_hash(value)
331
+ end
332
+ hash
333
+ end
334
+
335
+ end
336
+
337
+ end
@@ -0,0 +1,178 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GenerateKeywordIdeas200Response < ApiModelBase
18
+ # The customer the request ran against.
19
+ attr_accessor :customer_id
20
+
21
+ attr_accessor :data
22
+
23
+ attr_accessor :aggregate_metric_results
24
+
25
+ attr_accessor :paging
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'customer_id' => :'customerId',
31
+ :'data' => :'data',
32
+ :'aggregate_metric_results' => :'aggregateMetricResults',
33
+ :'paging' => :'paging'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'customer_id' => :'String',
51
+ :'data' => :'Array<Object>',
52
+ :'aggregate_metric_results' => :'Object',
53
+ :'paging' => :'GenerateKeywordIdeas200ResponsePaging'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ :'aggregate_metric_results',
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 `Zernio::GenerateKeywordIdeas200Response` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ acceptable_attribute_map = self.class.acceptable_attribute_map
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!acceptable_attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GenerateKeywordIdeas200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'customer_id')
81
+ self.customer_id = attributes[:'customer_id']
82
+ end
83
+
84
+ if attributes.key?(:'data')
85
+ if (value = attributes[:'data']).is_a?(Array)
86
+ self.data = value
87
+ end
88
+ end
89
+
90
+ if attributes.key?(:'aggregate_metric_results')
91
+ self.aggregate_metric_results = attributes[:'aggregate_metric_results']
92
+ end
93
+
94
+ if attributes.key?(:'paging')
95
+ self.paging = attributes[:'paging']
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
103
+ invalid_properties = Array.new
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
+ true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ customer_id == o.customer_id &&
120
+ data == o.data &&
121
+ aggregate_metric_results == o.aggregate_metric_results &&
122
+ paging == o.paging
123
+ end
124
+
125
+ # @see the `==` method
126
+ # @param [Object] Object to be compared
127
+ def eql?(o)
128
+ self == o
129
+ end
130
+
131
+ # Calculates hash code according to all attributes.
132
+ # @return [Integer] Hash code
133
+ def hash
134
+ [customer_id, data, aggregate_metric_results, paging].hash
135
+ end
136
+
137
+ # Builds the object from hash
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ # @return [Object] Returns the model itself
140
+ def self.build_from_hash(attributes)
141
+ return nil unless attributes.is_a?(Hash)
142
+ attributes = attributes.transform_keys(&:to_sym)
143
+ transformed_hash = {}
144
+ openapi_types.each_pair do |key, type|
145
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
146
+ transformed_hash["#{key}"] = nil
147
+ elsif type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the attribute
149
+ # is documented as an array but the input is not
150
+ if attributes[attribute_map[key]].is_a?(Array)
151
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
152
+ end
153
+ elsif !attributes[attribute_map[key]].nil?
154
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
155
+ end
156
+ end
157
+ new(transformed_hash)
158
+ end
159
+
160
+ # Returns the object in the form of hash
161
+ # @return [Hash] Returns the object in the form of hash
162
+ def to_hash
163
+ hash = {}
164
+ self.class.attribute_map.each_pair do |attr, param|
165
+ value = self.send(attr)
166
+ if value.nil?
167
+ is_nullable = self.class.openapi_nullable.include?(attr)
168
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
169
+ end
170
+
171
+ hash[param] = _to_hash(value)
172
+ end
173
+ hash
174
+ end
175
+
176
+ end
177
+
178
+ end
@@ -0,0 +1,149 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class GenerateKeywordIdeas200ResponsePaging < ApiModelBase
18
+ # Cursor for the next page; null when exhausted.
19
+ attr_accessor :next_page_token
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'next_page_token' => :'nextPageToken'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'next_page_token' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ :'next_page_token'
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GenerateKeywordIdeas200ResponsePaging` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!acceptable_attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GenerateKeywordIdeas200ResponsePaging`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'next_page_token')
69
+ self.next_page_token = attributes[:'next_page_token']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ next_page_token == o.next_page_token
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [next_page_token].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
118
+ elsif type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
123
+ end
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
126
+ end
127
+ end
128
+ new(transformed_hash)
129
+ end
130
+
131
+ # Returns the object in the form of hash
132
+ # @return [Hash] Returns the object in the form of hash
133
+ def to_hash
134
+ hash = {}
135
+ self.class.attribute_map.each_pair do |attr, param|
136
+ value = self.send(attr)
137
+ if value.nil?
138
+ is_nullable = self.class.openapi_nullable.include?(attr)
139
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
140
+ end
141
+
142
+ hash[param] = _to_hash(value)
143
+ end
144
+ hash
145
+ end
146
+
147
+ end
148
+
149
+ end