late-sdk 0.0.706 → 0.0.708

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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -0
  3. data/docs/AdInsightsApi.md +84 -0
  4. data/docs/BoostPostRequest.md +4 -4
  5. data/docs/BoostPostRequestPlatformSpecificData.md +49 -0
  6. data/docs/CreateStandaloneAdRequest.md +4 -4
  7. data/docs/GetAdsSearchTerms200Response.md +22 -0
  8. data/docs/GetAdsSearchTerms200ResponseDataInner.md +40 -0
  9. data/docs/GetAdsSearchTerms200ResponsePaging.md +18 -0
  10. data/docs/InstagramApi.md +1 -1
  11. data/docs/MetaAdsPlatformData.md +22 -0
  12. data/docs/WebhookPayloadCommentPost.md +7 -1
  13. data/lib/zernio-sdk/api/ad_insights_api.rb +82 -0
  14. data/lib/zernio-sdk/api/instagram_api.rb +2 -2
  15. data/lib/zernio-sdk/models/boost_post_request.rb +4 -4
  16. data/lib/zernio-sdk/models/boost_post_request_platform_specific_data.rb +105 -0
  17. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +4 -4
  18. data/lib/zernio-sdk/models/get_ads_search_terms200_response.rb +167 -0
  19. data/lib/zernio-sdk/models/get_ads_search_terms200_response_data_inner.rb +256 -0
  20. data/lib/zernio-sdk/models/get_ads_search_terms200_response_paging.rb +149 -0
  21. data/lib/zernio-sdk/models/meta_ads_platform_data.rb +190 -0
  22. data/lib/zernio-sdk/models/webhook_payload_comment_post.rb +43 -4
  23. data/lib/zernio-sdk/version.rb +1 -1
  24. data/lib/zernio-sdk.rb +5 -0
  25. data/openapi.yaml +117 -6
  26. data/spec/api/ad_insights_api_spec.rb +18 -0
  27. data/spec/api/instagram_api_spec.rb +1 -1
  28. data/spec/models/boost_post_request_platform_specific_data_spec.rb +32 -0
  29. data/spec/models/get_ads_search_terms200_response_data_inner_spec.rb +102 -0
  30. data/spec/models/get_ads_search_terms200_response_paging_spec.rb +36 -0
  31. data/spec/models/get_ads_search_terms200_response_spec.rb +48 -0
  32. data/spec/models/meta_ads_platform_data_spec.rb +48 -0
  33. data/spec/models/webhook_payload_comment_post_spec.rb +18 -0
  34. data/zernio-sdk-0.0.708.gem +0 -0
  35. metadata +22 -2
  36. data/zernio-sdk-0.0.706.gem +0 -0
@@ -216,13 +216,13 @@ module Zernio
216
216
  # Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Applied on Meta, TikTok and Pinterest. Ignored on Google, LinkedIn and X.
217
217
  attr_accessor :gender
218
218
 
219
- # Meta bid strategy applied to the ad set.
219
+ # Deprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Meta bid strategy applied to the ad set.
220
220
  attr_accessor :bid_strategy
221
221
 
222
- # Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`.
222
+ # Deprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`.
223
223
  attr_accessor :bid_amount
224
224
 
225
- # Minimum ROAS as a decimal multiplier (e.g. 2.0 = 2.0x ROAS). Required when `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`. Sent to Meta as `bid_constraints.roas_average_floor` × 10000.
225
+ # Deprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Minimum ROAS as a decimal multiplier (e.g. 2.0 = 2.0x ROAS). Required when `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`. Sent to Meta as `bid_constraints.roas_average_floor` × 10000.
226
226
  attr_accessor :roas_average_floor
227
227
 
228
228
  # Meta only (facebook, instagram; other platforms return 400). Value rule set to attach to the new ad set, from `/v1/ads/value-rule-sets`. Attachment is driven by this id, so `valueRulesApplied` is optional alongside it. Rejected with 400 in `adSetId` attach mode: that shape inherits the existing ad set's attachment, so the field would be silently ignored. Use `PUT /v1/ads/ad-sets/{adSetId}` there instead. Ignored (stripped before the ad-set create) when `buyingType` is `RESERVED`: value rules only apply to auction ad sets on `LOWEST_COST_WITHOUT_CAP` or `COST_CAP`, and a Reach & Frequency reservation has no auction bid strategy. Read back with `GET /v1/ads/ad-sets/{adSetId}?fields=value_rule_set_id`; the attachment is not mirrored onto Zernio's ad documents.
@@ -445,7 +445,7 @@ module Zernio
445
445
  :'roas_average_floor' => :'Float',
446
446
  :'value_rule_set_id' => :'String',
447
447
  :'value_rules_applied' => :'Boolean',
448
- :'platform_specific_data' => :'LinkedInAdsPlatformData',
448
+ :'platform_specific_data' => :'BoostPostRequestPlatformSpecificData',
449
449
  :'dsa_beneficiary' => :'String',
450
450
  :'dsa_payor' => :'String',
451
451
  :'brand_identity' => :'CreateStandaloneAdRequestBrandIdentity',
@@ -0,0 +1,167 @@
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 GetAdsSearchTerms200Response < ApiModelBase
18
+ attr_accessor :customer_id
19
+
20
+ attr_accessor :data
21
+
22
+ attr_accessor :paging
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'customer_id' => :'customerId',
28
+ :'data' => :'data',
29
+ :'paging' => :'paging'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'customer_id' => :'String',
47
+ :'data' => :'Array<GetAdsSearchTerms200ResponseDataInner>',
48
+ :'paging' => :'GetAdsSearchTerms200ResponsePaging'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdsSearchTerms200Response` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdsSearchTerms200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'customer_id')
75
+ self.customer_id = attributes[:'customer_id']
76
+ end
77
+
78
+ if attributes.key?(:'data')
79
+ if (value = attributes[:'data']).is_a?(Array)
80
+ self.data = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'paging')
85
+ self.paging = attributes[:'paging']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ warn '[DEPRECATED] the `valid?` method is obsolete'
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ customer_id == o.customer_id &&
110
+ data == o.data &&
111
+ paging == o.paging
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [customer_id, data, paging].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
+ end
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
+ end
145
+ end
146
+ new(transformed_hash)
147
+ end
148
+
149
+ # Returns the object in the form of hash
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_hash
152
+ hash = {}
153
+ self.class.attribute_map.each_pair do |attr, param|
154
+ value = self.send(attr)
155
+ if value.nil?
156
+ is_nullable = self.class.openapi_nullable.include?(attr)
157
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
+ end
159
+
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ end
166
+
167
+ end
@@ -0,0 +1,256 @@
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 GetAdsSearchTerms200ResponseDataInner < ApiModelBase
18
+ attr_accessor :search_term
19
+
20
+ # ADDED / EXCLUDED / ADDED_EXCLUDED / NONE — whether the term is already a keyword or a negative.
21
+ attr_accessor :status
22
+
23
+ # How the term matched (BROAD, PHRASE, EXACT, NEAR_PHRASE, NEAR_EXACT).
24
+ attr_accessor :match_type
25
+
26
+ attr_accessor :campaign_id
27
+
28
+ attr_accessor :campaign_name
29
+
30
+ attr_accessor :ad_group_id
31
+
32
+ attr_accessor :ad_group_name
33
+
34
+ attr_accessor :impressions
35
+
36
+ attr_accessor :clicks
37
+
38
+ # Cost in micros of the account currency (divide by 1,000,000).
39
+ attr_accessor :cost_micros
40
+
41
+ attr_accessor :conversions
42
+
43
+ attr_accessor :conversions_value
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'search_term' => :'searchTerm',
49
+ :'status' => :'status',
50
+ :'match_type' => :'matchType',
51
+ :'campaign_id' => :'campaignId',
52
+ :'campaign_name' => :'campaignName',
53
+ :'ad_group_id' => :'adGroupId',
54
+ :'ad_group_name' => :'adGroupName',
55
+ :'impressions' => :'impressions',
56
+ :'clicks' => :'clicks',
57
+ :'cost_micros' => :'costMicros',
58
+ :'conversions' => :'conversions',
59
+ :'conversions_value' => :'conversionsValue'
60
+ }
61
+ end
62
+
63
+ # Returns attribute mapping this model knows about
64
+ def self.acceptable_attribute_map
65
+ attribute_map
66
+ end
67
+
68
+ # Returns all the JSON keys this model knows about
69
+ def self.acceptable_attributes
70
+ acceptable_attribute_map.values
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.openapi_types
75
+ {
76
+ :'search_term' => :'String',
77
+ :'status' => :'String',
78
+ :'match_type' => :'String',
79
+ :'campaign_id' => :'String',
80
+ :'campaign_name' => :'String',
81
+ :'ad_group_id' => :'String',
82
+ :'ad_group_name' => :'String',
83
+ :'impressions' => :'Integer',
84
+ :'clicks' => :'Integer',
85
+ :'cost_micros' => :'Integer',
86
+ :'conversions' => :'Float',
87
+ :'conversions_value' => :'Float'
88
+ }
89
+ end
90
+
91
+ # List of attributes with nullable: true
92
+ def self.openapi_nullable
93
+ Set.new([
94
+ :'search_term',
95
+ :'status',
96
+ :'match_type',
97
+ :'campaign_id',
98
+ :'campaign_name',
99
+ :'ad_group_id',
100
+ :'ad_group_name',
101
+ ])
102
+ end
103
+
104
+ # Initializes the object
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ def initialize(attributes = {})
107
+ if (!attributes.is_a?(Hash))
108
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetAdsSearchTerms200ResponseDataInner` initialize method"
109
+ end
110
+
111
+ # check to see if the attribute exists and convert string to symbol for hash key
112
+ acceptable_attribute_map = self.class.acceptable_attribute_map
113
+ attributes = attributes.each_with_object({}) { |(k, v), h|
114
+ if (!acceptable_attribute_map.key?(k.to_sym))
115
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetAdsSearchTerms200ResponseDataInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
116
+ end
117
+ h[k.to_sym] = v
118
+ }
119
+
120
+ if attributes.key?(:'search_term')
121
+ self.search_term = attributes[:'search_term']
122
+ end
123
+
124
+ if attributes.key?(:'status')
125
+ self.status = attributes[:'status']
126
+ end
127
+
128
+ if attributes.key?(:'match_type')
129
+ self.match_type = attributes[:'match_type']
130
+ end
131
+
132
+ if attributes.key?(:'campaign_id')
133
+ self.campaign_id = attributes[:'campaign_id']
134
+ end
135
+
136
+ if attributes.key?(:'campaign_name')
137
+ self.campaign_name = attributes[:'campaign_name']
138
+ end
139
+
140
+ if attributes.key?(:'ad_group_id')
141
+ self.ad_group_id = attributes[:'ad_group_id']
142
+ end
143
+
144
+ if attributes.key?(:'ad_group_name')
145
+ self.ad_group_name = attributes[:'ad_group_name']
146
+ end
147
+
148
+ if attributes.key?(:'impressions')
149
+ self.impressions = attributes[:'impressions']
150
+ end
151
+
152
+ if attributes.key?(:'clicks')
153
+ self.clicks = attributes[:'clicks']
154
+ end
155
+
156
+ if attributes.key?(:'cost_micros')
157
+ self.cost_micros = attributes[:'cost_micros']
158
+ end
159
+
160
+ if attributes.key?(:'conversions')
161
+ self.conversions = attributes[:'conversions']
162
+ end
163
+
164
+ if attributes.key?(:'conversions_value')
165
+ self.conversions_value = attributes[:'conversions_value']
166
+ end
167
+ end
168
+
169
+ # Show invalid properties with the reasons. Usually used together with valid?
170
+ # @return Array for valid properties with the reasons
171
+ def list_invalid_properties
172
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
173
+ invalid_properties = Array.new
174
+ invalid_properties
175
+ end
176
+
177
+ # Check to see if the all the properties in the model are valid
178
+ # @return true if the model is valid
179
+ def valid?
180
+ warn '[DEPRECATED] the `valid?` method is obsolete'
181
+ true
182
+ end
183
+
184
+ # Checks equality by comparing each attribute.
185
+ # @param [Object] Object to be compared
186
+ def ==(o)
187
+ return true if self.equal?(o)
188
+ self.class == o.class &&
189
+ search_term == o.search_term &&
190
+ status == o.status &&
191
+ match_type == o.match_type &&
192
+ campaign_id == o.campaign_id &&
193
+ campaign_name == o.campaign_name &&
194
+ ad_group_id == o.ad_group_id &&
195
+ ad_group_name == o.ad_group_name &&
196
+ impressions == o.impressions &&
197
+ clicks == o.clicks &&
198
+ cost_micros == o.cost_micros &&
199
+ conversions == o.conversions &&
200
+ conversions_value == o.conversions_value
201
+ end
202
+
203
+ # @see the `==` method
204
+ # @param [Object] Object to be compared
205
+ def eql?(o)
206
+ self == o
207
+ end
208
+
209
+ # Calculates hash code according to all attributes.
210
+ # @return [Integer] Hash code
211
+ def hash
212
+ [search_term, status, match_type, campaign_id, campaign_name, ad_group_id, ad_group_name, impressions, clicks, cost_micros, conversions, conversions_value].hash
213
+ end
214
+
215
+ # Builds the object from hash
216
+ # @param [Hash] attributes Model attributes in the form of hash
217
+ # @return [Object] Returns the model itself
218
+ def self.build_from_hash(attributes)
219
+ return nil unless attributes.is_a?(Hash)
220
+ attributes = attributes.transform_keys(&:to_sym)
221
+ transformed_hash = {}
222
+ openapi_types.each_pair do |key, type|
223
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
224
+ transformed_hash["#{key}"] = nil
225
+ elsif type =~ /\AArray<(.*)>/i
226
+ # check to ensure the input is an array given that the attribute
227
+ # is documented as an array but the input is not
228
+ if attributes[attribute_map[key]].is_a?(Array)
229
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
230
+ end
231
+ elsif !attributes[attribute_map[key]].nil?
232
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
233
+ end
234
+ end
235
+ new(transformed_hash)
236
+ end
237
+
238
+ # Returns the object in the form of hash
239
+ # @return [Hash] Returns the object in the form of hash
240
+ def to_hash
241
+ hash = {}
242
+ self.class.attribute_map.each_pair do |attr, param|
243
+ value = self.send(attr)
244
+ if value.nil?
245
+ is_nullable = self.class.openapi_nullable.include?(attr)
246
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
247
+ end
248
+
249
+ hash[param] = _to_hash(value)
250
+ end
251
+ hash
252
+ end
253
+
254
+ end
255
+
256
+ 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 GetAdsSearchTerms200ResponsePaging < ApiModelBase
18
+ # Null when the last page was returned.
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::GetAdsSearchTerms200ResponsePaging` 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::GetAdsSearchTerms200ResponsePaging`. 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