plainrouter-sdk 0.1.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 +7 -0
- data/LICENSE +202 -0
- data/README.md +59 -0
- data/lib/plainrouter/client.rb +44 -0
- data/lib/plainrouter/openapi/api/event_api.rb +213 -0
- data/lib/plainrouter/openapi/api/operations_api.rb +542 -0
- data/lib/plainrouter/openapi/api/sandbox_api.rb +272 -0
- data/lib/plainrouter/openapi/api_client.rb +441 -0
- data/lib/plainrouter/openapi/api_error.rb +58 -0
- data/lib/plainrouter/openapi/api_model_base.rb +88 -0
- data/lib/plainrouter/openapi/configuration.rb +399 -0
- data/lib/plainrouter/openapi/models/create_event200_response.rb +190 -0
- data/lib/plainrouter/openapi/models/create_event_request.rb +103 -0
- data/lib/plainrouter/openapi/models/create_event_request_any_of.rb +344 -0
- data/lib/plainrouter/openapi/models/create_event_request_any_of1.rb +346 -0
- data/lib/plainrouter/openapi/models/create_event_request_any_of_event_time.rb +104 -0
- data/lib/plainrouter/openapi/models/create_event_request_any_of_value_data.rb +186 -0
- data/lib/plainrouter/openapi/models/create_sandbox_key201_response.rb +320 -0
- data/lib/plainrouter/openapi/models/create_sandbox_key201_response_use.rb +216 -0
- data/lib/plainrouter/openapi/models/delete_user_data200_response.rb +268 -0
- data/lib/plainrouter/openapi/models/delete_user_data_request.rb +225 -0
- data/lib/plainrouter/openapi/models/delivery_status.rb +49 -0
- data/lib/plainrouter/openapi/models/destination.rb +354 -0
- data/lib/plainrouter/openapi/models/destination_credential_source.rb +40 -0
- data/lib/plainrouter/openapi/models/destination_status.rb +40 -0
- data/lib/plainrouter/openapi/models/destination_type.rb +39 -0
- data/lib/plainrouter/openapi/models/emq_snapshot.rb +344 -0
- data/lib/plainrouter/openapi/models/error_message.rb +164 -0
- data/lib/plainrouter/openapi/models/event.rb +782 -0
- data/lib/plainrouter/openapi/models/get_emq_report200_response.rb +166 -0
- data/lib/plainrouter/openapi/models/get_emq_report200_response_snapshots_inner.rb +342 -0
- data/lib/plainrouter/openapi/models/get_event200_response.rb +218 -0
- data/lib/plainrouter/openapi/models/get_event200_response_deliveries_inner.rb +440 -0
- data/lib/plainrouter/openapi/models/get_event200_response_event.rb +624 -0
- data/lib/plainrouter/openapi/models/get_event200_response_event_consent.rb +103 -0
- data/lib/plainrouter/openapi/models/get_event200_response_event_deliveries_inner.rb +414 -0
- data/lib/plainrouter/openapi/models/get_event200_response_lineage.rb +178 -0
- data/lib/plainrouter/openapi/models/get_event200_response_lineage_children_inner.rb +596 -0
- data/lib/plainrouter/openapi/models/get_event200_response_lineage_parent.rb +596 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response.rb +192 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner.rb +476 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_buckets_value.rb +216 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts.rb +190 -0
- data/lib/plainrouter/openapi/models/get_reconciliation_report200_response_reports_inner_event_counts_accepted.rb +103 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response.rb +372 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response_self_serve_key.rb +242 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response_try.rb +242 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body.rb +242 -0
- data/lib/plainrouter/openapi/models/get_sandbox200_response_try_body_value_data.rb +216 -0
- data/lib/plainrouter/openapi/models/jurisdiction_policy_class.rb +40 -0
- data/lib/plainrouter/openapi/models/list_events200_response.rb +190 -0
- data/lib/plainrouter/openapi/models/list_events200_response_events.rb +382 -0
- data/lib/plainrouter/openapi/models/list_events200_response_events_links_inner.rb +202 -0
- data/lib/plainrouter/openapi/models/list_events200_response_metrics.rb +228 -0
- data/lib/plainrouter/openapi/models/list_events_by_cursor200_response.rb +190 -0
- data/lib/plainrouter/openapi/models/list_events_by_cursor200_response_events.rb +252 -0
- data/lib/plainrouter/openapi/models/reconciliation_report.rb +464 -0
- data/lib/plainrouter/openapi/models/replay_deliveries202_response.rb +242 -0
- data/lib/plainrouter/openapi/models/replay_deliveries_request.rb +199 -0
- data/lib/plainrouter/openapi/models/send_test_purchase200_response.rb +224 -0
- data/lib/plainrouter/openapi/models/send_test_purchase422_response.rb +103 -0
- data/lib/plainrouter/openapi/models/send_test_purchase_request.rb +224 -0
- data/lib/plainrouter/openapi/models/set_destination_test_mode200_response.rb +190 -0
- data/lib/plainrouter/openapi/models/set_destination_test_mode200_response_destination.rb +338 -0
- data/lib/plainrouter/openapi/models/set_destination_test_mode_request.rb +189 -0
- data/lib/plainrouter/openapi/models/traffic_class.rb +40 -0
- data/lib/plainrouter/openapi/models/validate_sandbox_event200_response.rb +320 -0
- data/lib/plainrouter/openapi/models/validate_sandbox_event_request.rb +194 -0
- data/lib/plainrouter/openapi/models/validate_sandbox_event_request_value_data.rb +166 -0
- data/lib/plainrouter/openapi/models/validation_error.rb +192 -0
- data/lib/plainrouter/openapi/version.rb +15 -0
- data/lib/plainrouter/openapi.rb +102 -0
- data/lib/plainrouter/version.rb +6 -0
- data/lib/plainrouter.rb +10 -0
- metadata +176 -0
|
@@ -0,0 +1,252 @@
|
|
|
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 ListEventsByCursor200ResponseEvents < ApiModelBase
|
|
18
|
+
attr_accessor :data
|
|
19
|
+
|
|
20
|
+
attr_accessor :path
|
|
21
|
+
|
|
22
|
+
attr_accessor :per_page
|
|
23
|
+
|
|
24
|
+
attr_accessor :next_cursor
|
|
25
|
+
|
|
26
|
+
attr_accessor :next_page_url
|
|
27
|
+
|
|
28
|
+
attr_accessor :prev_cursor
|
|
29
|
+
|
|
30
|
+
attr_accessor :prev_page_url
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'data' => :'data',
|
|
36
|
+
:'path' => :'path',
|
|
37
|
+
:'per_page' => :'per_page',
|
|
38
|
+
:'next_cursor' => :'next_cursor',
|
|
39
|
+
:'next_page_url' => :'next_page_url',
|
|
40
|
+
:'prev_cursor' => :'prev_cursor',
|
|
41
|
+
:'prev_page_url' => :'prev_page_url'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns attribute mapping this model knows about
|
|
46
|
+
def self.acceptable_attribute_map
|
|
47
|
+
attribute_map
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
acceptable_attribute_map.values
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'data' => :'Array<GetEvent200ResponseEvent>',
|
|
59
|
+
:'path' => :'String',
|
|
60
|
+
:'per_page' => :'Integer',
|
|
61
|
+
:'next_cursor' => :'String',
|
|
62
|
+
:'next_page_url' => :'String',
|
|
63
|
+
:'prev_cursor' => :'String',
|
|
64
|
+
:'prev_page_url' => :'String'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# List of attributes with nullable: true
|
|
69
|
+
def self.openapi_nullable
|
|
70
|
+
Set.new([
|
|
71
|
+
:'path',
|
|
72
|
+
:'next_cursor',
|
|
73
|
+
:'next_page_url',
|
|
74
|
+
:'prev_cursor',
|
|
75
|
+
:'prev_page_url'
|
|
76
|
+
])
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Initializes the object
|
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
81
|
+
def initialize(attributes = {})
|
|
82
|
+
if (!attributes.is_a?(Hash))
|
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ListEventsByCursor200ResponseEvents` initialize method"
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
87
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
89
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::ListEventsByCursor200ResponseEvents`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
91
|
+
end
|
|
92
|
+
h[k.to_sym] = v
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'data')
|
|
96
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
97
|
+
self.data = value
|
|
98
|
+
end
|
|
99
|
+
else
|
|
100
|
+
self.data = nil
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'path')
|
|
104
|
+
self.path = attributes[:'path']
|
|
105
|
+
else
|
|
106
|
+
self.path = nil
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'per_page')
|
|
110
|
+
self.per_page = attributes[:'per_page']
|
|
111
|
+
else
|
|
112
|
+
self.per_page = nil
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'next_cursor')
|
|
116
|
+
self.next_cursor = attributes[:'next_cursor']
|
|
117
|
+
else
|
|
118
|
+
self.next_cursor = nil
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'next_page_url')
|
|
122
|
+
self.next_page_url = attributes[:'next_page_url']
|
|
123
|
+
else
|
|
124
|
+
self.next_page_url = nil
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'prev_cursor')
|
|
128
|
+
self.prev_cursor = attributes[:'prev_cursor']
|
|
129
|
+
else
|
|
130
|
+
self.prev_cursor = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'prev_page_url')
|
|
134
|
+
self.prev_page_url = attributes[:'prev_page_url']
|
|
135
|
+
else
|
|
136
|
+
self.prev_page_url = nil
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
141
|
+
# @return Array for valid properties with the reasons
|
|
142
|
+
def list_invalid_properties
|
|
143
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
144
|
+
invalid_properties = Array.new
|
|
145
|
+
if @data.nil?
|
|
146
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if @per_page.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "per_page", per_page cannot be nil.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
invalid_properties
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Check to see if the all the properties in the model are valid
|
|
157
|
+
# @return true if the model is valid
|
|
158
|
+
def valid?
|
|
159
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
160
|
+
return false if @data.nil?
|
|
161
|
+
return false if @per_page.nil?
|
|
162
|
+
true
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Custom attribute writer method with validation
|
|
166
|
+
# @param [Object] data Value to be assigned
|
|
167
|
+
def data=(data)
|
|
168
|
+
if data.nil?
|
|
169
|
+
fail ArgumentError, 'data cannot be nil'
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
@data = data
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Custom attribute writer method with validation
|
|
176
|
+
# @param [Object] per_page Value to be assigned
|
|
177
|
+
def per_page=(per_page)
|
|
178
|
+
if per_page.nil?
|
|
179
|
+
fail ArgumentError, 'per_page cannot be nil'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
@per_page = per_page
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Checks equality by comparing each attribute.
|
|
186
|
+
# @param [Object] Object to be compared
|
|
187
|
+
def ==(o)
|
|
188
|
+
return true if self.equal?(o)
|
|
189
|
+
self.class == o.class &&
|
|
190
|
+
data == o.data &&
|
|
191
|
+
path == o.path &&
|
|
192
|
+
per_page == o.per_page &&
|
|
193
|
+
next_cursor == o.next_cursor &&
|
|
194
|
+
next_page_url == o.next_page_url &&
|
|
195
|
+
prev_cursor == o.prev_cursor &&
|
|
196
|
+
prev_page_url == o.prev_page_url
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# @see the `==` method
|
|
200
|
+
# @param [Object] Object to be compared
|
|
201
|
+
def eql?(o)
|
|
202
|
+
self == o
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Calculates hash code according to all attributes.
|
|
206
|
+
# @return [Integer] Hash code
|
|
207
|
+
def hash
|
|
208
|
+
[data, path, per_page, next_cursor, next_page_url, prev_cursor, prev_page_url].hash
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Builds the object from hash
|
|
212
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
213
|
+
# @return [Object] Returns the model itself
|
|
214
|
+
def self.build_from_hash(attributes)
|
|
215
|
+
return nil unless attributes.is_a?(Hash)
|
|
216
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
217
|
+
transformed_hash = {}
|
|
218
|
+
openapi_types.each_pair do |key, type|
|
|
219
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
220
|
+
transformed_hash["#{key}"] = nil
|
|
221
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
222
|
+
# check to ensure the input is an array given that the attribute
|
|
223
|
+
# is documented as an array but the input is not
|
|
224
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
225
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
226
|
+
end
|
|
227
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
228
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
new(transformed_hash)
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Returns the object in the form of hash
|
|
235
|
+
# @return [Hash] Returns the object in the form of hash
|
|
236
|
+
def to_hash
|
|
237
|
+
hash = {}
|
|
238
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
239
|
+
value = self.send(attr)
|
|
240
|
+
if value.nil?
|
|
241
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
242
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
hash[param] = _to_hash(value)
|
|
246
|
+
end
|
|
247
|
+
hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
end
|
|
@@ -0,0 +1,464 @@
|
|
|
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 ReconciliationReport < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :signal_tracker_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :destination_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :report_date
|
|
25
|
+
|
|
26
|
+
attr_accessor :accepted_count
|
|
27
|
+
|
|
28
|
+
attr_accessor :meta_count
|
|
29
|
+
|
|
30
|
+
attr_accessor :observed_gap
|
|
31
|
+
|
|
32
|
+
attr_accessor :event_counts
|
|
33
|
+
|
|
34
|
+
attr_accessor :buckets
|
|
35
|
+
|
|
36
|
+
attr_accessor :unexplained_residual
|
|
37
|
+
|
|
38
|
+
attr_accessor :status
|
|
39
|
+
|
|
40
|
+
attr_accessor :created_at
|
|
41
|
+
|
|
42
|
+
attr_accessor :updated_at
|
|
43
|
+
|
|
44
|
+
attr_accessor :claimed_clicks
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'id' => :'id',
|
|
50
|
+
:'signal_tracker_id' => :'signal_tracker_id',
|
|
51
|
+
:'destination_id' => :'destination_id',
|
|
52
|
+
:'report_date' => :'report_date',
|
|
53
|
+
:'accepted_count' => :'accepted_count',
|
|
54
|
+
:'meta_count' => :'meta_count',
|
|
55
|
+
:'observed_gap' => :'observed_gap',
|
|
56
|
+
:'event_counts' => :'event_counts',
|
|
57
|
+
:'buckets' => :'buckets',
|
|
58
|
+
:'unexplained_residual' => :'unexplained_residual',
|
|
59
|
+
:'status' => :'status',
|
|
60
|
+
:'created_at' => :'created_at',
|
|
61
|
+
:'updated_at' => :'updated_at',
|
|
62
|
+
:'claimed_clicks' => :'claimed_clicks'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Returns attribute mapping this model knows about
|
|
67
|
+
def self.acceptable_attribute_map
|
|
68
|
+
attribute_map
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Returns all the JSON keys this model knows about
|
|
72
|
+
def self.acceptable_attributes
|
|
73
|
+
acceptable_attribute_map.values
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Attribute type mapping.
|
|
77
|
+
def self.openapi_types
|
|
78
|
+
{
|
|
79
|
+
:'id' => :'Integer',
|
|
80
|
+
:'signal_tracker_id' => :'String',
|
|
81
|
+
:'destination_id' => :'String',
|
|
82
|
+
:'report_date' => :'Time',
|
|
83
|
+
:'accepted_count' => :'Integer',
|
|
84
|
+
:'meta_count' => :'Integer',
|
|
85
|
+
:'observed_gap' => :'Integer',
|
|
86
|
+
:'event_counts' => :'Array<Object>',
|
|
87
|
+
:'buckets' => :'Array<Object>',
|
|
88
|
+
:'unexplained_residual' => :'Integer',
|
|
89
|
+
:'status' => :'String',
|
|
90
|
+
:'created_at' => :'Time',
|
|
91
|
+
:'updated_at' => :'Time',
|
|
92
|
+
:'claimed_clicks' => :'Integer'
|
|
93
|
+
}
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# List of attributes with nullable: true
|
|
97
|
+
def self.openapi_nullable
|
|
98
|
+
Set.new([
|
|
99
|
+
:'created_at',
|
|
100
|
+
:'updated_at',
|
|
101
|
+
:'claimed_clicks'
|
|
102
|
+
])
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Initializes the object
|
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
107
|
+
def initialize(attributes = {})
|
|
108
|
+
if (!attributes.is_a?(Hash))
|
|
109
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ReconciliationReport` initialize method"
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
113
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
114
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
115
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
116
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PlainRouter::OpenAPI::ReconciliationReport`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
117
|
+
end
|
|
118
|
+
h[k.to_sym] = v
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'id')
|
|
122
|
+
self.id = attributes[:'id']
|
|
123
|
+
else
|
|
124
|
+
self.id = nil
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'signal_tracker_id')
|
|
128
|
+
self.signal_tracker_id = attributes[:'signal_tracker_id']
|
|
129
|
+
else
|
|
130
|
+
self.signal_tracker_id = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'destination_id')
|
|
134
|
+
self.destination_id = attributes[:'destination_id']
|
|
135
|
+
else
|
|
136
|
+
self.destination_id = nil
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'report_date')
|
|
140
|
+
self.report_date = attributes[:'report_date']
|
|
141
|
+
else
|
|
142
|
+
self.report_date = nil
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'accepted_count')
|
|
146
|
+
self.accepted_count = attributes[:'accepted_count']
|
|
147
|
+
else
|
|
148
|
+
self.accepted_count = nil
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'meta_count')
|
|
152
|
+
self.meta_count = attributes[:'meta_count']
|
|
153
|
+
else
|
|
154
|
+
self.meta_count = nil
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'observed_gap')
|
|
158
|
+
self.observed_gap = attributes[:'observed_gap']
|
|
159
|
+
else
|
|
160
|
+
self.observed_gap = nil
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'event_counts')
|
|
164
|
+
if (value = attributes[:'event_counts']).is_a?(Array)
|
|
165
|
+
self.event_counts = value
|
|
166
|
+
end
|
|
167
|
+
else
|
|
168
|
+
self.event_counts = nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'buckets')
|
|
172
|
+
if (value = attributes[:'buckets']).is_a?(Array)
|
|
173
|
+
self.buckets = value
|
|
174
|
+
end
|
|
175
|
+
else
|
|
176
|
+
self.buckets = nil
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'unexplained_residual')
|
|
180
|
+
self.unexplained_residual = attributes[:'unexplained_residual']
|
|
181
|
+
else
|
|
182
|
+
self.unexplained_residual = nil
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
if attributes.key?(:'status')
|
|
186
|
+
self.status = attributes[:'status']
|
|
187
|
+
else
|
|
188
|
+
self.status = nil
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if attributes.key?(:'created_at')
|
|
192
|
+
self.created_at = attributes[:'created_at']
|
|
193
|
+
else
|
|
194
|
+
self.created_at = nil
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if attributes.key?(:'updated_at')
|
|
198
|
+
self.updated_at = attributes[:'updated_at']
|
|
199
|
+
else
|
|
200
|
+
self.updated_at = nil
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if attributes.key?(:'claimed_clicks')
|
|
204
|
+
self.claimed_clicks = attributes[:'claimed_clicks']
|
|
205
|
+
else
|
|
206
|
+
self.claimed_clicks = nil
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
211
|
+
# @return Array for valid properties with the reasons
|
|
212
|
+
def list_invalid_properties
|
|
213
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
214
|
+
invalid_properties = Array.new
|
|
215
|
+
if @id.nil?
|
|
216
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if @signal_tracker_id.nil?
|
|
220
|
+
invalid_properties.push('invalid value for "signal_tracker_id", signal_tracker_id cannot be nil.')
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if @destination_id.nil?
|
|
224
|
+
invalid_properties.push('invalid value for "destination_id", destination_id cannot be nil.')
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if @report_date.nil?
|
|
228
|
+
invalid_properties.push('invalid value for "report_date", report_date cannot be nil.')
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if @accepted_count.nil?
|
|
232
|
+
invalid_properties.push('invalid value for "accepted_count", accepted_count cannot be nil.')
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if @meta_count.nil?
|
|
236
|
+
invalid_properties.push('invalid value for "meta_count", meta_count cannot be nil.')
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if @observed_gap.nil?
|
|
240
|
+
invalid_properties.push('invalid value for "observed_gap", observed_gap cannot be nil.')
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if @event_counts.nil?
|
|
244
|
+
invalid_properties.push('invalid value for "event_counts", event_counts cannot be nil.')
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if @buckets.nil?
|
|
248
|
+
invalid_properties.push('invalid value for "buckets", buckets cannot be nil.')
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
if @unexplained_residual.nil?
|
|
252
|
+
invalid_properties.push('invalid value for "unexplained_residual", unexplained_residual cannot be nil.')
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if @status.nil?
|
|
256
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
invalid_properties
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Check to see if the all the properties in the model are valid
|
|
263
|
+
# @return true if the model is valid
|
|
264
|
+
def valid?
|
|
265
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
266
|
+
return false if @id.nil?
|
|
267
|
+
return false if @signal_tracker_id.nil?
|
|
268
|
+
return false if @destination_id.nil?
|
|
269
|
+
return false if @report_date.nil?
|
|
270
|
+
return false if @accepted_count.nil?
|
|
271
|
+
return false if @meta_count.nil?
|
|
272
|
+
return false if @observed_gap.nil?
|
|
273
|
+
return false if @event_counts.nil?
|
|
274
|
+
return false if @buckets.nil?
|
|
275
|
+
return false if @unexplained_residual.nil?
|
|
276
|
+
return false if @status.nil?
|
|
277
|
+
true
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Custom attribute writer method with validation
|
|
281
|
+
# @param [Object] id Value to be assigned
|
|
282
|
+
def id=(id)
|
|
283
|
+
if id.nil?
|
|
284
|
+
fail ArgumentError, 'id cannot be nil'
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
@id = id
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Custom attribute writer method with validation
|
|
291
|
+
# @param [Object] signal_tracker_id Value to be assigned
|
|
292
|
+
def signal_tracker_id=(signal_tracker_id)
|
|
293
|
+
if signal_tracker_id.nil?
|
|
294
|
+
fail ArgumentError, 'signal_tracker_id cannot be nil'
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
@signal_tracker_id = signal_tracker_id
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Custom attribute writer method with validation
|
|
301
|
+
# @param [Object] destination_id Value to be assigned
|
|
302
|
+
def destination_id=(destination_id)
|
|
303
|
+
if destination_id.nil?
|
|
304
|
+
fail ArgumentError, 'destination_id cannot be nil'
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
@destination_id = destination_id
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Custom attribute writer method with validation
|
|
311
|
+
# @param [Object] report_date Value to be assigned
|
|
312
|
+
def report_date=(report_date)
|
|
313
|
+
if report_date.nil?
|
|
314
|
+
fail ArgumentError, 'report_date cannot be nil'
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
@report_date = report_date
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# Custom attribute writer method with validation
|
|
321
|
+
# @param [Object] accepted_count Value to be assigned
|
|
322
|
+
def accepted_count=(accepted_count)
|
|
323
|
+
if accepted_count.nil?
|
|
324
|
+
fail ArgumentError, 'accepted_count cannot be nil'
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
@accepted_count = accepted_count
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Custom attribute writer method with validation
|
|
331
|
+
# @param [Object] meta_count Value to be assigned
|
|
332
|
+
def meta_count=(meta_count)
|
|
333
|
+
if meta_count.nil?
|
|
334
|
+
fail ArgumentError, 'meta_count cannot be nil'
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
@meta_count = meta_count
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# Custom attribute writer method with validation
|
|
341
|
+
# @param [Object] observed_gap Value to be assigned
|
|
342
|
+
def observed_gap=(observed_gap)
|
|
343
|
+
if observed_gap.nil?
|
|
344
|
+
fail ArgumentError, 'observed_gap cannot be nil'
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
@observed_gap = observed_gap
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Custom attribute writer method with validation
|
|
351
|
+
# @param [Object] event_counts Value to be assigned
|
|
352
|
+
def event_counts=(event_counts)
|
|
353
|
+
if event_counts.nil?
|
|
354
|
+
fail ArgumentError, 'event_counts cannot be nil'
|
|
355
|
+
end
|
|
356
|
+
|
|
357
|
+
@event_counts = event_counts
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Custom attribute writer method with validation
|
|
361
|
+
# @param [Object] buckets Value to be assigned
|
|
362
|
+
def buckets=(buckets)
|
|
363
|
+
if buckets.nil?
|
|
364
|
+
fail ArgumentError, 'buckets cannot be nil'
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
@buckets = buckets
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
# Custom attribute writer method with validation
|
|
371
|
+
# @param [Object] unexplained_residual Value to be assigned
|
|
372
|
+
def unexplained_residual=(unexplained_residual)
|
|
373
|
+
if unexplained_residual.nil?
|
|
374
|
+
fail ArgumentError, 'unexplained_residual cannot be nil'
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
@unexplained_residual = unexplained_residual
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
# Custom attribute writer method with validation
|
|
381
|
+
# @param [Object] status Value to be assigned
|
|
382
|
+
def status=(status)
|
|
383
|
+
if status.nil?
|
|
384
|
+
fail ArgumentError, 'status cannot be nil'
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
@status = status
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
# Checks equality by comparing each attribute.
|
|
391
|
+
# @param [Object] Object to be compared
|
|
392
|
+
def ==(o)
|
|
393
|
+
return true if self.equal?(o)
|
|
394
|
+
self.class == o.class &&
|
|
395
|
+
id == o.id &&
|
|
396
|
+
signal_tracker_id == o.signal_tracker_id &&
|
|
397
|
+
destination_id == o.destination_id &&
|
|
398
|
+
report_date == o.report_date &&
|
|
399
|
+
accepted_count == o.accepted_count &&
|
|
400
|
+
meta_count == o.meta_count &&
|
|
401
|
+
observed_gap == o.observed_gap &&
|
|
402
|
+
event_counts == o.event_counts &&
|
|
403
|
+
buckets == o.buckets &&
|
|
404
|
+
unexplained_residual == o.unexplained_residual &&
|
|
405
|
+
status == o.status &&
|
|
406
|
+
created_at == o.created_at &&
|
|
407
|
+
updated_at == o.updated_at &&
|
|
408
|
+
claimed_clicks == o.claimed_clicks
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# @see the `==` method
|
|
412
|
+
# @param [Object] Object to be compared
|
|
413
|
+
def eql?(o)
|
|
414
|
+
self == o
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
# Calculates hash code according to all attributes.
|
|
418
|
+
# @return [Integer] Hash code
|
|
419
|
+
def hash
|
|
420
|
+
[id, signal_tracker_id, destination_id, report_date, accepted_count, meta_count, observed_gap, event_counts, buckets, unexplained_residual, status, created_at, updated_at, claimed_clicks].hash
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
# Builds the object from hash
|
|
424
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
425
|
+
# @return [Object] Returns the model itself
|
|
426
|
+
def self.build_from_hash(attributes)
|
|
427
|
+
return nil unless attributes.is_a?(Hash)
|
|
428
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
429
|
+
transformed_hash = {}
|
|
430
|
+
openapi_types.each_pair do |key, type|
|
|
431
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
432
|
+
transformed_hash["#{key}"] = nil
|
|
433
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
434
|
+
# check to ensure the input is an array given that the attribute
|
|
435
|
+
# is documented as an array but the input is not
|
|
436
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
437
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
438
|
+
end
|
|
439
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
440
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
441
|
+
end
|
|
442
|
+
end
|
|
443
|
+
new(transformed_hash)
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
# Returns the object in the form of hash
|
|
447
|
+
# @return [Hash] Returns the object in the form of hash
|
|
448
|
+
def to_hash
|
|
449
|
+
hash = {}
|
|
450
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
451
|
+
value = self.send(attr)
|
|
452
|
+
if value.nil?
|
|
453
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
454
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
hash[param] = _to_hash(value)
|
|
458
|
+
end
|
|
459
|
+
hash
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
end
|