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.
- checksums.yaml +4 -4
- data/README.md +9 -2
- data/lib/plainrouter/client.rb +2 -1
- data/lib/plainrouter/openapi/api/action_dry_run_api_api.rb +2 -2
- data/lib/plainrouter/openapi/api/action_proposal_api_api.rb +2 -2
- data/lib/plainrouter/openapi/api/ad_test_api_api.rb +259 -0
- data/lib/plainrouter/openapi/api/cookie_declaration_api.rb +90 -0
- data/lib/plainrouter/openapi/api/creative_api.rb +181 -0
- data/lib/plainrouter/openapi/api/deployment_plan_api.rb +306 -0
- data/lib/plainrouter/openapi/api/meta_inventory_exposure_api.rb +121 -0
- data/lib/plainrouter/openapi/configuration.rb +42 -0
- data/lib/plainrouter/openapi/models/action_current_disposition.rb +13 -1
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload.rb +238 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline.rb +103 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_baseline_any_of.rb +245 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_inverse.rb +206 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics.rb +103 -0
- data/lib/plainrouter/openapi/models/action_current_disposition_outcome_payload_metrics_any_of.rb +276 -0
- data/lib/plainrouter/openapi/models/action_policy_read_data.rb +3 -105
- data/lib/plainrouter/openapi/models/action_policy_result.rb +374 -0
- data/lib/plainrouter/openapi/models/action_proposal_input.rb +32 -4
- data/lib/plainrouter/openapi/models/action_read_item.rb +62 -4
- data/lib/plainrouter/openapi/models/action_read_item_evidence.rb +105 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of.rb +190 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of1.rb +242 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of2.rb +217 -0
- data/lib/plainrouter/openapi/models/action_read_item_evidence_any_of_outcome.rb +238 -0
- data/lib/plainrouter/openapi/models/action_read_item_proposer.rb +198 -0
- data/lib/plainrouter/openapi/models/actions_api_dry_run401_response.rb +103 -0
- data/lib/plainrouter/openapi/models/actions_tests_api_index404_response.rb +103 -0
- data/lib/plainrouter/openapi/models/actions_tests_api_store_request.rb +467 -0
- data/lib/plainrouter/openapi/models/actions_tests_api_store_request_maximum_spend_minor.rb +104 -0
- data/lib/plainrouter/openapi/models/ad_test.rb +552 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read.rb +164 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test.rb +675 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_members_inner.rb +232 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_pause_proposals_inner.rb +286 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict.rb +336 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_daily_facts_inner.rb +374 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details.rb +285 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_baseline.rb +190 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_halt_details_observed_destinations_inner.rb +216 -0
- data/lib/plainrouter/openapi/models/ad_test_create_read_test_verdict_members_inner.rb +349 -0
- data/lib/plainrouter/openapi/models/ad_test_daily_fact_read.rb +374 -0
- data/lib/plainrouter/openapi/models/ad_test_event_choice.rb +190 -0
- data/lib/plainrouter/openapi/models/ad_test_list_read.rb +218 -0
- data/lib/plainrouter/openapi/models/ad_test_list_read_observed_conversion_events_inner.rb +190 -0
- data/lib/plainrouter/openapi/models/ad_test_list_read_tests.rb +396 -0
- data/lib/plainrouter/openapi/models/ad_test_read.rb +675 -0
- data/lib/plainrouter/openapi/models/ad_test_show_read.rb +164 -0
- data/lib/plainrouter/openapi/models/ad_test_verdict_member_read.rb +349 -0
- data/lib/plainrouter/openapi/models/ad_test_verdict_read.rb +336 -0
- data/lib/plainrouter/openapi/models/agent_credential_error.rb +214 -0
- data/lib/plainrouter/openapi/models/api_route_not_found.rb +216 -0
- data/lib/plainrouter/openapi/models/api_route_not_found_error.rb +240 -0
- data/lib/plainrouter/openapi/models/api_route_not_found_request.rb +190 -0
- data/lib/plainrouter/openapi/models/api_route_not_found_resources.rb +190 -0
- data/lib/plainrouter/openapi/models/cookie_declaration.rb +177 -0
- data/lib/plainrouter/openapi/models/cookie_declaration_categories.rb +268 -0
- data/lib/plainrouter/openapi/models/cookie_declaration_categories_necessary.rb +194 -0
- data/lib/plainrouter/openapi/models/cookie_declaration_item.rb +280 -0
- data/lib/plainrouter/openapi/models/create_event202_response_warnings_inner.rb +2 -2
- data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +1 -1
- data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +1 -1
- data/lib/plainrouter/openapi/models/creative_intake_read.rb +164 -0
- data/lib/plainrouter/openapi/models/creative_intake_read_creative.rb +451 -0
- data/lib/plainrouter/openapi/models/creative_intake_read_creative_tags.rb +104 -0
- data/lib/plainrouter/openapi/models/creative_intake_rejected.rb +164 -0
- data/lib/plainrouter/openapi/models/creative_intake_rejected_error.rb +190 -0
- data/lib/plainrouter/openapi/models/creative_intake_tags.rb +257 -0
- data/lib/plainrouter/openapi/models/deployment_plan.rb +593 -0
- data/lib/plainrouter/openapi/models/deployment_plan_read.rb +268 -0
- data/lib/plainrouter/openapi/models/deployment_plan_read_copy.rb +266 -0
- data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner.rb +320 -0
- data/lib/plainrouter/openapi/models/deployment_plan_read_creatives_inner_copy.rb +267 -0
- data/lib/plainrouter/openapi/models/destination_type.rb +2 -1
- data/lib/plainrouter/openapi/models/execute_deployment_plan_request.rb +200 -0
- data/lib/plainrouter/openapi/models/get_cookie_declaration404_response.rb +103 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response.rb +324 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_account.rb +264 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_changes_inner.rb +304 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_effective_range.rb +190 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_metrics_inner.rb +492 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner.rb +304 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_object_metrics_inner_meta.rb +268 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_staleness.rb +200 -0
- data/lib/plainrouter/openapi/models/get_inventory_metrics200_response_sync.rb +186 -0
- data/lib/plainrouter/openapi/models/ingestion_warning_code.rb +2 -1
- data/lib/plainrouter/openapi/models/launch_intent_read.rb +164 -0
- data/lib/plainrouter/openapi/models/launch_intent_read_intent.rb +330 -0
- data/lib/plainrouter/openapi/models/launch_intent_read_intent_actions_inner.rb +238 -0
- data/lib/plainrouter/openapi/models/launch_intent_status.rb +46 -0
- data/lib/plainrouter/openapi/models/launch_plans_copy403_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_plans_copy404_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_plans_execute422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/launch_plans_index200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/launch_plans_index200_response_plans.rb +244 -0
- data/lib/plainrouter/openapi/models/launch_plans_show200_response.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_forbidden.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_forbidden_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_copy_not_found.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_not_found_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_copy_read.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_read_plan.rb +347 -0
- data/lib/plainrouter/openapi/models/plan_copy_rejected.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_copy_rejected_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_execute_conflict.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_execute_conflict_error.rb +214 -0
- data/lib/plainrouter/openapi/models/plan_execute_rejected.rb +164 -0
- data/lib/plainrouter/openapi/models/plan_execute_rejected_error.rb +214 -0
- data/lib/plainrouter/openapi/models/proposal_replay_conflict.rb +214 -0
- data/lib/plainrouter/openapi/models/proposal_replay_conflict_errors.rb +178 -0
- data/lib/plainrouter/openapi/models/store_creative403_response.rb +103 -0
- data/lib/plainrouter/openapi/models/store_creative413_response.rb +103 -0
- data/lib/plainrouter/openapi/models/store_creative422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/store_creative_from_url_request.rb +208 -0
- data/lib/plainrouter/openapi/models/store_creative_from_url_request_tags.rb +257 -0
- data/lib/plainrouter/openapi/models/store_creative_request.rb +219 -0
- data/lib/plainrouter/openapi/models/store_creative_request_tags.rb +257 -0
- data/lib/plainrouter/openapi/models/workspace_lock_timeout.rb +164 -0
- data/lib/plainrouter/openapi/models/workspace_lock_timeout_error.rb +214 -0
- data/lib/plainrouter/openapi/version.rb +1 -1
- data/lib/plainrouter/openapi.rb +106 -0
- data/lib/plainrouter/version.rb +1 -1
- metadata +108 -2
|
@@ -0,0 +1,675 @@
|
|
|
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 AdTestCreateReadTest < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :workspace_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :platform_ad_account_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :ad_set_id
|
|
25
|
+
|
|
26
|
+
attr_accessor :axis
|
|
27
|
+
|
|
28
|
+
attr_accessor :event_name
|
|
29
|
+
|
|
30
|
+
attr_accessor :arrivals_floor
|
|
31
|
+
|
|
32
|
+
# Link-click threshold frozen at conclusion; null until concluded or for legacy Tests.
|
|
33
|
+
attr_accessor :count_health_click_threshold
|
|
34
|
+
|
|
35
|
+
attr_accessor :minimum_conversions
|
|
36
|
+
|
|
37
|
+
attr_accessor :maximum_days
|
|
38
|
+
|
|
39
|
+
# Optional maximum in positive whole Meta minor units, using the same unit scale as Launch plan budget_amount_minor.
|
|
40
|
+
attr_accessor :maximum_spend_minor
|
|
41
|
+
|
|
42
|
+
attr_accessor :anomaly_threshold_percent
|
|
43
|
+
|
|
44
|
+
attr_accessor :first_day
|
|
45
|
+
|
|
46
|
+
attr_accessor :timezone
|
|
47
|
+
|
|
48
|
+
attr_accessor :currency
|
|
49
|
+
|
|
50
|
+
attr_accessor :created_at
|
|
51
|
+
|
|
52
|
+
attr_accessor :members
|
|
53
|
+
|
|
54
|
+
attr_accessor :pause_proposals
|
|
55
|
+
|
|
56
|
+
attr_accessor :verdict
|
|
57
|
+
|
|
58
|
+
class EnumAttributeValidator
|
|
59
|
+
attr_reader :datatype
|
|
60
|
+
attr_reader :allowable_values
|
|
61
|
+
|
|
62
|
+
def initialize(datatype, allowable_values)
|
|
63
|
+
@allowable_values = allowable_values.map do |value|
|
|
64
|
+
case datatype.to_s
|
|
65
|
+
when /Integer/i
|
|
66
|
+
value.to_i
|
|
67
|
+
when /Float/i
|
|
68
|
+
value.to_f
|
|
69
|
+
else
|
|
70
|
+
value
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def valid?(value)
|
|
76
|
+
!value || allowable_values.include?(value)
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
81
|
+
def self.attribute_map
|
|
82
|
+
{
|
|
83
|
+
:'id' => :'id',
|
|
84
|
+
:'workspace_id' => :'workspace_id',
|
|
85
|
+
:'platform_ad_account_id' => :'platform_ad_account_id',
|
|
86
|
+
:'ad_set_id' => :'ad_set_id',
|
|
87
|
+
:'axis' => :'axis',
|
|
88
|
+
:'event_name' => :'event_name',
|
|
89
|
+
:'arrivals_floor' => :'arrivals_floor',
|
|
90
|
+
:'count_health_click_threshold' => :'count_health_click_threshold',
|
|
91
|
+
:'minimum_conversions' => :'minimum_conversions',
|
|
92
|
+
:'maximum_days' => :'maximum_days',
|
|
93
|
+
:'maximum_spend_minor' => :'maximum_spend_minor',
|
|
94
|
+
:'anomaly_threshold_percent' => :'anomaly_threshold_percent',
|
|
95
|
+
:'first_day' => :'first_day',
|
|
96
|
+
:'timezone' => :'timezone',
|
|
97
|
+
:'currency' => :'currency',
|
|
98
|
+
:'created_at' => :'created_at',
|
|
99
|
+
:'members' => :'members',
|
|
100
|
+
:'pause_proposals' => :'pause_proposals',
|
|
101
|
+
:'verdict' => :'verdict'
|
|
102
|
+
}
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Returns attribute mapping this model knows about
|
|
106
|
+
def self.acceptable_attribute_map
|
|
107
|
+
attribute_map
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Returns all the JSON keys this model knows about
|
|
111
|
+
def self.acceptable_attributes
|
|
112
|
+
acceptable_attribute_map.values
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Attribute type mapping.
|
|
116
|
+
def self.openapi_types
|
|
117
|
+
{
|
|
118
|
+
:'id' => :'String',
|
|
119
|
+
:'workspace_id' => :'Integer',
|
|
120
|
+
:'platform_ad_account_id' => :'Integer',
|
|
121
|
+
:'ad_set_id' => :'String',
|
|
122
|
+
:'axis' => :'String',
|
|
123
|
+
:'event_name' => :'String',
|
|
124
|
+
:'arrivals_floor' => :'Integer',
|
|
125
|
+
:'count_health_click_threshold' => :'Integer',
|
|
126
|
+
:'minimum_conversions' => :'Integer',
|
|
127
|
+
:'maximum_days' => :'Integer',
|
|
128
|
+
:'maximum_spend_minor' => :'String',
|
|
129
|
+
:'anomaly_threshold_percent' => :'String',
|
|
130
|
+
:'first_day' => :'Date',
|
|
131
|
+
:'timezone' => :'String',
|
|
132
|
+
:'currency' => :'String',
|
|
133
|
+
:'created_at' => :'Time',
|
|
134
|
+
:'members' => :'Array<AdTestCreateReadTestMembersInner>',
|
|
135
|
+
:'pause_proposals' => :'Array<AdTestCreateReadTestPauseProposalsInner>',
|
|
136
|
+
:'verdict' => :'AdTestCreateReadTestVerdict'
|
|
137
|
+
}
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# List of attributes with nullable: true
|
|
141
|
+
def self.openapi_nullable
|
|
142
|
+
Set.new([
|
|
143
|
+
:'count_health_click_threshold',
|
|
144
|
+
:'maximum_spend_minor',
|
|
145
|
+
:'created_at',
|
|
146
|
+
:'verdict'
|
|
147
|
+
])
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Initializes the object
|
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
152
|
+
def initialize(attributes = {})
|
|
153
|
+
if (!attributes.is_a?(Hash))
|
|
154
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::AdTestCreateReadTest` initialize method"
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
158
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
159
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
160
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
161
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::AdTestCreateReadTest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
162
|
+
end
|
|
163
|
+
h[k.to_sym] = v
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'id')
|
|
167
|
+
self.id = attributes[:'id']
|
|
168
|
+
else
|
|
169
|
+
self.id = nil
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'workspace_id')
|
|
173
|
+
self.workspace_id = attributes[:'workspace_id']
|
|
174
|
+
else
|
|
175
|
+
self.workspace_id = nil
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'platform_ad_account_id')
|
|
179
|
+
self.platform_ad_account_id = attributes[:'platform_ad_account_id']
|
|
180
|
+
else
|
|
181
|
+
self.platform_ad_account_id = nil
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'ad_set_id')
|
|
185
|
+
self.ad_set_id = attributes[:'ad_set_id']
|
|
186
|
+
else
|
|
187
|
+
self.ad_set_id = nil
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'axis')
|
|
191
|
+
self.axis = attributes[:'axis']
|
|
192
|
+
else
|
|
193
|
+
self.axis = nil
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if attributes.key?(:'event_name')
|
|
197
|
+
self.event_name = attributes[:'event_name']
|
|
198
|
+
else
|
|
199
|
+
self.event_name = nil
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'arrivals_floor')
|
|
203
|
+
self.arrivals_floor = attributes[:'arrivals_floor']
|
|
204
|
+
else
|
|
205
|
+
self.arrivals_floor = nil
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if attributes.key?(:'count_health_click_threshold')
|
|
209
|
+
self.count_health_click_threshold = attributes[:'count_health_click_threshold']
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if attributes.key?(:'minimum_conversions')
|
|
213
|
+
self.minimum_conversions = attributes[:'minimum_conversions']
|
|
214
|
+
else
|
|
215
|
+
self.minimum_conversions = nil
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if attributes.key?(:'maximum_days')
|
|
219
|
+
self.maximum_days = attributes[:'maximum_days']
|
|
220
|
+
else
|
|
221
|
+
self.maximum_days = nil
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if attributes.key?(:'maximum_spend_minor')
|
|
225
|
+
self.maximum_spend_minor = attributes[:'maximum_spend_minor']
|
|
226
|
+
else
|
|
227
|
+
self.maximum_spend_minor = nil
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'anomaly_threshold_percent')
|
|
231
|
+
self.anomaly_threshold_percent = attributes[:'anomaly_threshold_percent']
|
|
232
|
+
else
|
|
233
|
+
self.anomaly_threshold_percent = nil
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
if attributes.key?(:'first_day')
|
|
237
|
+
self.first_day = attributes[:'first_day']
|
|
238
|
+
else
|
|
239
|
+
self.first_day = nil
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if attributes.key?(:'timezone')
|
|
243
|
+
self.timezone = attributes[:'timezone']
|
|
244
|
+
else
|
|
245
|
+
self.timezone = nil
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
if attributes.key?(:'currency')
|
|
249
|
+
self.currency = attributes[:'currency']
|
|
250
|
+
else
|
|
251
|
+
self.currency = nil
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
if attributes.key?(:'created_at')
|
|
255
|
+
self.created_at = attributes[:'created_at']
|
|
256
|
+
else
|
|
257
|
+
self.created_at = nil
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
if attributes.key?(:'members')
|
|
261
|
+
if (value = attributes[:'members']).is_a?(Array)
|
|
262
|
+
self.members = value
|
|
263
|
+
end
|
|
264
|
+
else
|
|
265
|
+
self.members = nil
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
if attributes.key?(:'pause_proposals')
|
|
269
|
+
if (value = attributes[:'pause_proposals']).is_a?(Array)
|
|
270
|
+
self.pause_proposals = value
|
|
271
|
+
end
|
|
272
|
+
else
|
|
273
|
+
self.pause_proposals = nil
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
if attributes.key?(:'verdict')
|
|
277
|
+
self.verdict = attributes[:'verdict']
|
|
278
|
+
else
|
|
279
|
+
self.verdict = nil
|
|
280
|
+
end
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
284
|
+
# @return Array for valid properties with the reasons
|
|
285
|
+
def list_invalid_properties
|
|
286
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
287
|
+
invalid_properties = Array.new
|
|
288
|
+
if @id.nil?
|
|
289
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
if @id.to_s.length > 26
|
|
293
|
+
invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 26.')
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
if @id.to_s.length < 26
|
|
297
|
+
invalid_properties.push('invalid value for "id", the character length must be greater than or equal to 26.')
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
pattern = Regexp.new(/^[0-7][0-9a-hjkmnp-tv-z]{25}$/)
|
|
301
|
+
if @id !~ pattern
|
|
302
|
+
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
if @workspace_id.nil?
|
|
306
|
+
invalid_properties.push('invalid value for "workspace_id", workspace_id cannot be nil.')
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
if @platform_ad_account_id.nil?
|
|
310
|
+
invalid_properties.push('invalid value for "platform_ad_account_id", platform_ad_account_id cannot be nil.')
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
if @ad_set_id.nil?
|
|
314
|
+
invalid_properties.push('invalid value for "ad_set_id", ad_set_id cannot be nil.')
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
if @ad_set_id.to_s.length > 128
|
|
318
|
+
invalid_properties.push('invalid value for "ad_set_id", the character length must be smaller than or equal to 128.')
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
pattern = Regexp.new(/^[0-9]+$/)
|
|
322
|
+
if @ad_set_id !~ pattern
|
|
323
|
+
invalid_properties.push("invalid value for \"ad_set_id\", must conform to the pattern #{pattern}.")
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
if @axis.nil?
|
|
327
|
+
invalid_properties.push('invalid value for "axis", axis cannot be nil.')
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
if @event_name.nil?
|
|
331
|
+
invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
if @arrivals_floor.nil?
|
|
335
|
+
invalid_properties.push('invalid value for "arrivals_floor", arrivals_floor cannot be nil.')
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
if @minimum_conversions.nil?
|
|
339
|
+
invalid_properties.push('invalid value for "minimum_conversions", minimum_conversions cannot be nil.')
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
if @maximum_days.nil?
|
|
343
|
+
invalid_properties.push('invalid value for "maximum_days", maximum_days cannot be nil.')
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
if @anomaly_threshold_percent.nil?
|
|
347
|
+
invalid_properties.push('invalid value for "anomaly_threshold_percent", anomaly_threshold_percent cannot be nil.')
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
pattern = Regexp.new(/^[0-9]+(?:\.[0-9]+)?$/)
|
|
351
|
+
if @anomaly_threshold_percent !~ pattern
|
|
352
|
+
invalid_properties.push("invalid value for \"anomaly_threshold_percent\", must conform to the pattern #{pattern}.")
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
if @first_day.nil?
|
|
356
|
+
invalid_properties.push('invalid value for "first_day", first_day cannot be nil.')
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
if @timezone.nil?
|
|
360
|
+
invalid_properties.push('invalid value for "timezone", timezone cannot be nil.')
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
if @currency.nil?
|
|
364
|
+
invalid_properties.push('invalid value for "currency", currency cannot be nil.')
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
pattern = Regexp.new(/^[A-Z]{3}$/)
|
|
368
|
+
if @currency !~ pattern
|
|
369
|
+
invalid_properties.push("invalid value for \"currency\", must conform to the pattern #{pattern}.")
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
if @members.nil?
|
|
373
|
+
invalid_properties.push('invalid value for "members", members cannot be nil.')
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
if @pause_proposals.nil?
|
|
377
|
+
invalid_properties.push('invalid value for "pause_proposals", pause_proposals cannot be nil.')
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
invalid_properties
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# Check to see if the all the properties in the model are valid
|
|
384
|
+
# @return true if the model is valid
|
|
385
|
+
def valid?
|
|
386
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
387
|
+
return false if @id.nil?
|
|
388
|
+
return false if @id.to_s.length > 26
|
|
389
|
+
return false if @id.to_s.length < 26
|
|
390
|
+
return false if @id !~ Regexp.new(/^[0-7][0-9a-hjkmnp-tv-z]{25}$/)
|
|
391
|
+
return false if @workspace_id.nil?
|
|
392
|
+
return false if @platform_ad_account_id.nil?
|
|
393
|
+
return false if @ad_set_id.nil?
|
|
394
|
+
return false if @ad_set_id.to_s.length > 128
|
|
395
|
+
return false if @ad_set_id !~ Regexp.new(/^[0-9]+$/)
|
|
396
|
+
return false if @axis.nil?
|
|
397
|
+
axis_validator = EnumAttributeValidator.new('String', ["hook", "angle", "visual", "offer", "format", "landing"])
|
|
398
|
+
return false unless axis_validator.valid?(@axis)
|
|
399
|
+
return false if @event_name.nil?
|
|
400
|
+
return false if @arrivals_floor.nil?
|
|
401
|
+
return false if @minimum_conversions.nil?
|
|
402
|
+
return false if @maximum_days.nil?
|
|
403
|
+
return false if @anomaly_threshold_percent.nil?
|
|
404
|
+
return false if @anomaly_threshold_percent !~ Regexp.new(/^[0-9]+(?:\.[0-9]+)?$/)
|
|
405
|
+
return false if @first_day.nil?
|
|
406
|
+
return false if @timezone.nil?
|
|
407
|
+
return false if @currency.nil?
|
|
408
|
+
return false if @currency !~ Regexp.new(/^[A-Z]{3}$/)
|
|
409
|
+
return false if @members.nil?
|
|
410
|
+
return false if @pause_proposals.nil?
|
|
411
|
+
true
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Custom attribute writer method with validation
|
|
415
|
+
# @param [Object] id Value to be assigned
|
|
416
|
+
def id=(id)
|
|
417
|
+
if id.nil?
|
|
418
|
+
fail ArgumentError, 'id cannot be nil'
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
if id.to_s.length > 26
|
|
422
|
+
fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 26.'
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
if id.to_s.length < 26
|
|
426
|
+
fail ArgumentError, 'invalid value for "id", the character length must be greater than or equal to 26.'
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
pattern = Regexp.new(/^[0-7][0-9a-hjkmnp-tv-z]{25}$/)
|
|
430
|
+
if id !~ pattern
|
|
431
|
+
fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
@id = id
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
# Custom attribute writer method with validation
|
|
438
|
+
# @param [Object] workspace_id Value to be assigned
|
|
439
|
+
def workspace_id=(workspace_id)
|
|
440
|
+
if workspace_id.nil?
|
|
441
|
+
fail ArgumentError, 'workspace_id cannot be nil'
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
@workspace_id = workspace_id
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
# Custom attribute writer method with validation
|
|
448
|
+
# @param [Object] platform_ad_account_id Value to be assigned
|
|
449
|
+
def platform_ad_account_id=(platform_ad_account_id)
|
|
450
|
+
if platform_ad_account_id.nil?
|
|
451
|
+
fail ArgumentError, 'platform_ad_account_id cannot be nil'
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
@platform_ad_account_id = platform_ad_account_id
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
# Custom attribute writer method with validation
|
|
458
|
+
# @param [Object] ad_set_id Value to be assigned
|
|
459
|
+
def ad_set_id=(ad_set_id)
|
|
460
|
+
if ad_set_id.nil?
|
|
461
|
+
fail ArgumentError, 'ad_set_id cannot be nil'
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
if ad_set_id.to_s.length > 128
|
|
465
|
+
fail ArgumentError, 'invalid value for "ad_set_id", the character length must be smaller than or equal to 128.'
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
pattern = Regexp.new(/^[0-9]+$/)
|
|
469
|
+
if ad_set_id !~ pattern
|
|
470
|
+
fail ArgumentError, "invalid value for \"ad_set_id\", must conform to the pattern #{pattern}."
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
@ad_set_id = ad_set_id
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
477
|
+
# @param [Object] axis Object to be assigned
|
|
478
|
+
def axis=(axis)
|
|
479
|
+
validator = EnumAttributeValidator.new('String', ["hook", "angle", "visual", "offer", "format", "landing"])
|
|
480
|
+
unless validator.valid?(axis)
|
|
481
|
+
fail ArgumentError, "invalid value for \"axis\", must be one of #{validator.allowable_values}."
|
|
482
|
+
end
|
|
483
|
+
@axis = axis
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
# Custom attribute writer method with validation
|
|
487
|
+
# @param [Object] event_name Value to be assigned
|
|
488
|
+
def event_name=(event_name)
|
|
489
|
+
if event_name.nil?
|
|
490
|
+
fail ArgumentError, 'event_name cannot be nil'
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
@event_name = event_name
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
# Custom attribute writer method with validation
|
|
497
|
+
# @param [Object] arrivals_floor Value to be assigned
|
|
498
|
+
def arrivals_floor=(arrivals_floor)
|
|
499
|
+
if arrivals_floor.nil?
|
|
500
|
+
fail ArgumentError, 'arrivals_floor cannot be nil'
|
|
501
|
+
end
|
|
502
|
+
|
|
503
|
+
@arrivals_floor = arrivals_floor
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
# Custom attribute writer method with validation
|
|
507
|
+
# @param [Object] minimum_conversions Value to be assigned
|
|
508
|
+
def minimum_conversions=(minimum_conversions)
|
|
509
|
+
if minimum_conversions.nil?
|
|
510
|
+
fail ArgumentError, 'minimum_conversions cannot be nil'
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
@minimum_conversions = minimum_conversions
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
# Custom attribute writer method with validation
|
|
517
|
+
# @param [Object] maximum_days Value to be assigned
|
|
518
|
+
def maximum_days=(maximum_days)
|
|
519
|
+
if maximum_days.nil?
|
|
520
|
+
fail ArgumentError, 'maximum_days cannot be nil'
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
@maximum_days = maximum_days
|
|
524
|
+
end
|
|
525
|
+
|
|
526
|
+
# Custom attribute writer method with validation
|
|
527
|
+
# @param [Object] anomaly_threshold_percent Value to be assigned
|
|
528
|
+
def anomaly_threshold_percent=(anomaly_threshold_percent)
|
|
529
|
+
if anomaly_threshold_percent.nil?
|
|
530
|
+
fail ArgumentError, 'anomaly_threshold_percent cannot be nil'
|
|
531
|
+
end
|
|
532
|
+
|
|
533
|
+
pattern = Regexp.new(/^[0-9]+(?:\.[0-9]+)?$/)
|
|
534
|
+
if anomaly_threshold_percent !~ pattern
|
|
535
|
+
fail ArgumentError, "invalid value for \"anomaly_threshold_percent\", must conform to the pattern #{pattern}."
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
@anomaly_threshold_percent = anomaly_threshold_percent
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
# Custom attribute writer method with validation
|
|
542
|
+
# @param [Object] first_day Value to be assigned
|
|
543
|
+
def first_day=(first_day)
|
|
544
|
+
if first_day.nil?
|
|
545
|
+
fail ArgumentError, 'first_day cannot be nil'
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
@first_day = first_day
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
# Custom attribute writer method with validation
|
|
552
|
+
# @param [Object] timezone Value to be assigned
|
|
553
|
+
def timezone=(timezone)
|
|
554
|
+
if timezone.nil?
|
|
555
|
+
fail ArgumentError, 'timezone cannot be nil'
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
@timezone = timezone
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
# Custom attribute writer method with validation
|
|
562
|
+
# @param [Object] currency Value to be assigned
|
|
563
|
+
def currency=(currency)
|
|
564
|
+
if currency.nil?
|
|
565
|
+
fail ArgumentError, 'currency cannot be nil'
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
pattern = Regexp.new(/^[A-Z]{3}$/)
|
|
569
|
+
if currency !~ pattern
|
|
570
|
+
fail ArgumentError, "invalid value for \"currency\", must conform to the pattern #{pattern}."
|
|
571
|
+
end
|
|
572
|
+
|
|
573
|
+
@currency = currency
|
|
574
|
+
end
|
|
575
|
+
|
|
576
|
+
# Custom attribute writer method with validation
|
|
577
|
+
# @param [Object] members Value to be assigned
|
|
578
|
+
def members=(members)
|
|
579
|
+
if members.nil?
|
|
580
|
+
fail ArgumentError, 'members cannot be nil'
|
|
581
|
+
end
|
|
582
|
+
|
|
583
|
+
@members = members
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
# Custom attribute writer method with validation
|
|
587
|
+
# @param [Object] pause_proposals Value to be assigned
|
|
588
|
+
def pause_proposals=(pause_proposals)
|
|
589
|
+
if pause_proposals.nil?
|
|
590
|
+
fail ArgumentError, 'pause_proposals cannot be nil'
|
|
591
|
+
end
|
|
592
|
+
|
|
593
|
+
@pause_proposals = pause_proposals
|
|
594
|
+
end
|
|
595
|
+
|
|
596
|
+
# Checks equality by comparing each attribute.
|
|
597
|
+
# @param [Object] Object to be compared
|
|
598
|
+
def ==(o)
|
|
599
|
+
return true if self.equal?(o)
|
|
600
|
+
self.class == o.class &&
|
|
601
|
+
id == o.id &&
|
|
602
|
+
workspace_id == o.workspace_id &&
|
|
603
|
+
platform_ad_account_id == o.platform_ad_account_id &&
|
|
604
|
+
ad_set_id == o.ad_set_id &&
|
|
605
|
+
axis == o.axis &&
|
|
606
|
+
event_name == o.event_name &&
|
|
607
|
+
arrivals_floor == o.arrivals_floor &&
|
|
608
|
+
count_health_click_threshold == o.count_health_click_threshold &&
|
|
609
|
+
minimum_conversions == o.minimum_conversions &&
|
|
610
|
+
maximum_days == o.maximum_days &&
|
|
611
|
+
maximum_spend_minor == o.maximum_spend_minor &&
|
|
612
|
+
anomaly_threshold_percent == o.anomaly_threshold_percent &&
|
|
613
|
+
first_day == o.first_day &&
|
|
614
|
+
timezone == o.timezone &&
|
|
615
|
+
currency == o.currency &&
|
|
616
|
+
created_at == o.created_at &&
|
|
617
|
+
members == o.members &&
|
|
618
|
+
pause_proposals == o.pause_proposals &&
|
|
619
|
+
verdict == o.verdict
|
|
620
|
+
end
|
|
621
|
+
|
|
622
|
+
# @see the `==` method
|
|
623
|
+
# @param [Object] Object to be compared
|
|
624
|
+
def eql?(o)
|
|
625
|
+
self == o
|
|
626
|
+
end
|
|
627
|
+
|
|
628
|
+
# Calculates hash code according to all attributes.
|
|
629
|
+
# @return [Integer] Hash code
|
|
630
|
+
def hash
|
|
631
|
+
[id, workspace_id, platform_ad_account_id, ad_set_id, axis, event_name, arrivals_floor, count_health_click_threshold, minimum_conversions, maximum_days, maximum_spend_minor, anomaly_threshold_percent, first_day, timezone, currency, created_at, members, pause_proposals, verdict].hash
|
|
632
|
+
end
|
|
633
|
+
|
|
634
|
+
# Builds the object from hash
|
|
635
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
636
|
+
# @return [Object] Returns the model itself
|
|
637
|
+
def self.build_from_hash(attributes)
|
|
638
|
+
return nil unless attributes.is_a?(Hash)
|
|
639
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
640
|
+
transformed_hash = {}
|
|
641
|
+
openapi_types.each_pair do |key, type|
|
|
642
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
643
|
+
transformed_hash["#{key}"] = nil
|
|
644
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
645
|
+
# check to ensure the input is an array given that the attribute
|
|
646
|
+
# is documented as an array but the input is not
|
|
647
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
648
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
649
|
+
end
|
|
650
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
651
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
652
|
+
end
|
|
653
|
+
end
|
|
654
|
+
new(transformed_hash)
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
# Returns the object in the form of hash
|
|
658
|
+
# @return [Hash] Returns the object in the form of hash
|
|
659
|
+
def to_hash
|
|
660
|
+
hash = {}
|
|
661
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
662
|
+
value = self.send(attr)
|
|
663
|
+
if value.nil?
|
|
664
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
665
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
hash[param] = _to_hash(value)
|
|
669
|
+
end
|
|
670
|
+
hash
|
|
671
|
+
end
|
|
672
|
+
|
|
673
|
+
end
|
|
674
|
+
|
|
675
|
+
end
|