plainrouter-sdk 0.1.1 → 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 (233) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -4
  3. data/lib/plainrouter/client.rb +75 -2
  4. data/lib/plainrouter/openapi/api/action_dry_run_api_api.rb +96 -0
  5. data/lib/plainrouter/openapi/api/action_proposal_api_api.rb +96 -0
  6. data/lib/plainrouter/openapi/api/action_read_api_api.rb +404 -0
  7. data/lib/plainrouter/openapi/api/ad_test_api_api.rb +259 -0
  8. data/lib/plainrouter/openapi/api/cookie_declaration_api.rb +90 -0
  9. data/lib/plainrouter/openapi/api/creative_api.rb +181 -0
  10. data/lib/plainrouter/openapi/api/deployment_plan_api.rb +306 -0
  11. data/lib/plainrouter/openapi/api/event_api.rb +15 -15
  12. data/lib/plainrouter/openapi/api/meta_inventory_exposure_api.rb +121 -0
  13. data/lib/plainrouter/openapi/api/operations_api.rb +24 -28
  14. data/lib/plainrouter/openapi/api/sandbox_api.rb +74 -17
  15. data/lib/plainrouter/openapi/api_client.rb +2 -2
  16. data/lib/plainrouter/openapi/api_error.rb +2 -2
  17. data/lib/plainrouter/openapi/api_model_base.rb +2 -2
  18. data/lib/plainrouter/openapi/configuration.rb +52 -3
  19. data/lib/plainrouter/openapi/models/action_batch_read.rb +164 -0
  20. data/lib/plainrouter/openapi/models/action_batch_read_data.rb +450 -0
  21. data/lib/plainrouter/openapi/models/action_current_disposition.rb +306 -0
  22. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload.rb +238 -0
  23. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline.rb +103 -0
  24. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline_any_of.rb +245 -0
  25. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_inverse.rb +206 -0
  26. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics.rb +103 -0
  27. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics_any_of.rb +276 -0
  28. data/lib/plainrouter/openapi/models/action_decision_receipt_read.rb +244 -0
  29. data/lib/plainrouter/openapi/models/action_decision_receipt_read_chain_entry.rb +190 -0
  30. data/lib/plainrouter/openapi/models/action_detail_read.rb +164 -0
  31. data/lib/plainrouter/openapi/models/action_dry_run_read.rb +164 -0
  32. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run.rb +166 -0
  33. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner.rb +103 -0
  34. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner_any_of.rb +376 -0
  35. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner_any_of1.rb +268 -0
  36. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner_any_of_diff.rb +162 -0
  37. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run_actions_inner_any_of_target_entity.rb +199 -0
  38. data/lib/plainrouter/openapi/models/action_list_read.rb +192 -0
  39. data/lib/plainrouter/openapi/models/action_list_read_meta.rb +242 -0
  40. data/lib/plainrouter/openapi/models/action_policy_read.rb +164 -0
  41. data/lib/plainrouter/openapi/models/action_policy_read_data.rb +278 -0
  42. data/lib/plainrouter/openapi/models/action_policy_result.rb +374 -0
  43. data/lib/plainrouter/openapi/models/action_proposal_input.rb +406 -0
  44. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner.rb +115 -0
  45. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of.rb +303 -0
  46. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of1.rb +303 -0
  47. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10.rb +303 -0
  48. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10_params.rb +356 -0
  49. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of11.rb +303 -0
  50. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of11_params.rb +173 -0
  51. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12.rb +303 -0
  52. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12_params.rb +188 -0
  53. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13.rb +303 -0
  54. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13_params.rb +259 -0
  55. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of2.rb +303 -0
  56. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of3.rb +303 -0
  57. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4.rb +303 -0
  58. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4_target_entity.rb +253 -0
  59. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of5.rb +303 -0
  60. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of6.rb +303 -0
  61. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of7.rb +303 -0
  62. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of8.rb +303 -0
  63. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of9.rb +303 -0
  64. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_params.rb +173 -0
  65. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_target_entity.rb +264 -0
  66. data/lib/plainrouter/openapi/models/action_proposal_input_evidence_inner.rb +262 -0
  67. data/lib/plainrouter/openapi/models/action_proposal_read.rb +164 -0
  68. data/lib/plainrouter/openapi/models/action_proposal_read_proposal.rb +452 -0
  69. data/lib/plainrouter/openapi/models/action_proposal_read_proposal_actions_inner.rb +386 -0
  70. data/lib/plainrouter/openapi/models/action_proposal_read_proposal_actions_inner_params.rb +103 -0
  71. data/lib/plainrouter/openapi/models/action_proposal_read_proposal_proposed_by.rb +202 -0
  72. data/lib/plainrouter/openapi/models/action_read_item.rb +574 -0
  73. data/lib/plainrouter/openapi/models/action_read_item_evidence.rb +105 -0
  74. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of.rb +190 -0
  75. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of1.rb +242 -0
  76. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of2.rb +217 -0
  77. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of_outcome.rb +238 -0
  78. data/lib/plainrouter/openapi/models/action_read_item_proposer.rb +198 -0
  79. data/lib/plainrouter/openapi/models/actions_api_dry_run401_response.rb +103 -0
  80. data/lib/plainrouter/openapi/models/actions_tests_api_index404_response.rb +103 -0
  81. data/lib/plainrouter/openapi/models/actions_tests_api_store_request.rb +467 -0
  82. data/lib/plainrouter/openapi/models/actions_tests_api_store_request_maximum_spend_minor.rb +104 -0
  83. data/lib/plainrouter/openapi/models/ad_test.rb +552 -0
  84. data/lib/plainrouter/openapi/models/ad_test_create_read.rb +164 -0
  85. data/lib/plainrouter/openapi/models/ad_test_create_read_test.rb +675 -0
  86. data/lib/plainrouter/openapi/models/ad_test_create_read_test_members_inner.rb +232 -0
  87. data/lib/plainrouter/openapi/models/ad_test_create_read_test_pause_proposals_inner.rb +286 -0
  88. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict.rb +336 -0
  89. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_daily_facts_inner.rb +374 -0
  90. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details.rb +285 -0
  91. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_baseline.rb +190 -0
  92. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_observed_destinations_inner.rb +216 -0
  93. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_members_inner.rb +349 -0
  94. data/lib/plainrouter/openapi/models/ad_test_daily_fact_read.rb +374 -0
  95. data/lib/plainrouter/openapi/models/ad_test_event_choice.rb +190 -0
  96. data/lib/plainrouter/openapi/models/ad_test_list_read.rb +218 -0
  97. data/lib/plainrouter/openapi/models/ad_test_list_read_observed_conversion_events_inner.rb +190 -0
  98. data/lib/plainrouter/openapi/models/ad_test_list_read_tests.rb +396 -0
  99. data/lib/plainrouter/openapi/models/ad_test_read.rb +675 -0
  100. data/lib/plainrouter/openapi/models/ad_test_show_read.rb +164 -0
  101. data/lib/plainrouter/openapi/models/ad_test_verdict_member_read.rb +349 -0
  102. data/lib/plainrouter/openapi/models/ad_test_verdict_read.rb +336 -0
  103. data/lib/plainrouter/openapi/models/agent_credential_error.rb +214 -0
  104. data/lib/plainrouter/openapi/models/api_route_not_found.rb +216 -0
  105. data/lib/plainrouter/openapi/models/api_route_not_found_error.rb +240 -0
  106. data/lib/plainrouter/openapi/models/api_route_not_found_request.rb +190 -0
  107. data/lib/plainrouter/openapi/models/api_route_not_found_resources.rb +190 -0
  108. data/lib/plainrouter/openapi/models/cookie_declaration.rb +177 -0
  109. data/lib/plainrouter/openapi/models/cookie_declaration_categories.rb +268 -0
  110. data/lib/plainrouter/openapi/models/cookie_declaration_categories_necessary.rb +194 -0
  111. data/lib/plainrouter/openapi/models/cookie_declaration_item.rb +280 -0
  112. data/lib/plainrouter/openapi/models/create_event200_response.rb +2 -2
  113. data/lib/plainrouter/openapi/models/create_event202_response.rb +218 -0
  114. data/lib/plainrouter/openapi/models/create_event202_response_warnings_inner.rb +240 -0
  115. data/lib/plainrouter/openapi/models/create_event_request.rb +2 -2
  116. data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +3 -3
  117. data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +3 -3
  118. data/lib/plainrouter/openapi/models/create_event_request_any_of_event_time.rb +2 -2
  119. data/lib/plainrouter/openapi/models/create_event_request_any_of_value_data.rb +2 -2
  120. data/lib/plainrouter/openapi/models/creative_intake_read.rb +164 -0
  121. data/lib/plainrouter/openapi/models/creative_intake_read_creative.rb +451 -0
  122. data/lib/plainrouter/openapi/models/creative_intake_read_creative_tags.rb +104 -0
  123. data/lib/plainrouter/openapi/models/creative_intake_rejected.rb +164 -0
  124. data/lib/plainrouter/openapi/models/creative_intake_rejected_error.rb +190 -0
  125. data/lib/plainrouter/openapi/models/creative_intake_tags.rb +257 -0
  126. data/lib/plainrouter/openapi/models/delete_user_data200_response.rb +2 -2
  127. data/lib/plainrouter/openapi/models/delete_user_data_request.rb +35 -36
  128. data/lib/plainrouter/openapi/models/delivery_status.rb +2 -2
  129. data/lib/plainrouter/openapi/models/deployment_plan.rb +593 -0
  130. data/lib/plainrouter/openapi/models/deployment_plan_read.rb +268 -0
  131. data/lib/plainrouter/openapi/models/deployment_plan_read_copy.rb +266 -0
  132. data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner.rb +320 -0
  133. data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner_copy.rb +267 -0
  134. data/lib/plainrouter/openapi/models/destination.rb +30 -3
  135. data/lib/plainrouter/openapi/models/destination_credential_source.rb +3 -4
  136. data/lib/plainrouter/openapi/models/destination_status.rb +2 -2
  137. data/lib/plainrouter/openapi/models/destination_type.rb +4 -3
  138. data/lib/plainrouter/openapi/models/emq_snapshot.rb +30 -3
  139. data/lib/plainrouter/openapi/models/error_message.rb +2 -2
  140. data/lib/plainrouter/openapi/models/event.rb +89 -45
  141. data/lib/plainrouter/openapi/models/execute_deployment_plan_request.rb +200 -0
  142. data/lib/plainrouter/openapi/models/get_cookie_declaration404_response.rb +103 -0
  143. data/lib/plainrouter/openapi/models/get_emq_report200_response.rb +2 -2
  144. data/lib/plainrouter/openapi/models/get_emq_report200_response_snapshots_inner.rb +30 -3
  145. data/lib/plainrouter/openapi/models/get_event200_response.rb +2 -2
  146. data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +30 -3
  147. data/lib/plainrouter/openapi/models/get_event200_response_event.rb +31 -4
  148. data/lib/plainrouter/openapi/models/get_event200_response_event_consent.rb +2 -2
  149. data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +30 -3
  150. data/lib/plainrouter/openapi/models/get_event200_response_event_user_data_hashed.rb +104 -0
  151. data/lib/plainrouter/openapi/models/get_event200_response_lineage.rb +2 -2
  152. data/lib/plainrouter/openapi/models/get_event200_response_lineage_children_inner.rb +31 -4
  153. data/lib/plainrouter/openapi/models/get_event200_response_lineage_parent.rb +31 -4
  154. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response.rb +324 -0
  155. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_account.rb +264 -0
  156. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_changes_inner.rb +304 -0
  157. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_effective_range.rb +190 -0
  158. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_metrics_inner.rb +492 -0
  159. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner.rb +304 -0
  160. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner_meta.rb +268 -0
  161. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_staleness.rb +200 -0
  162. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_sync.rb +186 -0
  163. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response.rb +2 -2
  164. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner.rb +30 -3
  165. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_buckets_value.rb +2 -2
  166. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts.rb +2 -2
  167. data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts_accepted.rb +2 -2
  168. data/lib/plainrouter/openapi/models/get_sandbox200_response.rb +2 -2
  169. data/lib/plainrouter/openapi/models/get_sandbox200_response_self_serve_key.rb +32 -6
  170. data/lib/plainrouter/openapi/models/{create_sandbox_key201_response.rb → get_sandbox200_response_self_serve_key_issued_key.rb} +6 -6
  171. data/lib/plainrouter/openapi/models/{create_sandbox_key201_response_use.rb → get_sandbox200_response_self_serve_key_issued_key_use.rb} +5 -5
  172. data/lib/plainrouter/openapi/models/get_sandbox200_response_try.rb +2 -2
  173. data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body.rb +2 -2
  174. data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body_value_data.rb +2 -2
  175. data/lib/plainrouter/openapi/models/ingestion_warning_code.rb +40 -0
  176. data/lib/plainrouter/openapi/models/jurisdiction_policy_class.rb +2 -2
  177. data/lib/plainrouter/openapi/models/launch_intent_read.rb +164 -0
  178. data/lib/plainrouter/openapi/models/launch_intent_read_intent.rb +330 -0
  179. data/lib/plainrouter/openapi/models/launch_intent_read_intent_actions_inner.rb +238 -0
  180. data/lib/plainrouter/openapi/models/launch_intent_status.rb +46 -0
  181. data/lib/plainrouter/openapi/models/launch_plans_copy403_response.rb +103 -0
  182. data/lib/plainrouter/openapi/models/launch_plans_copy404_response.rb +103 -0
  183. data/lib/plainrouter/openapi/models/launch_plans_execute422_response.rb +103 -0
  184. data/lib/plainrouter/openapi/models/launch_plans_index200_response.rb +164 -0
  185. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans.rb +244 -0
  186. data/lib/plainrouter/openapi/models/launch_plans_show200_response.rb +164 -0
  187. data/lib/plainrouter/openapi/models/list_events200_response.rb +2 -2
  188. data/lib/plainrouter/openapi/models/list_events200_response_events.rb +2 -2
  189. data/lib/plainrouter/openapi/models/list_events200_response_events_links_inner.rb +2 -2
  190. data/lib/plainrouter/openapi/models/list_events200_response_metrics.rb +2 -2
  191. data/lib/plainrouter/openapi/models/list_events_by_cursor200_response.rb +2 -2
  192. data/lib/plainrouter/openapi/models/list_events_by_cursor200_response_events.rb +2 -2
  193. data/lib/plainrouter/openapi/models/plan_copy_forbidden.rb +164 -0
  194. data/lib/plainrouter/openapi/models/plan_copy_forbidden_error.rb +214 -0
  195. data/lib/plainrouter/openapi/models/plan_copy_not_found.rb +164 -0
  196. data/lib/plainrouter/openapi/models/plan_copy_not_found_error.rb +214 -0
  197. data/lib/plainrouter/openapi/models/plan_copy_read.rb +164 -0
  198. data/lib/plainrouter/openapi/models/plan_copy_read_plan.rb +347 -0
  199. data/lib/plainrouter/openapi/models/plan_copy_rejected.rb +164 -0
  200. data/lib/plainrouter/openapi/models/plan_copy_rejected_error.rb +214 -0
  201. data/lib/plainrouter/openapi/models/plan_execute_conflict.rb +164 -0
  202. data/lib/plainrouter/openapi/models/plan_execute_conflict_error.rb +214 -0
  203. data/lib/plainrouter/openapi/models/plan_execute_rejected.rb +164 -0
  204. data/lib/plainrouter/openapi/models/plan_execute_rejected_error.rb +214 -0
  205. data/lib/plainrouter/openapi/models/proposal_replay_conflict.rb +214 -0
  206. data/lib/plainrouter/openapi/models/proposal_replay_conflict_errors.rb +178 -0
  207. data/lib/plainrouter/openapi/models/reconciliation_report.rb +31 -3
  208. data/lib/plainrouter/openapi/models/replay_deliveries202_response.rb +2 -2
  209. data/lib/plainrouter/openapi/models/replay_deliveries_request.rb +2 -2
  210. data/lib/plainrouter/openapi/models/send_test_purchase200_response.rb +2 -2
  211. data/lib/plainrouter/openapi/models/send_test_purchase422_response.rb +2 -2
  212. data/lib/plainrouter/openapi/models/send_test_purchase_request.rb +2 -2
  213. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response.rb +2 -2
  214. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +30 -3
  215. data/lib/plainrouter/openapi/models/set_destination_test_mode_request.rb +2 -2
  216. data/lib/plainrouter/openapi/models/store_creative403_response.rb +103 -0
  217. data/lib/plainrouter/openapi/models/store_creative413_response.rb +103 -0
  218. data/lib/plainrouter/openapi/models/store_creative422_response.rb +103 -0
  219. data/lib/plainrouter/openapi/models/store_creative_from_url_request.rb +208 -0
  220. data/lib/plainrouter/openapi/models/store_creative_from_url_request_tags.rb +257 -0
  221. data/lib/plainrouter/openapi/models/store_creative_request.rb +219 -0
  222. data/lib/plainrouter/openapi/models/store_creative_request_tags.rb +257 -0
  223. data/lib/plainrouter/openapi/models/traffic_class.rb +2 -2
  224. data/lib/plainrouter/openapi/models/validate_sandbox_event200_response.rb +2 -2
  225. data/lib/plainrouter/openapi/models/validate_sandbox_event_request.rb +2 -2
  226. data/lib/plainrouter/openapi/models/validate_sandbox_event_request_value_data.rb +2 -2
  227. data/lib/plainrouter/openapi/models/validation_error.rb +2 -2
  228. data/lib/plainrouter/openapi/models/workspace_lock_timeout.rb +164 -0
  229. data/lib/plainrouter/openapi/models/workspace_lock_timeout_error.rb +214 -0
  230. data/lib/plainrouter/openapi/version.rb +3 -3
  231. data/lib/plainrouter/openapi.rb +164 -4
  232. data/lib/plainrouter/version.rb +1 -1
  233. metadata +167 -7
@@ -0,0 +1,376 @@
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 ActionDryRunReadDryRunActionsInnerAnyOf < ApiModelBase
18
+ attr_accessor :type
19
+
20
+ attr_accessor :target_entity
21
+
22
+ attr_accessor :status
23
+
24
+ attr_accessor :policy_decision
25
+
26
+ attr_accessor :policy_reasons
27
+
28
+ attr_accessor :approval_required
29
+
30
+ attr_accessor :would_auto_execute
31
+
32
+ attr_accessor :diff
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'type' => :'type',
60
+ :'target_entity' => :'target_entity',
61
+ :'status' => :'status',
62
+ :'policy_decision' => :'policy_decision',
63
+ :'policy_reasons' => :'policy_reasons',
64
+ :'approval_required' => :'approval_required',
65
+ :'would_auto_execute' => :'would_auto_execute',
66
+ :'diff' => :'diff'
67
+ }
68
+ end
69
+
70
+ # Returns attribute mapping this model knows about
71
+ def self.acceptable_attribute_map
72
+ attribute_map
73
+ end
74
+
75
+ # Returns all the JSON keys this model knows about
76
+ def self.acceptable_attributes
77
+ acceptable_attribute_map.values
78
+ end
79
+
80
+ # Attribute type mapping.
81
+ def self.openapi_types
82
+ {
83
+ :'type' => :'String',
84
+ :'target_entity' => :'ActionDryRunReadDryRunActionsInnerAnyOfTargetEntity',
85
+ :'status' => :'String',
86
+ :'policy_decision' => :'String',
87
+ :'policy_reasons' => :'Array<String>',
88
+ :'approval_required' => :'Boolean',
89
+ :'would_auto_execute' => :'Boolean',
90
+ :'diff' => :'ActionDryRunReadDryRunActionsInnerAnyOfDiff'
91
+ }
92
+ end
93
+
94
+ # List of attributes with nullable: true
95
+ def self.openapi_nullable
96
+ Set.new([
97
+ ])
98
+ end
99
+
100
+ # Initializes the object
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ def initialize(attributes = {})
103
+ if (!attributes.is_a?(Hash))
104
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionDryRunReadDryRunActionsInnerAnyOf` initialize method"
105
+ end
106
+
107
+ # check to see if the attribute exists and convert string to symbol for hash key
108
+ acceptable_attribute_map = self.class.acceptable_attribute_map
109
+ attributes = attributes.each_with_object({}) { |(k, v), h|
110
+ if (!acceptable_attribute_map.key?(k.to_sym))
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::ActionDryRunReadDryRunActionsInnerAnyOf`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
112
+ end
113
+ h[k.to_sym] = v
114
+ }
115
+
116
+ if attributes.key?(:'type')
117
+ self.type = attributes[:'type']
118
+ else
119
+ self.type = nil
120
+ end
121
+
122
+ if attributes.key?(:'target_entity')
123
+ self.target_entity = attributes[:'target_entity']
124
+ else
125
+ self.target_entity = nil
126
+ end
127
+
128
+ if attributes.key?(:'status')
129
+ self.status = attributes[:'status']
130
+ else
131
+ self.status = nil
132
+ end
133
+
134
+ if attributes.key?(:'policy_decision')
135
+ self.policy_decision = attributes[:'policy_decision']
136
+ else
137
+ self.policy_decision = nil
138
+ end
139
+
140
+ if attributes.key?(:'policy_reasons')
141
+ if (value = attributes[:'policy_reasons']).is_a?(Array)
142
+ self.policy_reasons = value
143
+ end
144
+ else
145
+ self.policy_reasons = nil
146
+ end
147
+
148
+ if attributes.key?(:'approval_required')
149
+ self.approval_required = attributes[:'approval_required']
150
+ else
151
+ self.approval_required = nil
152
+ end
153
+
154
+ if attributes.key?(:'would_auto_execute')
155
+ self.would_auto_execute = attributes[:'would_auto_execute']
156
+ else
157
+ self.would_auto_execute = nil
158
+ end
159
+
160
+ if attributes.key?(:'diff')
161
+ self.diff = attributes[:'diff']
162
+ else
163
+ self.diff = nil
164
+ end
165
+ end
166
+
167
+ # Show invalid properties with the reasons. Usually used together with valid?
168
+ # @return Array for valid properties with the reasons
169
+ def list_invalid_properties
170
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
171
+ invalid_properties = Array.new
172
+ if @type.nil?
173
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
174
+ end
175
+
176
+ if @target_entity.nil?
177
+ invalid_properties.push('invalid value for "target_entity", target_entity cannot be nil.')
178
+ end
179
+
180
+ if @status.nil?
181
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
182
+ end
183
+
184
+ if @policy_decision.nil?
185
+ invalid_properties.push('invalid value for "policy_decision", policy_decision cannot be nil.')
186
+ end
187
+
188
+ if @policy_reasons.nil?
189
+ invalid_properties.push('invalid value for "policy_reasons", policy_reasons cannot be nil.')
190
+ end
191
+
192
+ if @approval_required.nil?
193
+ invalid_properties.push('invalid value for "approval_required", approval_required cannot be nil.')
194
+ end
195
+
196
+ if @would_auto_execute.nil?
197
+ invalid_properties.push('invalid value for "would_auto_execute", would_auto_execute cannot be nil.')
198
+ end
199
+
200
+ if @diff.nil?
201
+ invalid_properties.push('invalid value for "diff", diff cannot be nil.')
202
+ end
203
+
204
+ invalid_properties
205
+ end
206
+
207
+ # Check to see if the all the properties in the model are valid
208
+ # @return true if the model is valid
209
+ def valid?
210
+ warn '[DEPRECATED] the `valid?` method is obsolete'
211
+ return false if @type.nil?
212
+ type_validator = EnumAttributeValidator.new('String', ["increase_budget", "decrease_budget", "pause", "resume", "replace_creative", "shift_spend", "rollback", "create_campaign", "create_ad_set", "create_ad", "upload_asset", "adjust_budget", "set_status", "duplicate_ad_with_creative", "duplicate_adset", "duplicate_ad_with_creative_v2"])
213
+ return false unless type_validator.valid?(@type)
214
+ return false if @target_entity.nil?
215
+ return false if @status.nil?
216
+ status_validator = EnumAttributeValidator.new('String', ["evaluated"])
217
+ return false unless status_validator.valid?(@status)
218
+ return false if @policy_decision.nil?
219
+ policy_decision_validator = EnumAttributeValidator.new('String', ["allow", "require_approval", "block"])
220
+ return false unless policy_decision_validator.valid?(@policy_decision)
221
+ return false if @policy_reasons.nil?
222
+ return false if @approval_required.nil?
223
+ return false if @would_auto_execute.nil?
224
+ return false if @diff.nil?
225
+ true
226
+ end
227
+
228
+ # Custom attribute writer method checking allowed values (enum).
229
+ # @param [Object] type Object to be assigned
230
+ def type=(type)
231
+ validator = EnumAttributeValidator.new('String', ["increase_budget", "decrease_budget", "pause", "resume", "replace_creative", "shift_spend", "rollback", "create_campaign", "create_ad_set", "create_ad", "upload_asset", "adjust_budget", "set_status", "duplicate_ad_with_creative", "duplicate_adset", "duplicate_ad_with_creative_v2"])
232
+ unless validator.valid?(type)
233
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
234
+ end
235
+ @type = type
236
+ end
237
+
238
+ # Custom attribute writer method with validation
239
+ # @param [Object] target_entity Value to be assigned
240
+ def target_entity=(target_entity)
241
+ if target_entity.nil?
242
+ fail ArgumentError, 'target_entity cannot be nil'
243
+ end
244
+
245
+ @target_entity = target_entity
246
+ end
247
+
248
+ # Custom attribute writer method checking allowed values (enum).
249
+ # @param [Object] status Object to be assigned
250
+ def status=(status)
251
+ validator = EnumAttributeValidator.new('String', ["evaluated"])
252
+ unless validator.valid?(status)
253
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
254
+ end
255
+ @status = status
256
+ end
257
+
258
+ # Custom attribute writer method checking allowed values (enum).
259
+ # @param [Object] policy_decision Object to be assigned
260
+ def policy_decision=(policy_decision)
261
+ validator = EnumAttributeValidator.new('String', ["allow", "require_approval", "block"])
262
+ unless validator.valid?(policy_decision)
263
+ fail ArgumentError, "invalid value for \"policy_decision\", must be one of #{validator.allowable_values}."
264
+ end
265
+ @policy_decision = policy_decision
266
+ end
267
+
268
+ # Custom attribute writer method with validation
269
+ # @param [Object] policy_reasons Value to be assigned
270
+ def policy_reasons=(policy_reasons)
271
+ if policy_reasons.nil?
272
+ fail ArgumentError, 'policy_reasons cannot be nil'
273
+ end
274
+
275
+ @policy_reasons = policy_reasons
276
+ end
277
+
278
+ # Custom attribute writer method with validation
279
+ # @param [Object] approval_required Value to be assigned
280
+ def approval_required=(approval_required)
281
+ if approval_required.nil?
282
+ fail ArgumentError, 'approval_required cannot be nil'
283
+ end
284
+
285
+ @approval_required = approval_required
286
+ end
287
+
288
+ # Custom attribute writer method with validation
289
+ # @param [Object] would_auto_execute Value to be assigned
290
+ def would_auto_execute=(would_auto_execute)
291
+ if would_auto_execute.nil?
292
+ fail ArgumentError, 'would_auto_execute cannot be nil'
293
+ end
294
+
295
+ @would_auto_execute = would_auto_execute
296
+ end
297
+
298
+ # Custom attribute writer method with validation
299
+ # @param [Object] diff Value to be assigned
300
+ def diff=(diff)
301
+ if diff.nil?
302
+ fail ArgumentError, 'diff cannot be nil'
303
+ end
304
+
305
+ @diff = diff
306
+ end
307
+
308
+ # Checks equality by comparing each attribute.
309
+ # @param [Object] Object to be compared
310
+ def ==(o)
311
+ return true if self.equal?(o)
312
+ self.class == o.class &&
313
+ type == o.type &&
314
+ target_entity == o.target_entity &&
315
+ status == o.status &&
316
+ policy_decision == o.policy_decision &&
317
+ policy_reasons == o.policy_reasons &&
318
+ approval_required == o.approval_required &&
319
+ would_auto_execute == o.would_auto_execute &&
320
+ diff == o.diff
321
+ end
322
+
323
+ # @see the `==` method
324
+ # @param [Object] Object to be compared
325
+ def eql?(o)
326
+ self == o
327
+ end
328
+
329
+ # Calculates hash code according to all attributes.
330
+ # @return [Integer] Hash code
331
+ def hash
332
+ [type, target_entity, status, policy_decision, policy_reasons, approval_required, would_auto_execute, diff].hash
333
+ end
334
+
335
+ # Builds the object from hash
336
+ # @param [Hash] attributes Model attributes in the form of hash
337
+ # @return [Object] Returns the model itself
338
+ def self.build_from_hash(attributes)
339
+ return nil unless attributes.is_a?(Hash)
340
+ attributes = attributes.transform_keys(&:to_sym)
341
+ transformed_hash = {}
342
+ openapi_types.each_pair do |key, type|
343
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
344
+ transformed_hash["#{key}"] = nil
345
+ elsif type =~ /\AArray<(.*)>/i
346
+ # check to ensure the input is an array given that the attribute
347
+ # is documented as an array but the input is not
348
+ if attributes[attribute_map[key]].is_a?(Array)
349
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
350
+ end
351
+ elsif !attributes[attribute_map[key]].nil?
352
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
353
+ end
354
+ end
355
+ new(transformed_hash)
356
+ end
357
+
358
+ # Returns the object in the form of hash
359
+ # @return [Hash] Returns the object in the form of hash
360
+ def to_hash
361
+ hash = {}
362
+ self.class.attribute_map.each_pair do |attr, param|
363
+ value = self.send(attr)
364
+ if value.nil?
365
+ is_nullable = self.class.openapi_nullable.include?(attr)
366
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
367
+ end
368
+
369
+ hash[param] = _to_hash(value)
370
+ end
371
+ hash
372
+ end
373
+
374
+ end
375
+
376
+ end
@@ -0,0 +1,268 @@
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 ActionDryRunReadDryRunActionsInnerAnyOf1 < ApiModelBase
18
+ attr_accessor :type
19
+
20
+ attr_accessor :target_entity
21
+
22
+ attr_accessor :status
23
+
24
+ attr_accessor :reason
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'type' => :'type',
52
+ :'target_entity' => :'target_entity',
53
+ :'status' => :'status',
54
+ :'reason' => :'reason'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'type' => :'String',
72
+ :'target_entity' => :'ActionDryRunReadDryRunActionsInnerAnyOfTargetEntity',
73
+ :'status' => :'String',
74
+ :'reason' => :'String'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionDryRunReadDryRunActionsInnerAnyOf1` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ acceptable_attribute_map = self.class.acceptable_attribute_map
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!acceptable_attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::ActionDryRunReadDryRunActionsInnerAnyOf1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'type')
101
+ self.type = attributes[:'type']
102
+ else
103
+ self.type = nil
104
+ end
105
+
106
+ if attributes.key?(:'target_entity')
107
+ self.target_entity = attributes[:'target_entity']
108
+ else
109
+ self.target_entity = nil
110
+ end
111
+
112
+ if attributes.key?(:'status')
113
+ self.status = attributes[:'status']
114
+ else
115
+ self.status = nil
116
+ end
117
+
118
+ if attributes.key?(:'reason')
119
+ self.reason = attributes[:'reason']
120
+ else
121
+ self.reason = nil
122
+ end
123
+ end
124
+
125
+ # Show invalid properties with the reasons. Usually used together with valid?
126
+ # @return Array for valid properties with the reasons
127
+ def list_invalid_properties
128
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
129
+ invalid_properties = Array.new
130
+ if @type.nil?
131
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
132
+ end
133
+
134
+ if @target_entity.nil?
135
+ invalid_properties.push('invalid value for "target_entity", target_entity cannot be nil.')
136
+ end
137
+
138
+ if @status.nil?
139
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
140
+ end
141
+
142
+ if @reason.nil?
143
+ invalid_properties.push('invalid value for "reason", reason cannot be nil.')
144
+ end
145
+
146
+ invalid_properties
147
+ end
148
+
149
+ # Check to see if the all the properties in the model are valid
150
+ # @return true if the model is valid
151
+ def valid?
152
+ warn '[DEPRECATED] the `valid?` method is obsolete'
153
+ return false if @type.nil?
154
+ type_validator = EnumAttributeValidator.new('String', ["increase_budget", "decrease_budget", "pause", "resume", "replace_creative", "shift_spend", "rollback", "create_campaign", "create_ad_set", "create_ad", "upload_asset", "adjust_budget", "set_status", "duplicate_ad_with_creative", "duplicate_adset", "duplicate_ad_with_creative_v2"])
155
+ return false unless type_validator.valid?(@type)
156
+ return false if @target_entity.nil?
157
+ return false if @status.nil?
158
+ status_validator = EnumAttributeValidator.new('String', ["dry_run_unavailable"])
159
+ return false unless status_validator.valid?(@status)
160
+ return false if @reason.nil?
161
+ true
162
+ end
163
+
164
+ # Custom attribute writer method checking allowed values (enum).
165
+ # @param [Object] type Object to be assigned
166
+ def type=(type)
167
+ validator = EnumAttributeValidator.new('String', ["increase_budget", "decrease_budget", "pause", "resume", "replace_creative", "shift_spend", "rollback", "create_campaign", "create_ad_set", "create_ad", "upload_asset", "adjust_budget", "set_status", "duplicate_ad_with_creative", "duplicate_adset", "duplicate_ad_with_creative_v2"])
168
+ unless validator.valid?(type)
169
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
170
+ end
171
+ @type = type
172
+ end
173
+
174
+ # Custom attribute writer method with validation
175
+ # @param [Object] target_entity Value to be assigned
176
+ def target_entity=(target_entity)
177
+ if target_entity.nil?
178
+ fail ArgumentError, 'target_entity cannot be nil'
179
+ end
180
+
181
+ @target_entity = target_entity
182
+ end
183
+
184
+ # Custom attribute writer method checking allowed values (enum).
185
+ # @param [Object] status Object to be assigned
186
+ def status=(status)
187
+ validator = EnumAttributeValidator.new('String', ["dry_run_unavailable"])
188
+ unless validator.valid?(status)
189
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
190
+ end
191
+ @status = status
192
+ end
193
+
194
+ # Custom attribute writer method with validation
195
+ # @param [Object] reason Value to be assigned
196
+ def reason=(reason)
197
+ if reason.nil?
198
+ fail ArgumentError, 'reason cannot be nil'
199
+ end
200
+
201
+ @reason = reason
202
+ end
203
+
204
+ # Checks equality by comparing each attribute.
205
+ # @param [Object] Object to be compared
206
+ def ==(o)
207
+ return true if self.equal?(o)
208
+ self.class == o.class &&
209
+ type == o.type &&
210
+ target_entity == o.target_entity &&
211
+ status == o.status &&
212
+ reason == o.reason
213
+ end
214
+
215
+ # @see the `==` method
216
+ # @param [Object] Object to be compared
217
+ def eql?(o)
218
+ self == o
219
+ end
220
+
221
+ # Calculates hash code according to all attributes.
222
+ # @return [Integer] Hash code
223
+ def hash
224
+ [type, target_entity, status, reason].hash
225
+ end
226
+
227
+ # Builds the object from hash
228
+ # @param [Hash] attributes Model attributes in the form of hash
229
+ # @return [Object] Returns the model itself
230
+ def self.build_from_hash(attributes)
231
+ return nil unless attributes.is_a?(Hash)
232
+ attributes = attributes.transform_keys(&:to_sym)
233
+ transformed_hash = {}
234
+ openapi_types.each_pair do |key, type|
235
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
236
+ transformed_hash["#{key}"] = nil
237
+ elsif type =~ /\AArray<(.*)>/i
238
+ # check to ensure the input is an array given that the attribute
239
+ # is documented as an array but the input is not
240
+ if attributes[attribute_map[key]].is_a?(Array)
241
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
242
+ end
243
+ elsif !attributes[attribute_map[key]].nil?
244
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
245
+ end
246
+ end
247
+ new(transformed_hash)
248
+ end
249
+
250
+ # Returns the object in the form of hash
251
+ # @return [Hash] Returns the object in the form of hash
252
+ def to_hash
253
+ hash = {}
254
+ self.class.attribute_map.each_pair do |attr, param|
255
+ value = self.send(attr)
256
+ if value.nil?
257
+ is_nullable = self.class.openapi_nullable.include?(attr)
258
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
259
+ end
260
+
261
+ hash[param] = _to_hash(value)
262
+ end
263
+ hash
264
+ end
265
+
266
+ end
267
+
268
+ end