Class: PlainRouter::OpenAPI::ReconciliationReport
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- PlainRouter::OpenAPI::ReconciliationReport
- Defined in:
- lib/plainrouter/openapi/models/reconciliation_report.rb
Instance Attribute Summary collapse
-
#accepted_count ⇒ Object
Returns the value of attribute accepted_count.
-
#buckets ⇒ Object
Returns the value of attribute buckets.
-
#claimed_clicks ⇒ Object
Returns the value of attribute claimed_clicks.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#destination_id ⇒ Object
Returns the value of attribute destination_id.
-
#event_counts ⇒ Object
Returns the value of attribute event_counts.
-
#id ⇒ Object
Returns the value of attribute id.
-
#meta_count ⇒ Object
Returns the value of attribute meta_count.
-
#observed_gap ⇒ Object
Returns the value of attribute observed_gap.
-
#report_date ⇒ Object
Returns the value of attribute report_date.
-
#signal_tracker_id ⇒ Object
Returns the value of attribute signal_tracker_id.
-
#status ⇒ Object
Returns the value of attribute status.
-
#unexplained_residual ⇒ Object
Returns the value of attribute unexplained_residual.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ReconciliationReport
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ ReconciliationReport
Initializes the object
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 107 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `PlainRouter::OpenAPI::ReconciliationReport` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) 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 end h[k.to_sym] = v } if attributes.key?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'signal_tracker_id') self.signal_tracker_id = attributes[:'signal_tracker_id'] else self.signal_tracker_id = nil end if attributes.key?(:'destination_id') self.destination_id = attributes[:'destination_id'] else self.destination_id = nil end if attributes.key?(:'report_date') self.report_date = attributes[:'report_date'] else self.report_date = nil end if attributes.key?(:'accepted_count') self.accepted_count = attributes[:'accepted_count'] else self.accepted_count = nil end if attributes.key?(:'meta_count') self. = attributes[:'meta_count'] else self. = nil end if attributes.key?(:'observed_gap') self.observed_gap = attributes[:'observed_gap'] else self.observed_gap = nil end if attributes.key?(:'event_counts') if (value = attributes[:'event_counts']).is_a?(Array) self.event_counts = value end else self.event_counts = nil end if attributes.key?(:'buckets') if (value = attributes[:'buckets']).is_a?(Array) self.buckets = value end else self.buckets = nil end if attributes.key?(:'unexplained_residual') self.unexplained_residual = attributes[:'unexplained_residual'] else self.unexplained_residual = nil end if attributes.key?(:'status') self.status = attributes[:'status'] else self.status = nil end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] else self.created_at = nil end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] else self.updated_at = nil end if attributes.key?(:'claimed_clicks') self.claimed_clicks = attributes[:'claimed_clicks'] else self.claimed_clicks = nil end end |
Instance Attribute Details
#accepted_count ⇒ Object
Returns the value of attribute accepted_count.
26 27 28 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 26 def accepted_count @accepted_count end |
#buckets ⇒ Object
Returns the value of attribute buckets.
34 35 36 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 34 def buckets @buckets end |
#claimed_clicks ⇒ Object
Returns the value of attribute claimed_clicks.
44 45 46 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 44 def claimed_clicks @claimed_clicks end |
#created_at ⇒ Object
Returns the value of attribute created_at.
40 41 42 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 40 def created_at @created_at end |
#destination_id ⇒ Object
Returns the value of attribute destination_id.
22 23 24 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 22 def destination_id @destination_id end |
#event_counts ⇒ Object
Returns the value of attribute event_counts.
32 33 34 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 32 def event_counts @event_counts end |
#id ⇒ Object
Returns the value of attribute id.
18 19 20 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 18 def id @id end |
#meta_count ⇒ Object
Returns the value of attribute meta_count.
28 29 30 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 28 def @meta_count end |
#observed_gap ⇒ Object
Returns the value of attribute observed_gap.
30 31 32 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 30 def observed_gap @observed_gap end |
#report_date ⇒ Object
Returns the value of attribute report_date.
24 25 26 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 24 def report_date @report_date end |
#signal_tracker_id ⇒ Object
Returns the value of attribute signal_tracker_id.
20 21 22 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 20 def signal_tracker_id @signal_tracker_id end |
#status ⇒ Object
Returns the value of attribute status.
38 39 40 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 38 def status @status end |
#unexplained_residual ⇒ Object
Returns the value of attribute unexplained_residual.
36 37 38 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 36 def unexplained_residual @unexplained_residual end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
42 43 44 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 42 def updated_at @updated_at end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
67 68 69 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 67 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
72 73 74 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 72 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 47 def self.attribute_map { :'id' => :'id', :'signal_tracker_id' => :'signal_tracker_id', :'destination_id' => :'destination_id', :'report_date' => :'report_date', :'accepted_count' => :'accepted_count', :'meta_count' => :'meta_count', :'observed_gap' => :'observed_gap', :'event_counts' => :'event_counts', :'buckets' => :'buckets', :'unexplained_residual' => :'unexplained_residual', :'status' => :'status', :'created_at' => :'created_at', :'updated_at' => :'updated_at', :'claimed_clicks' => :'claimed_clicks' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 426 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
97 98 99 100 101 102 103 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 97 def self.openapi_nullable Set.new([ :'created_at', :'updated_at', :'claimed_clicks' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 77 def self.openapi_types { :'id' => :'Integer', :'signal_tracker_id' => :'String', :'destination_id' => :'String', :'report_date' => :'Time', :'accepted_count' => :'Integer', :'meta_count' => :'Integer', :'observed_gap' => :'Integer', :'event_counts' => :'Array<Object>', :'buckets' => :'Array<Object>', :'unexplained_residual' => :'Integer', :'status' => :'String', :'created_at' => :'Time', :'updated_at' => :'Time', :'claimed_clicks' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 392 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && signal_tracker_id == o.signal_tracker_id && destination_id == o.destination_id && report_date == o.report_date && accepted_count == o.accepted_count && == o. && observed_gap == o.observed_gap && event_counts == o.event_counts && buckets == o.buckets && unexplained_residual == o.unexplained_residual && status == o.status && created_at == o.created_at && updated_at == o.updated_at && claimed_clicks == o.claimed_clicks end |
#eql?(o) ⇒ Boolean
413 414 415 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 413 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
419 420 421 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 419 def hash [id, signal_tracker_id, destination_id, report_date, accepted_count, , observed_gap, event_counts, buckets, unexplained_residual, status, created_at, updated_at, claimed_clicks].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 212 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @signal_tracker_id.nil? invalid_properties.push('invalid value for "signal_tracker_id", signal_tracker_id cannot be nil.') end if @destination_id.nil? invalid_properties.push('invalid value for "destination_id", destination_id cannot be nil.') end if @report_date.nil? invalid_properties.push('invalid value for "report_date", report_date cannot be nil.') end if @accepted_count.nil? invalid_properties.push('invalid value for "accepted_count", accepted_count cannot be nil.') end if @meta_count.nil? invalid_properties.push('invalid value for "meta_count", meta_count cannot be nil.') end if @observed_gap.nil? invalid_properties.push('invalid value for "observed_gap", observed_gap cannot be nil.') end if @event_counts.nil? invalid_properties.push('invalid value for "event_counts", event_counts cannot be nil.') end if @buckets.nil? invalid_properties.push('invalid value for "buckets", buckets cannot be nil.') end if @unexplained_residual.nil? invalid_properties.push('invalid value for "unexplained_residual", unexplained_residual cannot be nil.') end if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 448 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/plainrouter/openapi/models/reconciliation_report.rb', line 264 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @id.nil? return false if @signal_tracker_id.nil? return false if @destination_id.nil? return false if @report_date.nil? return false if @accepted_count.nil? return false if @meta_count.nil? return false if @observed_gap.nil? return false if @event_counts.nil? return false if @buckets.nil? return false if @unexplained_residual.nil? return false if @status.nil? true end |