plainrouter-sdk 0.2.0 → 0.5.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 (125) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -2
  3. data/lib/plainrouter/client.rb +2 -1
  4. data/lib/plainrouter/openapi/api/action_dry_run_api_api.rb +2 -2
  5. data/lib/plainrouter/openapi/api/action_proposal_api_api.rb +2 -2
  6. data/lib/plainrouter/openapi/api/ad_test_api_api.rb +259 -0
  7. data/lib/plainrouter/openapi/api/cookie_declaration_api.rb +90 -0
  8. data/lib/plainrouter/openapi/api/creative_api.rb +181 -0
  9. data/lib/plainrouter/openapi/api/deployment_plan_api.rb +306 -0
  10. data/lib/plainrouter/openapi/api/meta_inventory_exposure_api.rb +121 -0
  11. data/lib/plainrouter/openapi/configuration.rb +42 -0
  12. data/lib/plainrouter/openapi/models/action_current_disposition.rb +13 -1
  13. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload.rb +238 -0
  14. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline.rb +103 -0
  15. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline_any_of.rb +245 -0
  16. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_inverse.rb +206 -0
  17. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics.rb +103 -0
  18. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics_any_of.rb +276 -0
  19. data/lib/plainrouter/openapi/models/action_policy_read_data.rb +3 -105
  20. data/lib/plainrouter/openapi/models/action_policy_result.rb +374 -0
  21. data/lib/plainrouter/openapi/models/action_proposal_input.rb +32 -4
  22. data/lib/plainrouter/openapi/models/action_read_item.rb +62 -4
  23. data/lib/plainrouter/openapi/models/action_read_item_evidence.rb +105 -0
  24. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of.rb +190 -0
  25. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of1.rb +242 -0
  26. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of2.rb +217 -0
  27. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of_outcome.rb +238 -0
  28. data/lib/plainrouter/openapi/models/action_read_item_proposer.rb +198 -0
  29. data/lib/plainrouter/openapi/models/actions_api_dry_run401_response.rb +103 -0
  30. data/lib/plainrouter/openapi/models/actions_tests_api_index404_response.rb +103 -0
  31. data/lib/plainrouter/openapi/models/actions_tests_api_store_request.rb +467 -0
  32. data/lib/plainrouter/openapi/models/actions_tests_api_store_request_maximum_spend_minor.rb +104 -0
  33. data/lib/plainrouter/openapi/models/ad_test.rb +552 -0
  34. data/lib/plainrouter/openapi/models/ad_test_create_read.rb +164 -0
  35. data/lib/plainrouter/openapi/models/ad_test_create_read_test.rb +675 -0
  36. data/lib/plainrouter/openapi/models/ad_test_create_read_test_members_inner.rb +232 -0
  37. data/lib/plainrouter/openapi/models/ad_test_create_read_test_pause_proposals_inner.rb +286 -0
  38. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict.rb +336 -0
  39. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_daily_facts_inner.rb +374 -0
  40. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details.rb +285 -0
  41. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_baseline.rb +190 -0
  42. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_observed_destinations_inner.rb +216 -0
  43. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_members_inner.rb +349 -0
  44. data/lib/plainrouter/openapi/models/ad_test_daily_fact_read.rb +374 -0
  45. data/lib/plainrouter/openapi/models/ad_test_event_choice.rb +190 -0
  46. data/lib/plainrouter/openapi/models/ad_test_list_read.rb +218 -0
  47. data/lib/plainrouter/openapi/models/ad_test_list_read_observed_conversion_events_inner.rb +190 -0
  48. data/lib/plainrouter/openapi/models/ad_test_list_read_tests.rb +396 -0
  49. data/lib/plainrouter/openapi/models/ad_test_read.rb +675 -0
  50. data/lib/plainrouter/openapi/models/ad_test_show_read.rb +164 -0
  51. data/lib/plainrouter/openapi/models/ad_test_verdict_member_read.rb +349 -0
  52. data/lib/plainrouter/openapi/models/ad_test_verdict_read.rb +336 -0
  53. data/lib/plainrouter/openapi/models/agent_credential_error.rb +214 -0
  54. data/lib/plainrouter/openapi/models/api_route_not_found.rb +216 -0
  55. data/lib/plainrouter/openapi/models/api_route_not_found_error.rb +240 -0
  56. data/lib/plainrouter/openapi/models/api_route_not_found_request.rb +190 -0
  57. data/lib/plainrouter/openapi/models/api_route_not_found_resources.rb +190 -0
  58. data/lib/plainrouter/openapi/models/cookie_declaration.rb +177 -0
  59. data/lib/plainrouter/openapi/models/cookie_declaration_categories.rb +268 -0
  60. data/lib/plainrouter/openapi/models/cookie_declaration_categories_necessary.rb +194 -0
  61. data/lib/plainrouter/openapi/models/cookie_declaration_item.rb +280 -0
  62. data/lib/plainrouter/openapi/models/create_event202_response_warnings_inner.rb +2 -2
  63. data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +1 -1
  64. data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +1 -1
  65. data/lib/plainrouter/openapi/models/creative_intake_read.rb +164 -0
  66. data/lib/plainrouter/openapi/models/creative_intake_read_creative.rb +451 -0
  67. data/lib/plainrouter/openapi/models/creative_intake_read_creative_tags.rb +104 -0
  68. data/lib/plainrouter/openapi/models/creative_intake_rejected.rb +164 -0
  69. data/lib/plainrouter/openapi/models/creative_intake_rejected_error.rb +190 -0
  70. data/lib/plainrouter/openapi/models/creative_intake_tags.rb +257 -0
  71. data/lib/plainrouter/openapi/models/deployment_plan.rb +593 -0
  72. data/lib/plainrouter/openapi/models/deployment_plan_read.rb +268 -0
  73. data/lib/plainrouter/openapi/models/deployment_plan_read_copy.rb +266 -0
  74. data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner.rb +320 -0
  75. data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner_copy.rb +267 -0
  76. data/lib/plainrouter/openapi/models/destination_type.rb +2 -1
  77. data/lib/plainrouter/openapi/models/execute_deployment_plan_request.rb +200 -0
  78. data/lib/plainrouter/openapi/models/get_cookie_declaration404_response.rb +103 -0
  79. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response.rb +324 -0
  80. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_account.rb +264 -0
  81. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_changes_inner.rb +304 -0
  82. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_effective_range.rb +190 -0
  83. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_metrics_inner.rb +492 -0
  84. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner.rb +304 -0
  85. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner_meta.rb +268 -0
  86. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_staleness.rb +200 -0
  87. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_sync.rb +186 -0
  88. data/lib/plainrouter/openapi/models/ingestion_warning_code.rb +2 -1
  89. data/lib/plainrouter/openapi/models/launch_intent_read.rb +164 -0
  90. data/lib/plainrouter/openapi/models/launch_intent_read_intent.rb +330 -0
  91. data/lib/plainrouter/openapi/models/launch_intent_read_intent_actions_inner.rb +238 -0
  92. data/lib/plainrouter/openapi/models/launch_intent_status.rb +46 -0
  93. data/lib/plainrouter/openapi/models/launch_plans_copy403_response.rb +103 -0
  94. data/lib/plainrouter/openapi/models/launch_plans_copy404_response.rb +103 -0
  95. data/lib/plainrouter/openapi/models/launch_plans_execute422_response.rb +103 -0
  96. data/lib/plainrouter/openapi/models/launch_plans_index200_response.rb +164 -0
  97. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans.rb +244 -0
  98. data/lib/plainrouter/openapi/models/launch_plans_show200_response.rb +164 -0
  99. data/lib/plainrouter/openapi/models/plan_copy_forbidden.rb +164 -0
  100. data/lib/plainrouter/openapi/models/plan_copy_forbidden_error.rb +214 -0
  101. data/lib/plainrouter/openapi/models/plan_copy_not_found.rb +164 -0
  102. data/lib/plainrouter/openapi/models/plan_copy_not_found_error.rb +214 -0
  103. data/lib/plainrouter/openapi/models/plan_copy_read.rb +164 -0
  104. data/lib/plainrouter/openapi/models/plan_copy_read_plan.rb +347 -0
  105. data/lib/plainrouter/openapi/models/plan_copy_rejected.rb +164 -0
  106. data/lib/plainrouter/openapi/models/plan_copy_rejected_error.rb +214 -0
  107. data/lib/plainrouter/openapi/models/plan_execute_conflict.rb +164 -0
  108. data/lib/plainrouter/openapi/models/plan_execute_conflict_error.rb +214 -0
  109. data/lib/plainrouter/openapi/models/plan_execute_rejected.rb +164 -0
  110. data/lib/plainrouter/openapi/models/plan_execute_rejected_error.rb +214 -0
  111. data/lib/plainrouter/openapi/models/proposal_replay_conflict.rb +214 -0
  112. data/lib/plainrouter/openapi/models/proposal_replay_conflict_errors.rb +178 -0
  113. data/lib/plainrouter/openapi/models/store_creative403_response.rb +103 -0
  114. data/lib/plainrouter/openapi/models/store_creative413_response.rb +103 -0
  115. data/lib/plainrouter/openapi/models/store_creative422_response.rb +103 -0
  116. data/lib/plainrouter/openapi/models/store_creative_from_url_request.rb +208 -0
  117. data/lib/plainrouter/openapi/models/store_creative_from_url_request_tags.rb +257 -0
  118. data/lib/plainrouter/openapi/models/store_creative_request.rb +219 -0
  119. data/lib/plainrouter/openapi/models/store_creative_request_tags.rb +257 -0
  120. data/lib/plainrouter/openapi/models/workspace_lock_timeout.rb +164 -0
  121. data/lib/plainrouter/openapi/models/workspace_lock_timeout_error.rb +214 -0
  122. data/lib/plainrouter/openapi/version.rb +1 -1
  123. data/lib/plainrouter/openapi.rb +106 -0
  124. data/lib/plainrouter/version.rb +1 -1
  125. metadata +108 -2
@@ -0,0 +1,593 @@
1
+ =begin
2
+ #Plainrouter Conversion API
3
+
4
+ #Plainrouter public Signals Conversion API.
5
+
6
+ The version of the OpenAPI document: 0.5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PlainRouter::OpenAPI
17
+ class DeploymentPlan < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :workspace_id
21
+
22
+ attr_accessor :platform_ad_account_id
23
+
24
+ attr_accessor :platform
25
+
26
+ attr_accessor :campaign_ref
27
+
28
+ attr_accessor :campaign_spec
29
+
30
+ attr_accessor :ad_set_ref
31
+
32
+ # When present, bid_amount must be a positive integer in Meta minor units for the account currency. Digit-only strings of at most 18 digits are accepted and normalized to integers. Null, zero, negatives, decimals and other strings are refused on ad_set_spec.bid_amount.
33
+ attr_accessor :ad_set_spec
34
+
35
+ attr_accessor :budget_type
36
+
37
+ attr_accessor :budget_amount_minor
38
+
39
+ attr_accessor :currency
40
+
41
+ attr_accessor :copy
42
+
43
+ attr_accessor :landing_page
44
+
45
+ attr_accessor :utm_policy_id
46
+
47
+ attr_accessor :naming_policy_id
48
+
49
+ attr_accessor :status
50
+
51
+ attr_accessor :validation_result
52
+
53
+ attr_accessor :diff
54
+
55
+ attr_accessor :validated_at
56
+
57
+ attr_accessor :approval_id
58
+
59
+ attr_accessor :created_at
60
+
61
+ attr_accessor :updated_at
62
+
63
+ attr_accessor :platform_object_ids
64
+
65
+ attr_accessor :name
66
+
67
+ # Attribute mapping from ruby-style variable name to JSON key.
68
+ def self.attribute_map
69
+ {
70
+ :'id' => :'id',
71
+ :'workspace_id' => :'workspace_id',
72
+ :'platform_ad_account_id' => :'platform_ad_account_id',
73
+ :'platform' => :'platform',
74
+ :'campaign_ref' => :'campaign_ref',
75
+ :'campaign_spec' => :'campaign_spec',
76
+ :'ad_set_ref' => :'ad_set_ref',
77
+ :'ad_set_spec' => :'ad_set_spec',
78
+ :'budget_type' => :'budget_type',
79
+ :'budget_amount_minor' => :'budget_amount_minor',
80
+ :'currency' => :'currency',
81
+ :'copy' => :'copy',
82
+ :'landing_page' => :'landing_page',
83
+ :'utm_policy_id' => :'utm_policy_id',
84
+ :'naming_policy_id' => :'naming_policy_id',
85
+ :'status' => :'status',
86
+ :'validation_result' => :'validation_result',
87
+ :'diff' => :'diff',
88
+ :'validated_at' => :'validated_at',
89
+ :'approval_id' => :'approval_id',
90
+ :'created_at' => :'created_at',
91
+ :'updated_at' => :'updated_at',
92
+ :'platform_object_ids' => :'platform_object_ids',
93
+ :'name' => :'name'
94
+ }
95
+ end
96
+
97
+ # Returns attribute mapping this model knows about
98
+ def self.acceptable_attribute_map
99
+ attribute_map
100
+ end
101
+
102
+ # Returns all the JSON keys this model knows about
103
+ def self.acceptable_attributes
104
+ acceptable_attribute_map.values
105
+ end
106
+
107
+ # Attribute type mapping.
108
+ def self.openapi_types
109
+ {
110
+ :'id' => :'String',
111
+ :'workspace_id' => :'Integer',
112
+ :'platform_ad_account_id' => :'Integer',
113
+ :'platform' => :'String',
114
+ :'campaign_ref' => :'String',
115
+ :'campaign_spec' => :'Array<Object>',
116
+ :'ad_set_ref' => :'String',
117
+ :'ad_set_spec' => :'Array<Object>',
118
+ :'budget_type' => :'String',
119
+ :'budget_amount_minor' => :'Integer',
120
+ :'currency' => :'String',
121
+ :'copy' => :'Array<Object>',
122
+ :'landing_page' => :'String',
123
+ :'utm_policy_id' => :'String',
124
+ :'naming_policy_id' => :'String',
125
+ :'status' => :'String',
126
+ :'validation_result' => :'Array<Object>',
127
+ :'diff' => :'Array<Object>',
128
+ :'validated_at' => :'Time',
129
+ :'approval_id' => :'String',
130
+ :'created_at' => :'Time',
131
+ :'updated_at' => :'Time',
132
+ :'platform_object_ids' => :'Array<Object>',
133
+ :'name' => :'String'
134
+ }
135
+ end
136
+
137
+ # List of attributes with nullable: true
138
+ def self.openapi_nullable
139
+ Set.new([
140
+ :'campaign_ref',
141
+ :'campaign_spec',
142
+ :'ad_set_ref',
143
+ :'ad_set_spec',
144
+ :'utm_policy_id',
145
+ :'naming_policy_id',
146
+ :'validation_result',
147
+ :'diff',
148
+ :'validated_at',
149
+ :'approval_id',
150
+ :'created_at',
151
+ :'updated_at',
152
+ :'name'
153
+ ])
154
+ end
155
+
156
+ # Initializes the object
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ def initialize(attributes = {})
159
+ if (!attributes.is_a?(Hash))
160
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::DeploymentPlan` initialize method"
161
+ end
162
+
163
+ # check to see if the attribute exists and convert string to symbol for hash key
164
+ acceptable_attribute_map = self.class.acceptable_attribute_map
165
+ attributes = attributes.each_with_object({}) { |(k, v), h|
166
+ if (!acceptable_attribute_map.key?(k.to_sym))
167
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::DeploymentPlan`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
168
+ end
169
+ h[k.to_sym] = v
170
+ }
171
+
172
+ if attributes.key?(:'id')
173
+ self.id = attributes[:'id']
174
+ else
175
+ self.id = nil
176
+ end
177
+
178
+ if attributes.key?(:'workspace_id')
179
+ self.workspace_id = attributes[:'workspace_id']
180
+ else
181
+ self.workspace_id = nil
182
+ end
183
+
184
+ if attributes.key?(:'platform_ad_account_id')
185
+ self.platform_ad_account_id = attributes[:'platform_ad_account_id']
186
+ else
187
+ self.platform_ad_account_id = nil
188
+ end
189
+
190
+ if attributes.key?(:'platform')
191
+ self.platform = attributes[:'platform']
192
+ else
193
+ self.platform = nil
194
+ end
195
+
196
+ if attributes.key?(:'campaign_ref')
197
+ self.campaign_ref = attributes[:'campaign_ref']
198
+ else
199
+ self.campaign_ref = nil
200
+ end
201
+
202
+ if attributes.key?(:'campaign_spec')
203
+ if (value = attributes[:'campaign_spec']).is_a?(Array)
204
+ self.campaign_spec = value
205
+ end
206
+ else
207
+ self.campaign_spec = nil
208
+ end
209
+
210
+ if attributes.key?(:'ad_set_ref')
211
+ self.ad_set_ref = attributes[:'ad_set_ref']
212
+ else
213
+ self.ad_set_ref = nil
214
+ end
215
+
216
+ if attributes.key?(:'ad_set_spec')
217
+ if (value = attributes[:'ad_set_spec']).is_a?(Array)
218
+ self.ad_set_spec = value
219
+ end
220
+ else
221
+ self.ad_set_spec = nil
222
+ end
223
+
224
+ if attributes.key?(:'budget_type')
225
+ self.budget_type = attributes[:'budget_type']
226
+ else
227
+ self.budget_type = nil
228
+ end
229
+
230
+ if attributes.key?(:'budget_amount_minor')
231
+ self.budget_amount_minor = attributes[:'budget_amount_minor']
232
+ else
233
+ self.budget_amount_minor = nil
234
+ end
235
+
236
+ if attributes.key?(:'currency')
237
+ self.currency = attributes[:'currency']
238
+ else
239
+ self.currency = nil
240
+ end
241
+
242
+ if attributes.key?(:'copy')
243
+ if (value = attributes[:'copy']).is_a?(Array)
244
+ self.copy = value
245
+ end
246
+ else
247
+ self.copy = nil
248
+ end
249
+
250
+ if attributes.key?(:'landing_page')
251
+ self.landing_page = attributes[:'landing_page']
252
+ else
253
+ self.landing_page = nil
254
+ end
255
+
256
+ if attributes.key?(:'utm_policy_id')
257
+ self.utm_policy_id = attributes[:'utm_policy_id']
258
+ else
259
+ self.utm_policy_id = nil
260
+ end
261
+
262
+ if attributes.key?(:'naming_policy_id')
263
+ self.naming_policy_id = attributes[:'naming_policy_id']
264
+ else
265
+ self.naming_policy_id = nil
266
+ end
267
+
268
+ if attributes.key?(:'status')
269
+ self.status = attributes[:'status']
270
+ else
271
+ self.status = nil
272
+ end
273
+
274
+ if attributes.key?(:'validation_result')
275
+ if (value = attributes[:'validation_result']).is_a?(Array)
276
+ self.validation_result = value
277
+ end
278
+ else
279
+ self.validation_result = nil
280
+ end
281
+
282
+ if attributes.key?(:'diff')
283
+ if (value = attributes[:'diff']).is_a?(Array)
284
+ self.diff = value
285
+ end
286
+ else
287
+ self.diff = nil
288
+ end
289
+
290
+ if attributes.key?(:'validated_at')
291
+ self.validated_at = attributes[:'validated_at']
292
+ else
293
+ self.validated_at = nil
294
+ end
295
+
296
+ if attributes.key?(:'approval_id')
297
+ self.approval_id = attributes[:'approval_id']
298
+ else
299
+ self.approval_id = nil
300
+ end
301
+
302
+ if attributes.key?(:'created_at')
303
+ self.created_at = attributes[:'created_at']
304
+ else
305
+ self.created_at = nil
306
+ end
307
+
308
+ if attributes.key?(:'updated_at')
309
+ self.updated_at = attributes[:'updated_at']
310
+ else
311
+ self.updated_at = nil
312
+ end
313
+
314
+ if attributes.key?(:'platform_object_ids')
315
+ if (value = attributes[:'platform_object_ids']).is_a?(Array)
316
+ self.platform_object_ids = value
317
+ end
318
+ else
319
+ self.platform_object_ids = nil
320
+ end
321
+
322
+ if attributes.key?(:'name')
323
+ self.name = attributes[:'name']
324
+ else
325
+ self.name = nil
326
+ end
327
+ end
328
+
329
+ # Show invalid properties with the reasons. Usually used together with valid?
330
+ # @return Array for valid properties with the reasons
331
+ def list_invalid_properties
332
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
333
+ invalid_properties = Array.new
334
+ if @id.nil?
335
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
336
+ end
337
+
338
+ if @workspace_id.nil?
339
+ invalid_properties.push('invalid value for "workspace_id", workspace_id cannot be nil.')
340
+ end
341
+
342
+ if @platform_ad_account_id.nil?
343
+ invalid_properties.push('invalid value for "platform_ad_account_id", platform_ad_account_id cannot be nil.')
344
+ end
345
+
346
+ if @platform.nil?
347
+ invalid_properties.push('invalid value for "platform", platform cannot be nil.')
348
+ end
349
+
350
+ if @budget_type.nil?
351
+ invalid_properties.push('invalid value for "budget_type", budget_type cannot be nil.')
352
+ end
353
+
354
+ if @budget_amount_minor.nil?
355
+ invalid_properties.push('invalid value for "budget_amount_minor", budget_amount_minor cannot be nil.')
356
+ end
357
+
358
+ if @currency.nil?
359
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
360
+ end
361
+
362
+ if @copy.nil?
363
+ invalid_properties.push('invalid value for "copy", copy cannot be nil.')
364
+ end
365
+
366
+ if @landing_page.nil?
367
+ invalid_properties.push('invalid value for "landing_page", landing_page cannot be nil.')
368
+ end
369
+
370
+ if @status.nil?
371
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
372
+ end
373
+
374
+ if @platform_object_ids.nil?
375
+ invalid_properties.push('invalid value for "platform_object_ids", platform_object_ids cannot be nil.')
376
+ end
377
+
378
+ invalid_properties
379
+ end
380
+
381
+ # Check to see if the all the properties in the model are valid
382
+ # @return true if the model is valid
383
+ def valid?
384
+ warn '[DEPRECATED] the `valid?` method is obsolete'
385
+ return false if @id.nil?
386
+ return false if @workspace_id.nil?
387
+ return false if @platform_ad_account_id.nil?
388
+ return false if @platform.nil?
389
+ return false if @budget_type.nil?
390
+ return false if @budget_amount_minor.nil?
391
+ return false if @currency.nil?
392
+ return false if @copy.nil?
393
+ return false if @landing_page.nil?
394
+ return false if @status.nil?
395
+ return false if @platform_object_ids.nil?
396
+ true
397
+ end
398
+
399
+ # Custom attribute writer method with validation
400
+ # @param [Object] id Value to be assigned
401
+ def id=(id)
402
+ if id.nil?
403
+ fail ArgumentError, 'id cannot be nil'
404
+ end
405
+
406
+ @id = id
407
+ end
408
+
409
+ # Custom attribute writer method with validation
410
+ # @param [Object] workspace_id Value to be assigned
411
+ def workspace_id=(workspace_id)
412
+ if workspace_id.nil?
413
+ fail ArgumentError, 'workspace_id cannot be nil'
414
+ end
415
+
416
+ @workspace_id = workspace_id
417
+ end
418
+
419
+ # Custom attribute writer method with validation
420
+ # @param [Object] platform_ad_account_id Value to be assigned
421
+ def platform_ad_account_id=(platform_ad_account_id)
422
+ if platform_ad_account_id.nil?
423
+ fail ArgumentError, 'platform_ad_account_id cannot be nil'
424
+ end
425
+
426
+ @platform_ad_account_id = platform_ad_account_id
427
+ end
428
+
429
+ # Custom attribute writer method with validation
430
+ # @param [Object] platform Value to be assigned
431
+ def platform=(platform)
432
+ if platform.nil?
433
+ fail ArgumentError, 'platform cannot be nil'
434
+ end
435
+
436
+ @platform = platform
437
+ end
438
+
439
+ # Custom attribute writer method with validation
440
+ # @param [Object] budget_type Value to be assigned
441
+ def budget_type=(budget_type)
442
+ if budget_type.nil?
443
+ fail ArgumentError, 'budget_type cannot be nil'
444
+ end
445
+
446
+ @budget_type = budget_type
447
+ end
448
+
449
+ # Custom attribute writer method with validation
450
+ # @param [Object] budget_amount_minor Value to be assigned
451
+ def budget_amount_minor=(budget_amount_minor)
452
+ if budget_amount_minor.nil?
453
+ fail ArgumentError, 'budget_amount_minor cannot be nil'
454
+ end
455
+
456
+ @budget_amount_minor = budget_amount_minor
457
+ end
458
+
459
+ # Custom attribute writer method with validation
460
+ # @param [Object] currency Value to be assigned
461
+ def currency=(currency)
462
+ if currency.nil?
463
+ fail ArgumentError, 'currency cannot be nil'
464
+ end
465
+
466
+ @currency = currency
467
+ end
468
+
469
+ # Custom attribute writer method with validation
470
+ # @param [Object] copy Value to be assigned
471
+ def copy=(copy)
472
+ if copy.nil?
473
+ fail ArgumentError, 'copy cannot be nil'
474
+ end
475
+
476
+ @copy = copy
477
+ end
478
+
479
+ # Custom attribute writer method with validation
480
+ # @param [Object] landing_page Value to be assigned
481
+ def landing_page=(landing_page)
482
+ if landing_page.nil?
483
+ fail ArgumentError, 'landing_page cannot be nil'
484
+ end
485
+
486
+ @landing_page = landing_page
487
+ end
488
+
489
+ # Custom attribute writer method with validation
490
+ # @param [Object] status Value to be assigned
491
+ def status=(status)
492
+ if status.nil?
493
+ fail ArgumentError, 'status cannot be nil'
494
+ end
495
+
496
+ @status = status
497
+ end
498
+
499
+ # Custom attribute writer method with validation
500
+ # @param [Object] platform_object_ids Value to be assigned
501
+ def platform_object_ids=(platform_object_ids)
502
+ if platform_object_ids.nil?
503
+ fail ArgumentError, 'platform_object_ids cannot be nil'
504
+ end
505
+
506
+ @platform_object_ids = platform_object_ids
507
+ end
508
+
509
+ # Checks equality by comparing each attribute.
510
+ # @param [Object] Object to be compared
511
+ def ==(o)
512
+ return true if self.equal?(o)
513
+ self.class == o.class &&
514
+ id == o.id &&
515
+ workspace_id == o.workspace_id &&
516
+ platform_ad_account_id == o.platform_ad_account_id &&
517
+ platform == o.platform &&
518
+ campaign_ref == o.campaign_ref &&
519
+ campaign_spec == o.campaign_spec &&
520
+ ad_set_ref == o.ad_set_ref &&
521
+ ad_set_spec == o.ad_set_spec &&
522
+ budget_type == o.budget_type &&
523
+ budget_amount_minor == o.budget_amount_minor &&
524
+ currency == o.currency &&
525
+ copy == o.copy &&
526
+ landing_page == o.landing_page &&
527
+ utm_policy_id == o.utm_policy_id &&
528
+ naming_policy_id == o.naming_policy_id &&
529
+ status == o.status &&
530
+ validation_result == o.validation_result &&
531
+ diff == o.diff &&
532
+ validated_at == o.validated_at &&
533
+ approval_id == o.approval_id &&
534
+ created_at == o.created_at &&
535
+ updated_at == o.updated_at &&
536
+ platform_object_ids == o.platform_object_ids &&
537
+ name == o.name
538
+ end
539
+
540
+ # @see the `==` method
541
+ # @param [Object] Object to be compared
542
+ def eql?(o)
543
+ self == o
544
+ end
545
+
546
+ # Calculates hash code according to all attributes.
547
+ # @return [Integer] Hash code
548
+ def hash
549
+ [id, workspace_id, platform_ad_account_id, platform, campaign_ref, campaign_spec, ad_set_ref, ad_set_spec, budget_type, budget_amount_minor, currency, copy, landing_page, utm_policy_id, naming_policy_id, status, validation_result, diff, validated_at, approval_id, created_at, updated_at, platform_object_ids, name].hash
550
+ end
551
+
552
+ # Builds the object from hash
553
+ # @param [Hash] attributes Model attributes in the form of hash
554
+ # @return [Object] Returns the model itself
555
+ def self.build_from_hash(attributes)
556
+ return nil unless attributes.is_a?(Hash)
557
+ attributes = attributes.transform_keys(&:to_sym)
558
+ transformed_hash = {}
559
+ openapi_types.each_pair do |key, type|
560
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
561
+ transformed_hash["#{key}"] = nil
562
+ elsif type =~ /\AArray<(.*)>/i
563
+ # check to ensure the input is an array given that the attribute
564
+ # is documented as an array but the input is not
565
+ if attributes[attribute_map[key]].is_a?(Array)
566
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
567
+ end
568
+ elsif !attributes[attribute_map[key]].nil?
569
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
570
+ end
571
+ end
572
+ new(transformed_hash)
573
+ end
574
+
575
+ # Returns the object in the form of hash
576
+ # @return [Hash] Returns the object in the form of hash
577
+ def to_hash
578
+ hash = {}
579
+ self.class.attribute_map.each_pair do |attr, param|
580
+ value = self.send(attr)
581
+ if value.nil?
582
+ is_nullable = self.class.openapi_nullable.include?(attr)
583
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
584
+ end
585
+
586
+ hash[param] = _to_hash(value)
587
+ end
588
+ hash
589
+ end
590
+
591
+ end
592
+
593
+ end