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,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 AdTestShowRead < ApiModelBase
|
|
18
|
+
attr_accessor :test
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'test' => :'test'
|
|
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
|
+
:'test' => :'AdTestCreateReadTest'
|
|
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::AdTestShowRead` 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::AdTestShowRead`. 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?(:'test')
|
|
67
|
+
self.test = attributes[:'test']
|
|
68
|
+
else
|
|
69
|
+
self.test = 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 @test.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "test", test 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 @test.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] test Value to be assigned
|
|
95
|
+
def test=(test)
|
|
96
|
+
if test.nil?
|
|
97
|
+
fail ArgumentError, 'test cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@test = test
|
|
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
|
+
test == o.test
|
|
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
|
+
[test].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
|
|
@@ -0,0 +1,349 @@
|
|
|
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 AdTestVerdictMemberRead < ApiModelBase
|
|
18
|
+
attr_accessor :ad_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :state
|
|
21
|
+
|
|
22
|
+
attr_accessor :rank
|
|
23
|
+
|
|
24
|
+
attr_accessor :spend
|
|
25
|
+
|
|
26
|
+
attr_accessor :impressions
|
|
27
|
+
|
|
28
|
+
attr_accessor :counted_arrivals
|
|
29
|
+
|
|
30
|
+
# PlainRouter recorded consented conversions of this Test event.
|
|
31
|
+
attr_accessor :recorded_conversions
|
|
32
|
+
|
|
33
|
+
# Admitted conversions are shown beside recorded conversions and are never substituted for them.
|
|
34
|
+
attr_accessor :admitted_conversions
|
|
35
|
+
|
|
36
|
+
# Major-unit spend divided by PlainRouter recorded conversions; used only to compare members within this Test.
|
|
37
|
+
attr_accessor :spend_per_recorded_conversion
|
|
38
|
+
|
|
39
|
+
attr_accessor :covered_days
|
|
40
|
+
|
|
41
|
+
class EnumAttributeValidator
|
|
42
|
+
attr_reader :datatype
|
|
43
|
+
attr_reader :allowable_values
|
|
44
|
+
|
|
45
|
+
def initialize(datatype, allowable_values)
|
|
46
|
+
@allowable_values = allowable_values.map do |value|
|
|
47
|
+
case datatype.to_s
|
|
48
|
+
when /Integer/i
|
|
49
|
+
value.to_i
|
|
50
|
+
when /Float/i
|
|
51
|
+
value.to_f
|
|
52
|
+
else
|
|
53
|
+
value
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def valid?(value)
|
|
59
|
+
!value || allowable_values.include?(value)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
64
|
+
def self.attribute_map
|
|
65
|
+
{
|
|
66
|
+
:'ad_id' => :'ad_id',
|
|
67
|
+
:'state' => :'state',
|
|
68
|
+
:'rank' => :'rank',
|
|
69
|
+
:'spend' => :'spend',
|
|
70
|
+
:'impressions' => :'impressions',
|
|
71
|
+
:'counted_arrivals' => :'counted_arrivals',
|
|
72
|
+
:'recorded_conversions' => :'recorded_conversions',
|
|
73
|
+
:'admitted_conversions' => :'admitted_conversions',
|
|
74
|
+
:'spend_per_recorded_conversion' => :'spend_per_recorded_conversion',
|
|
75
|
+
:'covered_days' => :'covered_days'
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Returns attribute mapping this model knows about
|
|
80
|
+
def self.acceptable_attribute_map
|
|
81
|
+
attribute_map
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Returns all the JSON keys this model knows about
|
|
85
|
+
def self.acceptable_attributes
|
|
86
|
+
acceptable_attribute_map.values
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Attribute type mapping.
|
|
90
|
+
def self.openapi_types
|
|
91
|
+
{
|
|
92
|
+
:'ad_id' => :'String',
|
|
93
|
+
:'state' => :'String',
|
|
94
|
+
:'rank' => :'Integer',
|
|
95
|
+
:'spend' => :'String',
|
|
96
|
+
:'impressions' => :'Integer',
|
|
97
|
+
:'counted_arrivals' => :'Integer',
|
|
98
|
+
:'recorded_conversions' => :'Integer',
|
|
99
|
+
:'admitted_conversions' => :'Integer',
|
|
100
|
+
:'spend_per_recorded_conversion' => :'String',
|
|
101
|
+
:'covered_days' => :'Array<Date>'
|
|
102
|
+
}
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# List of attributes with nullable: true
|
|
106
|
+
def self.openapi_nullable
|
|
107
|
+
Set.new([
|
|
108
|
+
:'rank',
|
|
109
|
+
:'spend',
|
|
110
|
+
:'impressions',
|
|
111
|
+
:'counted_arrivals',
|
|
112
|
+
:'recorded_conversions',
|
|
113
|
+
:'admitted_conversions',
|
|
114
|
+
:'spend_per_recorded_conversion',
|
|
115
|
+
])
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Initializes the object
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
def initialize(attributes = {})
|
|
121
|
+
if (!attributes.is_a?(Hash))
|
|
122
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::AdTestVerdictMemberRead` initialize method"
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
126
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
127
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
128
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
129
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::AdTestVerdictMemberRead`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
130
|
+
end
|
|
131
|
+
h[k.to_sym] = v
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'ad_id')
|
|
135
|
+
self.ad_id = attributes[:'ad_id']
|
|
136
|
+
else
|
|
137
|
+
self.ad_id = nil
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'state')
|
|
141
|
+
self.state = attributes[:'state']
|
|
142
|
+
else
|
|
143
|
+
self.state = nil
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'rank')
|
|
147
|
+
self.rank = attributes[:'rank']
|
|
148
|
+
else
|
|
149
|
+
self.rank = nil
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'spend')
|
|
153
|
+
self.spend = attributes[:'spend']
|
|
154
|
+
else
|
|
155
|
+
self.spend = nil
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'impressions')
|
|
159
|
+
self.impressions = attributes[:'impressions']
|
|
160
|
+
else
|
|
161
|
+
self.impressions = nil
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'counted_arrivals')
|
|
165
|
+
self.counted_arrivals = attributes[:'counted_arrivals']
|
|
166
|
+
else
|
|
167
|
+
self.counted_arrivals = nil
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'recorded_conversions')
|
|
171
|
+
self.recorded_conversions = attributes[:'recorded_conversions']
|
|
172
|
+
else
|
|
173
|
+
self.recorded_conversions = nil
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'admitted_conversions')
|
|
177
|
+
self.admitted_conversions = attributes[:'admitted_conversions']
|
|
178
|
+
else
|
|
179
|
+
self.admitted_conversions = nil
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'spend_per_recorded_conversion')
|
|
183
|
+
self.spend_per_recorded_conversion = attributes[:'spend_per_recorded_conversion']
|
|
184
|
+
else
|
|
185
|
+
self.spend_per_recorded_conversion = nil
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if attributes.key?(:'covered_days')
|
|
189
|
+
if (value = attributes[:'covered_days']).is_a?(Array)
|
|
190
|
+
self.covered_days = value
|
|
191
|
+
end
|
|
192
|
+
else
|
|
193
|
+
self.covered_days = nil
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
198
|
+
# @return Array for valid properties with the reasons
|
|
199
|
+
def list_invalid_properties
|
|
200
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
201
|
+
invalid_properties = Array.new
|
|
202
|
+
if @ad_id.nil?
|
|
203
|
+
invalid_properties.push('invalid value for "ad_id", ad_id cannot be nil.')
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if @ad_id.to_s.length > 128
|
|
207
|
+
invalid_properties.push('invalid value for "ad_id", the character length must be smaller than or equal to 128.')
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
pattern = Regexp.new(/^[0-9]+$/)
|
|
211
|
+
if @ad_id !~ pattern
|
|
212
|
+
invalid_properties.push("invalid value for \"ad_id\", must conform to the pattern #{pattern}.")
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if @state.nil?
|
|
216
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if @covered_days.nil?
|
|
220
|
+
invalid_properties.push('invalid value for "covered_days", covered_days cannot be nil.')
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
invalid_properties
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Check to see if the all the properties in the model are valid
|
|
227
|
+
# @return true if the model is valid
|
|
228
|
+
def valid?
|
|
229
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
230
|
+
return false if @ad_id.nil?
|
|
231
|
+
return false if @ad_id.to_s.length > 128
|
|
232
|
+
return false if @ad_id !~ Regexp.new(/^[0-9]+$/)
|
|
233
|
+
return false if @state.nil?
|
|
234
|
+
state_validator = EnumAttributeValidator.new('String', ["not_delivered", "insufficient", "ranked", "facts_unavailable", "halted"])
|
|
235
|
+
return false unless state_validator.valid?(@state)
|
|
236
|
+
return false if @covered_days.nil?
|
|
237
|
+
true
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Custom attribute writer method with validation
|
|
241
|
+
# @param [Object] ad_id Value to be assigned
|
|
242
|
+
def ad_id=(ad_id)
|
|
243
|
+
if ad_id.nil?
|
|
244
|
+
fail ArgumentError, 'ad_id cannot be nil'
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if ad_id.to_s.length > 128
|
|
248
|
+
fail ArgumentError, 'invalid value for "ad_id", the character length must be smaller than or equal to 128.'
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
pattern = Regexp.new(/^[0-9]+$/)
|
|
252
|
+
if ad_id !~ pattern
|
|
253
|
+
fail ArgumentError, "invalid value for \"ad_id\", must conform to the pattern #{pattern}."
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
@ad_id = ad_id
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
260
|
+
# @param [Object] state Object to be assigned
|
|
261
|
+
def state=(state)
|
|
262
|
+
validator = EnumAttributeValidator.new('String', ["not_delivered", "insufficient", "ranked", "facts_unavailable", "halted"])
|
|
263
|
+
unless validator.valid?(state)
|
|
264
|
+
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
265
|
+
end
|
|
266
|
+
@state = state
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Custom attribute writer method with validation
|
|
270
|
+
# @param [Object] covered_days Value to be assigned
|
|
271
|
+
def covered_days=(covered_days)
|
|
272
|
+
if covered_days.nil?
|
|
273
|
+
fail ArgumentError, 'covered_days cannot be nil'
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
@covered_days = covered_days
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Checks equality by comparing each attribute.
|
|
280
|
+
# @param [Object] Object to be compared
|
|
281
|
+
def ==(o)
|
|
282
|
+
return true if self.equal?(o)
|
|
283
|
+
self.class == o.class &&
|
|
284
|
+
ad_id == o.ad_id &&
|
|
285
|
+
state == o.state &&
|
|
286
|
+
rank == o.rank &&
|
|
287
|
+
spend == o.spend &&
|
|
288
|
+
impressions == o.impressions &&
|
|
289
|
+
counted_arrivals == o.counted_arrivals &&
|
|
290
|
+
recorded_conversions == o.recorded_conversions &&
|
|
291
|
+
admitted_conversions == o.admitted_conversions &&
|
|
292
|
+
spend_per_recorded_conversion == o.spend_per_recorded_conversion &&
|
|
293
|
+
covered_days == o.covered_days
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# @see the `==` method
|
|
297
|
+
# @param [Object] Object to be compared
|
|
298
|
+
def eql?(o)
|
|
299
|
+
self == o
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Calculates hash code according to all attributes.
|
|
303
|
+
# @return [Integer] Hash code
|
|
304
|
+
def hash
|
|
305
|
+
[ad_id, state, rank, spend, impressions, counted_arrivals, recorded_conversions, admitted_conversions, spend_per_recorded_conversion, covered_days].hash
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Builds the object from hash
|
|
309
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
310
|
+
# @return [Object] Returns the model itself
|
|
311
|
+
def self.build_from_hash(attributes)
|
|
312
|
+
return nil unless attributes.is_a?(Hash)
|
|
313
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
314
|
+
transformed_hash = {}
|
|
315
|
+
openapi_types.each_pair do |key, type|
|
|
316
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
317
|
+
transformed_hash["#{key}"] = nil
|
|
318
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
319
|
+
# check to ensure the input is an array given that the attribute
|
|
320
|
+
# is documented as an array but the input is not
|
|
321
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
322
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
323
|
+
end
|
|
324
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
325
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
326
|
+
end
|
|
327
|
+
end
|
|
328
|
+
new(transformed_hash)
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
# Returns the object in the form of hash
|
|
332
|
+
# @return [Hash] Returns the object in the form of hash
|
|
333
|
+
def to_hash
|
|
334
|
+
hash = {}
|
|
335
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
336
|
+
value = self.send(attr)
|
|
337
|
+
if value.nil?
|
|
338
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
339
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
hash[param] = _to_hash(value)
|
|
343
|
+
end
|
|
344
|
+
hash
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
end
|