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,511 @@
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 UpdateDeploymentPlanRequest < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ attr_accessor :platform_ad_account_id
21
+
22
+ attr_accessor :platform
23
+
24
+ attr_accessor :campaign_ref
25
+
26
+ attr_accessor :campaign_spec
27
+
28
+ attr_accessor :ad_set_ref
29
+
30
+ attr_accessor :ad_set_spec
31
+
32
+ attr_accessor :budget_type
33
+
34
+ attr_accessor :budget_amount_minor
35
+
36
+ attr_accessor :currency
37
+
38
+ attr_accessor :copy
39
+
40
+ attr_accessor :landing_page
41
+
42
+ attr_accessor :utm_policy_name
43
+
44
+ attr_accessor :naming_policy_name
45
+
46
+ attr_accessor :creative_ids
47
+
48
+ attr_accessor :creative_overrides
49
+
50
+ class EnumAttributeValidator
51
+ attr_reader :datatype
52
+ attr_reader :allowable_values
53
+
54
+ def initialize(datatype, allowable_values)
55
+ @allowable_values = allowable_values.map do |value|
56
+ case datatype.to_s
57
+ when /Integer/i
58
+ value.to_i
59
+ when /Float/i
60
+ value.to_f
61
+ else
62
+ value
63
+ end
64
+ end
65
+ end
66
+
67
+ def valid?(value)
68
+ !value || allowable_values.include?(value)
69
+ end
70
+ end
71
+
72
+ # Attribute mapping from ruby-style variable name to JSON key.
73
+ def self.attribute_map
74
+ {
75
+ :'name' => :'name',
76
+ :'platform_ad_account_id' => :'platform_ad_account_id',
77
+ :'platform' => :'platform',
78
+ :'campaign_ref' => :'campaign_ref',
79
+ :'campaign_spec' => :'campaign_spec',
80
+ :'ad_set_ref' => :'ad_set_ref',
81
+ :'ad_set_spec' => :'ad_set_spec',
82
+ :'budget_type' => :'budget_type',
83
+ :'budget_amount_minor' => :'budget_amount_minor',
84
+ :'currency' => :'currency',
85
+ :'copy' => :'copy',
86
+ :'landing_page' => :'landing_page',
87
+ :'utm_policy_name' => :'utm_policy_name',
88
+ :'naming_policy_name' => :'naming_policy_name',
89
+ :'creative_ids' => :'creative_ids',
90
+ :'creative_overrides' => :'creative_overrides'
91
+ }
92
+ end
93
+
94
+ # Returns attribute mapping this model knows about
95
+ def self.acceptable_attribute_map
96
+ attribute_map
97
+ end
98
+
99
+ # Returns all the JSON keys this model knows about
100
+ def self.acceptable_attributes
101
+ acceptable_attribute_map.values
102
+ end
103
+
104
+ # Attribute type mapping.
105
+ def self.openapi_types
106
+ {
107
+ :'name' => :'String',
108
+ :'platform_ad_account_id' => :'Integer',
109
+ :'platform' => :'String',
110
+ :'campaign_ref' => :'String',
111
+ :'campaign_spec' => :'Array<String>',
112
+ :'ad_set_ref' => :'String',
113
+ :'ad_set_spec' => :'StoreDeploymentPlanRequestAdSetSpec',
114
+ :'budget_type' => :'String',
115
+ :'budget_amount_minor' => :'Integer',
116
+ :'currency' => :'String',
117
+ :'copy' => :'StoreDeploymentPlanRequestCopy',
118
+ :'landing_page' => :'String',
119
+ :'utm_policy_name' => :'String',
120
+ :'naming_policy_name' => :'String',
121
+ :'creative_ids' => :'Array<String>',
122
+ :'creative_overrides' => :'Array<StoreDeploymentPlanRequestCreativeOverridesInner>'
123
+ }
124
+ end
125
+
126
+ # List of attributes with nullable: true
127
+ def self.openapi_nullable
128
+ Set.new([
129
+ :'name',
130
+ :'campaign_ref',
131
+ :'campaign_spec',
132
+ :'ad_set_ref',
133
+ :'ad_set_spec',
134
+ :'utm_policy_name',
135
+ :'naming_policy_name',
136
+ ])
137
+ end
138
+
139
+ # Initializes the object
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ def initialize(attributes = {})
142
+ if (!attributes.is_a?(Hash))
143
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::UpdateDeploymentPlanRequest` initialize method"
144
+ end
145
+
146
+ # check to see if the attribute exists and convert string to symbol for hash key
147
+ acceptable_attribute_map = self.class.acceptable_attribute_map
148
+ attributes = attributes.each_with_object({}) { |(k, v), h|
149
+ if (!acceptable_attribute_map.key?(k.to_sym))
150
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::UpdateDeploymentPlanRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
151
+ end
152
+ h[k.to_sym] = v
153
+ }
154
+
155
+ if attributes.key?(:'name')
156
+ self.name = attributes[:'name']
157
+ end
158
+
159
+ if attributes.key?(:'platform_ad_account_id')
160
+ self.platform_ad_account_id = attributes[:'platform_ad_account_id']
161
+ end
162
+
163
+ if attributes.key?(:'platform')
164
+ self.platform = attributes[:'platform']
165
+ end
166
+
167
+ if attributes.key?(:'campaign_ref')
168
+ self.campaign_ref = attributes[:'campaign_ref']
169
+ end
170
+
171
+ if attributes.key?(:'campaign_spec')
172
+ if (value = attributes[:'campaign_spec']).is_a?(Array)
173
+ self.campaign_spec = value
174
+ end
175
+ end
176
+
177
+ if attributes.key?(:'ad_set_ref')
178
+ self.ad_set_ref = attributes[:'ad_set_ref']
179
+ end
180
+
181
+ if attributes.key?(:'ad_set_spec')
182
+ self.ad_set_spec = attributes[:'ad_set_spec']
183
+ end
184
+
185
+ if attributes.key?(:'budget_type')
186
+ self.budget_type = attributes[:'budget_type']
187
+ end
188
+
189
+ if attributes.key?(:'budget_amount_minor')
190
+ self.budget_amount_minor = attributes[:'budget_amount_minor']
191
+ end
192
+
193
+ if attributes.key?(:'currency')
194
+ self.currency = attributes[:'currency']
195
+ end
196
+
197
+ if attributes.key?(:'copy')
198
+ self.copy = attributes[:'copy']
199
+ end
200
+
201
+ if attributes.key?(:'landing_page')
202
+ self.landing_page = attributes[:'landing_page']
203
+ end
204
+
205
+ if attributes.key?(:'utm_policy_name')
206
+ self.utm_policy_name = attributes[:'utm_policy_name']
207
+ end
208
+
209
+ if attributes.key?(:'naming_policy_name')
210
+ self.naming_policy_name = attributes[:'naming_policy_name']
211
+ end
212
+
213
+ if attributes.key?(:'creative_ids')
214
+ if (value = attributes[:'creative_ids']).is_a?(Array)
215
+ self.creative_ids = value
216
+ end
217
+ end
218
+
219
+ if attributes.key?(:'creative_overrides')
220
+ if (value = attributes[:'creative_overrides']).is_a?(Array)
221
+ self.creative_overrides = value
222
+ end
223
+ end
224
+ end
225
+
226
+ # Show invalid properties with the reasons. Usually used together with valid?
227
+ # @return Array for valid properties with the reasons
228
+ def list_invalid_properties
229
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
230
+ invalid_properties = Array.new
231
+ if !@name.nil? && @name.to_s.length > 255
232
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
233
+ end
234
+
235
+ if !@platform_ad_account_id.nil? && @platform_ad_account_id < 1
236
+ invalid_properties.push('invalid value for "platform_ad_account_id", must be greater than or equal to 1.')
237
+ end
238
+
239
+ if !@campaign_ref.nil? && @campaign_ref.to_s.length > 255
240
+ invalid_properties.push('invalid value for "campaign_ref", the character length must be smaller than or equal to 255.')
241
+ end
242
+
243
+ if !@ad_set_ref.nil? && @ad_set_ref.to_s.length > 255
244
+ invalid_properties.push('invalid value for "ad_set_ref", the character length must be smaller than or equal to 255.')
245
+ end
246
+
247
+ if !@budget_amount_minor.nil? && @budget_amount_minor < 1
248
+ invalid_properties.push('invalid value for "budget_amount_minor", must be greater than or equal to 1.')
249
+ end
250
+
251
+ if !@currency.nil? && @currency.to_s.length > 3
252
+ invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
253
+ end
254
+
255
+ if !@currency.nil? && @currency.to_s.length < 3
256
+ invalid_properties.push('invalid value for "currency", the character length must be greater than or equal to 3.')
257
+ end
258
+
259
+ if !@landing_page.nil? && @landing_page.to_s.length > 2048
260
+ invalid_properties.push('invalid value for "landing_page", the character length must be smaller than or equal to 2048.')
261
+ end
262
+
263
+ if !@utm_policy_name.nil? && @utm_policy_name.to_s.length > 255
264
+ invalid_properties.push('invalid value for "utm_policy_name", the character length must be smaller than or equal to 255.')
265
+ end
266
+
267
+ if !@naming_policy_name.nil? && @naming_policy_name.to_s.length > 255
268
+ invalid_properties.push('invalid value for "naming_policy_name", the character length must be smaller than or equal to 255.')
269
+ end
270
+
271
+ invalid_properties
272
+ end
273
+
274
+ # Check to see if the all the properties in the model are valid
275
+ # @return true if the model is valid
276
+ def valid?
277
+ warn '[DEPRECATED] the `valid?` method is obsolete'
278
+ return false if !@name.nil? && @name.to_s.length > 255
279
+ return false if !@platform_ad_account_id.nil? && @platform_ad_account_id < 1
280
+ platform_validator = EnumAttributeValidator.new('String', ["google", "meta", "microsoft"])
281
+ return false unless platform_validator.valid?(@platform)
282
+ return false if !@campaign_ref.nil? && @campaign_ref.to_s.length > 255
283
+ return false if !@ad_set_ref.nil? && @ad_set_ref.to_s.length > 255
284
+ budget_type_validator = EnumAttributeValidator.new('String', ["daily", "lifetime"])
285
+ return false unless budget_type_validator.valid?(@budget_type)
286
+ return false if !@budget_amount_minor.nil? && @budget_amount_minor < 1
287
+ return false if !@currency.nil? && @currency.to_s.length > 3
288
+ return false if !@currency.nil? && @currency.to_s.length < 3
289
+ return false if !@landing_page.nil? && @landing_page.to_s.length > 2048
290
+ return false if !@utm_policy_name.nil? && @utm_policy_name.to_s.length > 255
291
+ return false if !@naming_policy_name.nil? && @naming_policy_name.to_s.length > 255
292
+ true
293
+ end
294
+
295
+ # Custom attribute writer method with validation
296
+ # @param [Object] name Value to be assigned
297
+ def name=(name)
298
+ if !name.nil? && name.to_s.length > 255
299
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
300
+ end
301
+
302
+ @name = name
303
+ end
304
+
305
+ # Custom attribute writer method with validation
306
+ # @param [Object] platform_ad_account_id Value to be assigned
307
+ def platform_ad_account_id=(platform_ad_account_id)
308
+ if platform_ad_account_id.nil?
309
+ fail ArgumentError, 'platform_ad_account_id cannot be nil'
310
+ end
311
+
312
+ if platform_ad_account_id < 1
313
+ fail ArgumentError, 'invalid value for "platform_ad_account_id", must be greater than or equal to 1.'
314
+ end
315
+
316
+ @platform_ad_account_id = platform_ad_account_id
317
+ end
318
+
319
+ # Custom attribute writer method checking allowed values (enum).
320
+ # @param [Object] platform Object to be assigned
321
+ def platform=(platform)
322
+ validator = EnumAttributeValidator.new('String', ["google", "meta", "microsoft"])
323
+ unless validator.valid?(platform)
324
+ fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
325
+ end
326
+ @platform = platform
327
+ end
328
+
329
+ # Custom attribute writer method with validation
330
+ # @param [Object] campaign_ref Value to be assigned
331
+ def campaign_ref=(campaign_ref)
332
+ if !campaign_ref.nil? && campaign_ref.to_s.length > 255
333
+ fail ArgumentError, 'invalid value for "campaign_ref", the character length must be smaller than or equal to 255.'
334
+ end
335
+
336
+ @campaign_ref = campaign_ref
337
+ end
338
+
339
+ # Custom attribute writer method with validation
340
+ # @param [Object] ad_set_ref Value to be assigned
341
+ def ad_set_ref=(ad_set_ref)
342
+ if !ad_set_ref.nil? && ad_set_ref.to_s.length > 255
343
+ fail ArgumentError, 'invalid value for "ad_set_ref", the character length must be smaller than or equal to 255.'
344
+ end
345
+
346
+ @ad_set_ref = ad_set_ref
347
+ end
348
+
349
+ # Custom attribute writer method checking allowed values (enum).
350
+ # @param [Object] budget_type Object to be assigned
351
+ def budget_type=(budget_type)
352
+ validator = EnumAttributeValidator.new('String', ["daily", "lifetime"])
353
+ unless validator.valid?(budget_type)
354
+ fail ArgumentError, "invalid value for \"budget_type\", must be one of #{validator.allowable_values}."
355
+ end
356
+ @budget_type = budget_type
357
+ end
358
+
359
+ # Custom attribute writer method with validation
360
+ # @param [Object] budget_amount_minor Value to be assigned
361
+ def budget_amount_minor=(budget_amount_minor)
362
+ if budget_amount_minor.nil?
363
+ fail ArgumentError, 'budget_amount_minor cannot be nil'
364
+ end
365
+
366
+ if budget_amount_minor < 1
367
+ fail ArgumentError, 'invalid value for "budget_amount_minor", must be greater than or equal to 1.'
368
+ end
369
+
370
+ @budget_amount_minor = budget_amount_minor
371
+ end
372
+
373
+ # Custom attribute writer method with validation
374
+ # @param [Object] currency Value to be assigned
375
+ def currency=(currency)
376
+ if currency.nil?
377
+ fail ArgumentError, 'currency cannot be nil'
378
+ end
379
+
380
+ if currency.to_s.length > 3
381
+ fail ArgumentError, 'invalid value for "currency", the character length must be smaller than or equal to 3.'
382
+ end
383
+
384
+ if currency.to_s.length < 3
385
+ fail ArgumentError, 'invalid value for "currency", the character length must be greater than or equal to 3.'
386
+ end
387
+
388
+ @currency = currency
389
+ end
390
+
391
+ # Custom attribute writer method with validation
392
+ # @param [Object] landing_page Value to be assigned
393
+ def landing_page=(landing_page)
394
+ if landing_page.nil?
395
+ fail ArgumentError, 'landing_page cannot be nil'
396
+ end
397
+
398
+ if landing_page.to_s.length > 2048
399
+ fail ArgumentError, 'invalid value for "landing_page", the character length must be smaller than or equal to 2048.'
400
+ end
401
+
402
+ @landing_page = landing_page
403
+ end
404
+
405
+ # Custom attribute writer method with validation
406
+ # @param [Object] utm_policy_name Value to be assigned
407
+ def utm_policy_name=(utm_policy_name)
408
+ if !utm_policy_name.nil? && utm_policy_name.to_s.length > 255
409
+ fail ArgumentError, 'invalid value for "utm_policy_name", the character length must be smaller than or equal to 255.'
410
+ end
411
+
412
+ @utm_policy_name = utm_policy_name
413
+ end
414
+
415
+ # Custom attribute writer method with validation
416
+ # @param [Object] naming_policy_name Value to be assigned
417
+ def naming_policy_name=(naming_policy_name)
418
+ if !naming_policy_name.nil? && naming_policy_name.to_s.length > 255
419
+ fail ArgumentError, 'invalid value for "naming_policy_name", the character length must be smaller than or equal to 255.'
420
+ end
421
+
422
+ @naming_policy_name = naming_policy_name
423
+ end
424
+
425
+ # Custom attribute writer method with validation
426
+ # @param [Object] creative_overrides Value to be assigned
427
+ def creative_overrides=(creative_overrides)
428
+ if creative_overrides.nil?
429
+ fail ArgumentError, 'creative_overrides cannot be nil'
430
+ end
431
+
432
+ @creative_overrides = creative_overrides
433
+ end
434
+
435
+ # Checks equality by comparing each attribute.
436
+ # @param [Object] Object to be compared
437
+ def ==(o)
438
+ return true if self.equal?(o)
439
+ self.class == o.class &&
440
+ name == o.name &&
441
+ platform_ad_account_id == o.platform_ad_account_id &&
442
+ platform == o.platform &&
443
+ campaign_ref == o.campaign_ref &&
444
+ campaign_spec == o.campaign_spec &&
445
+ ad_set_ref == o.ad_set_ref &&
446
+ ad_set_spec == o.ad_set_spec &&
447
+ budget_type == o.budget_type &&
448
+ budget_amount_minor == o.budget_amount_minor &&
449
+ currency == o.currency &&
450
+ copy == o.copy &&
451
+ landing_page == o.landing_page &&
452
+ utm_policy_name == o.utm_policy_name &&
453
+ naming_policy_name == o.naming_policy_name &&
454
+ creative_ids == o.creative_ids &&
455
+ creative_overrides == o.creative_overrides
456
+ end
457
+
458
+ # @see the `==` method
459
+ # @param [Object] Object to be compared
460
+ def eql?(o)
461
+ self == o
462
+ end
463
+
464
+ # Calculates hash code according to all attributes.
465
+ # @return [Integer] Hash code
466
+ def hash
467
+ [name, 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_name, naming_policy_name, creative_ids, creative_overrides].hash
468
+ end
469
+
470
+ # Builds the object from hash
471
+ # @param [Hash] attributes Model attributes in the form of hash
472
+ # @return [Object] Returns the model itself
473
+ def self.build_from_hash(attributes)
474
+ return nil unless attributes.is_a?(Hash)
475
+ attributes = attributes.transform_keys(&:to_sym)
476
+ transformed_hash = {}
477
+ openapi_types.each_pair do |key, type|
478
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
479
+ transformed_hash["#{key}"] = nil
480
+ elsif type =~ /\AArray<(.*)>/i
481
+ # check to ensure the input is an array given that the attribute
482
+ # is documented as an array but the input is not
483
+ if attributes[attribute_map[key]].is_a?(Array)
484
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
485
+ end
486
+ elsif !attributes[attribute_map[key]].nil?
487
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
488
+ end
489
+ end
490
+ new(transformed_hash)
491
+ end
492
+
493
+ # Returns the object in the form of hash
494
+ # @return [Hash] Returns the object in the form of hash
495
+ def to_hash
496
+ hash = {}
497
+ self.class.attribute_map.each_pair do |attr, param|
498
+ value = self.send(attr)
499
+ if value.nil?
500
+ is_nullable = self.class.openapi_nullable.include?(attr)
501
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
502
+ end
503
+
504
+ hash[param] = _to_hash(value)
505
+ end
506
+ hash
507
+ end
508
+
509
+ end
510
+
511
+ end
@@ -0,0 +1,164 @@
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 WorkspaceLockTimeout < ApiModelBase
18
+ attr_accessor :error
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'error' => :'error'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'error' => :'WorkspaceLockTimeoutError'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::WorkspaceLockTimeout` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::WorkspaceLockTimeout`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'error')
67
+ self.error = attributes[:'error']
68
+ else
69
+ self.error = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @error.nil?
79
+ invalid_properties.push('invalid value for "error", error cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @error.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] error Value to be assigned
95
+ def error=(error)
96
+ if error.nil?
97
+ fail ArgumentError, 'error cannot be nil'
98
+ end
99
+
100
+ @error = error
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ error == o.error
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [error].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end