plainrouter-sdk 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -0
  3. data/lib/plainrouter/client.rb +337 -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 +3 -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 +188 -0
  104. data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +25 -1
  105. data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +25 -1
  106. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response.rb +26 -5
  107. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_pagination_value.rb +202 -0
  108. data/lib/plainrouter/openapi/models/launch_creatives_index200_response.rb +164 -0
  109. data/lib/plainrouter/openapi/models/launch_creatives_index200_response_creatives.rb +196 -0
  110. data/lib/plainrouter/openapi/models/{creative_intake_read_creative.rb → launch_creatives_index200_response_creatives_data_inner.rb} +4 -4
  111. data/lib/plainrouter/openapi/models/{creative_intake_read_creative_tags.rb → launch_creatives_index200_response_creatives_data_inner_tags.rb} +1 -1
  112. data/lib/plainrouter/openapi/models/launch_creatives_status200_response.rb +166 -0
  113. data/lib/plainrouter/openapi/models/launch_plans_copy422_response.rb +103 -0
  114. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans.rb +107 -4
  115. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments.rb +104 -0
  116. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments_any_of.rb +190 -0
  117. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans_next_page_arguments_any_of1.rb +190 -0
  118. data/lib/plainrouter/openapi/models/launch_plans_store201_response.rb +166 -0
  119. data/lib/plainrouter/openapi/models/launch_plans_validate422_response.rb +103 -0
  120. data/lib/plainrouter/openapi/models/launch_policies_index200_response.rb +164 -0
  121. data/lib/plainrouter/openapi/models/launch_policies_index200_response_policies.rb +453 -0
  122. data/lib/plainrouter/openapi/models/{list_events200_response_events_links_inner.rb → launch_policies_index200_response_policies_links_inner.rb} +3 -3
  123. data/lib/plainrouter/openapi/models/launch_policies_store201_response.rb +166 -0
  124. data/lib/plainrouter/openapi/models/launch_policy.rb +346 -0
  125. data/lib/plainrouter/openapi/models/launcher_file_import403_response.rb +216 -0
  126. data/lib/plainrouter/openapi/models/launcher_file_import422_response.rb +103 -0
  127. data/lib/plainrouter/openapi/models/launcher_file_import422_response_any_of.rb +242 -0
  128. data/lib/plainrouter/openapi/models/launcher_file_import422_response_any_of_syntactic_row_failures_inner.rb +190 -0
  129. data/lib/plainrouter/openapi/models/list_events200_response_events.rb +1 -1
  130. data/lib/plainrouter/openapi/models/plan_execute_rejected_error.rb +2 -2
  131. data/lib/plainrouter/openapi/models/plan_validate_rejected.rb +164 -0
  132. data/lib/plainrouter/openapi/models/plan_validate_rejected_error.rb +191 -0
  133. data/lib/plainrouter/openapi/models/proposal_unavailable.rb +164 -0
  134. data/lib/plainrouter/openapi/models/proposal_unavailable_error.rb +214 -0
  135. data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +67 -1
  136. data/lib/plainrouter/openapi/models/{deployment_plan.rb → store_deployment_plan_request.rb} +185 -208
  137. data/lib/plainrouter/openapi/models/store_deployment_plan_request_ad_set_spec.rb +220 -0
  138. data/lib/plainrouter/openapi/models/store_deployment_plan_request_copy.rb +266 -0
  139. data/lib/plainrouter/openapi/models/store_deployment_plan_request_creative_overrides_inner.rb +217 -0
  140. data/lib/plainrouter/openapi/models/store_launch_policy_request.rb +260 -0
  141. data/lib/plainrouter/openapi/models/update_creative_status_request.rb +188 -0
  142. data/lib/plainrouter/openapi/models/update_deployment_plan_request.rb +511 -0
  143. data/lib/plainrouter/openapi/version.rb +1 -1
  144. data/lib/plainrouter/openapi.rb +87 -5
  145. data/lib/plainrouter/proposal_errors.rb +31 -0
  146. data/lib/plainrouter/version.rb +1 -1
  147. data/lib/plainrouter.rb +1 -0
  148. metadata +93 -7
@@ -0,0 +1,188 @@
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 GetAccountInventory404Response < ApiModelBase
18
+ attr_accessor :message
19
+
20
+ class EnumAttributeValidator
21
+ attr_reader :datatype
22
+ attr_reader :allowable_values
23
+
24
+ def initialize(datatype, allowable_values)
25
+ @allowable_values = allowable_values.map do |value|
26
+ case datatype.to_s
27
+ when /Integer/i
28
+ value.to_i
29
+ when /Float/i
30
+ value.to_f
31
+ else
32
+ value
33
+ end
34
+ end
35
+ end
36
+
37
+ def valid?(value)
38
+ !value || allowable_values.include?(value)
39
+ end
40
+ end
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'message' => :'message'
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
+ :'message' => :'String'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+ ])
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetAccountInventory404Response` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ acceptable_attribute_map = self.class.acceptable_attribute_map
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!acceptable_attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetAccountInventory404Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'message')
89
+ self.message = attributes[:'message']
90
+ else
91
+ self.message = nil
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if @message.nil?
101
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ warn '[DEPRECATED] the `valid?` method is obsolete'
111
+ return false if @message.nil?
112
+ message_validator = EnumAttributeValidator.new('String', ["Account not found."])
113
+ return false unless message_validator.valid?(@message)
114
+ true
115
+ end
116
+
117
+ # Custom attribute writer method checking allowed values (enum).
118
+ # @param [Object] message Object to be assigned
119
+ def message=(message)
120
+ validator = EnumAttributeValidator.new('String', ["Account not found."])
121
+ unless validator.valid?(message)
122
+ fail ArgumentError, "invalid value for \"message\", must be one of #{validator.allowable_values}."
123
+ end
124
+ @message = message
125
+ end
126
+
127
+ # Checks equality by comparing each attribute.
128
+ # @param [Object] Object to be compared
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ message == o.message
133
+ end
134
+
135
+ # @see the `==` method
136
+ # @param [Object] Object to be compared
137
+ def eql?(o)
138
+ self == o
139
+ end
140
+
141
+ # Calculates hash code according to all attributes.
142
+ # @return [Integer] Hash code
143
+ def hash
144
+ [message].hash
145
+ end
146
+
147
+ # Builds the object from hash
148
+ # @param [Hash] attributes Model attributes in the form of hash
149
+ # @return [Object] Returns the model itself
150
+ def self.build_from_hash(attributes)
151
+ return nil unless attributes.is_a?(Hash)
152
+ attributes = attributes.transform_keys(&:to_sym)
153
+ transformed_hash = {}
154
+ openapi_types.each_pair do |key, type|
155
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
156
+ transformed_hash["#{key}"] = nil
157
+ elsif type =~ /\AArray<(.*)>/i
158
+ # check to ensure the input is an array given that the attribute
159
+ # is documented as an array but the input is not
160
+ if attributes[attribute_map[key]].is_a?(Array)
161
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
162
+ end
163
+ elsif !attributes[attribute_map[key]].nil?
164
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
165
+ end
166
+ end
167
+ new(transformed_hash)
168
+ end
169
+
170
+ # Returns the object in the form of hash
171
+ # @return [Hash] Returns the object in the form of hash
172
+ def to_hash
173
+ hash = {}
174
+ self.class.attribute_map.each_pair do |attr, param|
175
+ value = self.send(attr)
176
+ if value.nil?
177
+ is_nullable = self.class.openapi_nullable.include?(attr)
178
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
179
+ end
180
+
181
+ hash[param] = _to_hash(value)
182
+ end
183
+ hash
184
+ end
185
+
186
+ end
187
+
188
+ end
@@ -40,6 +40,10 @@ module PlainRouter::OpenAPI
40
40
 
41
41
  attr_accessor :next_attempt_at
42
42
 
43
+ attr_accessor :upload_deadline_at
44
+
45
+ attr_accessor :freshness_basis
46
+
43
47
  attr_accessor :created_at
44
48
 
45
49
  attr_accessor :updated_at
@@ -83,6 +87,8 @@ module PlainRouter::OpenAPI
83
87
  :'platform_response' => :'platform_response',
84
88
  :'platform_trace_id' => :'platform_trace_id',
85
89
  :'next_attempt_at' => :'next_attempt_at',
90
+ :'upload_deadline_at' => :'upload_deadline_at',
91
+ :'freshness_basis' => :'freshness_basis',
86
92
  :'created_at' => :'created_at',
87
93
  :'updated_at' => :'updated_at',
88
94
  :'explanation' => :'explanation'
@@ -114,6 +120,8 @@ module PlainRouter::OpenAPI
114
120
  :'platform_response' => :'GetEvent200ResponseEventConsent',
115
121
  :'platform_trace_id' => :'String',
116
122
  :'next_attempt_at' => :'String',
123
+ :'upload_deadline_at' => :'String',
124
+ :'freshness_basis' => :'String',
117
125
  :'created_at' => :'String',
118
126
  :'updated_at' => :'String',
119
127
  :'explanation' => :'String'
@@ -128,6 +136,8 @@ module PlainRouter::OpenAPI
128
136
  :'platform_response',
129
137
  :'platform_trace_id',
130
138
  :'next_attempt_at',
139
+ :'upload_deadline_at',
140
+ :'freshness_basis',
131
141
  :'updated_at',
132
142
  ])
133
143
  end
@@ -220,6 +230,18 @@ module PlainRouter::OpenAPI
220
230
  self.next_attempt_at = nil
221
231
  end
222
232
 
233
+ if attributes.key?(:'upload_deadline_at')
234
+ self.upload_deadline_at = attributes[:'upload_deadline_at']
235
+ else
236
+ self.upload_deadline_at = nil
237
+ end
238
+
239
+ if attributes.key?(:'freshness_basis')
240
+ self.freshness_basis = attributes[:'freshness_basis']
241
+ else
242
+ self.freshness_basis = nil
243
+ end
244
+
223
245
  if attributes.key?(:'created_at')
224
246
  self.created_at = attributes[:'created_at']
225
247
  else
@@ -406,6 +428,8 @@ module PlainRouter::OpenAPI
406
428
  platform_response == o.platform_response &&
407
429
  platform_trace_id == o.platform_trace_id &&
408
430
  next_attempt_at == o.next_attempt_at &&
431
+ upload_deadline_at == o.upload_deadline_at &&
432
+ freshness_basis == o.freshness_basis &&
409
433
  created_at == o.created_at &&
410
434
  updated_at == o.updated_at &&
411
435
  explanation == o.explanation
@@ -420,7 +444,7 @@ module PlainRouter::OpenAPI
420
444
  # Calculates hash code according to all attributes.
421
445
  # @return [Integer] Hash code
422
446
  def hash
423
- [id, workspace_id, signal_tracker_id, event_id, destination_id, status, is_test, attempt_count, last_error, platform_response, platform_trace_id, next_attempt_at, created_at, updated_at, explanation].hash
447
+ [id, workspace_id, signal_tracker_id, event_id, destination_id, status, is_test, attempt_count, last_error, platform_response, platform_trace_id, next_attempt_at, upload_deadline_at, freshness_basis, created_at, updated_at, explanation].hash
424
448
  end
425
449
 
426
450
  # Builds the object from hash
@@ -40,6 +40,10 @@ module PlainRouter::OpenAPI
40
40
 
41
41
  attr_accessor :next_attempt_at
42
42
 
43
+ attr_accessor :upload_deadline_at
44
+
45
+ attr_accessor :freshness_basis
46
+
43
47
  attr_accessor :created_at
44
48
 
45
49
  attr_accessor :updated_at
@@ -81,6 +85,8 @@ module PlainRouter::OpenAPI
81
85
  :'platform_response' => :'platform_response',
82
86
  :'platform_trace_id' => :'platform_trace_id',
83
87
  :'next_attempt_at' => :'next_attempt_at',
88
+ :'upload_deadline_at' => :'upload_deadline_at',
89
+ :'freshness_basis' => :'freshness_basis',
84
90
  :'created_at' => :'created_at',
85
91
  :'updated_at' => :'updated_at'
86
92
  }
@@ -111,6 +117,8 @@ module PlainRouter::OpenAPI
111
117
  :'platform_response' => :'GetEvent200ResponseEventConsent',
112
118
  :'platform_trace_id' => :'String',
113
119
  :'next_attempt_at' => :'String',
120
+ :'upload_deadline_at' => :'String',
121
+ :'freshness_basis' => :'String',
114
122
  :'created_at' => :'String',
115
123
  :'updated_at' => :'String'
116
124
  }
@@ -124,6 +132,8 @@ module PlainRouter::OpenAPI
124
132
  :'platform_response',
125
133
  :'platform_trace_id',
126
134
  :'next_attempt_at',
135
+ :'upload_deadline_at',
136
+ :'freshness_basis',
127
137
  :'updated_at'
128
138
  ])
129
139
  end
@@ -216,6 +226,18 @@ module PlainRouter::OpenAPI
216
226
  self.next_attempt_at = nil
217
227
  end
218
228
 
229
+ if attributes.key?(:'upload_deadline_at')
230
+ self.upload_deadline_at = attributes[:'upload_deadline_at']
231
+ else
232
+ self.upload_deadline_at = nil
233
+ end
234
+
235
+ if attributes.key?(:'freshness_basis')
236
+ self.freshness_basis = attributes[:'freshness_basis']
237
+ else
238
+ self.freshness_basis = nil
239
+ end
240
+
219
241
  if attributes.key?(:'created_at')
220
242
  self.created_at = attributes[:'created_at']
221
243
  else
@@ -381,6 +403,8 @@ module PlainRouter::OpenAPI
381
403
  platform_response == o.platform_response &&
382
404
  platform_trace_id == o.platform_trace_id &&
383
405
  next_attempt_at == o.next_attempt_at &&
406
+ upload_deadline_at == o.upload_deadline_at &&
407
+ freshness_basis == o.freshness_basis &&
384
408
  created_at == o.created_at &&
385
409
  updated_at == o.updated_at
386
410
  end
@@ -394,7 +418,7 @@ module PlainRouter::OpenAPI
394
418
  # Calculates hash code according to all attributes.
395
419
  # @return [Integer] Hash code
396
420
  def hash
397
- [id, workspace_id, signal_tracker_id, event_id, destination_id, status, is_test, attempt_count, last_error, platform_response, platform_trace_id, next_attempt_at, created_at, updated_at].hash
421
+ [id, workspace_id, signal_tracker_id, event_id, destination_id, status, is_test, attempt_count, last_error, platform_response, platform_trace_id, next_attempt_at, upload_deadline_at, freshness_basis, created_at, updated_at].hash
398
422
  end
399
423
 
400
424
  # Builds the object from hash
@@ -31,6 +31,10 @@ module PlainRouter::OpenAPI
31
31
 
32
32
  attr_accessor :unmatched_arrivals
33
33
 
34
+ attr_accessor :pagination
35
+
36
+ attr_accessor :next_cursor
37
+
34
38
  # Attribute mapping from ruby-style variable name to JSON key.
35
39
  def self.attribute_map
36
40
  {
@@ -41,7 +45,9 @@ module PlainRouter::OpenAPI
41
45
  :'changes' => :'changes',
42
46
  :'effective_range' => :'effective_range',
43
47
  :'object_metrics' => :'object_metrics',
44
- :'unmatched_arrivals' => :'unmatched_arrivals'
48
+ :'unmatched_arrivals' => :'unmatched_arrivals',
49
+ :'pagination' => :'pagination',
50
+ :'next_cursor' => :'next_cursor'
45
51
  }
46
52
  end
47
53
 
@@ -65,7 +71,9 @@ module PlainRouter::OpenAPI
65
71
  :'changes' => :'Array<GetInventoryMetrics200ResponseChangesInner>',
66
72
  :'effective_range' => :'GetInventoryMetrics200ResponseEffectiveRange',
67
73
  :'object_metrics' => :'Array<GetInventoryMetrics200ResponseObjectMetricsInner>',
68
- :'unmatched_arrivals' => :'Integer'
74
+ :'unmatched_arrivals' => :'Integer',
75
+ :'pagination' => :'Hash<String, GetInventoryMetrics200ResponsePaginationValue>',
76
+ :'next_cursor' => :'String'
69
77
  }
70
78
  end
71
79
 
@@ -73,7 +81,8 @@ module PlainRouter::OpenAPI
73
81
  def self.openapi_nullable
74
82
  Set.new([
75
83
  :'effective_range',
76
- :'unmatched_arrivals'
84
+ :'unmatched_arrivals',
85
+ :'next_cursor'
77
86
  ])
78
87
  end
79
88
 
@@ -146,6 +155,16 @@ module PlainRouter::OpenAPI
146
155
  else
147
156
  self.unmatched_arrivals = nil
148
157
  end
158
+
159
+ if attributes.key?(:'pagination')
160
+ if (value = attributes[:'pagination']).is_a?(Hash)
161
+ self.pagination = value
162
+ end
163
+ end
164
+
165
+ if attributes.key?(:'next_cursor')
166
+ self.next_cursor = attributes[:'next_cursor']
167
+ end
149
168
  end
150
169
 
151
170
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -265,7 +284,9 @@ module PlainRouter::OpenAPI
265
284
  changes == o.changes &&
266
285
  effective_range == o.effective_range &&
267
286
  object_metrics == o.object_metrics &&
268
- unmatched_arrivals == o.unmatched_arrivals
287
+ unmatched_arrivals == o.unmatched_arrivals &&
288
+ pagination == o.pagination &&
289
+ next_cursor == o.next_cursor
269
290
  end
270
291
 
271
292
  # @see the `==` method
@@ -277,7 +298,7 @@ module PlainRouter::OpenAPI
277
298
  # Calculates hash code according to all attributes.
278
299
  # @return [Integer] Hash code
279
300
  def hash
280
- [account, sync, staleness, metrics, changes, effective_range, object_metrics, unmatched_arrivals].hash
301
+ [account, sync, staleness, metrics, changes, effective_range, object_metrics, unmatched_arrivals, pagination, next_cursor].hash
281
302
  end
282
303
 
283
304
  # Builds the object from hash
@@ -0,0 +1,202 @@
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 GetInventoryMetrics200ResponsePaginationValue < ApiModelBase
18
+ attr_accessor :total
19
+
20
+ attr_accessor :truncated
21
+
22
+ attr_accessor :next_cursor
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'total' => :'total',
28
+ :'truncated' => :'truncated',
29
+ :'next_cursor' => :'next_cursor'
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
+ :'total' => :'Integer',
47
+ :'truncated' => :'Boolean',
48
+ :'next_cursor' => :'Integer'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ :'next_cursor'
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetInventoryMetrics200ResponsePaginationValue` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ acceptable_attribute_map = self.class.acceptable_attribute_map
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!acceptable_attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetInventoryMetrics200ResponsePaginationValue`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'total')
76
+ self.total = attributes[:'total']
77
+ else
78
+ self.total = nil
79
+ end
80
+
81
+ if attributes.key?(:'truncated')
82
+ self.truncated = attributes[:'truncated']
83
+ else
84
+ self.truncated = nil
85
+ end
86
+
87
+ if attributes.key?(:'next_cursor')
88
+ self.next_cursor = attributes[:'next_cursor']
89
+ else
90
+ self.next_cursor = nil
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
98
+ invalid_properties = Array.new
99
+ if @total.nil?
100
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
101
+ end
102
+
103
+ if @truncated.nil?
104
+ invalid_properties.push('invalid value for "truncated", truncated cannot be nil.')
105
+ end
106
+
107
+ invalid_properties
108
+ end
109
+
110
+ # Check to see if the all the properties in the model are valid
111
+ # @return true if the model is valid
112
+ def valid?
113
+ warn '[DEPRECATED] the `valid?` method is obsolete'
114
+ return false if @total.nil?
115
+ return false if @truncated.nil?
116
+ true
117
+ end
118
+
119
+ # Custom attribute writer method with validation
120
+ # @param [Object] total Value to be assigned
121
+ def total=(total)
122
+ if total.nil?
123
+ fail ArgumentError, 'total cannot be nil'
124
+ end
125
+
126
+ @total = total
127
+ end
128
+
129
+ # Custom attribute writer method with validation
130
+ # @param [Object] truncated Value to be assigned
131
+ def truncated=(truncated)
132
+ if truncated.nil?
133
+ fail ArgumentError, 'truncated cannot be nil'
134
+ end
135
+
136
+ @truncated = truncated
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ total == o.total &&
145
+ truncated == o.truncated &&
146
+ next_cursor == o.next_cursor
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [total, truncated, next_cursor].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ attributes = attributes.transform_keys(&:to_sym)
167
+ transformed_hash = {}
168
+ openapi_types.each_pair do |key, type|
169
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
170
+ transformed_hash["#{key}"] = nil
171
+ elsif type =~ /\AArray<(.*)>/i
172
+ # check to ensure the input is an array given that the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[attribute_map[key]].is_a?(Array)
175
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
176
+ end
177
+ elsif !attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
179
+ end
180
+ end
181
+ new(transformed_hash)
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ end
201
+
202
+ end