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
@@ -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
@@ -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 DeploymentPlanRead < ApiModelBase
18
19
  attr_accessor :name
19
20
 
@@ -30,6 +31,14 @@ module PlainRouter::OpenAPI
30
31
 
31
32
  attr_accessor :creatives
32
33
 
34
+ attr_accessor :next_cursor
35
+
36
+ attr_accessor :truncated
37
+
38
+ attr_accessor :continuation
39
+
40
+ attr_accessor :creative_count
41
+
33
42
  # Attribute mapping from ruby-style variable name to JSON key.
34
43
  def self.attribute_map
35
44
  {
@@ -39,7 +48,11 @@ module PlainRouter::OpenAPI
39
48
  :'review_version' => :'review_version',
40
49
  :'copy' => :'copy',
41
50
  :'landing_page' => :'landing_page',
42
- :'creatives' => :'creatives'
51
+ :'creatives' => :'creatives',
52
+ :'next_cursor' => :'next_cursor',
53
+ :'truncated' => :'truncated',
54
+ :'continuation' => :'continuation',
55
+ :'creative_count' => :'creative_count'
43
56
  }
44
57
  end
45
58
 
@@ -62,7 +75,11 @@ module PlainRouter::OpenAPI
62
75
  :'review_version' => :'String',
63
76
  :'copy' => :'DeploymentPlanReadCopy',
64
77
  :'landing_page' => :'String',
65
- :'creatives' => :'Array<DeploymentPlanReadCreativesInner>'
78
+ :'creatives' => :'Array<DeploymentPlanReadCreativesInner>',
79
+ :'next_cursor' => :'Integer',
80
+ :'truncated' => :'Boolean',
81
+ :'continuation' => :'String',
82
+ :'creative_count' => :'Integer'
66
83
  }
67
84
  end
68
85
 
@@ -71,6 +88,7 @@ module PlainRouter::OpenAPI
71
88
  Set.new([
72
89
  :'name',
73
90
  :'copy',
91
+ :'next_cursor',
74
92
  ])
75
93
  end
76
94
 
@@ -125,6 +143,22 @@ module PlainRouter::OpenAPI
125
143
  self.creatives = value
126
144
  end
127
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
128
162
  end
129
163
 
130
164
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -209,7 +243,11 @@ module PlainRouter::OpenAPI
209
243
  review_version == o.review_version &&
210
244
  copy == o.copy &&
211
245
  landing_page == o.landing_page &&
212
- creatives == o.creatives
246
+ creatives == o.creatives &&
247
+ next_cursor == o.next_cursor &&
248
+ truncated == o.truncated &&
249
+ continuation == o.continuation &&
250
+ creative_count == o.creative_count
213
251
  end
214
252
 
215
253
  # @see the `==` method
@@ -221,7 +259,7 @@ module PlainRouter::OpenAPI
221
259
  # Calculates hash code according to all attributes.
222
260
  # @return [Integer] Hash code
223
261
  def hash
224
- [name, id, platform_ad_account_id, review_version, copy, landing_page, creatives].hash
262
+ [name, id, platform_ad_account_id, review_version, copy, landing_page, creatives, next_cursor, truncated, continuation, creative_count].hash
225
263
  end
226
264
 
227
265
  # Builds the object from hash
@@ -36,6 +36,12 @@ module PlainRouter::OpenAPI
36
36
 
37
37
  attr_accessor :updated_at
38
38
 
39
+ attr_accessor :attention_reason
40
+
41
+ attr_accessor :held_count
42
+
43
+ attr_accessor :notices
44
+
39
45
  class EnumAttributeValidator
40
46
  attr_reader :datatype
41
47
  attr_reader :allowable_values
@@ -70,7 +76,10 @@ module PlainRouter::OpenAPI
70
76
  :'config' => :'config',
71
77
  :'status' => :'status',
72
78
  :'created_at' => :'created_at',
73
- :'updated_at' => :'updated_at'
79
+ :'updated_at' => :'updated_at',
80
+ :'attention_reason' => :'attention_reason',
81
+ :'held_count' => :'held_count',
82
+ :'notices' => :'notices'
74
83
  }
75
84
  end
76
85
 
@@ -93,10 +102,13 @@ module PlainRouter::OpenAPI
93
102
  :'platform_ad_account_id' => :'Integer',
94
103
  :'type' => :'DestinationType',
95
104
  :'credential_source' => :'DestinationCredentialSource',
96
- :'config' => :'Array<Object>',
105
+ :'config' => :'DestinationConfig',
97
106
  :'status' => :'DestinationStatus',
98
107
  :'created_at' => :'Time',
99
- :'updated_at' => :'Time'
108
+ :'updated_at' => :'Time',
109
+ :'attention_reason' => :'GetEvent200ResponseEventConsent',
110
+ :'held_count' => :'Integer',
111
+ :'notices' => :'Array<Hash<String, Object>>'
100
112
  }
101
113
  end
102
114
 
@@ -105,7 +117,8 @@ module PlainRouter::OpenAPI
105
117
  Set.new([
106
118
  :'platform_ad_account_id',
107
119
  :'created_at',
108
- :'updated_at'
120
+ :'updated_at',
121
+ :'attention_reason',
109
122
  ])
110
123
  end
111
124
 
@@ -162,9 +175,7 @@ module PlainRouter::OpenAPI
162
175
  end
163
176
 
164
177
  if attributes.key?(:'config')
165
- if (value = attributes[:'config']).is_a?(Array)
166
- self.config = value
167
- end
178
+ self.config = attributes[:'config']
168
179
  else
169
180
  self.config = nil
170
181
  end
@@ -186,6 +197,26 @@ module PlainRouter::OpenAPI
186
197
  else
187
198
  self.updated_at = nil
188
199
  end
200
+
201
+ if attributes.key?(:'attention_reason')
202
+ self.attention_reason = attributes[:'attention_reason']
203
+ else
204
+ self.attention_reason = nil
205
+ end
206
+
207
+ if attributes.key?(:'held_count')
208
+ self.held_count = attributes[:'held_count']
209
+ else
210
+ self.held_count = nil
211
+ end
212
+
213
+ if attributes.key?(:'notices')
214
+ if (value = attributes[:'notices']).is_a?(Array)
215
+ self.notices = value
216
+ end
217
+ else
218
+ self.notices = nil
219
+ end
189
220
  end
190
221
 
191
222
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -221,6 +252,14 @@ module PlainRouter::OpenAPI
221
252
  invalid_properties.push('invalid value for "status", status cannot be nil.')
222
253
  end
223
254
 
255
+ if @held_count.nil?
256
+ invalid_properties.push('invalid value for "held_count", held_count cannot be nil.')
257
+ end
258
+
259
+ if @notices.nil?
260
+ invalid_properties.push('invalid value for "notices", notices cannot be nil.')
261
+ end
262
+
224
263
  invalid_properties
225
264
  end
226
265
 
@@ -235,6 +274,8 @@ module PlainRouter::OpenAPI
235
274
  return false if @credential_source.nil?
236
275
  return false if @config.nil?
237
276
  return false if @status.nil?
277
+ return false if @held_count.nil?
278
+ return false if @notices.nil?
238
279
  true
239
280
  end
240
281
 
@@ -308,6 +349,26 @@ module PlainRouter::OpenAPI
308
349
  @status = status
309
350
  end
310
351
 
352
+ # Custom attribute writer method with validation
353
+ # @param [Object] held_count Value to be assigned
354
+ def held_count=(held_count)
355
+ if held_count.nil?
356
+ fail ArgumentError, 'held_count cannot be nil'
357
+ end
358
+
359
+ @held_count = held_count
360
+ end
361
+
362
+ # Custom attribute writer method with validation
363
+ # @param [Object] notices Value to be assigned
364
+ def notices=(notices)
365
+ if notices.nil?
366
+ fail ArgumentError, 'notices cannot be nil'
367
+ end
368
+
369
+ @notices = notices
370
+ end
371
+
311
372
  # Checks equality by comparing each attribute.
312
373
  # @param [Object] Object to be compared
313
374
  def ==(o)
@@ -322,7 +383,10 @@ module PlainRouter::OpenAPI
322
383
  config == o.config &&
323
384
  status == o.status &&
324
385
  created_at == o.created_at &&
325
- updated_at == o.updated_at
386
+ updated_at == o.updated_at &&
387
+ attention_reason == o.attention_reason &&
388
+ held_count == o.held_count &&
389
+ notices == o.notices
326
390
  end
327
391
 
328
392
  # @see the `==` method
@@ -334,7 +398,7 @@ module PlainRouter::OpenAPI
334
398
  # Calculates hash code according to all attributes.
335
399
  # @return [Integer] Hash code
336
400
  def hash
337
- [id, workspace_id, signal_tracker_id, platform_ad_account_id, type, credential_source, config, status, created_at, updated_at].hash
401
+ [id, workspace_id, signal_tracker_id, platform_ad_account_id, type, credential_source, config, status, created_at, updated_at, attention_reason, held_count, notices].hash
338
402
  end
339
403
 
340
404
  # Builds the object from hash