plainrouter-sdk 0.2.0 → 0.6.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 (250) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -2
  3. data/lib/plainrouter/client.rb +338 -3
  4. data/lib/plainrouter/closed_input_objects.json +3896 -0
  5. data/lib/plainrouter/closed_input_validator.rb +246 -0
  6. data/lib/plainrouter/integer_input_fields.json +579 -0
  7. data/lib/plainrouter/openapi/api/action_dry_run_api_api.rb +2 -2
  8. data/lib/plainrouter/openapi/api/action_proposal_api_api.rb +2 -2
  9. data/lib/plainrouter/openapi/api/action_read_api_api.rb +71 -31
  10. data/lib/plainrouter/openapi/api/action_rule_api_api.rb +350 -0
  11. data/lib/plainrouter/openapi/api/ad_test_api_api.rb +263 -0
  12. data/lib/plainrouter/openapi/api/agent_context_api.rb +93 -0
  13. data/lib/plainrouter/openapi/api/cookie_declaration_api.rb +90 -0
  14. data/lib/plainrouter/openapi/api/creative_api.rb +422 -0
  15. data/lib/plainrouter/openapi/api/deployment_plan_api.rb +561 -0
  16. data/lib/plainrouter/openapi/api/draft_batch_file_import_api.rb +142 -0
  17. data/lib/plainrouter/openapi/api/launch_policy_api.rb +242 -0
  18. data/lib/plainrouter/openapi/api/meta_inventory_exposure_api.rb +254 -0
  19. data/lib/plainrouter/openapi/api_client.rb +3 -0
  20. data/lib/plainrouter/openapi/api_model_base.rb +2 -0
  21. data/lib/plainrouter/openapi/configuration.rb +76 -0
  22. data/lib/plainrouter/openapi/models/action_batch_read_data.rb +42 -4
  23. data/lib/plainrouter/openapi/models/action_current_disposition.rb +13 -1
  24. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload.rb +238 -0
  25. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline.rb +103 -0
  26. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline_any_of.rb +245 -0
  27. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_inverse.rb +206 -0
  28. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics.rb +103 -0
  29. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics_any_of.rb +276 -0
  30. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run.rb +42 -4
  31. data/lib/plainrouter/openapi/models/action_list_read_meta.rb +33 -4
  32. data/lib/plainrouter/openapi/models/action_policy_read_data.rb +3 -105
  33. data/lib/plainrouter/openapi/models/action_policy_result.rb +374 -0
  34. data/lib/plainrouter/openapi/models/action_proposal_input.rb +103 -4
  35. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner.rb +1 -0
  36. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of.rb +2 -0
  37. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of1.rb +2 -0
  38. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10.rb +2 -0
  39. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10_params.rb +2 -0
  40. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of11.rb +3 -1
  41. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12.rb +2 -0
  42. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12_params.rb +2 -0
  43. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13.rb +2 -0
  44. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13_params.rb +2 -0
  45. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of2.rb +2 -0
  46. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of3.rb +2 -0
  47. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4.rb +2 -0
  48. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4_target_entity.rb +2 -0
  49. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of5.rb +2 -0
  50. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of6.rb +2 -0
  51. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of7.rb +2 -0
  52. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of8.rb +2 -0
  53. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of9.rb +2 -0
  54. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_params.rb +2 -0
  55. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_target_entity.rb +2 -0
  56. data/lib/plainrouter/openapi/models/action_proposal_input_evidence_inner.rb +4 -2
  57. data/lib/plainrouter/openapi/models/action_proposal_read_proposal.rb +42 -4
  58. data/lib/plainrouter/openapi/models/action_read_item.rb +72 -4
  59. data/lib/plainrouter/openapi/models/action_read_item_counted_evidence.rb +319 -0
  60. data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_counted.rb +174 -0
  61. data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_coverage.rb +162 -0
  62. data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_meta_reported.rb +198 -0
  63. data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_target.rb +190 -0
  64. data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_window.rb +225 -0
  65. data/lib/plainrouter/openapi/models/action_read_item_evidence.rb +105 -0
  66. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of.rb +190 -0
  67. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of1.rb +242 -0
  68. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of2.rb +217 -0
  69. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of_outcome.rb +238 -0
  70. data/lib/plainrouter/openapi/models/action_read_item_proposer.rb +198 -0
  71. data/lib/plainrouter/openapi/models/action_receipt_unavailable.rb +164 -0
  72. data/lib/plainrouter/openapi/models/action_receipt_unavailable_error.rb +214 -0
  73. data/lib/plainrouter/openapi/models/action_rule_detail_read.rb +164 -0
  74. data/lib/plainrouter/openapi/models/action_rule_detail_read_rule.rb +402 -0
  75. data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_current_revision.rb +388 -0
  76. data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_runs_inner.rb +396 -0
  77. data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_runs_inner_decisions_inner.rb +382 -0
  78. data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_window.rb +242 -0
  79. data/lib/plainrouter/openapi/models/action_rule_write_read.rb +164 -0
  80. data/lib/plainrouter/openapi/models/action_rule_write_read_rule.rb +373 -0
  81. data/lib/plainrouter/openapi/models/actions_api_decision_receipt404_response.rb +103 -0
  82. data/lib/plainrouter/openapi/models/actions_api_dry_run401_response.rb +103 -0
  83. data/lib/plainrouter/openapi/models/actions_rules_index200_response.rb +164 -0
  84. data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules.rb +196 -0
  85. data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules_data_inner.rb +344 -0
  86. data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules_data_inner_account.rb +157 -0
  87. data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules_data_inner_counts.rb +156 -0
  88. data/lib/plainrouter/openapi/models/actions_rules_index403_response.rb +103 -0
  89. data/lib/plainrouter/openapi/models/actions_rules_index403_response_any_of.rb +214 -0
  90. data/lib/plainrouter/openapi/models/actions_rules_store_request.rb +317 -0
  91. data/lib/plainrouter/openapi/models/actions_rules_store_request_definition.rb +105 -0
  92. data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of.rb +317 -0
  93. data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of1.rb +361 -0
  94. data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of2.rb +361 -0
  95. data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of_cost_ratio.rb +104 -0
  96. data/lib/plainrouter/openapi/models/actions_rules_store_request_window.rb +103 -0
  97. data/lib/plainrouter/openapi/models/actions_rules_update_request.rb +267 -0
  98. data/lib/plainrouter/openapi/models/actions_rules_update_request_definition.rb +105 -0
  99. data/lib/plainrouter/openapi/models/actions_rules_update_request_definition_any_of.rb +317 -0
  100. data/lib/plainrouter/openapi/models/actions_rules_update_request_definition_any_of1.rb +361 -0
  101. data/lib/plainrouter/openapi/models/actions_rules_update_request_definition_any_of2.rb +361 -0
  102. data/lib/plainrouter/openapi/models/actions_tests_api_index404_response.rb +103 -0
  103. data/lib/plainrouter/openapi/models/actions_tests_api_store_request.rb +467 -0
  104. data/lib/plainrouter/openapi/models/actions_tests_api_store_request_maximum_spend_minor.rb +104 -0
  105. data/lib/plainrouter/openapi/models/ad_test.rb +552 -0
  106. data/lib/plainrouter/openapi/models/ad_test_create_read.rb +164 -0
  107. data/lib/plainrouter/openapi/models/ad_test_create_read_test.rb +675 -0
  108. data/lib/plainrouter/openapi/models/ad_test_create_read_test_members_inner.rb +232 -0
  109. data/lib/plainrouter/openapi/models/ad_test_create_read_test_pause_proposals_inner.rb +286 -0
  110. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict.rb +336 -0
  111. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_daily_facts_inner.rb +374 -0
  112. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details.rb +285 -0
  113. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_baseline.rb +190 -0
  114. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_observed_destinations_inner.rb +216 -0
  115. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_members_inner.rb +349 -0
  116. data/lib/plainrouter/openapi/models/ad_test_daily_fact_read.rb +374 -0
  117. data/lib/plainrouter/openapi/models/ad_test_event_choice.rb +190 -0
  118. data/lib/plainrouter/openapi/models/ad_test_list_read.rb +218 -0
  119. data/lib/plainrouter/openapi/models/ad_test_list_read_observed_conversion_events_inner.rb +190 -0
  120. data/lib/plainrouter/openapi/models/ad_test_list_read_tests.rb +396 -0
  121. data/lib/plainrouter/openapi/models/ad_test_read.rb +675 -0
  122. data/lib/plainrouter/openapi/models/ad_test_show_read.rb +164 -0
  123. data/lib/plainrouter/openapi/models/ad_test_verdict_member_read.rb +349 -0
  124. data/lib/plainrouter/openapi/models/ad_test_verdict_read.rb +336 -0
  125. data/lib/plainrouter/openapi/models/agent_context200_response.rb +214 -0
  126. data/lib/plainrouter/openapi/models/agent_context200_response_agent.rb +268 -0
  127. data/lib/plainrouter/openapi/models/agent_context200_response_platform_ad_account.rb +292 -0
  128. data/lib/plainrouter/openapi/models/agent_context200_response_platform_ad_account_workspace.rb +190 -0
  129. data/lib/plainrouter/openapi/models/agent_context401_response.rb +103 -0
  130. data/lib/plainrouter/openapi/models/agent_context_auth_error.rb +190 -0
  131. data/lib/plainrouter/openapi/models/agent_credential_error.rb +214 -0
  132. data/lib/plainrouter/openapi/models/api_route_not_found.rb +216 -0
  133. data/lib/plainrouter/openapi/models/api_route_not_found_error.rb +240 -0
  134. data/lib/plainrouter/openapi/models/api_route_not_found_request.rb +190 -0
  135. data/lib/plainrouter/openapi/models/api_route_not_found_resources.rb +190 -0
  136. data/lib/plainrouter/openapi/models/cookie_declaration.rb +177 -0
  137. data/lib/plainrouter/openapi/models/cookie_declaration_categories.rb +268 -0
  138. data/lib/plainrouter/openapi/models/cookie_declaration_categories_necessary.rb +194 -0
  139. data/lib/plainrouter/openapi/models/cookie_declaration_item.rb +280 -0
  140. data/lib/plainrouter/openapi/models/create_event202_response_warnings_inner.rb +2 -2
  141. data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +1 -1
  142. data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +1 -1
  143. data/lib/plainrouter/openapi/models/creative_intake_read.rb +164 -0
  144. data/lib/plainrouter/openapi/models/creative_intake_rejected.rb +164 -0
  145. data/lib/plainrouter/openapi/models/creative_intake_rejected_error.rb +190 -0
  146. data/lib/plainrouter/openapi/models/creative_intake_tags.rb +257 -0
  147. data/lib/plainrouter/openapi/models/creative_mcp_grant_operation.rb +44 -0
  148. data/lib/plainrouter/openapi/models/creative_mcp_preview.rb +283 -0
  149. data/lib/plainrouter/openapi/models/creative_mcp_refusal.rb +45 -0
  150. data/lib/plainrouter/openapi/models/creative_mcp_tool.rb +44 -0
  151. data/lib/plainrouter/openapi/models/delivery_status.rb +2 -1
  152. data/lib/plainrouter/openapi/models/deployment_plan_read.rb +306 -0
  153. data/lib/plainrouter/openapi/models/deployment_plan_read_copy.rb +266 -0
  154. data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner.rb +320 -0
  155. data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner_copy.rb +267 -0
  156. data/lib/plainrouter/openapi/models/destination.rb +73 -9
  157. data/lib/plainrouter/openapi/models/destination_config.rb +103 -0
  158. data/lib/plainrouter/openapi/models/destination_status.rb +2 -1
  159. data/lib/plainrouter/openapi/models/destination_type.rb +2 -1
  160. data/lib/plainrouter/openapi/models/draft_batch_mode.rb +41 -0
  161. data/lib/plainrouter/openapi/models/execute_deployment_plan_request.rb +200 -0
  162. data/lib/plainrouter/openapi/models/get_account_inventory200_response.rb +341 -0
  163. data/lib/plainrouter/openapi/models/get_account_inventory200_response_summary.rb +158 -0
  164. data/lib/plainrouter/openapi/models/get_account_inventory404_response.rb +188 -0
  165. data/lib/plainrouter/openapi/models/get_cookie_declaration404_response.rb +103 -0
  166. data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +25 -1
  167. data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +25 -1
  168. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response.rb +345 -0
  169. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_account.rb +264 -0
  170. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_changes_inner.rb +304 -0
  171. data/lib/plainrouter/openapi/models/{action_proposal_input_actions_inner_any_of11_params.rb → get_inventory_metrics200_response_effective_range.rb} +41 -24
  172. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_metrics_inner.rb +492 -0
  173. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner.rb +304 -0
  174. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner_meta.rb +268 -0
  175. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_pagination_value.rb +202 -0
  176. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_staleness.rb +200 -0
  177. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_sync.rb +186 -0
  178. data/lib/plainrouter/openapi/models/ingestion_warning_code.rb +2 -1
  179. data/lib/plainrouter/openapi/models/launch_creatives_index200_response.rb +164 -0
  180. data/lib/plainrouter/openapi/models/launch_creatives_index200_response_creatives.rb +196 -0
  181. data/lib/plainrouter/openapi/models/launch_creatives_index200_response_creatives_data_inner.rb +451 -0
  182. data/lib/plainrouter/openapi/models/launch_creatives_index200_response_creatives_data_inner_tags.rb +104 -0
  183. data/lib/plainrouter/openapi/models/launch_creatives_status200_response.rb +166 -0
  184. data/lib/plainrouter/openapi/models/launch_intent_read.rb +164 -0
  185. data/lib/plainrouter/openapi/models/launch_intent_read_intent.rb +330 -0
  186. data/lib/plainrouter/openapi/models/launch_intent_read_intent_actions_inner.rb +238 -0
  187. data/lib/plainrouter/openapi/models/launch_intent_status.rb +46 -0
  188. data/lib/plainrouter/openapi/models/launch_plans_copy403_response.rb +103 -0
  189. data/lib/plainrouter/openapi/models/launch_plans_copy404_response.rb +103 -0
  190. data/lib/plainrouter/openapi/models/launch_plans_copy422_response.rb +103 -0
  191. data/lib/plainrouter/openapi/models/launch_plans_execute422_response.rb +103 -0
  192. data/lib/plainrouter/openapi/models/launch_plans_index200_response.rb +164 -0
  193. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans.rb +347 -0
  194. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments.rb +104 -0
  195. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments_any_of.rb +190 -0
  196. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments_any_of1.rb +190 -0
  197. data/lib/plainrouter/openapi/models/launch_plans_show200_response.rb +164 -0
  198. data/lib/plainrouter/openapi/models/launch_plans_store201_response.rb +166 -0
  199. data/lib/plainrouter/openapi/models/launch_plans_validate422_response.rb +103 -0
  200. data/lib/plainrouter/openapi/models/launch_policies_index200_response.rb +164 -0
  201. data/lib/plainrouter/openapi/models/launch_policies_index200_response_policies.rb +453 -0
  202. data/lib/plainrouter/openapi/models/{list_events200_response_events_links_inner.rb → launch_policies_index200_response_policies_links_inner.rb} +3 -3
  203. data/lib/plainrouter/openapi/models/launch_policies_store201_response.rb +166 -0
  204. data/lib/plainrouter/openapi/models/launch_policy.rb +346 -0
  205. data/lib/plainrouter/openapi/models/launcher_file_import403_response.rb +216 -0
  206. data/lib/plainrouter/openapi/models/launcher_file_import422_response.rb +103 -0
  207. data/lib/plainrouter/openapi/models/launcher_file_import422_response_any_of.rb +242 -0
  208. data/lib/plainrouter/openapi/models/launcher_file_import422_response_any_of_syntactic_row_failures_inner.rb +190 -0
  209. data/lib/plainrouter/openapi/models/list_events200_response_events.rb +1 -1
  210. data/lib/plainrouter/openapi/models/plan_copy_forbidden.rb +164 -0
  211. data/lib/plainrouter/openapi/models/plan_copy_forbidden_error.rb +214 -0
  212. data/lib/plainrouter/openapi/models/plan_copy_not_found.rb +164 -0
  213. data/lib/plainrouter/openapi/models/plan_copy_not_found_error.rb +214 -0
  214. data/lib/plainrouter/openapi/models/plan_copy_read.rb +164 -0
  215. data/lib/plainrouter/openapi/models/plan_copy_read_plan.rb +347 -0
  216. data/lib/plainrouter/openapi/models/plan_copy_rejected.rb +164 -0
  217. data/lib/plainrouter/openapi/models/plan_copy_rejected_error.rb +214 -0
  218. data/lib/plainrouter/openapi/models/plan_execute_conflict.rb +164 -0
  219. data/lib/plainrouter/openapi/models/plan_execute_conflict_error.rb +214 -0
  220. data/lib/plainrouter/openapi/models/plan_execute_rejected.rb +164 -0
  221. data/lib/plainrouter/openapi/models/plan_execute_rejected_error.rb +214 -0
  222. data/lib/plainrouter/openapi/models/plan_validate_rejected.rb +164 -0
  223. data/lib/plainrouter/openapi/models/plan_validate_rejected_error.rb +191 -0
  224. data/lib/plainrouter/openapi/models/proposal_replay_conflict.rb +214 -0
  225. data/lib/plainrouter/openapi/models/proposal_replay_conflict_errors.rb +178 -0
  226. data/lib/plainrouter/openapi/models/proposal_unavailable.rb +164 -0
  227. data/lib/plainrouter/openapi/models/proposal_unavailable_error.rb +214 -0
  228. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +67 -1
  229. data/lib/plainrouter/openapi/models/store_creative403_response.rb +103 -0
  230. data/lib/plainrouter/openapi/models/store_creative413_response.rb +103 -0
  231. data/lib/plainrouter/openapi/models/store_creative422_response.rb +103 -0
  232. data/lib/plainrouter/openapi/models/store_creative_from_url_request.rb +208 -0
  233. data/lib/plainrouter/openapi/models/store_creative_from_url_request_tags.rb +257 -0
  234. data/lib/plainrouter/openapi/models/store_creative_request.rb +219 -0
  235. data/lib/plainrouter/openapi/models/store_creative_request_tags.rb +257 -0
  236. data/lib/plainrouter/openapi/models/store_deployment_plan_request.rb +570 -0
  237. data/lib/plainrouter/openapi/models/store_deployment_plan_request_ad_set_spec.rb +220 -0
  238. data/lib/plainrouter/openapi/models/store_deployment_plan_request_copy.rb +266 -0
  239. data/lib/plainrouter/openapi/models/store_deployment_plan_request_creative_overrides_inner.rb +217 -0
  240. data/lib/plainrouter/openapi/models/store_launch_policy_request.rb +260 -0
  241. data/lib/plainrouter/openapi/models/update_creative_status_request.rb +188 -0
  242. data/lib/plainrouter/openapi/models/update_deployment_plan_request.rb +511 -0
  243. data/lib/plainrouter/openapi/models/workspace_lock_timeout.rb +164 -0
  244. data/lib/plainrouter/openapi/models/workspace_lock_timeout_error.rb +214 -0
  245. data/lib/plainrouter/openapi/version.rb +1 -1
  246. data/lib/plainrouter/openapi.rb +190 -2
  247. data/lib/plainrouter/proposal_errors.rb +31 -0
  248. data/lib/plainrouter/version.rb +1 -1
  249. data/lib/plainrouter.rb +1 -0
  250. metadata +196 -4
@@ -0,0 +1,374 @@
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 ActionPolicyResult < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :policy_id
21
+
22
+ attr_accessor :policy_version
23
+
24
+ attr_accessor :phase
25
+
26
+ attr_accessor :outcome
27
+
28
+ attr_accessor :reasons
29
+
30
+ attr_accessor :reason_details
31
+
32
+ attr_accessor :requested_minor
33
+
34
+ attr_accessor :evaluated_at
35
+
36
+ class EnumAttributeValidator
37
+ attr_reader :datatype
38
+ attr_reader :allowable_values
39
+
40
+ def initialize(datatype, allowable_values)
41
+ @allowable_values = allowable_values.map do |value|
42
+ case datatype.to_s
43
+ when /Integer/i
44
+ value.to_i
45
+ when /Float/i
46
+ value.to_f
47
+ else
48
+ value
49
+ end
50
+ end
51
+ end
52
+
53
+ def valid?(value)
54
+ !value || allowable_values.include?(value)
55
+ end
56
+ end
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ def self.attribute_map
60
+ {
61
+ :'id' => :'id',
62
+ :'policy_id' => :'policy_id',
63
+ :'policy_version' => :'policy_version',
64
+ :'phase' => :'phase',
65
+ :'outcome' => :'outcome',
66
+ :'reasons' => :'reasons',
67
+ :'reason_details' => :'reason_details',
68
+ :'requested_minor' => :'requested_minor',
69
+ :'evaluated_at' => :'evaluated_at'
70
+ }
71
+ end
72
+
73
+ # Returns attribute mapping this model knows about
74
+ def self.acceptable_attribute_map
75
+ attribute_map
76
+ end
77
+
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ acceptable_attribute_map.values
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'id' => :'String',
87
+ :'policy_id' => :'String',
88
+ :'policy_version' => :'Integer',
89
+ :'phase' => :'String',
90
+ :'outcome' => :'String',
91
+ :'reasons' => :'Array<String>',
92
+ :'reason_details' => :'Array<String>',
93
+ :'requested_minor' => :'Integer',
94
+ :'evaluated_at' => :'Time'
95
+ }
96
+ end
97
+
98
+ # List of attributes with nullable: true
99
+ def self.openapi_nullable
100
+ Set.new([
101
+ :'reason_details',
102
+ :'requested_minor',
103
+ ])
104
+ end
105
+
106
+ # Initializes the object
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ def initialize(attributes = {})
109
+ if (!attributes.is_a?(Hash))
110
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionPolicyResult` initialize method"
111
+ end
112
+
113
+ # check to see if the attribute exists and convert string to symbol for hash key
114
+ acceptable_attribute_map = self.class.acceptable_attribute_map
115
+ attributes = attributes.each_with_object({}) { |(k, v), h|
116
+ if (!acceptable_attribute_map.key?(k.to_sym))
117
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::ActionPolicyResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
118
+ end
119
+ h[k.to_sym] = v
120
+ }
121
+
122
+ if attributes.key?(:'id')
123
+ self.id = attributes[:'id']
124
+ else
125
+ self.id = nil
126
+ end
127
+
128
+ if attributes.key?(:'policy_id')
129
+ self.policy_id = attributes[:'policy_id']
130
+ else
131
+ self.policy_id = nil
132
+ end
133
+
134
+ if attributes.key?(:'policy_version')
135
+ self.policy_version = attributes[:'policy_version']
136
+ else
137
+ self.policy_version = nil
138
+ end
139
+
140
+ if attributes.key?(:'phase')
141
+ self.phase = attributes[:'phase']
142
+ else
143
+ self.phase = nil
144
+ end
145
+
146
+ if attributes.key?(:'outcome')
147
+ self.outcome = attributes[:'outcome']
148
+ else
149
+ self.outcome = nil
150
+ end
151
+
152
+ if attributes.key?(:'reasons')
153
+ if (value = attributes[:'reasons']).is_a?(Array)
154
+ self.reasons = value
155
+ end
156
+ else
157
+ self.reasons = nil
158
+ end
159
+
160
+ if attributes.key?(:'reason_details')
161
+ if (value = attributes[:'reason_details']).is_a?(Array)
162
+ self.reason_details = value
163
+ end
164
+ else
165
+ self.reason_details = nil
166
+ end
167
+
168
+ if attributes.key?(:'requested_minor')
169
+ self.requested_minor = attributes[:'requested_minor']
170
+ else
171
+ self.requested_minor = nil
172
+ end
173
+
174
+ if attributes.key?(:'evaluated_at')
175
+ self.evaluated_at = attributes[:'evaluated_at']
176
+ else
177
+ self.evaluated_at = nil
178
+ end
179
+ end
180
+
181
+ # Show invalid properties with the reasons. Usually used together with valid?
182
+ # @return Array for valid properties with the reasons
183
+ def list_invalid_properties
184
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
185
+ invalid_properties = Array.new
186
+ if @id.nil?
187
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
188
+ end
189
+
190
+ if @policy_id.nil?
191
+ invalid_properties.push('invalid value for "policy_id", policy_id cannot be nil.')
192
+ end
193
+
194
+ if @policy_version.nil?
195
+ invalid_properties.push('invalid value for "policy_version", policy_version cannot be nil.')
196
+ end
197
+
198
+ if @phase.nil?
199
+ invalid_properties.push('invalid value for "phase", phase cannot be nil.')
200
+ end
201
+
202
+ if @outcome.nil?
203
+ invalid_properties.push('invalid value for "outcome", outcome cannot be nil.')
204
+ end
205
+
206
+ if @reasons.nil?
207
+ invalid_properties.push('invalid value for "reasons", reasons cannot be nil.')
208
+ end
209
+
210
+ if @evaluated_at.nil?
211
+ invalid_properties.push('invalid value for "evaluated_at", evaluated_at cannot be nil.')
212
+ end
213
+
214
+ invalid_properties
215
+ end
216
+
217
+ # Check to see if the all the properties in the model are valid
218
+ # @return true if the model is valid
219
+ def valid?
220
+ warn '[DEPRECATED] the `valid?` method is obsolete'
221
+ return false if @id.nil?
222
+ return false if @policy_id.nil?
223
+ return false if @policy_version.nil?
224
+ return false if @phase.nil?
225
+ phase_validator = EnumAttributeValidator.new('String', ["proposal", "approval", "execution"])
226
+ return false unless phase_validator.valid?(@phase)
227
+ return false if @outcome.nil?
228
+ outcome_validator = EnumAttributeValidator.new('String', ["allowed", "approval_required", "blocked"])
229
+ return false unless outcome_validator.valid?(@outcome)
230
+ return false if @reasons.nil?
231
+ return false if @evaluated_at.nil?
232
+ true
233
+ end
234
+
235
+ # Custom attribute writer method with validation
236
+ # @param [Object] id Value to be assigned
237
+ def id=(id)
238
+ if id.nil?
239
+ fail ArgumentError, 'id cannot be nil'
240
+ end
241
+
242
+ @id = id
243
+ end
244
+
245
+ # Custom attribute writer method with validation
246
+ # @param [Object] policy_id Value to be assigned
247
+ def policy_id=(policy_id)
248
+ if policy_id.nil?
249
+ fail ArgumentError, 'policy_id cannot be nil'
250
+ end
251
+
252
+ @policy_id = policy_id
253
+ end
254
+
255
+ # Custom attribute writer method with validation
256
+ # @param [Object] policy_version Value to be assigned
257
+ def policy_version=(policy_version)
258
+ if policy_version.nil?
259
+ fail ArgumentError, 'policy_version cannot be nil'
260
+ end
261
+
262
+ @policy_version = policy_version
263
+ end
264
+
265
+ # Custom attribute writer method checking allowed values (enum).
266
+ # @param [Object] phase Object to be assigned
267
+ def phase=(phase)
268
+ validator = EnumAttributeValidator.new('String', ["proposal", "approval", "execution"])
269
+ unless validator.valid?(phase)
270
+ fail ArgumentError, "invalid value for \"phase\", must be one of #{validator.allowable_values}."
271
+ end
272
+ @phase = phase
273
+ end
274
+
275
+ # Custom attribute writer method checking allowed values (enum).
276
+ # @param [Object] outcome Object to be assigned
277
+ def outcome=(outcome)
278
+ validator = EnumAttributeValidator.new('String', ["allowed", "approval_required", "blocked"])
279
+ unless validator.valid?(outcome)
280
+ fail ArgumentError, "invalid value for \"outcome\", must be one of #{validator.allowable_values}."
281
+ end
282
+ @outcome = outcome
283
+ end
284
+
285
+ # Custom attribute writer method with validation
286
+ # @param [Object] reasons Value to be assigned
287
+ def reasons=(reasons)
288
+ if reasons.nil?
289
+ fail ArgumentError, 'reasons cannot be nil'
290
+ end
291
+
292
+ @reasons = reasons
293
+ end
294
+
295
+ # Custom attribute writer method with validation
296
+ # @param [Object] evaluated_at Value to be assigned
297
+ def evaluated_at=(evaluated_at)
298
+ if evaluated_at.nil?
299
+ fail ArgumentError, 'evaluated_at cannot be nil'
300
+ end
301
+
302
+ @evaluated_at = evaluated_at
303
+ end
304
+
305
+ # Checks equality by comparing each attribute.
306
+ # @param [Object] Object to be compared
307
+ def ==(o)
308
+ return true if self.equal?(o)
309
+ self.class == o.class &&
310
+ id == o.id &&
311
+ policy_id == o.policy_id &&
312
+ policy_version == o.policy_version &&
313
+ phase == o.phase &&
314
+ outcome == o.outcome &&
315
+ reasons == o.reasons &&
316
+ reason_details == o.reason_details &&
317
+ requested_minor == o.requested_minor &&
318
+ evaluated_at == o.evaluated_at
319
+ end
320
+
321
+ # @see the `==` method
322
+ # @param [Object] Object to be compared
323
+ def eql?(o)
324
+ self == o
325
+ end
326
+
327
+ # Calculates hash code according to all attributes.
328
+ # @return [Integer] Hash code
329
+ def hash
330
+ [id, policy_id, policy_version, phase, outcome, reasons, reason_details, requested_minor, evaluated_at].hash
331
+ end
332
+
333
+ # Builds the object from hash
334
+ # @param [Hash] attributes Model attributes in the form of hash
335
+ # @return [Object] Returns the model itself
336
+ def self.build_from_hash(attributes)
337
+ return nil unless attributes.is_a?(Hash)
338
+ attributes = attributes.transform_keys(&:to_sym)
339
+ transformed_hash = {}
340
+ openapi_types.each_pair do |key, type|
341
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
342
+ transformed_hash["#{key}"] = nil
343
+ elsif type =~ /\AArray<(.*)>/i
344
+ # check to ensure the input is an array given that the attribute
345
+ # is documented as an array but the input is not
346
+ if attributes[attribute_map[key]].is_a?(Array)
347
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
348
+ end
349
+ elsif !attributes[attribute_map[key]].nil?
350
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
351
+ end
352
+ end
353
+ new(transformed_hash)
354
+ end
355
+
356
+ # Returns the object in the form of hash
357
+ # @return [Hash] Returns the object in the form of hash
358
+ def to_hash
359
+ hash = {}
360
+ self.class.attribute_map.each_pair do |attr, param|
361
+ value = self.send(attr)
362
+ if value.nil?
363
+ is_nullable = self.class.openapi_nullable.include?(attr)
364
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
365
+ end
366
+
367
+ hash[param] = _to_hash(value)
368
+ end
369
+ hash
370
+ end
371
+
372
+ end
373
+
374
+ end
@@ -15,6 +15,12 @@ require 'time'
15
15
 
16
16
  module PlainRouter::OpenAPI
17
17
  class ActionProposalInput < ApiModelBase
18
+ # Maximum complete result actions; the shared JSON byte budget can return fewer.
19
+ attr_accessor :limit
20
+
21
+ # Continue using next_cursor. Read saved proposal actions with get_action_batch to avoid another write; dry runs repeat the same inputs.
22
+ attr_accessor :cursor
23
+
18
24
  attr_accessor :actions
19
25
 
20
26
  attr_accessor :rationale
@@ -27,6 +33,8 @@ module PlainRouter::OpenAPI
27
33
 
28
34
  attr_accessor :account_id
29
35
 
36
+ attr_accessor :workspace_id
37
+
30
38
  class EnumAttributeValidator
31
39
  attr_reader :datatype
32
40
  attr_reader :allowable_values
@@ -52,12 +60,15 @@ module PlainRouter::OpenAPI
52
60
  # Attribute mapping from ruby-style variable name to JSON key.
53
61
  def self.attribute_map
54
62
  {
63
+ :'limit' => :'limit',
64
+ :'cursor' => :'cursor',
55
65
  :'actions' => :'actions',
56
66
  :'rationale' => :'rationale',
57
67
  :'idempotency_key' => :'idempotency_key',
58
68
  :'evidence' => :'evidence',
59
69
  :'target_source' => :'target_source',
60
- :'account_id' => :'account_id'
70
+ :'account_id' => :'account_id',
71
+ :'workspace_id' => :'workspace_id'
61
72
  }
62
73
  end
63
74
 
@@ -74,12 +85,15 @@ module PlainRouter::OpenAPI
74
85
  # Attribute type mapping.
75
86
  def self.openapi_types
76
87
  {
88
+ :'limit' => :'Integer',
89
+ :'cursor' => :'Integer',
77
90
  :'actions' => :'Array<ActionProposalInputActionsInner>',
78
91
  :'rationale' => :'String',
79
92
  :'idempotency_key' => :'String',
80
93
  :'evidence' => :'Array<ActionProposalInputEvidenceInner>',
81
94
  :'target_source' => :'String',
82
- :'account_id' => :'Integer'
95
+ :'account_id' => :'Integer',
96
+ :'workspace_id' => :'Integer'
83
97
  }
84
98
  end
85
99
 
@@ -92,6 +106,7 @@ module PlainRouter::OpenAPI
92
106
  # Initializes the object
93
107
  # @param [Hash] attributes Model attributes in the form of hash
94
108
  def initialize(attributes = {})
109
+ ClosedInputValidator.validate_model!(self, attributes)
95
110
  if (!attributes.is_a?(Hash))
96
111
  fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionProposalInput` initialize method"
97
112
  end
@@ -105,6 +120,16 @@ module PlainRouter::OpenAPI
105
120
  h[k.to_sym] = v
106
121
  }
107
122
 
123
+ if attributes.key?(:'limit')
124
+ self.limit = attributes[:'limit']
125
+ else
126
+ self.limit = 25
127
+ end
128
+
129
+ if attributes.key?(:'cursor')
130
+ self.cursor = attributes[:'cursor']
131
+ end
132
+
108
133
  if attributes.key?(:'actions')
109
134
  if (value = attributes[:'actions']).is_a?(Array)
110
135
  self.actions = value
@@ -142,6 +167,10 @@ module PlainRouter::OpenAPI
142
167
  if attributes.key?(:'account_id')
143
168
  self.account_id = attributes[:'account_id']
144
169
  end
170
+
171
+ if attributes.key?(:'workspace_id')
172
+ self.workspace_id = attributes[:'workspace_id']
173
+ end
145
174
  end
146
175
 
147
176
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -149,6 +178,18 @@ module PlainRouter::OpenAPI
149
178
  def list_invalid_properties
150
179
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
151
180
  invalid_properties = Array.new
181
+ if !@limit.nil? && @limit > 100
182
+ invalid_properties.push('invalid value for "limit", must be smaller than or equal to 100.')
183
+ end
184
+
185
+ if !@limit.nil? && @limit < 1
186
+ invalid_properties.push('invalid value for "limit", must be greater than or equal to 1.')
187
+ end
188
+
189
+ if !@cursor.nil? && @cursor < 0
190
+ invalid_properties.push('invalid value for "cursor", must be greater than or equal to 0.')
191
+ end
192
+
152
193
  if @actions.nil?
153
194
  invalid_properties.push('invalid value for "actions", actions cannot be nil.')
154
195
  end
@@ -197,6 +238,10 @@ module PlainRouter::OpenAPI
197
238
  invalid_properties.push('invalid value for "account_id", must be greater than or equal to 1.')
198
239
  end
199
240
 
241
+ if !@workspace_id.nil? && @workspace_id < 1
242
+ invalid_properties.push('invalid value for "workspace_id", must be greater than or equal to 1.')
243
+ end
244
+
200
245
  invalid_properties
201
246
  end
202
247
 
@@ -204,6 +249,9 @@ module PlainRouter::OpenAPI
204
249
  # @return true if the model is valid
205
250
  def valid?
206
251
  warn '[DEPRECATED] the `valid?` method is obsolete'
252
+ return false if !@limit.nil? && @limit > 100
253
+ return false if !@limit.nil? && @limit < 1
254
+ return false if !@cursor.nil? && @cursor < 0
207
255
  return false if @actions.nil?
208
256
  return false if @actions.length > 25
209
257
  return false if @actions.length < 1
@@ -218,9 +266,42 @@ module PlainRouter::OpenAPI
218
266
  target_source_validator = EnumAttributeValidator.new('String', ["human_supplied"])
219
267
  return false unless target_source_validator.valid?(@target_source)
220
268
  return false if !@account_id.nil? && @account_id < 1
269
+ return false if !@workspace_id.nil? && @workspace_id < 1
221
270
  true
222
271
  end
223
272
 
273
+ # Custom attribute writer method with validation
274
+ # @param [Object] limit Value to be assigned
275
+ def limit=(limit)
276
+ if limit.nil?
277
+ fail ArgumentError, 'limit cannot be nil'
278
+ end
279
+
280
+ if limit > 100
281
+ fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 100.'
282
+ end
283
+
284
+ if limit < 1
285
+ fail ArgumentError, 'invalid value for "limit", must be greater than or equal to 1.'
286
+ end
287
+
288
+ @limit = limit
289
+ end
290
+
291
+ # Custom attribute writer method with validation
292
+ # @param [Object] cursor Value to be assigned
293
+ def cursor=(cursor)
294
+ if cursor.nil?
295
+ fail ArgumentError, 'cursor cannot be nil'
296
+ end
297
+
298
+ if cursor < 0
299
+ fail ArgumentError, 'invalid value for "cursor", must be greater than or equal to 0.'
300
+ end
301
+
302
+ @cursor = cursor
303
+ end
304
+
224
305
  # Custom attribute writer method with validation
225
306
  # @param [Object] actions Value to be assigned
226
307
  def actions=(actions)
@@ -309,17 +390,34 @@ module PlainRouter::OpenAPI
309
390
  @account_id = account_id
310
391
  end
311
392
 
393
+ # Custom attribute writer method with validation
394
+ # @param [Object] workspace_id Value to be assigned
395
+ def workspace_id=(workspace_id)
396
+ if workspace_id.nil?
397
+ fail ArgumentError, 'workspace_id cannot be nil'
398
+ end
399
+
400
+ if workspace_id < 1
401
+ fail ArgumentError, 'invalid value for "workspace_id", must be greater than or equal to 1.'
402
+ end
403
+
404
+ @workspace_id = workspace_id
405
+ end
406
+
312
407
  # Checks equality by comparing each attribute.
313
408
  # @param [Object] Object to be compared
314
409
  def ==(o)
315
410
  return true if self.equal?(o)
316
411
  self.class == o.class &&
412
+ limit == o.limit &&
413
+ cursor == o.cursor &&
317
414
  actions == o.actions &&
318
415
  rationale == o.rationale &&
319
416
  idempotency_key == o.idempotency_key &&
320
417
  evidence == o.evidence &&
321
418
  target_source == o.target_source &&
322
- account_id == o.account_id
419
+ account_id == o.account_id &&
420
+ workspace_id == o.workspace_id
323
421
  end
324
422
 
325
423
  # @see the `==` method
@@ -331,13 +429,14 @@ module PlainRouter::OpenAPI
331
429
  # Calculates hash code according to all attributes.
332
430
  # @return [Integer] Hash code
333
431
  def hash
334
- [actions, rationale, idempotency_key, evidence, target_source, account_id].hash
432
+ [limit, cursor, actions, rationale, idempotency_key, evidence, target_source, account_id, workspace_id].hash
335
433
  end
336
434
 
337
435
  # Builds the object from hash
338
436
  # @param [Hash] attributes Model attributes in the form of hash
339
437
  # @return [Object] Returns the model itself
340
438
  def self.build_from_hash(attributes)
439
+ ClosedInputValidator.validate_model!(self, attributes)
341
440
  return nil unless attributes.is_a?(Hash)
342
441
  attributes = attributes.transform_keys(&:to_sym)
343
442
  transformed_hash = {}
@@ -40,6 +40,7 @@ module PlainRouter::OpenAPI
40
40
  # @param [Mixed] Data to be matched against the list of anyOf items
41
41
  # @return [Object] Returns the model or the data itself
42
42
  def build(data)
43
+ ClosedInputValidator.validate_model!(self, data)
43
44
  # Go through the list of anyOf items and attempt to identify the appropriate one.
44
45
  # Note:
45
46
  # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
@@ -88,6 +88,7 @@ module PlainRouter::OpenAPI
88
88
  # Initializes the object
89
89
  # @param [Hash] attributes Model attributes in the form of hash
90
90
  def initialize(attributes = {})
91
+ ClosedInputValidator.validate_model!(self, attributes)
91
92
  if (!attributes.is_a?(Hash))
92
93
  fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionProposalInputActionsInnerAnyOf` initialize method"
93
94
  end
@@ -263,6 +264,7 @@ module PlainRouter::OpenAPI
263
264
  # @param [Hash] attributes Model attributes in the form of hash
264
265
  # @return [Object] Returns the model itself
265
266
  def self.build_from_hash(attributes)
267
+ ClosedInputValidator.validate_model!(self, attributes)
266
268
  return nil unless attributes.is_a?(Hash)
267
269
  attributes = attributes.transform_keys(&:to_sym)
268
270
  transformed_hash = {}
@@ -88,6 +88,7 @@ module PlainRouter::OpenAPI
88
88
  # Initializes the object
89
89
  # @param [Hash] attributes Model attributes in the form of hash
90
90
  def initialize(attributes = {})
91
+ ClosedInputValidator.validate_model!(self, attributes)
91
92
  if (!attributes.is_a?(Hash))
92
93
  fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionProposalInputActionsInnerAnyOf1` initialize method"
93
94
  end
@@ -263,6 +264,7 @@ module PlainRouter::OpenAPI
263
264
  # @param [Hash] attributes Model attributes in the form of hash
264
265
  # @return [Object] Returns the model itself
265
266
  def self.build_from_hash(attributes)
267
+ ClosedInputValidator.validate_model!(self, attributes)
266
268
  return nil unless attributes.is_a?(Hash)
267
269
  attributes = attributes.transform_keys(&:to_sym)
268
270
  transformed_hash = {}
@@ -88,6 +88,7 @@ module PlainRouter::OpenAPI
88
88
  # Initializes the object
89
89
  # @param [Hash] attributes Model attributes in the form of hash
90
90
  def initialize(attributes = {})
91
+ ClosedInputValidator.validate_model!(self, attributes)
91
92
  if (!attributes.is_a?(Hash))
92
93
  fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionProposalInputActionsInnerAnyOf10` initialize method"
93
94
  end
@@ -263,6 +264,7 @@ module PlainRouter::OpenAPI
263
264
  # @param [Hash] attributes Model attributes in the form of hash
264
265
  # @return [Object] Returns the model itself
265
266
  def self.build_from_hash(attributes)
267
+ ClosedInputValidator.validate_model!(self, attributes)
266
268
  return nil unless attributes.is_a?(Hash)
267
269
  attributes = attributes.transform_keys(&:to_sym)
268
270
  transformed_hash = {}
@@ -94,6 +94,7 @@ module PlainRouter::OpenAPI
94
94
  # Initializes the object
95
95
  # @param [Hash] attributes Model attributes in the form of hash
96
96
  def initialize(attributes = {})
97
+ ClosedInputValidator.validate_model!(self, attributes)
97
98
  if (!attributes.is_a?(Hash))
98
99
  fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionProposalInputActionsInnerAnyOf10Params` initialize method"
99
100
  end
@@ -316,6 +317,7 @@ module PlainRouter::OpenAPI
316
317
  # @param [Hash] attributes Model attributes in the form of hash
317
318
  # @return [Object] Returns the model itself
318
319
  def self.build_from_hash(attributes)
320
+ ClosedInputValidator.validate_model!(self, attributes)
319
321
  return nil unless attributes.is_a?(Hash)
320
322
  attributes = attributes.transform_keys(&:to_sym)
321
323
  transformed_hash = {}
@@ -73,7 +73,7 @@ module PlainRouter::OpenAPI
73
73
  {
74
74
  :'type' => :'String',
75
75
  :'target_entity' => :'ActionProposalInputActionsInnerAnyOf4TargetEntity',
76
- :'params' => :'ActionProposalInputActionsInnerAnyOf11Params',
76
+ :'params' => :'ActionProposalInputActionsInnerAnyOfParams',
77
77
  :'rationale' => :'String',
78
78
  :'idempotency_key' => :'String'
79
79
  }
@@ -88,6 +88,7 @@ module PlainRouter::OpenAPI
88
88
  # Initializes the object
89
89
  # @param [Hash] attributes Model attributes in the form of hash
90
90
  def initialize(attributes = {})
91
+ ClosedInputValidator.validate_model!(self, attributes)
91
92
  if (!attributes.is_a?(Hash))
92
93
  fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionProposalInputActionsInnerAnyOf11` initialize method"
93
94
  end
@@ -263,6 +264,7 @@ module PlainRouter::OpenAPI
263
264
  # @param [Hash] attributes Model attributes in the form of hash
264
265
  # @return [Object] Returns the model itself
265
266
  def self.build_from_hash(attributes)
267
+ ClosedInputValidator.validate_model!(self, attributes)
266
268
  return nil unless attributes.is_a?(Hash)
267
269
  attributes = attributes.transform_keys(&:to_sym)
268
270
  transformed_hash = {}