plainrouter-sdk 0.5.0 → 0.6.1

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 (149) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -0
  3. data/lib/plainrouter/client.rb +343 -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_read_api_api.rb +71 -31
  8. data/lib/plainrouter/openapi/api/action_rule_api_api.rb +350 -0
  9. data/lib/plainrouter/openapi/api/ad_test_api_api.rb +13 -9
  10. data/lib/plainrouter/openapi/api/agent_context_api.rb +93 -0
  11. data/lib/plainrouter/openapi/api/creative_api.rb +241 -0
  12. data/lib/plainrouter/openapi/api/deployment_plan_api.rb +257 -2
  13. data/lib/plainrouter/openapi/api/draft_batch_file_import_api.rb +142 -0
  14. data/lib/plainrouter/openapi/api/launch_policy_api.rb +242 -0
  15. data/lib/plainrouter/openapi/api/meta_inventory_exposure_api.rb +133 -0
  16. data/lib/plainrouter/openapi/api_client.rb +4 -0
  17. data/lib/plainrouter/openapi/api_model_base.rb +2 -0
  18. data/lib/plainrouter/openapi/configuration.rb +34 -0
  19. data/lib/plainrouter/openapi/models/action_batch_read_data.rb +42 -4
  20. data/lib/plainrouter/openapi/models/action_dry_run_read_dry_run.rb +42 -4
  21. data/lib/plainrouter/openapi/models/action_list_read_meta.rb +33 -4
  22. data/lib/plainrouter/openapi/models/action_proposal_input.rb +72 -1
  23. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner.rb +1 -0
  24. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of.rb +2 -0
  25. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of1.rb +2 -0
  26. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10.rb +2 -0
  27. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of10_params.rb +2 -0
  28. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of11.rb +3 -1
  29. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12.rb +2 -0
  30. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of12_params.rb +2 -0
  31. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13.rb +2 -0
  32. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of13_params.rb +2 -0
  33. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of2.rb +2 -0
  34. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of3.rb +2 -0
  35. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4.rb +2 -0
  36. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of4_target_entity.rb +2 -0
  37. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of5.rb +2 -0
  38. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of6.rb +2 -0
  39. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of7.rb +2 -0
  40. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of8.rb +2 -0
  41. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of9.rb +2 -0
  42. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_params.rb +2 -0
  43. data/lib/plainrouter/openapi/models/action_proposal_input_actions_inner_any_of_target_entity.rb +2 -0
  44. data/lib/plainrouter/openapi/models/action_proposal_input_evidence_inner.rb +4 -2
  45. data/lib/plainrouter/openapi/models/action_proposal_read_proposal.rb +42 -4
  46. data/lib/plainrouter/openapi/models/action_read_item.rb +11 -1
  47. data/lib/plainrouter/openapi/models/action_read_item_counted_evidence.rb +319 -0
  48. data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_counted.rb +174 -0
  49. data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_coverage.rb +162 -0
  50. data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_meta_reported.rb +198 -0
  51. data/lib/plainrouter/openapi/models/{action_proposal_input_actions_inner_any_of11_params.rb → action_read_item_counted_evidence_target.rb} +41 -24
  52. data/lib/plainrouter/openapi/models/action_read_item_counted_evidence_window.rb +225 -0
  53. data/lib/plainrouter/openapi/models/action_receipt_unavailable.rb +164 -0
  54. data/lib/plainrouter/openapi/models/action_receipt_unavailable_error.rb +214 -0
  55. data/lib/plainrouter/openapi/models/action_rule_detail_read.rb +164 -0
  56. data/lib/plainrouter/openapi/models/action_rule_detail_read_rule.rb +402 -0
  57. data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_current_revision.rb +388 -0
  58. data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_runs_inner.rb +396 -0
  59. data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_runs_inner_decisions_inner.rb +382 -0
  60. data/lib/plainrouter/openapi/models/action_rule_detail_read_rule_window.rb +242 -0
  61. data/lib/plainrouter/openapi/models/action_rule_write_read.rb +164 -0
  62. data/lib/plainrouter/openapi/models/action_rule_write_read_rule.rb +373 -0
  63. data/lib/plainrouter/openapi/models/actions_api_decision_receipt404_response.rb +103 -0
  64. data/lib/plainrouter/openapi/models/actions_rules_index200_response.rb +164 -0
  65. data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules.rb +196 -0
  66. data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules_data_inner.rb +344 -0
  67. data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules_data_inner_account.rb +157 -0
  68. data/lib/plainrouter/openapi/models/actions_rules_index200_response_rules_data_inner_counts.rb +156 -0
  69. data/lib/plainrouter/openapi/models/actions_rules_index403_response.rb +103 -0
  70. data/lib/plainrouter/openapi/models/actions_rules_index403_response_any_of.rb +214 -0
  71. data/lib/plainrouter/openapi/models/actions_rules_store_request.rb +317 -0
  72. data/lib/plainrouter/openapi/models/actions_rules_store_request_definition.rb +105 -0
  73. data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of.rb +317 -0
  74. data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of1.rb +361 -0
  75. data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of2.rb +361 -0
  76. data/lib/plainrouter/openapi/models/actions_rules_store_request_definition_any_of_cost_ratio.rb +104 -0
  77. data/lib/plainrouter/openapi/models/actions_rules_store_request_window.rb +103 -0
  78. data/lib/plainrouter/openapi/models/actions_rules_update_request.rb +267 -0
  79. data/lib/plainrouter/openapi/models/actions_rules_update_request_definition.rb +105 -0
  80. data/lib/plainrouter/openapi/models/actions_rules_update_request_definition_any_of.rb +317 -0
  81. data/lib/plainrouter/openapi/models/actions_rules_update_request_definition_any_of1.rb +361 -0
  82. data/lib/plainrouter/openapi/models/actions_rules_update_request_definition_any_of2.rb +361 -0
  83. data/lib/plainrouter/openapi/models/ad_test_list_read_tests.rb +1 -1
  84. data/lib/plainrouter/openapi/models/agent_context200_response.rb +214 -0
  85. data/lib/plainrouter/openapi/models/agent_context200_response_agent.rb +268 -0
  86. data/lib/plainrouter/openapi/models/agent_context200_response_platform_ad_account.rb +292 -0
  87. data/lib/plainrouter/openapi/models/agent_context200_response_platform_ad_account_workspace.rb +190 -0
  88. data/lib/plainrouter/openapi/models/agent_context401_response.rb +103 -0
  89. data/lib/plainrouter/openapi/models/agent_context_auth_error.rb +190 -0
  90. data/lib/plainrouter/openapi/models/creative_intake_read.rb +1 -1
  91. data/lib/plainrouter/openapi/models/creative_mcp_grant_operation.rb +44 -0
  92. data/lib/plainrouter/openapi/models/creative_mcp_preview.rb +283 -0
  93. data/lib/plainrouter/openapi/models/creative_mcp_refusal.rb +45 -0
  94. data/lib/plainrouter/openapi/models/creative_mcp_tool.rb +44 -0
  95. data/lib/plainrouter/openapi/models/delivery_status.rb +2 -1
  96. data/lib/plainrouter/openapi/models/deployment_plan_read.rb +42 -4
  97. data/lib/plainrouter/openapi/models/destination.rb +73 -9
  98. data/lib/plainrouter/openapi/models/destination_config.rb +103 -0
  99. data/lib/plainrouter/openapi/models/destination_status.rb +2 -1
  100. data/lib/plainrouter/openapi/models/draft_batch_mode.rb +41 -0
  101. data/lib/plainrouter/openapi/models/get_account_inventory200_response.rb +341 -0
  102. data/lib/plainrouter/openapi/models/get_account_inventory200_response_summary.rb +158 -0
  103. data/lib/plainrouter/openapi/models/get_account_inventory404_response.rb +103 -0
  104. data/lib/plainrouter/openapi/models/get_account_inventory404_response_any_of.rb +188 -0
  105. data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +25 -1
  106. data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +25 -1
  107. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response.rb +26 -5
  108. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_pagination_value.rb +202 -0
  109. data/lib/plainrouter/openapi/models/launch_creatives_index200_response.rb +164 -0
  110. data/lib/plainrouter/openapi/models/launch_creatives_index200_response_creatives.rb +196 -0
  111. data/lib/plainrouter/openapi/models/{creative_intake_read_creative.rb → launch_creatives_index200_response_creatives_data_inner.rb} +4 -4
  112. data/lib/plainrouter/openapi/models/{creative_intake_read_creative_tags.rb → launch_creatives_index200_response_creatives_data_inner_tags.rb} +1 -1
  113. data/lib/plainrouter/openapi/models/launch_creatives_status200_response.rb +166 -0
  114. data/lib/plainrouter/openapi/models/launch_plans_copy422_response.rb +103 -0
  115. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans.rb +107 -4
  116. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments.rb +104 -0
  117. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments_any_of.rb +190 -0
  118. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments_any_of1.rb +190 -0
  119. data/lib/plainrouter/openapi/models/launch_plans_store201_response.rb +166 -0
  120. data/lib/plainrouter/openapi/models/launch_plans_validate422_response.rb +103 -0
  121. data/lib/plainrouter/openapi/models/launch_policies_index200_response.rb +164 -0
  122. data/lib/plainrouter/openapi/models/launch_policies_index200_response_policies.rb +453 -0
  123. data/lib/plainrouter/openapi/models/{list_events200_response_events_links_inner.rb → launch_policies_index200_response_policies_links_inner.rb} +3 -3
  124. data/lib/plainrouter/openapi/models/launch_policies_store201_response.rb +166 -0
  125. data/lib/plainrouter/openapi/models/launch_policy.rb +346 -0
  126. data/lib/plainrouter/openapi/models/launcher_file_import403_response.rb +216 -0
  127. data/lib/plainrouter/openapi/models/launcher_file_import422_response.rb +103 -0
  128. data/lib/plainrouter/openapi/models/launcher_file_import422_response_any_of.rb +242 -0
  129. data/lib/plainrouter/openapi/models/launcher_file_import422_response_any_of_syntactic_row_failures_inner.rb +190 -0
  130. data/lib/plainrouter/openapi/models/list_events200_response_events.rb +1 -1
  131. data/lib/plainrouter/openapi/models/plan_execute_rejected_error.rb +2 -2
  132. data/lib/plainrouter/openapi/models/plan_validate_rejected.rb +164 -0
  133. data/lib/plainrouter/openapi/models/plan_validate_rejected_error.rb +191 -0
  134. data/lib/plainrouter/openapi/models/proposal_unavailable.rb +164 -0
  135. data/lib/plainrouter/openapi/models/proposal_unavailable_error.rb +214 -0
  136. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +67 -1
  137. data/lib/plainrouter/openapi/models/{deployment_plan.rb → store_deployment_plan_request.rb} +185 -208
  138. data/lib/plainrouter/openapi/models/store_deployment_plan_request_ad_set_spec.rb +220 -0
  139. data/lib/plainrouter/openapi/models/store_deployment_plan_request_copy.rb +266 -0
  140. data/lib/plainrouter/openapi/models/store_deployment_plan_request_creative_overrides_inner.rb +217 -0
  141. data/lib/plainrouter/openapi/models/store_launch_policy_request.rb +260 -0
  142. data/lib/plainrouter/openapi/models/update_creative_status_request.rb +188 -0
  143. data/lib/plainrouter/openapi/models/update_deployment_plan_request.rb +511 -0
  144. data/lib/plainrouter/openapi/version.rb +1 -1
  145. data/lib/plainrouter/openapi.rb +88 -5
  146. data/lib/plainrouter/proposal_errors.rb +31 -0
  147. data/lib/plainrouter/version.rb +1 -1
  148. data/lib/plainrouter.rb +1 -0
  149. metadata +94 -7
@@ -81,6 +81,7 @@ module PlainRouter::OpenAPI
81
81
  # Initializes the object
82
82
  # @param [Hash] attributes Model attributes in the form of hash
83
83
  def initialize(attributes = {})
84
+ ClosedInputValidator.validate_model!(self, attributes)
84
85
  if (!attributes.is_a?(Hash))
85
86
  fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionProposalInputActionsInnerAnyOfTargetEntity` initialize method"
86
87
  end
@@ -224,6 +225,7 @@ module PlainRouter::OpenAPI
224
225
  # @param [Hash] attributes Model attributes in the form of hash
225
226
  # @return [Object] Returns the model itself
226
227
  def self.build_from_hash(attributes)
228
+ ClosedInputValidator.validate_model!(self, attributes)
227
229
  return nil unless attributes.is_a?(Hash)
228
230
  attributes = attributes.transform_keys(&:to_sym)
229
231
  transformed_hash = {}
@@ -80,6 +80,7 @@ module PlainRouter::OpenAPI
80
80
  # Initializes the object
81
81
  # @param [Hash] attributes Model attributes in the form of hash
82
82
  def initialize(attributes = {})
83
+ ClosedInputValidator.validate_model!(self, attributes)
83
84
  if (!attributes.is_a?(Hash))
84
85
  fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionProposalInputEvidenceInner` initialize method"
85
86
  end
@@ -145,7 +146,7 @@ module PlainRouter::OpenAPI
145
146
  def valid?
146
147
  warn '[DEPRECATED] the `valid?` method is obsolete'
147
148
  return false if @source_tool.nil?
148
- source_tool_validator = EnumAttributeValidator.new('String', ["get_account_state", "get_signal_health", "get_performance", "get-creative-library", "staged-asset-manifest"])
149
+ source_tool_validator = EnumAttributeValidator.new('String', ["get_account_state", "get_signal_health", "get_performance", "get_inventory_metrics", "get-creative-library", "staged-asset-manifest"])
149
150
  return false unless source_tool_validator.valid?(@source_tool)
150
151
  return false if @fields_used.nil?
151
152
  return false if @fields_used.length > 50
@@ -157,7 +158,7 @@ module PlainRouter::OpenAPI
157
158
  # Custom attribute writer method checking allowed values (enum).
158
159
  # @param [Object] source_tool Object to be assigned
159
160
  def source_tool=(source_tool)
160
- validator = EnumAttributeValidator.new('String', ["get_account_state", "get_signal_health", "get_performance", "get-creative-library", "staged-asset-manifest"])
161
+ validator = EnumAttributeValidator.new('String', ["get_account_state", "get_signal_health", "get_performance", "get_inventory_metrics", "get-creative-library", "staged-asset-manifest"])
161
162
  unless validator.valid?(source_tool)
162
163
  fail ArgumentError, "invalid value for \"source_tool\", must be one of #{validator.allowable_values}."
163
164
  end
@@ -222,6 +223,7 @@ module PlainRouter::OpenAPI
222
223
  # @param [Hash] attributes Model attributes in the form of hash
223
224
  # @return [Object] Returns the model itself
224
225
  def self.build_from_hash(attributes)
226
+ ClosedInputValidator.validate_model!(self, attributes)
225
227
  return nil unless attributes.is_a?(Hash)
226
228
  attributes = attributes.transform_keys(&:to_sym)
227
229
  transformed_hash = {}
@@ -14,6 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
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.
17
18
  class ActionProposalReadProposal < ApiModelBase
18
19
  attr_accessor :id
19
20
 
@@ -39,6 +40,14 @@ module PlainRouter::OpenAPI
39
40
 
40
41
  attr_accessor :actions
41
42
 
43
+ attr_accessor :next_cursor
44
+
45
+ attr_accessor :truncated
46
+
47
+ attr_accessor :continuation
48
+
49
+ attr_accessor :total
50
+
42
51
  class EnumAttributeValidator
43
52
  attr_reader :datatype
44
53
  attr_reader :allowable_values
@@ -75,7 +84,11 @@ module PlainRouter::OpenAPI
75
84
  :'approval_queue_url' => :'approval_queue_url',
76
85
  :'rationale' => :'rationale',
77
86
  :'proposed_by' => :'proposed_by',
78
- :'actions' => :'actions'
87
+ :'actions' => :'actions',
88
+ :'next_cursor' => :'next_cursor',
89
+ :'truncated' => :'truncated',
90
+ :'continuation' => :'continuation',
91
+ :'total' => :'total'
79
92
  }
80
93
  end
81
94
 
@@ -103,7 +116,11 @@ module PlainRouter::OpenAPI
103
116
  :'approval_queue_url' => :'String',
104
117
  :'rationale' => :'String',
105
118
  :'proposed_by' => :'ActionProposalReadProposalProposedBy',
106
- :'actions' => :'Array<ActionProposalReadProposalActionsInner>'
119
+ :'actions' => :'Array<ActionProposalReadProposalActionsInner>',
120
+ :'next_cursor' => :'Integer',
121
+ :'truncated' => :'Boolean',
122
+ :'continuation' => :'String',
123
+ :'total' => :'Integer'
107
124
  }
108
125
  end
109
126
 
@@ -112,6 +129,7 @@ module PlainRouter::OpenAPI
112
129
  Set.new([
113
130
  :'scope',
114
131
  :'evidence_provenance',
132
+ :'next_cursor',
115
133
  ])
116
134
  end
117
135
 
@@ -206,6 +224,22 @@ module PlainRouter::OpenAPI
206
224
  else
207
225
  self.actions = nil
208
226
  end
227
+
228
+ if attributes.key?(:'next_cursor')
229
+ self.next_cursor = attributes[:'next_cursor']
230
+ end
231
+
232
+ if attributes.key?(:'truncated')
233
+ self.truncated = attributes[:'truncated']
234
+ end
235
+
236
+ if attributes.key?(:'continuation')
237
+ self.continuation = attributes[:'continuation']
238
+ end
239
+
240
+ if attributes.key?(:'total')
241
+ self.total = attributes[:'total']
242
+ end
209
243
  end
210
244
 
211
245
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -393,7 +427,11 @@ module PlainRouter::OpenAPI
393
427
  approval_queue_url == o.approval_queue_url &&
394
428
  rationale == o.rationale &&
395
429
  proposed_by == o.proposed_by &&
396
- actions == o.actions
430
+ actions == o.actions &&
431
+ next_cursor == o.next_cursor &&
432
+ truncated == o.truncated &&
433
+ continuation == o.continuation &&
434
+ total == o.total
397
435
  end
398
436
 
399
437
  # @see the `==` method
@@ -405,7 +443,7 @@ module PlainRouter::OpenAPI
405
443
  # Calculates hash code according to all attributes.
406
444
  # @return [Integer] Hash code
407
445
  def hash
408
- [id, scope, evidence_provenance, status, policy_decision, policy_reasons, approval_required, inbox_url, approval_queue_url, rationale, proposed_by, actions].hash
446
+ [id, scope, evidence_provenance, status, policy_decision, policy_reasons, approval_required, inbox_url, approval_queue_url, rationale, proposed_by, actions, next_cursor, truncated, continuation, total].hash
409
447
  end
410
448
 
411
449
  # Builds the object from hash
@@ -29,6 +29,8 @@ module PlainRouter::OpenAPI
29
29
 
30
30
  attr_accessor :target_entity_name
31
31
 
32
+ attr_accessor :counted_evidence
33
+
32
34
  attr_accessor :params
33
35
 
34
36
  attr_accessor :rationale
@@ -83,6 +85,7 @@ module PlainRouter::OpenAPI
83
85
  :'target_entity_type' => :'target_entity_type',
84
86
  :'target_entity_id' => :'target_entity_id',
85
87
  :'target_entity_name' => :'target_entity_name',
88
+ :'counted_evidence' => :'counted_evidence',
86
89
  :'params' => :'params',
87
90
  :'rationale' => :'rationale',
88
91
  :'proposer' => :'proposer',
@@ -117,6 +120,7 @@ module PlainRouter::OpenAPI
117
120
  :'target_entity_type' => :'String',
118
121
  :'target_entity_id' => :'String',
119
122
  :'target_entity_name' => :'String',
123
+ :'counted_evidence' => :'ActionReadItemCountedEvidence',
120
124
  :'params' => :'ActionProposalReadProposalActionsInnerParams',
121
125
  :'rationale' => :'String',
122
126
  :'proposer' => :'ActionReadItemProposer',
@@ -135,6 +139,7 @@ module PlainRouter::OpenAPI
135
139
  def self.openapi_nullable
136
140
  Set.new([
137
141
  :'target_entity_name',
142
+ :'counted_evidence',
138
143
  :'policy_decision',
139
144
  :'policy_result',
140
145
  ])
@@ -198,6 +203,10 @@ module PlainRouter::OpenAPI
198
203
  self.target_entity_name = nil
199
204
  end
200
205
 
206
+ if attributes.key?(:'counted_evidence')
207
+ self.counted_evidence = attributes[:'counted_evidence']
208
+ end
209
+
201
210
  if attributes.key?(:'params')
202
211
  self.params = attributes[:'params']
203
212
  else
@@ -505,6 +514,7 @@ module PlainRouter::OpenAPI
505
514
  target_entity_type == o.target_entity_type &&
506
515
  target_entity_id == o.target_entity_id &&
507
516
  target_entity_name == o.target_entity_name &&
517
+ counted_evidence == o.counted_evidence &&
508
518
  params == o.params &&
509
519
  rationale == o.rationale &&
510
520
  proposer == o.proposer &&
@@ -527,7 +537,7 @@ module PlainRouter::OpenAPI
527
537
  # Calculates hash code according to all attributes.
528
538
  # @return [Integer] Hash code
529
539
  def hash
530
- [id, batch_id, workspace_id, type, target_entity_type, target_entity_id, target_entity_name, params, rationale, proposer, evidence, status, batch_status, disposition, policy_decision, policy_reasons, policy_result, policy_results].hash
540
+ [id, batch_id, workspace_id, type, target_entity_type, target_entity_id, target_entity_name, counted_evidence, params, rationale, proposer, evidence, status, batch_status, disposition, policy_decision, policy_reasons, policy_result, policy_results].hash
531
541
  end
532
542
 
533
543
  # Builds the object from hash
@@ -0,0 +1,319 @@
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
+ # Frozen proposal-time target figures over completed account-local dates. Purchase values are decimal strings in the account currency; counted values in other currencies are excluded and never converted. Null means figures were not captured. Display only; never an enforcement input.
18
+ class ActionReadItemCountedEvidence < ApiModelBase
19
+ attr_accessor :target
20
+
21
+ attr_accessor :captured_at
22
+
23
+ attr_accessor :window
24
+
25
+ attr_accessor :currency
26
+
27
+ attr_accessor :currency_note
28
+
29
+ attr_accessor :meta_reported
30
+
31
+ attr_accessor :counted
32
+
33
+ attr_accessor :coverage
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'target' => :'target',
39
+ :'captured_at' => :'captured_at',
40
+ :'window' => :'window',
41
+ :'currency' => :'currency',
42
+ :'currency_note' => :'currency_note',
43
+ :'meta_reported' => :'meta_reported',
44
+ :'counted' => :'counted',
45
+ :'coverage' => :'coverage'
46
+ }
47
+ end
48
+
49
+ # Returns attribute mapping this model knows about
50
+ def self.acceptable_attribute_map
51
+ attribute_map
52
+ end
53
+
54
+ # Returns all the JSON keys this model knows about
55
+ def self.acceptable_attributes
56
+ acceptable_attribute_map.values
57
+ end
58
+
59
+ # Attribute type mapping.
60
+ def self.openapi_types
61
+ {
62
+ :'target' => :'ActionReadItemCountedEvidenceTarget',
63
+ :'captured_at' => :'String',
64
+ :'window' => :'ActionReadItemCountedEvidenceWindow',
65
+ :'currency' => :'String',
66
+ :'currency_note' => :'String',
67
+ :'meta_reported' => :'ActionReadItemCountedEvidenceMetaReported',
68
+ :'counted' => :'ActionReadItemCountedEvidenceCounted',
69
+ :'coverage' => :'ActionReadItemCountedEvidenceCoverage'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ def self.openapi_nullable
75
+ Set.new([
76
+ :'window',
77
+ :'currency',
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionReadItemCountedEvidence` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::ActionReadItemCountedEvidence`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'target')
98
+ self.target = attributes[:'target']
99
+ else
100
+ self.target = nil
101
+ end
102
+
103
+ if attributes.key?(:'captured_at')
104
+ self.captured_at = attributes[:'captured_at']
105
+ else
106
+ self.captured_at = nil
107
+ end
108
+
109
+ if attributes.key?(:'window')
110
+ self.window = attributes[:'window']
111
+ else
112
+ self.window = nil
113
+ end
114
+
115
+ if attributes.key?(:'currency')
116
+ self.currency = attributes[:'currency']
117
+ else
118
+ self.currency = nil
119
+ end
120
+
121
+ if attributes.key?(:'currency_note')
122
+ self.currency_note = attributes[:'currency_note']
123
+ else
124
+ self.currency_note = nil
125
+ end
126
+
127
+ if attributes.key?(:'meta_reported')
128
+ self.meta_reported = attributes[:'meta_reported']
129
+ else
130
+ self.meta_reported = nil
131
+ end
132
+
133
+ if attributes.key?(:'counted')
134
+ self.counted = attributes[:'counted']
135
+ else
136
+ self.counted = nil
137
+ end
138
+
139
+ if attributes.key?(:'coverage')
140
+ self.coverage = attributes[:'coverage']
141
+ else
142
+ self.coverage = nil
143
+ end
144
+ end
145
+
146
+ # Show invalid properties with the reasons. Usually used together with valid?
147
+ # @return Array for valid properties with the reasons
148
+ def list_invalid_properties
149
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
150
+ invalid_properties = Array.new
151
+ if @target.nil?
152
+ invalid_properties.push('invalid value for "target", target cannot be nil.')
153
+ end
154
+
155
+ if @captured_at.nil?
156
+ invalid_properties.push('invalid value for "captured_at", captured_at cannot be nil.')
157
+ end
158
+
159
+ if @currency_note.nil?
160
+ invalid_properties.push('invalid value for "currency_note", currency_note cannot be nil.')
161
+ end
162
+
163
+ if @meta_reported.nil?
164
+ invalid_properties.push('invalid value for "meta_reported", meta_reported cannot be nil.')
165
+ end
166
+
167
+ if @counted.nil?
168
+ invalid_properties.push('invalid value for "counted", counted cannot be nil.')
169
+ end
170
+
171
+ if @coverage.nil?
172
+ invalid_properties.push('invalid value for "coverage", coverage cannot be nil.')
173
+ end
174
+
175
+ invalid_properties
176
+ end
177
+
178
+ # Check to see if the all the properties in the model are valid
179
+ # @return true if the model is valid
180
+ def valid?
181
+ warn '[DEPRECATED] the `valid?` method is obsolete'
182
+ return false if @target.nil?
183
+ return false if @captured_at.nil?
184
+ return false if @currency_note.nil?
185
+ return false if @meta_reported.nil?
186
+ return false if @counted.nil?
187
+ return false if @coverage.nil?
188
+ true
189
+ end
190
+
191
+ # Custom attribute writer method with validation
192
+ # @param [Object] target Value to be assigned
193
+ def target=(target)
194
+ if target.nil?
195
+ fail ArgumentError, 'target cannot be nil'
196
+ end
197
+
198
+ @target = target
199
+ end
200
+
201
+ # Custom attribute writer method with validation
202
+ # @param [Object] captured_at Value to be assigned
203
+ def captured_at=(captured_at)
204
+ if captured_at.nil?
205
+ fail ArgumentError, 'captured_at cannot be nil'
206
+ end
207
+
208
+ @captured_at = captured_at
209
+ end
210
+
211
+ # Custom attribute writer method with validation
212
+ # @param [Object] currency_note Value to be assigned
213
+ def currency_note=(currency_note)
214
+ if currency_note.nil?
215
+ fail ArgumentError, 'currency_note cannot be nil'
216
+ end
217
+
218
+ @currency_note = currency_note
219
+ end
220
+
221
+ # Custom attribute writer method with validation
222
+ # @param [Object] meta_reported Value to be assigned
223
+ def meta_reported=(meta_reported)
224
+ if meta_reported.nil?
225
+ fail ArgumentError, 'meta_reported cannot be nil'
226
+ end
227
+
228
+ @meta_reported = meta_reported
229
+ end
230
+
231
+ # Custom attribute writer method with validation
232
+ # @param [Object] counted Value to be assigned
233
+ def counted=(counted)
234
+ if counted.nil?
235
+ fail ArgumentError, 'counted cannot be nil'
236
+ end
237
+
238
+ @counted = counted
239
+ end
240
+
241
+ # Custom attribute writer method with validation
242
+ # @param [Object] coverage Value to be assigned
243
+ def coverage=(coverage)
244
+ if coverage.nil?
245
+ fail ArgumentError, 'coverage cannot be nil'
246
+ end
247
+
248
+ @coverage = coverage
249
+ end
250
+
251
+ # Checks equality by comparing each attribute.
252
+ # @param [Object] Object to be compared
253
+ def ==(o)
254
+ return true if self.equal?(o)
255
+ self.class == o.class &&
256
+ target == o.target &&
257
+ captured_at == o.captured_at &&
258
+ window == o.window &&
259
+ currency == o.currency &&
260
+ currency_note == o.currency_note &&
261
+ meta_reported == o.meta_reported &&
262
+ counted == o.counted &&
263
+ coverage == o.coverage
264
+ end
265
+
266
+ # @see the `==` method
267
+ # @param [Object] Object to be compared
268
+ def eql?(o)
269
+ self == o
270
+ end
271
+
272
+ # Calculates hash code according to all attributes.
273
+ # @return [Integer] Hash code
274
+ def hash
275
+ [target, captured_at, window, currency, currency_note, meta_reported, counted, coverage].hash
276
+ end
277
+
278
+ # Builds the object from hash
279
+ # @param [Hash] attributes Model attributes in the form of hash
280
+ # @return [Object] Returns the model itself
281
+ def self.build_from_hash(attributes)
282
+ return nil unless attributes.is_a?(Hash)
283
+ attributes = attributes.transform_keys(&:to_sym)
284
+ transformed_hash = {}
285
+ openapi_types.each_pair do |key, type|
286
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
287
+ transformed_hash["#{key}"] = nil
288
+ elsif type =~ /\AArray<(.*)>/i
289
+ # check to ensure the input is an array given that the attribute
290
+ # is documented as an array but the input is not
291
+ if attributes[attribute_map[key]].is_a?(Array)
292
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
293
+ end
294
+ elsif !attributes[attribute_map[key]].nil?
295
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
296
+ end
297
+ end
298
+ new(transformed_hash)
299
+ end
300
+
301
+ # Returns the object in the form of hash
302
+ # @return [Hash] Returns the object in the form of hash
303
+ def to_hash
304
+ hash = {}
305
+ self.class.attribute_map.each_pair do |attr, param|
306
+ value = self.send(attr)
307
+ if value.nil?
308
+ is_nullable = self.class.openapi_nullable.include?(attr)
309
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
310
+ end
311
+
312
+ hash[param] = _to_hash(value)
313
+ end
314
+ hash
315
+ end
316
+
317
+ end
318
+
319
+ end
@@ -0,0 +1,174 @@
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 ActionReadItemCountedEvidenceCounted < ApiModelBase
18
+ attr_accessor :arrivals
19
+
20
+ attr_accessor :purchase_count
21
+
22
+ attr_accessor :purchase_value
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'arrivals' => :'arrivals',
28
+ :'purchase_count' => :'purchase_count',
29
+ :'purchase_value' => :'purchase_value'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'arrivals' => :'Integer',
47
+ :'purchase_count' => :'Integer',
48
+ :'purchase_value' => :'String'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ :'arrivals',
56
+ :'purchase_count',
57
+ :'purchase_value'
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ActionReadItemCountedEvidenceCounted` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::ActionReadItemCountedEvidenceCounted`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'arrivals')
78
+ self.arrivals = attributes[:'arrivals']
79
+ else
80
+ self.arrivals = nil
81
+ end
82
+
83
+ if attributes.key?(:'purchase_count')
84
+ self.purchase_count = attributes[:'purchase_count']
85
+ else
86
+ self.purchase_count = nil
87
+ end
88
+
89
+ if attributes.key?(:'purchase_value')
90
+ self.purchase_value = attributes[:'purchase_value']
91
+ else
92
+ self.purchase_value = nil
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ warn '[DEPRECATED] the `valid?` method is obsolete'
108
+ true
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ arrivals == o.arrivals &&
117
+ purchase_count == o.purchase_count &&
118
+ purchase_value == o.purchase_value
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [arrivals, purchase_count, purchase_value].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
+ elsif type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
+ end
152
+ end
153
+ new(transformed_hash)
154
+ end
155
+
156
+ # Returns the object in the form of hash
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_hash
159
+ hash = {}
160
+ self.class.attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ if value.nil?
163
+ is_nullable = self.class.openapi_nullable.include?(attr)
164
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165
+ end
166
+
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ end
173
+
174
+ end