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.
- checksums.yaml +4 -4
- data/README.md +16 -2
- data/lib/plainrouter/client.rb +338 -3
- data/lib/plainrouter/closed_input_objects.json +3896 -0
- data/lib/plainrouter/closed_input_validator.rb +246 -0
- data/lib/plainrouter/integer_input_fields.json +579 -0
- data/lib/plainrouter/openapi/api/action_dry_run_api_api.rb +2 -2
- data/lib/plainrouter/openapi/api/action_proposal_api_api.rb +2 -2
- data/lib/plainrouter/openapi/api/action_read_api_api.rb +71 -31
- data/lib/plainrouter/openapi/api/action_rule_api_api.rb +350 -0
- data/lib/plainrouter/openapi/api/ad_test_api_api.rb +263 -0
- data/lib/plainrouter/openapi/api/agent_context_api.rb +93 -0
- data/lib/plainrouter/openapi/api/cookie_declaration_api.rb +90 -0
- data/lib/plainrouter/openapi/api/creative_api.rb +422 -0
- data/lib/plainrouter/openapi/api/deployment_plan_api.rb +561 -0
- data/lib/plainrouter/openapi/api/draft_batch_file_import_api.rb +142 -0
- data/lib/plainrouter/openapi/api/launch_policy_api.rb +242 -0
- data/lib/plainrouter/openapi/api/meta_inventory_exposure_api.rb +254 -0
- data/lib/plainrouter/openapi/api_client.rb +3 -0
- data/lib/plainrouter/openapi/api_model_base.rb +2 -0
- data/lib/plainrouter/openapi/configuration.rb +76 -0
- data/lib/plainrouter/openapi/models/action_batch_read_data.rb +42 -4
- data/lib/plainrouter/openapi/models/action_current_disposition.rb +13 -1
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload.rb +238 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline.rb +103 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline_any_of.rb +245 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_inverse.rb +206 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics.rb +103 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics_any_of.rb +276 -0
- data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run.rb +42 -4
- data/lib/plainrouter/openapi/models/action_list_read_meta.rb +33 -4
- data/lib/plainrouter/openapi/models/action_policy_read_data.rb +3 -105
- data/lib/plainrouter/openapi/models/action_policy_result.rb +374 -0
- data/lib/plainrouter/openapi/models/action_proposal_input.rb +103 -4
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner.rb +1 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of1.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10_params.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of11.rb +3 -1
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12_params.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13_params.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of2.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of3.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4_target_entity.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of5.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of6.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of7.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of8.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of9.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_params.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_target_entity.rb +2 -0
- data/lib/plainrouter/openapi/models/action_proposal_input_evidence_inner.rb +4 -2
- data/lib/plainrouter/openapi/models/action_proposal_read_proposal.rb +42 -4
- data/lib/plainrouter/openapi/models/action_read_item.rb +72 -4
- data/lib/plainrouter/openapi/models/action_read_item_counted_evidence.rb +319 -0
- data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_counted.rb +174 -0
- data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_coverage.rb +162 -0
- data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_meta_reported.rb +198 -0
- data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_target.rb +190 -0
- data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_window.rb +225 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence.rb +105 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of.rb +190 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of1.rb +242 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of2.rb +217 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of_outcome.rb +238 -0
- data/lib/plainrouter/openapi/models/action_read_item_proposer.rb +198 -0
- data/lib/plainrouter/openapi/models/action_receipt_unavailable.rb +164 -0
- data/lib/plainrouter/openapi/models/action_receipt_unavailable_error.rb +214 -0
- data/lib/plainrouter/openapi/models/action_rule_detail_read.rb +164 -0
- data/lib/plainrouter/openapi/models/action_rule_detail_read_rule.rb +402 -0
- data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_current_revision.rb +388 -0
- data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_runs_inner.rb +396 -0
- data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_runs_inner_decisions_inner.rb +382 -0
- data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_window.rb +242 -0
- data/lib/plainrouter/openapi/models/action_rule_write_read.rb +164 -0
- data/lib/plainrouter/openapi/models/action_rule_write_read_rule.rb +373 -0
- data/lib/plainrouter/openapi/models/actions_api_decision_receipt404_response.rb +103 -0
- data/lib/plainrouter/openapi/models/actions_api_dry_run401_response.rb +103 -0
- data/lib/plainrouter/openapi/models/actions_rules_index200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules.rb +196 -0
- data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules_data_inner.rb +344 -0
- data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules_data_inner_account.rb +157 -0
- data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules_data_inner_counts.rb +156 -0
- data/lib/plainrouter/openapi/models/actions_rules_index403_response.rb +103 -0
- data/lib/plainrouter/openapi/models/actions_rules_index403_response_any_of.rb +214 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request.rb +317 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request_definition.rb +105 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of.rb +317 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of1.rb +361 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of2.rb +361 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of_cost_ratio.rb +104 -0
- data/lib/plainrouter/openapi/models/actions_rules_store_request_window.rb +103 -0
- data/lib/plainrouter/openapi/models/actions_rules_update_request.rb +267 -0
- data/lib/plainrouter/openapi/models/actions_rules_update_request_definition.rb +105 -0
- data/lib/plainrouter/openapi/models/actions_rules_update_request_definition_any_of.rb +317 -0
- data/lib/plainrouter/openapi/models/actions_rules_update_request_definition_any_of1.rb +361 -0
- data/lib/plainrouter/openapi/models/actions_rules_update_request_definition_any_of2.rb +361 -0
- data/lib/plainrouter/openapi/models/actions_tests_api_index404_response.rb +103 -0
- data/lib/plainrouter/openapi/models/actions_tests_api_store_request.rb +467 -0
- data/lib/plainrouter/openapi/models/actions_tests_api_store_request_maximum_spend_minor.rb +104 -0
- data/lib/plainrouter/openapi/models/ad_test.rb +552 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read.rb +164 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test.rb +675 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_members_inner.rb +232 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_pause_proposals_inner.rb +286 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict.rb +336 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_daily_facts_inner.rb +374 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details.rb +285 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_baseline.rb +190 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_observed_destinations_inner.rb +216 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_members_inner.rb +349 -0
- data/lib/plainrouter/openapi/models/ad_test_daily_fact_read.rb +374 -0
- data/lib/plainrouter/openapi/models/ad_test_event_choice.rb +190 -0
- data/lib/plainrouter/openapi/models/ad_test_list_read.rb +218 -0
- data/lib/plainrouter/openapi/models/ad_test_list_read_observed_conversion_events_inner.rb +190 -0
- data/lib/plainrouter/openapi/models/ad_test_list_read_tests.rb +396 -0
- data/lib/plainrouter/openapi/models/ad_test_read.rb +675 -0
- data/lib/plainrouter/openapi/models/ad_test_show_read.rb +164 -0
- data/lib/plainrouter/openapi/models/ad_test_verdict_member_read.rb +349 -0
- data/lib/plainrouter/openapi/models/ad_test_verdict_read.rb +336 -0
- data/lib/plainrouter/openapi/models/agent_context200_response.rb +214 -0
- data/lib/plainrouter/openapi/models/agent_context200_response_agent.rb +268 -0
- data/lib/plainrouter/openapi/models/agent_context200_response_platform_ad_account.rb +292 -0
- data/lib/plainrouter/openapi/models/agent_context200_response_platform_ad_account_workspace.rb +190 -0
- data/lib/plainrouter/openapi/models/agent_context401_response.rb +103 -0
- data/lib/plainrouter/openapi/models/agent_context_auth_error.rb +190 -0
- data/lib/plainrouter/openapi/models/agent_credential_error.rb +214 -0
- data/lib/plainrouter/openapi/models/api_route_not_found.rb +216 -0
- data/lib/plainrouter/openapi/models/api_route_not_found_error.rb +240 -0
- data/lib/plainrouter/openapi/models/api_route_not_found_request.rb +190 -0
- data/lib/plainrouter/openapi/models/api_route_not_found_resources.rb +190 -0
- data/lib/plainrouter/openapi/models/cookie_declaration.rb +177 -0
- data/lib/plainrouter/openapi/models/cookie_declaration_categories.rb +268 -0
- data/lib/plainrouter/openapi/models/cookie_declaration_categories_necessary.rb +194 -0
- data/lib/plainrouter/openapi/models/cookie_declaration_item.rb +280 -0
- data/lib/plainrouter/openapi/models/create_event202_response_warnings_inner.rb +2 -2
- data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +1 -1
- data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +1 -1
- data/lib/plainrouter/openapi/models/creative_intake_read.rb +164 -0
- data/lib/plainrouter/openapi/models/creative_intake_rejected.rb +164 -0
- data/lib/plainrouter/openapi/models/creative_intake_rejected_error.rb +190 -0
- data/lib/plainrouter/openapi/models/creative_intake_tags.rb +257 -0
- data/lib/plainrouter/openapi/models/creative_mcp_grant_operation.rb +44 -0
- data/lib/plainrouter/openapi/models/creative_mcp_preview.rb +283 -0
- data/lib/plainrouter/openapi/models/creative_mcp_refusal.rb +45 -0
- data/lib/plainrouter/openapi/models/creative_mcp_tool.rb +44 -0
- data/lib/plainrouter/openapi/models/delivery_status.rb +2 -1
- data/lib/plainrouter/openapi/models/deployment_plan_read.rb +306 -0
- data/lib/plainrouter/openapi/models/deployment_plan_read_copy.rb +266 -0
- data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner.rb +320 -0
- data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner_copy.rb +267 -0
- data/lib/plainrouter/openapi/models/destination.rb +73 -9
- data/lib/plainrouter/openapi/models/destination_config.rb +103 -0
- data/lib/plainrouter/openapi/models/destination_status.rb +2 -1
- data/lib/plainrouter/openapi/models/destination_type.rb +2 -1
- data/lib/plainrouter/openapi/models/draft_batch_mode.rb +41 -0
- data/lib/plainrouter/openapi/models/execute_deployment_plan_request.rb +200 -0
- data/lib/plainrouter/openapi/models/get_account_inventory200_response.rb +341 -0
- data/lib/plainrouter/openapi/models/get_account_inventory200_response_summary.rb +158 -0
- data/lib/plainrouter/openapi/models/get_account_inventory404_response.rb +188 -0
- data/lib/plainrouter/openapi/models/get_cookie_declaration404_response.rb +103 -0
- data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +25 -1
- data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +25 -1
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response.rb +345 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_account.rb +264 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_changes_inner.rb +304 -0
- data/lib/plainrouter/openapi/models/{action_proposal_input_actions_inner_any_of11_params.rb → get_inventory_metrics200_response_effective_range.rb} +41 -24
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_metrics_inner.rb +492 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner.rb +304 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner_meta.rb +268 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_pagination_value.rb +202 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_staleness.rb +200 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_sync.rb +186 -0
- data/lib/plainrouter/openapi/models/ingestion_warning_code.rb +2 -1
- data/lib/plainrouter/openapi/models/launch_creatives_index200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/launch_creatives_index200_response_creatives.rb +196 -0
- data/lib/plainrouter/openapi/models/launch_creatives_index200_response_creatives_data_inner.rb +451 -0
- data/lib/plainrouter/openapi/models/launch_creatives_index200_response_creatives_data_inner_tags.rb +104 -0
- data/lib/plainrouter/openapi/models/launch_creatives_status200_response.rb +166 -0
- data/lib/plainrouter/openapi/models/launch_intent_read.rb +164 -0
- data/lib/plainrouter/openapi/models/launch_intent_read_intent.rb +330 -0
- data/lib/plainrouter/openapi/models/launch_intent_read_intent_actions_inner.rb +238 -0
- data/lib/plainrouter/openapi/models/launch_intent_status.rb +46 -0
- data/lib/plainrouter/openapi/models/launch_plans_copy403_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_plans_copy404_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_plans_copy422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_plans_execute422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_plans_index200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans.rb +347 -0
- data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments.rb +104 -0
- data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments_any_of.rb +190 -0
- data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments_any_of1.rb +190 -0
- data/lib/plainrouter/openapi/models/launch_plans_show200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/launch_plans_store201_response.rb +166 -0
- data/lib/plainrouter/openapi/models/launch_plans_validate422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_policies_index200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/launch_policies_index200_response_policies.rb +453 -0
- data/lib/plainrouter/openapi/models/{list_events200_response_events_links_inner.rb → launch_policies_index200_response_policies_links_inner.rb} +3 -3
- data/lib/plainrouter/openapi/models/launch_policies_store201_response.rb +166 -0
- data/lib/plainrouter/openapi/models/launch_policy.rb +346 -0
- data/lib/plainrouter/openapi/models/launcher_file_import403_response.rb +216 -0
- data/lib/plainrouter/openapi/models/launcher_file_import422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launcher_file_import422_response_any_of.rb +242 -0
- data/lib/plainrouter/openapi/models/launcher_file_import422_response_any_of_syntactic_row_failures_inner.rb +190 -0
- data/lib/plainrouter/openapi/models/list_events200_response_events.rb +1 -1
- data/lib/plainrouter/openapi/models/plan_copy_forbidden.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_forbidden_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_copy_not_found.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_not_found_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_copy_read.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_read_plan.rb +347 -0
- data/lib/plainrouter/openapi/models/plan_copy_rejected.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_rejected_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_execute_conflict.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_execute_conflict_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_execute_rejected.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_execute_rejected_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_validate_rejected.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_validate_rejected_error.rb +191 -0
- data/lib/plainrouter/openapi/models/proposal_replay_conflict.rb +214 -0
- data/lib/plainrouter/openapi/models/proposal_replay_conflict_errors.rb +178 -0
- data/lib/plainrouter/openapi/models/proposal_unavailable.rb +164 -0
- data/lib/plainrouter/openapi/models/proposal_unavailable_error.rb +214 -0
- data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +67 -1
- data/lib/plainrouter/openapi/models/store_creative403_response.rb +103 -0
- data/lib/plainrouter/openapi/models/store_creative413_response.rb +103 -0
- data/lib/plainrouter/openapi/models/store_creative422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/store_creative_from_url_request.rb +208 -0
- data/lib/plainrouter/openapi/models/store_creative_from_url_request_tags.rb +257 -0
- data/lib/plainrouter/openapi/models/store_creative_request.rb +219 -0
- data/lib/plainrouter/openapi/models/store_creative_request_tags.rb +257 -0
- data/lib/plainrouter/openapi/models/store_deployment_plan_request.rb +570 -0
- data/lib/plainrouter/openapi/models/store_deployment_plan_request_ad_set_spec.rb +220 -0
- data/lib/plainrouter/openapi/models/store_deployment_plan_request_copy.rb +266 -0
- data/lib/plainrouter/openapi/models/store_deployment_plan_request_creative_overrides_inner.rb +217 -0
- data/lib/plainrouter/openapi/models/store_launch_policy_request.rb +260 -0
- data/lib/plainrouter/openapi/models/update_creative_status_request.rb +188 -0
- data/lib/plainrouter/openapi/models/update_deployment_plan_request.rb +511 -0
- data/lib/plainrouter/openapi/models/workspace_lock_timeout.rb +164 -0
- data/lib/plainrouter/openapi/models/workspace_lock_timeout_error.rb +214 -0
- data/lib/plainrouter/openapi/version.rb +1 -1
- data/lib/plainrouter/openapi.rb +190 -2
- data/lib/plainrouter/proposal_errors.rb +31 -0
- data/lib/plainrouter/version.rb +1 -1
- data/lib/plainrouter.rb +1 -0
- metadata +196 -4
|
@@ -0,0 +1,283 @@
|
|
|
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
|
+
# Missing derivatives return pending and queue a creative-queue build, including creatives created before these tools shipped. No image bytes are sent to the model.
|
|
18
|
+
class CreativeMcpPreview < ApiModelBase
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
attr_accessor :state
|
|
22
|
+
|
|
23
|
+
# Ready items only, delivered in tool-result _meta.creative_previews to the MCP App. Signed R2 derivative URL valid for at most 300 seconds; never an original or provider URL.
|
|
24
|
+
attr_accessor :url
|
|
25
|
+
|
|
26
|
+
attr_accessor :mime_type
|
|
27
|
+
|
|
28
|
+
attr_accessor :width
|
|
29
|
+
|
|
30
|
+
attr_accessor :height
|
|
31
|
+
|
|
32
|
+
# Stored derivative at most 1048576 bytes and 4000000 pixels. SVG refused; the existing decode cap applies.
|
|
33
|
+
attr_accessor :byte_size
|
|
34
|
+
|
|
35
|
+
attr_accessor :expires_at
|
|
36
|
+
|
|
37
|
+
class EnumAttributeValidator
|
|
38
|
+
attr_reader :datatype
|
|
39
|
+
attr_reader :allowable_values
|
|
40
|
+
|
|
41
|
+
def initialize(datatype, allowable_values)
|
|
42
|
+
@allowable_values = allowable_values.map do |value|
|
|
43
|
+
case datatype.to_s
|
|
44
|
+
when /Integer/i
|
|
45
|
+
value.to_i
|
|
46
|
+
when /Float/i
|
|
47
|
+
value.to_f
|
|
48
|
+
else
|
|
49
|
+
value
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def valid?(value)
|
|
55
|
+
!value || allowable_values.include?(value)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
60
|
+
def self.attribute_map
|
|
61
|
+
{
|
|
62
|
+
:'id' => :'id',
|
|
63
|
+
:'state' => :'state',
|
|
64
|
+
:'url' => :'url',
|
|
65
|
+
:'mime_type' => :'mime_type',
|
|
66
|
+
:'width' => :'width',
|
|
67
|
+
:'height' => :'height',
|
|
68
|
+
:'byte_size' => :'byte_size',
|
|
69
|
+
:'expires_at' => :'expires_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
|
+
:'state' => :'String',
|
|
88
|
+
:'url' => :'String',
|
|
89
|
+
:'mime_type' => :'String',
|
|
90
|
+
:'width' => :'Integer',
|
|
91
|
+
:'height' => :'Integer',
|
|
92
|
+
:'byte_size' => :'Integer',
|
|
93
|
+
:'expires_at' => :'String'
|
|
94
|
+
}
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# List of attributes with nullable: true
|
|
98
|
+
def self.openapi_nullable
|
|
99
|
+
Set.new([
|
|
100
|
+
])
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Initializes the object
|
|
104
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
105
|
+
def initialize(attributes = {})
|
|
106
|
+
if (!attributes.is_a?(Hash))
|
|
107
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::CreativeMcpPreview` initialize method"
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
111
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
112
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
113
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
114
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::CreativeMcpPreview`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
115
|
+
end
|
|
116
|
+
h[k.to_sym] = v
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if attributes.key?(:'id')
|
|
120
|
+
self.id = attributes[:'id']
|
|
121
|
+
else
|
|
122
|
+
self.id = nil
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'state')
|
|
126
|
+
self.state = attributes[:'state']
|
|
127
|
+
else
|
|
128
|
+
self.state = nil
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'url')
|
|
132
|
+
self.url = attributes[:'url']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'mime_type')
|
|
136
|
+
self.mime_type = attributes[:'mime_type']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'width')
|
|
140
|
+
self.width = attributes[:'width']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'height')
|
|
144
|
+
self.height = attributes[:'height']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'byte_size')
|
|
148
|
+
self.byte_size = attributes[:'byte_size']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'expires_at')
|
|
152
|
+
self.expires_at = attributes[:'expires_at']
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
157
|
+
# @return Array for valid properties with the reasons
|
|
158
|
+
def list_invalid_properties
|
|
159
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
160
|
+
invalid_properties = Array.new
|
|
161
|
+
if @id.nil?
|
|
162
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if @state.nil?
|
|
166
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
invalid_properties
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Check to see if the all the properties in the model are valid
|
|
173
|
+
# @return true if the model is valid
|
|
174
|
+
def valid?
|
|
175
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
176
|
+
return false if @id.nil?
|
|
177
|
+
return false if @state.nil?
|
|
178
|
+
state_validator = EnumAttributeValidator.new('String', ["pending", "ready", "refused"])
|
|
179
|
+
return false unless state_validator.valid?(@state)
|
|
180
|
+
mime_type_validator = EnumAttributeValidator.new('String', ["image/jpeg"])
|
|
181
|
+
return false unless mime_type_validator.valid?(@mime_type)
|
|
182
|
+
true
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Custom attribute writer method with validation
|
|
186
|
+
# @param [Object] id Value to be assigned
|
|
187
|
+
def id=(id)
|
|
188
|
+
if id.nil?
|
|
189
|
+
fail ArgumentError, 'id cannot be nil'
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
@id = id
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
196
|
+
# @param [Object] state Object to be assigned
|
|
197
|
+
def state=(state)
|
|
198
|
+
validator = EnumAttributeValidator.new('String', ["pending", "ready", "refused"])
|
|
199
|
+
unless validator.valid?(state)
|
|
200
|
+
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
201
|
+
end
|
|
202
|
+
@state = state
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
206
|
+
# @param [Object] mime_type Object to be assigned
|
|
207
|
+
def mime_type=(mime_type)
|
|
208
|
+
validator = EnumAttributeValidator.new('String', ["image/jpeg"])
|
|
209
|
+
unless validator.valid?(mime_type)
|
|
210
|
+
fail ArgumentError, "invalid value for \"mime_type\", must be one of #{validator.allowable_values}."
|
|
211
|
+
end
|
|
212
|
+
@mime_type = mime_type
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Checks equality by comparing each attribute.
|
|
216
|
+
# @param [Object] Object to be compared
|
|
217
|
+
def ==(o)
|
|
218
|
+
return true if self.equal?(o)
|
|
219
|
+
self.class == o.class &&
|
|
220
|
+
id == o.id &&
|
|
221
|
+
state == o.state &&
|
|
222
|
+
url == o.url &&
|
|
223
|
+
mime_type == o.mime_type &&
|
|
224
|
+
width == o.width &&
|
|
225
|
+
height == o.height &&
|
|
226
|
+
byte_size == o.byte_size &&
|
|
227
|
+
expires_at == o.expires_at
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# @see the `==` method
|
|
231
|
+
# @param [Object] Object to be compared
|
|
232
|
+
def eql?(o)
|
|
233
|
+
self == o
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Calculates hash code according to all attributes.
|
|
237
|
+
# @return [Integer] Hash code
|
|
238
|
+
def hash
|
|
239
|
+
[id, state, url, mime_type, width, height, byte_size, expires_at].hash
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Builds the object from hash
|
|
243
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
244
|
+
# @return [Object] Returns the model itself
|
|
245
|
+
def self.build_from_hash(attributes)
|
|
246
|
+
return nil unless attributes.is_a?(Hash)
|
|
247
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
248
|
+
transformed_hash = {}
|
|
249
|
+
openapi_types.each_pair do |key, type|
|
|
250
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
251
|
+
transformed_hash["#{key}"] = nil
|
|
252
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
253
|
+
# check to ensure the input is an array given that the attribute
|
|
254
|
+
# is documented as an array but the input is not
|
|
255
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
256
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
257
|
+
end
|
|
258
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
259
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
new(transformed_hash)
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Returns the object in the form of hash
|
|
266
|
+
# @return [Hash] Returns the object in the form of hash
|
|
267
|
+
def to_hash
|
|
268
|
+
hash = {}
|
|
269
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
270
|
+
value = self.send(attr)
|
|
271
|
+
if value.nil?
|
|
272
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
273
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
hash[param] = _to_hash(value)
|
|
277
|
+
end
|
|
278
|
+
hash
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
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 CreativeMcpRefusal
|
|
18
|
+
REQUEST_KEY_CONFLICT = "request_key_conflict".freeze
|
|
19
|
+
RATE_LIMITED = "rate_limited".freeze
|
|
20
|
+
INVALID_ARGUMENTS = "invalid_arguments".freeze
|
|
21
|
+
INSUFFICIENT_SCOPE = "insufficient_scope".freeze
|
|
22
|
+
INVALID_TOKEN = "invalid_token".freeze
|
|
23
|
+
NOT_FOUND = "not_found".freeze
|
|
24
|
+
WORKSPACE_REQUIRED = "workspace_required".freeze
|
|
25
|
+
|
|
26
|
+
def self.all_vars
|
|
27
|
+
@all_vars ||= [REQUEST_KEY_CONFLICT, RATE_LIMITED, INVALID_ARGUMENTS, INSUFFICIENT_SCOPE, INVALID_TOKEN, NOT_FOUND, WORKSPACE_REQUIRED].freeze
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Builds the enum from string
|
|
31
|
+
# @param [String] The enum value in the form of the string
|
|
32
|
+
# @return [String] The enum value
|
|
33
|
+
def self.build_from_hash(value)
|
|
34
|
+
new.build_from_hash(value)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Builds the enum from string
|
|
38
|
+
# @param [String] The enum value in the form of the string
|
|
39
|
+
# @return [String] The enum value
|
|
40
|
+
def build_from_hash(value)
|
|
41
|
+
return value if CreativeMcpRefusal.all_vars.include?(value)
|
|
42
|
+
raise "Invalid ENUM value #{value} for class #CreativeMcpRefusal"
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
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 CreativeMcpTool
|
|
18
|
+
LIST_TEMPLATES = "list_templates".freeze
|
|
19
|
+
RENDER_AD = "render_ad".freeze
|
|
20
|
+
GET_RENDER = "get_render".freeze
|
|
21
|
+
RESUME_RENDER = "resume_render".freeze
|
|
22
|
+
LIST_CREATIVES = "list_creatives".freeze
|
|
23
|
+
PREVIEW_CREATIVES = "preview_creatives".freeze
|
|
24
|
+
|
|
25
|
+
def self.all_vars
|
|
26
|
+
@all_vars ||= [LIST_TEMPLATES, RENDER_AD, GET_RENDER, RESUME_RENDER, LIST_CREATIVES, PREVIEW_CREATIVES].freeze
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Builds the enum from string
|
|
30
|
+
# @param [String] The enum value in the form of the string
|
|
31
|
+
# @return [String] The enum value
|
|
32
|
+
def self.build_from_hash(value)
|
|
33
|
+
new.build_from_hash(value)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Builds the enum from string
|
|
37
|
+
# @param [String] The enum value in the form of the string
|
|
38
|
+
# @return [String] The enum value
|
|
39
|
+
def build_from_hash(value)
|
|
40
|
+
return value if CreativeMcpTool.all_vars.include?(value)
|
|
41
|
+
raise "Invalid ENUM value #{value} for class #CreativeMcpTool"
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -17,6 +17,7 @@ module PlainRouter::OpenAPI
|
|
|
17
17
|
class DeliveryStatus
|
|
18
18
|
QUEUED = "queued".freeze
|
|
19
19
|
SENT = "sent".freeze
|
|
20
|
+
HELD = "held".freeze
|
|
20
21
|
ACCEPTED = "accepted".freeze
|
|
21
22
|
RETRYING = "retrying".freeze
|
|
22
23
|
FAILED_AUTH = "failed:auth".freeze
|
|
@@ -28,7 +29,7 @@ module PlainRouter::OpenAPI
|
|
|
28
29
|
SKIPPED_DUPLICATE = "skipped:duplicate".freeze
|
|
29
30
|
|
|
30
31
|
def self.all_vars
|
|
31
|
-
@all_vars ||= [QUEUED, SENT, ACCEPTED, RETRYING, FAILED_AUTH, FAILED_PERMANENT, FAILED_UNKNOWN, EXPIRED, SKIPPED_CONSENT, SKIPPED_NO_DESTINATION, SKIPPED_DUPLICATE].freeze
|
|
32
|
+
@all_vars ||= [QUEUED, SENT, HELD, ACCEPTED, RETRYING, FAILED_AUTH, FAILED_PERMANENT, FAILED_UNKNOWN, EXPIRED, SKIPPED_CONSENT, SKIPPED_NO_DESTINATION, SKIPPED_DUPLICATE].freeze
|
|
32
33
|
end
|
|
33
34
|
|
|
34
35
|
# Builds the enum from string
|
|
@@ -0,0 +1,306 @@
|
|
|
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
|
+
# Complete projection rows are paged within 80,000 JSON bytes, accounting for both MCP representations. Defaults are bounded. Follow next_cursor with the same scope and filters. One oversized row is explicitly refused; fields are never silently clipped.
|
|
18
|
+
class DeploymentPlanRead < ApiModelBase
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
attr_accessor :id
|
|
22
|
+
|
|
23
|
+
attr_accessor :platform_ad_account_id
|
|
24
|
+
|
|
25
|
+
# Current review version. Pass this value when executing the plan you reviewed.
|
|
26
|
+
attr_accessor :review_version
|
|
27
|
+
|
|
28
|
+
attr_accessor :copy
|
|
29
|
+
|
|
30
|
+
attr_accessor :landing_page
|
|
31
|
+
|
|
32
|
+
attr_accessor :creatives
|
|
33
|
+
|
|
34
|
+
attr_accessor :next_cursor
|
|
35
|
+
|
|
36
|
+
attr_accessor :truncated
|
|
37
|
+
|
|
38
|
+
attr_accessor :continuation
|
|
39
|
+
|
|
40
|
+
attr_accessor :creative_count
|
|
41
|
+
|
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
|
+
def self.attribute_map
|
|
44
|
+
{
|
|
45
|
+
:'name' => :'name',
|
|
46
|
+
:'id' => :'id',
|
|
47
|
+
:'platform_ad_account_id' => :'platform_ad_account_id',
|
|
48
|
+
:'review_version' => :'review_version',
|
|
49
|
+
:'copy' => :'copy',
|
|
50
|
+
:'landing_page' => :'landing_page',
|
|
51
|
+
:'creatives' => :'creatives',
|
|
52
|
+
:'next_cursor' => :'next_cursor',
|
|
53
|
+
:'truncated' => :'truncated',
|
|
54
|
+
:'continuation' => :'continuation',
|
|
55
|
+
:'creative_count' => :'creative_count'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Returns attribute mapping this model knows about
|
|
60
|
+
def self.acceptable_attribute_map
|
|
61
|
+
attribute_map
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Returns all the JSON keys this model knows about
|
|
65
|
+
def self.acceptable_attributes
|
|
66
|
+
acceptable_attribute_map.values
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Attribute type mapping.
|
|
70
|
+
def self.openapi_types
|
|
71
|
+
{
|
|
72
|
+
:'name' => :'String',
|
|
73
|
+
:'id' => :'String',
|
|
74
|
+
:'platform_ad_account_id' => :'Integer',
|
|
75
|
+
:'review_version' => :'String',
|
|
76
|
+
:'copy' => :'DeploymentPlanReadCopy',
|
|
77
|
+
:'landing_page' => :'String',
|
|
78
|
+
:'creatives' => :'Array<DeploymentPlanReadCreativesInner>',
|
|
79
|
+
:'next_cursor' => :'Integer',
|
|
80
|
+
:'truncated' => :'Boolean',
|
|
81
|
+
:'continuation' => :'String',
|
|
82
|
+
:'creative_count' => :'Integer'
|
|
83
|
+
}
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# List of attributes with nullable: true
|
|
87
|
+
def self.openapi_nullable
|
|
88
|
+
Set.new([
|
|
89
|
+
:'name',
|
|
90
|
+
:'copy',
|
|
91
|
+
:'next_cursor',
|
|
92
|
+
])
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Initializes the object
|
|
96
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
97
|
+
def initialize(attributes = {})
|
|
98
|
+
if (!attributes.is_a?(Hash))
|
|
99
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::DeploymentPlanRead` initialize method"
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
103
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
104
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
105
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
106
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::DeploymentPlanRead`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
107
|
+
end
|
|
108
|
+
h[k.to_sym] = v
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'name')
|
|
112
|
+
self.name = attributes[:'name']
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'id')
|
|
116
|
+
self.id = attributes[:'id']
|
|
117
|
+
else
|
|
118
|
+
self.id = nil
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'platform_ad_account_id')
|
|
122
|
+
self.platform_ad_account_id = attributes[:'platform_ad_account_id']
|
|
123
|
+
else
|
|
124
|
+
self.platform_ad_account_id = nil
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'review_version')
|
|
128
|
+
self.review_version = attributes[:'review_version']
|
|
129
|
+
else
|
|
130
|
+
self.review_version = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'copy')
|
|
134
|
+
self.copy = attributes[:'copy']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'landing_page')
|
|
138
|
+
self.landing_page = attributes[:'landing_page']
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'creatives')
|
|
142
|
+
if (value = attributes[:'creatives']).is_a?(Array)
|
|
143
|
+
self.creatives = value
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'next_cursor')
|
|
148
|
+
self.next_cursor = attributes[:'next_cursor']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'truncated')
|
|
152
|
+
self.truncated = attributes[:'truncated']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'continuation')
|
|
156
|
+
self.continuation = attributes[:'continuation']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'creative_count')
|
|
160
|
+
self.creative_count = attributes[:'creative_count']
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
165
|
+
# @return Array for valid properties with the reasons
|
|
166
|
+
def list_invalid_properties
|
|
167
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
168
|
+
invalid_properties = Array.new
|
|
169
|
+
if @id.nil?
|
|
170
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if @platform_ad_account_id.nil?
|
|
174
|
+
invalid_properties.push('invalid value for "platform_ad_account_id", platform_ad_account_id cannot be nil.')
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if @review_version.nil?
|
|
178
|
+
invalid_properties.push('invalid value for "review_version", review_version cannot be nil.')
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
pattern = Regexp.new(/^[a-f0-9]{64}$/)
|
|
182
|
+
if @review_version !~ pattern
|
|
183
|
+
invalid_properties.push("invalid value for \"review_version\", must conform to the pattern #{pattern}.")
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
invalid_properties
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Check to see if the all the properties in the model are valid
|
|
190
|
+
# @return true if the model is valid
|
|
191
|
+
def valid?
|
|
192
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
193
|
+
return false if @id.nil?
|
|
194
|
+
return false if @platform_ad_account_id.nil?
|
|
195
|
+
return false if @review_version.nil?
|
|
196
|
+
return false if @review_version !~ Regexp.new(/^[a-f0-9]{64}$/)
|
|
197
|
+
true
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Custom attribute writer method with validation
|
|
201
|
+
# @param [Object] id Value to be assigned
|
|
202
|
+
def id=(id)
|
|
203
|
+
if id.nil?
|
|
204
|
+
fail ArgumentError, 'id cannot be nil'
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
@id = id
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Custom attribute writer method with validation
|
|
211
|
+
# @param [Object] platform_ad_account_id Value to be assigned
|
|
212
|
+
def platform_ad_account_id=(platform_ad_account_id)
|
|
213
|
+
if platform_ad_account_id.nil?
|
|
214
|
+
fail ArgumentError, 'platform_ad_account_id cannot be nil'
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
@platform_ad_account_id = platform_ad_account_id
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Custom attribute writer method with validation
|
|
221
|
+
# @param [Object] review_version Value to be assigned
|
|
222
|
+
def review_version=(review_version)
|
|
223
|
+
if review_version.nil?
|
|
224
|
+
fail ArgumentError, 'review_version cannot be nil'
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
pattern = Regexp.new(/^[a-f0-9]{64}$/)
|
|
228
|
+
if review_version !~ pattern
|
|
229
|
+
fail ArgumentError, "invalid value for \"review_version\", must conform to the pattern #{pattern}."
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
@review_version = review_version
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Checks equality by comparing each attribute.
|
|
236
|
+
# @param [Object] Object to be compared
|
|
237
|
+
def ==(o)
|
|
238
|
+
return true if self.equal?(o)
|
|
239
|
+
self.class == o.class &&
|
|
240
|
+
name == o.name &&
|
|
241
|
+
id == o.id &&
|
|
242
|
+
platform_ad_account_id == o.platform_ad_account_id &&
|
|
243
|
+
review_version == o.review_version &&
|
|
244
|
+
copy == o.copy &&
|
|
245
|
+
landing_page == o.landing_page &&
|
|
246
|
+
creatives == o.creatives &&
|
|
247
|
+
next_cursor == o.next_cursor &&
|
|
248
|
+
truncated == o.truncated &&
|
|
249
|
+
continuation == o.continuation &&
|
|
250
|
+
creative_count == o.creative_count
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# @see the `==` method
|
|
254
|
+
# @param [Object] Object to be compared
|
|
255
|
+
def eql?(o)
|
|
256
|
+
self == o
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Calculates hash code according to all attributes.
|
|
260
|
+
# @return [Integer] Hash code
|
|
261
|
+
def hash
|
|
262
|
+
[name, id, platform_ad_account_id, review_version, copy, landing_page, creatives, next_cursor, truncated, continuation, creative_count].hash
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Builds the object from hash
|
|
266
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
267
|
+
# @return [Object] Returns the model itself
|
|
268
|
+
def self.build_from_hash(attributes)
|
|
269
|
+
return nil unless attributes.is_a?(Hash)
|
|
270
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
271
|
+
transformed_hash = {}
|
|
272
|
+
openapi_types.each_pair do |key, type|
|
|
273
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
274
|
+
transformed_hash["#{key}"] = nil
|
|
275
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
276
|
+
# check to ensure the input is an array given that the attribute
|
|
277
|
+
# is documented as an array but the input is not
|
|
278
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
279
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
280
|
+
end
|
|
281
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
282
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
new(transformed_hash)
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Returns the object in the form of hash
|
|
289
|
+
# @return [Hash] Returns the object in the form of hash
|
|
290
|
+
def to_hash
|
|
291
|
+
hash = {}
|
|
292
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
293
|
+
value = self.send(attr)
|
|
294
|
+
if value.nil?
|
|
295
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
296
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
hash[param] = _to_hash(value)
|
|
300
|
+
end
|
|
301
|
+
hash
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
end
|