plainrouter-sdk 0.2.0 → 0.5.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 (125) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -2
  3. data/lib/plainrouter/client.rb +2 -1
  4. data/lib/plainrouter/openapi/api/action_dry_run_api_api.rb +2 -2
  5. data/lib/plainrouter/openapi/api/action_proposal_api_api.rb +2 -2
  6. data/lib/plainrouter/openapi/api/ad_test_api_api.rb +259 -0
  7. data/lib/plainrouter/openapi/api/cookie_declaration_api.rb +90 -0
  8. data/lib/plainrouter/openapi/api/creative_api.rb +181 -0
  9. data/lib/plainrouter/openapi/api/deployment_plan_api.rb +306 -0
  10. data/lib/plainrouter/openapi/api/meta_inventory_exposure_api.rb +121 -0
  11. data/lib/plainrouter/openapi/configuration.rb +42 -0
  12. data/lib/plainrouter/openapi/models/action_current_disposition.rb +13 -1
  13. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload.rb +238 -0
  14. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline.rb +103 -0
  15. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline_any_of.rb +245 -0
  16. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_inverse.rb +206 -0
  17. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics.rb +103 -0
  18. data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics_any_of.rb +276 -0
  19. data/lib/plainrouter/openapi/models/action_policy_read_data.rb +3 -105
  20. data/lib/plainrouter/openapi/models/action_policy_result.rb +374 -0
  21. data/lib/plainrouter/openapi/models/action_proposal_input.rb +32 -4
  22. data/lib/plainrouter/openapi/models/action_read_item.rb +62 -4
  23. data/lib/plainrouter/openapi/models/action_read_item_evidence.rb +105 -0
  24. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of.rb +190 -0
  25. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of1.rb +242 -0
  26. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of2.rb +217 -0
  27. data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of_outcome.rb +238 -0
  28. data/lib/plainrouter/openapi/models/action_read_item_proposer.rb +198 -0
  29. data/lib/plainrouter/openapi/models/actions_api_dry_run401_response.rb +103 -0
  30. data/lib/plainrouter/openapi/models/actions_tests_api_index404_response.rb +103 -0
  31. data/lib/plainrouter/openapi/models/actions_tests_api_store_request.rb +467 -0
  32. data/lib/plainrouter/openapi/models/actions_tests_api_store_request_maximum_spend_minor.rb +104 -0
  33. data/lib/plainrouter/openapi/models/ad_test.rb +552 -0
  34. data/lib/plainrouter/openapi/models/ad_test_create_read.rb +164 -0
  35. data/lib/plainrouter/openapi/models/ad_test_create_read_test.rb +675 -0
  36. data/lib/plainrouter/openapi/models/ad_test_create_read_test_members_inner.rb +232 -0
  37. data/lib/plainrouter/openapi/models/ad_test_create_read_test_pause_proposals_inner.rb +286 -0
  38. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict.rb +336 -0
  39. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_daily_facts_inner.rb +374 -0
  40. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details.rb +285 -0
  41. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_baseline.rb +190 -0
  42. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_observed_destinations_inner.rb +216 -0
  43. data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_members_inner.rb +349 -0
  44. data/lib/plainrouter/openapi/models/ad_test_daily_fact_read.rb +374 -0
  45. data/lib/plainrouter/openapi/models/ad_test_event_choice.rb +190 -0
  46. data/lib/plainrouter/openapi/models/ad_test_list_read.rb +218 -0
  47. data/lib/plainrouter/openapi/models/ad_test_list_read_observed_conversion_events_inner.rb +190 -0
  48. data/lib/plainrouter/openapi/models/ad_test_list_read_tests.rb +396 -0
  49. data/lib/plainrouter/openapi/models/ad_test_read.rb +675 -0
  50. data/lib/plainrouter/openapi/models/ad_test_show_read.rb +164 -0
  51. data/lib/plainrouter/openapi/models/ad_test_verdict_member_read.rb +349 -0
  52. data/lib/plainrouter/openapi/models/ad_test_verdict_read.rb +336 -0
  53. data/lib/plainrouter/openapi/models/agent_credential_error.rb +214 -0
  54. data/lib/plainrouter/openapi/models/api_route_not_found.rb +216 -0
  55. data/lib/plainrouter/openapi/models/api_route_not_found_error.rb +240 -0
  56. data/lib/plainrouter/openapi/models/api_route_not_found_request.rb +190 -0
  57. data/lib/plainrouter/openapi/models/api_route_not_found_resources.rb +190 -0
  58. data/lib/plainrouter/openapi/models/cookie_declaration.rb +177 -0
  59. data/lib/plainrouter/openapi/models/cookie_declaration_categories.rb +268 -0
  60. data/lib/plainrouter/openapi/models/cookie_declaration_categories_necessary.rb +194 -0
  61. data/lib/plainrouter/openapi/models/cookie_declaration_item.rb +280 -0
  62. data/lib/plainrouter/openapi/models/create_event202_response_warnings_inner.rb +2 -2
  63. data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +1 -1
  64. data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +1 -1
  65. data/lib/plainrouter/openapi/models/creative_intake_read.rb +164 -0
  66. data/lib/plainrouter/openapi/models/creative_intake_read_creative.rb +451 -0
  67. data/lib/plainrouter/openapi/models/creative_intake_read_creative_tags.rb +104 -0
  68. data/lib/plainrouter/openapi/models/creative_intake_rejected.rb +164 -0
  69. data/lib/plainrouter/openapi/models/creative_intake_rejected_error.rb +190 -0
  70. data/lib/plainrouter/openapi/models/creative_intake_tags.rb +257 -0
  71. data/lib/plainrouter/openapi/models/deployment_plan.rb +593 -0
  72. data/lib/plainrouter/openapi/models/deployment_plan_read.rb +268 -0
  73. data/lib/plainrouter/openapi/models/deployment_plan_read_copy.rb +266 -0
  74. data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner.rb +320 -0
  75. data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner_copy.rb +267 -0
  76. data/lib/plainrouter/openapi/models/destination_type.rb +2 -1
  77. data/lib/plainrouter/openapi/models/execute_deployment_plan_request.rb +200 -0
  78. data/lib/plainrouter/openapi/models/get_cookie_declaration404_response.rb +103 -0
  79. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response.rb +324 -0
  80. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_account.rb +264 -0
  81. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_changes_inner.rb +304 -0
  82. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_effective_range.rb +190 -0
  83. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_metrics_inner.rb +492 -0
  84. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner.rb +304 -0
  85. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner_meta.rb +268 -0
  86. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_staleness.rb +200 -0
  87. data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_sync.rb +186 -0
  88. data/lib/plainrouter/openapi/models/ingestion_warning_code.rb +2 -1
  89. data/lib/plainrouter/openapi/models/launch_intent_read.rb +164 -0
  90. data/lib/plainrouter/openapi/models/launch_intent_read_intent.rb +330 -0
  91. data/lib/plainrouter/openapi/models/launch_intent_read_intent_actions_inner.rb +238 -0
  92. data/lib/plainrouter/openapi/models/launch_intent_status.rb +46 -0
  93. data/lib/plainrouter/openapi/models/launch_plans_copy403_response.rb +103 -0
  94. data/lib/plainrouter/openapi/models/launch_plans_copy404_response.rb +103 -0
  95. data/lib/plainrouter/openapi/models/launch_plans_execute422_response.rb +103 -0
  96. data/lib/plainrouter/openapi/models/launch_plans_index200_response.rb +164 -0
  97. data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans.rb +244 -0
  98. data/lib/plainrouter/openapi/models/launch_plans_show200_response.rb +164 -0
  99. data/lib/plainrouter/openapi/models/plan_copy_forbidden.rb +164 -0
  100. data/lib/plainrouter/openapi/models/plan_copy_forbidden_error.rb +214 -0
  101. data/lib/plainrouter/openapi/models/plan_copy_not_found.rb +164 -0
  102. data/lib/plainrouter/openapi/models/plan_copy_not_found_error.rb +214 -0
  103. data/lib/plainrouter/openapi/models/plan_copy_read.rb +164 -0
  104. data/lib/plainrouter/openapi/models/plan_copy_read_plan.rb +347 -0
  105. data/lib/plainrouter/openapi/models/plan_copy_rejected.rb +164 -0
  106. data/lib/plainrouter/openapi/models/plan_copy_rejected_error.rb +214 -0
  107. data/lib/plainrouter/openapi/models/plan_execute_conflict.rb +164 -0
  108. data/lib/plainrouter/openapi/models/plan_execute_conflict_error.rb +214 -0
  109. data/lib/plainrouter/openapi/models/plan_execute_rejected.rb +164 -0
  110. data/lib/plainrouter/openapi/models/plan_execute_rejected_error.rb +214 -0
  111. data/lib/plainrouter/openapi/models/proposal_replay_conflict.rb +214 -0
  112. data/lib/plainrouter/openapi/models/proposal_replay_conflict_errors.rb +178 -0
  113. data/lib/plainrouter/openapi/models/store_creative403_response.rb +103 -0
  114. data/lib/plainrouter/openapi/models/store_creative413_response.rb +103 -0
  115. data/lib/plainrouter/openapi/models/store_creative422_response.rb +103 -0
  116. data/lib/plainrouter/openapi/models/store_creative_from_url_request.rb +208 -0
  117. data/lib/plainrouter/openapi/models/store_creative_from_url_request_tags.rb +257 -0
  118. data/lib/plainrouter/openapi/models/store_creative_request.rb +219 -0
  119. data/lib/plainrouter/openapi/models/store_creative_request_tags.rb +257 -0
  120. data/lib/plainrouter/openapi/models/workspace_lock_timeout.rb +164 -0
  121. data/lib/plainrouter/openapi/models/workspace_lock_timeout_error.rb +214 -0
  122. data/lib/plainrouter/openapi/version.rb +1 -1
  123. data/lib/plainrouter/openapi.rb +106 -0
  124. data/lib/plainrouter/version.rb +1 -1
  125. metadata +108 -2
@@ -0,0 +1,200 @@
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 GetInventoryMetrics200ResponseStaleness < ApiModelBase
18
+ attr_accessor :structure_synced_at
19
+
20
+ attr_accessor :metrics_synced_at
21
+
22
+ attr_accessor :last_error_code
23
+
24
+ attr_accessor :state
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'structure_synced_at' => :'structure_synced_at',
30
+ :'metrics_synced_at' => :'metrics_synced_at',
31
+ :'last_error_code' => :'last_error_code',
32
+ :'state' => :'state'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'structure_synced_at' => :'String',
50
+ :'metrics_synced_at' => :'String',
51
+ :'last_error_code' => :'String',
52
+ :'state' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'structure_synced_at',
60
+ :'metrics_synced_at',
61
+ :'last_error_code',
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetInventoryMetrics200ResponseStaleness` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ acceptable_attribute_map = self.class.acceptable_attribute_map
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!acceptable_attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetInventoryMetrics200ResponseStaleness`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'structure_synced_at')
82
+ self.structure_synced_at = attributes[:'structure_synced_at']
83
+ else
84
+ self.structure_synced_at = nil
85
+ end
86
+
87
+ if attributes.key?(:'metrics_synced_at')
88
+ self.metrics_synced_at = attributes[:'metrics_synced_at']
89
+ else
90
+ self.metrics_synced_at = nil
91
+ end
92
+
93
+ if attributes.key?(:'last_error_code')
94
+ self.last_error_code = attributes[:'last_error_code']
95
+ else
96
+ self.last_error_code = nil
97
+ end
98
+
99
+ if attributes.key?(:'state')
100
+ self.state = attributes[:'state']
101
+ else
102
+ self.state = nil
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
110
+ invalid_properties = Array.new
111
+ if @state.nil?
112
+ invalid_properties.push('invalid value for "state", state cannot be nil.')
113
+ end
114
+
115
+ invalid_properties
116
+ end
117
+
118
+ # Check to see if the all the properties in the model are valid
119
+ # @return true if the model is valid
120
+ def valid?
121
+ warn '[DEPRECATED] the `valid?` method is obsolete'
122
+ return false if @state.nil?
123
+ true
124
+ end
125
+
126
+ # Custom attribute writer method with validation
127
+ # @param [Object] state Value to be assigned
128
+ def state=(state)
129
+ if state.nil?
130
+ fail ArgumentError, 'state cannot be nil'
131
+ end
132
+
133
+ @state = state
134
+ end
135
+
136
+ # Checks equality by comparing each attribute.
137
+ # @param [Object] Object to be compared
138
+ def ==(o)
139
+ return true if self.equal?(o)
140
+ self.class == o.class &&
141
+ structure_synced_at == o.structure_synced_at &&
142
+ metrics_synced_at == o.metrics_synced_at &&
143
+ last_error_code == o.last_error_code &&
144
+ state == o.state
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [structure_synced_at, metrics_synced_at, last_error_code, state].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ return nil unless attributes.is_a?(Hash)
164
+ attributes = attributes.transform_keys(&:to_sym)
165
+ transformed_hash = {}
166
+ openapi_types.each_pair do |key, type|
167
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = nil
169
+ elsif type =~ /\AArray<(.*)>/i
170
+ # check to ensure the input is an array given that the attribute
171
+ # is documented as an array but the input is not
172
+ if attributes[attribute_map[key]].is_a?(Array)
173
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
174
+ end
175
+ elsif !attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
177
+ end
178
+ end
179
+ new(transformed_hash)
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ end
199
+
200
+ end
@@ -0,0 +1,186 @@
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 GetInventoryMetrics200ResponseSync < ApiModelBase
18
+ attr_accessor :campaigns_count
19
+
20
+ attr_accessor :adsets_count
21
+
22
+ attr_accessor :ads_count
23
+
24
+ attr_accessor :counts_read_at
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'campaigns_count' => :'campaigns_count',
30
+ :'adsets_count' => :'adsets_count',
31
+ :'ads_count' => :'ads_count',
32
+ :'counts_read_at' => :'counts_read_at'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'campaigns_count' => :'Integer',
50
+ :'adsets_count' => :'Integer',
51
+ :'ads_count' => :'Integer',
52
+ :'counts_read_at' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'campaigns_count',
60
+ :'adsets_count',
61
+ :'ads_count',
62
+ :'counts_read_at'
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::GetInventoryMetrics200ResponseSync` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::GetInventoryMetrics200ResponseSync`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'campaigns_count')
83
+ self.campaigns_count = attributes[:'campaigns_count']
84
+ else
85
+ self.campaigns_count = nil
86
+ end
87
+
88
+ if attributes.key?(:'adsets_count')
89
+ self.adsets_count = attributes[:'adsets_count']
90
+ else
91
+ self.adsets_count = nil
92
+ end
93
+
94
+ if attributes.key?(:'ads_count')
95
+ self.ads_count = attributes[:'ads_count']
96
+ else
97
+ self.ads_count = nil
98
+ end
99
+
100
+ if attributes.key?(:'counts_read_at')
101
+ self.counts_read_at = attributes[:'counts_read_at']
102
+ else
103
+ self.counts_read_at = nil
104
+ end
105
+ end
106
+
107
+ # Show invalid properties with the reasons. Usually used together with valid?
108
+ # @return Array for valid properties with the reasons
109
+ def list_invalid_properties
110
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
+ invalid_properties = Array.new
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ warn '[DEPRECATED] the `valid?` method is obsolete'
119
+ true
120
+ end
121
+
122
+ # Checks equality by comparing each attribute.
123
+ # @param [Object] Object to be compared
124
+ def ==(o)
125
+ return true if self.equal?(o)
126
+ self.class == o.class &&
127
+ campaigns_count == o.campaigns_count &&
128
+ adsets_count == o.adsets_count &&
129
+ ads_count == o.ads_count &&
130
+ counts_read_at == o.counts_read_at
131
+ end
132
+
133
+ # @see the `==` method
134
+ # @param [Object] Object to be compared
135
+ def eql?(o)
136
+ self == o
137
+ end
138
+
139
+ # Calculates hash code according to all attributes.
140
+ # @return [Integer] Hash code
141
+ def hash
142
+ [campaigns_count, adsets_count, ads_count, counts_read_at].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def self.build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+ attributes = attributes.transform_keys(&:to_sym)
151
+ transformed_hash = {}
152
+ openapi_types.each_pair do |key, type|
153
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
154
+ transformed_hash["#{key}"] = nil
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[attribute_map[key]].is_a?(Array)
159
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
160
+ end
161
+ elsif !attributes[attribute_map[key]].nil?
162
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
163
+ end
164
+ end
165
+ new(transformed_hash)
166
+ end
167
+
168
+ # Returns the object in the form of hash
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_hash
171
+ hash = {}
172
+ self.class.attribute_map.each_pair do |attr, param|
173
+ value = self.send(attr)
174
+ if value.nil?
175
+ is_nullable = self.class.openapi_nullable.include?(attr)
176
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
177
+ end
178
+
179
+ hash[param] = _to_hash(value)
180
+ end
181
+ hash
182
+ end
183
+
184
+ end
185
+
186
+ end
@@ -16,9 +16,10 @@ require 'time'
16
16
  module PlainRouter::OpenAPI
17
17
  class IngestionWarningCode
18
18
  CONSENT_CAPTURED_AT_INVALID = "consent_captured_at_invalid".freeze
19
+ EVENT_SOURCE_INVALID = "event_source_invalid".freeze
19
20
 
20
21
  def self.all_vars
21
- @all_vars ||= [CONSENT_CAPTURED_AT_INVALID].freeze
22
+ @all_vars ||= [CONSENT_CAPTURED_AT_INVALID, EVENT_SOURCE_INVALID].freeze
22
23
  end
23
24
 
24
25
  # Builds the enum from string
@@ -0,0 +1,164 @@
1
+ =begin
2
+ #Plainrouter Conversion API
3
+
4
+ #Plainrouter public Signals Conversion API.
5
+
6
+ The version of the OpenAPI document: 0.5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.25.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PlainRouter::OpenAPI
17
+ class LaunchIntentRead < ApiModelBase
18
+ attr_accessor :intent
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'intent' => :'intent'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'intent' => :'LaunchIntentReadIntent'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::LaunchIntentRead` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::LaunchIntentRead`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'intent')
67
+ self.intent = attributes[:'intent']
68
+ else
69
+ self.intent = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @intent.nil?
79
+ invalid_properties.push('invalid value for "intent", intent cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @intent.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] intent Value to be assigned
95
+ def intent=(intent)
96
+ if intent.nil?
97
+ fail ArgumentError, 'intent cannot be nil'
98
+ end
99
+
100
+ @intent = intent
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ intent == o.intent
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [intent].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end