seatschart 0.1.0 → 0.2.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 +31 -3
- data/lib/seatschart/api/charts_api.rb +9 -9
- data/lib/seatschart/api/embed_api.rb +13 -2
- data/lib/seatschart/api/event_log_api.rb +2 -2
- data/lib/seatschart/api/events_api.rb +186 -20
- data/lib/seatschart/api/listings_api.rb +884 -0
- data/lib/seatschart/api/object_status_api.rb +2 -2
- data/lib/seatschart/api/seasons_api.rb +113 -8
- data/lib/seatschart/api/seats_api.rb +3 -22
- data/lib/seatschart/api/usage_api.rb +4 -4
- data/lib/seatschart/api/webhooks_api.rb +2 -2
- data/lib/seatschart/api/workspace_api.rb +4 -4
- data/lib/seatschart/models/api_error.rb +307 -0
- data/lib/seatschart/models/api_error_params_value.rb +105 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response.rb +17 -1
- data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency.rb +318 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency_api_keys_inner.rb +297 -0
- data/lib/seatschart/models/get_api_monitoring_requests200_response_points_inner.rb +21 -4
- data/lib/seatschart/models/get_api_workspace_settings200_response_effective.rb +20 -4
- data/lib/seatschart/models/get_api_workspace_settings200_response_overrides.rb +13 -4
- data/lib/seatschart/models/get_api_workspace_settings200_response_sources.rb +32 -4
- data/lib/seatschart/models/patch_api_events_by_event_id_listings_by_listing_id_request.rb +379 -0
- data/lib/seatschart/models/patch_api_listing_types_by_key_request.rb +376 -0
- data/lib/seatschart/models/patch_api_seasons_by_season_id_partial_seasons_by_partial_season_id_request.rb +268 -0
- data/lib/seatschart/models/patch_api_seasons_by_season_id_request.rb +27 -1
- data/lib/seatschart/models/patch_api_webhooks_by_id_request.rb +1 -1
- data/lib/seatschart/models/patch_api_workspace_settings_request.rb +12 -1
- data/lib/seatschart/models/post_api_charts_by_chart_id_actions_validate_request_seats_inner_accessibility.rb +6 -6
- data/lib/seatschart/models/post_api_events_actions_change_object_status_request_status_changes_inner.rb +0 -11
- data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request.rb +13 -26
- data/lib/seatschart/models/post_api_events_by_event_id_actions_change_object_status_request_listing.rb +392 -0
- data/lib/seatschart/models/post_api_events_by_event_id_actions_mark_everything_as_not_for_sale_request.rb +215 -0
- data/lib/seatschart/models/post_api_events_by_event_id_listings_by_listing_id_actions_mark_sold_request.rb +243 -0
- data/lib/seatschart/models/post_api_events_by_event_id_listings_request.rb +435 -0
- data/lib/seatschart/models/post_api_events_by_event_id_listings_request_objects_inner.rb +104 -0
- data/lib/seatschart/models/post_api_events_by_event_id_listings_request_objects_inner_any_of.rb +325 -0
- data/lib/seatschart/models/post_api_ga_confirm_request.rb +0 -44
- data/lib/seatschart/models/post_api_ga_release_request.rb +0 -11
- data/lib/seatschart/models/post_api_ga_reserve_request.rb +0 -33
- data/lib/seatschart/models/post_api_hold_tokens_request.rb +0 -22
- data/lib/seatschart/models/post_api_listing_types_request.rb +439 -0
- data/lib/seatschart/models/post_api_quotes_request.rb +0 -22
- data/lib/seatschart/models/post_api_seasons_by_season_id_partial_seasons_request.rb +27 -1
- data/lib/seatschart/models/post_api_seasons_request.rb +27 -1
- data/lib/seatschart/models/post_api_seats_best_available_request.rb +0 -11
- data/lib/seatschart/models/post_api_seats_confirm_request.rb +0 -44
- data/lib/seatschart/models/post_api_seats_release_request.rb +0 -11
- data/lib/seatschart/models/post_api_seats_reserve_request.rb +0 -22
- data/lib/seatschart/models/post_api_viewer_tokens_request.rb +0 -11
- data/lib/seatschart/models/post_api_webhooks_request.rb +1 -1
- data/lib/seatschart/models/put_api_charts_by_chart_id_map_draft_request.rb +348 -0
- data/lib/seatschart/version.rb +1 -1
- data/lib/seatschart.rb +16 -0
- metadata +17 -1
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SeatsChart API
|
|
3
|
+
|
|
4
|
+
#Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api-key` (partners) or `Authorization: Bearer` with an HS256 JWT.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.11.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SeatsChart
|
|
17
|
+
class GetApiMonitoringRequests200ResponseConcurrency
|
|
18
|
+
# Workspace requests in flight now on the API instance that answered (this request excluded).
|
|
19
|
+
attr_accessor :current
|
|
20
|
+
|
|
21
|
+
# Highest concurrent requests in any minute of the last hour.
|
|
22
|
+
attr_accessor :peak_last_hour
|
|
23
|
+
|
|
24
|
+
# Start of the minute (hour for the day) of the peak.
|
|
25
|
+
attr_accessor :peak_last_hour_at
|
|
26
|
+
|
|
27
|
+
# Highest concurrent requests in any hour of the last 24 hours.
|
|
28
|
+
attr_accessor :peak_last_day
|
|
29
|
+
|
|
30
|
+
# Start of the minute (hour for the day) of the peak.
|
|
31
|
+
attr_accessor :peak_last_day_at
|
|
32
|
+
|
|
33
|
+
# API instances that reported in-flight peaks in the last 24 hours (peaks are summed across them).
|
|
34
|
+
attr_accessor :instances
|
|
35
|
+
|
|
36
|
+
# Per API key, busiest first (keys without traffic in the last 24 hours are omitted).
|
|
37
|
+
attr_accessor :api_keys
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
:'current' => :'current',
|
|
43
|
+
:'peak_last_hour' => :'peakLastHour',
|
|
44
|
+
:'peak_last_hour_at' => :'peakLastHourAt',
|
|
45
|
+
:'peak_last_day' => :'peakLastDay',
|
|
46
|
+
:'peak_last_day_at' => :'peakLastDayAt',
|
|
47
|
+
:'instances' => :'instances',
|
|
48
|
+
:'api_keys' => :'apiKeys'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns all the JSON keys this model knows about
|
|
53
|
+
def self.acceptable_attributes
|
|
54
|
+
attribute_map.values
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute type mapping.
|
|
58
|
+
def self.openapi_types
|
|
59
|
+
{
|
|
60
|
+
:'current' => :'Integer',
|
|
61
|
+
:'peak_last_hour' => :'Integer',
|
|
62
|
+
:'peak_last_hour_at' => :'Time',
|
|
63
|
+
:'peak_last_day' => :'Integer',
|
|
64
|
+
:'peak_last_day_at' => :'Time',
|
|
65
|
+
:'instances' => :'Integer',
|
|
66
|
+
:'api_keys' => :'Array<GetApiMonitoringRequests200ResponseConcurrencyApiKeysInner>'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
:'peak_last_hour_at',
|
|
74
|
+
:'peak_last_day_at',
|
|
75
|
+
])
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Initializes the object
|
|
79
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
80
|
+
def initialize(attributes = {})
|
|
81
|
+
if (!attributes.is_a?(Hash))
|
|
82
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::GetApiMonitoringRequests200ResponseConcurrency` initialize method"
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::GetApiMonitoringRequests200ResponseConcurrency`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
89
|
+
end
|
|
90
|
+
h[k.to_sym] = v
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'current')
|
|
94
|
+
self.current = attributes[:'current']
|
|
95
|
+
else
|
|
96
|
+
self.current = nil
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'peak_last_hour')
|
|
100
|
+
self.peak_last_hour = attributes[:'peak_last_hour']
|
|
101
|
+
else
|
|
102
|
+
self.peak_last_hour = nil
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'peak_last_hour_at')
|
|
106
|
+
self.peak_last_hour_at = attributes[:'peak_last_hour_at']
|
|
107
|
+
else
|
|
108
|
+
self.peak_last_hour_at = nil
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'peak_last_day')
|
|
112
|
+
self.peak_last_day = attributes[:'peak_last_day']
|
|
113
|
+
else
|
|
114
|
+
self.peak_last_day = nil
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'peak_last_day_at')
|
|
118
|
+
self.peak_last_day_at = attributes[:'peak_last_day_at']
|
|
119
|
+
else
|
|
120
|
+
self.peak_last_day_at = nil
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'instances')
|
|
124
|
+
self.instances = attributes[:'instances']
|
|
125
|
+
else
|
|
126
|
+
self.instances = nil
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'api_keys')
|
|
130
|
+
if (value = attributes[:'api_keys']).is_a?(Array)
|
|
131
|
+
self.api_keys = value
|
|
132
|
+
end
|
|
133
|
+
else
|
|
134
|
+
self.api_keys = nil
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
139
|
+
# @return Array for valid properties with the reasons
|
|
140
|
+
def list_invalid_properties
|
|
141
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
142
|
+
invalid_properties = Array.new
|
|
143
|
+
if @current.nil?
|
|
144
|
+
invalid_properties.push('invalid value for "current", current cannot be nil.')
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if @peak_last_hour.nil?
|
|
148
|
+
invalid_properties.push('invalid value for "peak_last_hour", peak_last_hour cannot be nil.')
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if @peak_last_day.nil?
|
|
152
|
+
invalid_properties.push('invalid value for "peak_last_day", peak_last_day cannot be nil.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if @instances.nil?
|
|
156
|
+
invalid_properties.push('invalid value for "instances", instances cannot be nil.')
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if @api_keys.nil?
|
|
160
|
+
invalid_properties.push('invalid value for "api_keys", api_keys cannot be nil.')
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
invalid_properties
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Check to see if the all the properties in the model are valid
|
|
167
|
+
# @return true if the model is valid
|
|
168
|
+
def valid?
|
|
169
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
170
|
+
return false if @current.nil?
|
|
171
|
+
return false if @peak_last_hour.nil?
|
|
172
|
+
return false if @peak_last_day.nil?
|
|
173
|
+
return false if @instances.nil?
|
|
174
|
+
return false if @api_keys.nil?
|
|
175
|
+
true
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Checks equality by comparing each attribute.
|
|
179
|
+
# @param [Object] Object to be compared
|
|
180
|
+
def ==(o)
|
|
181
|
+
return true if self.equal?(o)
|
|
182
|
+
self.class == o.class &&
|
|
183
|
+
current == o.current &&
|
|
184
|
+
peak_last_hour == o.peak_last_hour &&
|
|
185
|
+
peak_last_hour_at == o.peak_last_hour_at &&
|
|
186
|
+
peak_last_day == o.peak_last_day &&
|
|
187
|
+
peak_last_day_at == o.peak_last_day_at &&
|
|
188
|
+
instances == o.instances &&
|
|
189
|
+
api_keys == o.api_keys
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# @see the `==` method
|
|
193
|
+
# @param [Object] Object to be compared
|
|
194
|
+
def eql?(o)
|
|
195
|
+
self == o
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Calculates hash code according to all attributes.
|
|
199
|
+
# @return [Integer] Hash code
|
|
200
|
+
def hash
|
|
201
|
+
[current, peak_last_hour, peak_last_hour_at, peak_last_day, peak_last_day_at, instances, api_keys].hash
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Builds the object from hash
|
|
205
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
206
|
+
# @return [Object] Returns the model itself
|
|
207
|
+
def self.build_from_hash(attributes)
|
|
208
|
+
return nil unless attributes.is_a?(Hash)
|
|
209
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
210
|
+
transformed_hash = {}
|
|
211
|
+
openapi_types.each_pair do |key, type|
|
|
212
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
213
|
+
transformed_hash["#{key}"] = nil
|
|
214
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
215
|
+
# check to ensure the input is an array given that the attribute
|
|
216
|
+
# is documented as an array but the input is not
|
|
217
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
218
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
219
|
+
end
|
|
220
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
221
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
new(transformed_hash)
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Deserializes the data based on type
|
|
228
|
+
# @param string type Data type
|
|
229
|
+
# @param string value Value to be deserialized
|
|
230
|
+
# @return [Object] Deserialized data
|
|
231
|
+
def self._deserialize(type, value)
|
|
232
|
+
case type.to_sym
|
|
233
|
+
when :Time
|
|
234
|
+
Time.parse(value)
|
|
235
|
+
when :Date
|
|
236
|
+
Date.parse(value)
|
|
237
|
+
when :String
|
|
238
|
+
value.to_s
|
|
239
|
+
when :Integer
|
|
240
|
+
value.to_i
|
|
241
|
+
when :Float
|
|
242
|
+
value.to_f
|
|
243
|
+
when :Boolean
|
|
244
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
245
|
+
true
|
|
246
|
+
else
|
|
247
|
+
false
|
|
248
|
+
end
|
|
249
|
+
when :Object
|
|
250
|
+
# generic object (usually a Hash), return directly
|
|
251
|
+
value
|
|
252
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
253
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
254
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
255
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
256
|
+
k_type = Regexp.last_match[:k_type]
|
|
257
|
+
v_type = Regexp.last_match[:v_type]
|
|
258
|
+
{}.tap do |hash|
|
|
259
|
+
value.each do |k, v|
|
|
260
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
else # model
|
|
264
|
+
# models (e.g. Pet) or oneOf
|
|
265
|
+
klass = SeatsChart.const_get(type)
|
|
266
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Returns the string representation of the object
|
|
271
|
+
# @return [String] String presentation of the object
|
|
272
|
+
def to_s
|
|
273
|
+
to_hash.to_s
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
277
|
+
# @return [Hash] Returns the object in the form of hash
|
|
278
|
+
def to_body
|
|
279
|
+
to_hash
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Returns the object in the form of hash
|
|
283
|
+
# @return [Hash] Returns the object in the form of hash
|
|
284
|
+
def to_hash
|
|
285
|
+
hash = {}
|
|
286
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
287
|
+
value = self.send(attr)
|
|
288
|
+
if value.nil?
|
|
289
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
290
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
hash[param] = _to_hash(value)
|
|
294
|
+
end
|
|
295
|
+
hash
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Outputs non-array value in the form of hash
|
|
299
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
300
|
+
# @param [Object] value Any valid value
|
|
301
|
+
# @return [Hash] Returns the value in the form of hash
|
|
302
|
+
def _to_hash(value)
|
|
303
|
+
if value.is_a?(Array)
|
|
304
|
+
value.compact.map { |v| _to_hash(v) }
|
|
305
|
+
elsif value.is_a?(Hash)
|
|
306
|
+
{}.tap do |hash|
|
|
307
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
308
|
+
end
|
|
309
|
+
elsif value.respond_to? :to_hash
|
|
310
|
+
value.to_hash
|
|
311
|
+
else
|
|
312
|
+
value
|
|
313
|
+
end
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
end
|
data/lib/seatschart/models/get_api_monitoring_requests200_response_concurrency_api_keys_inner.rb
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SeatsChart API
|
|
3
|
+
|
|
4
|
+
#Seat inventory and locking API for B2B2C integrations. Authenticate using `x-api-key` (partners) or `Authorization: Bearer` with an HS256 JWT.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.11.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SeatsChart
|
|
17
|
+
class GetApiMonitoringRequests200ResponseConcurrencyApiKeysInner
|
|
18
|
+
# API key id.
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Key name (null when the key was deleted).
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# Non-secret key prefix.
|
|
25
|
+
attr_accessor :prefix
|
|
26
|
+
|
|
27
|
+
# Requests of this key in flight now on the API instance that answered.
|
|
28
|
+
attr_accessor :current
|
|
29
|
+
|
|
30
|
+
attr_accessor :peak_last_hour
|
|
31
|
+
|
|
32
|
+
attr_accessor :peak_last_day
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'id' => :'id',
|
|
38
|
+
:'name' => :'name',
|
|
39
|
+
:'prefix' => :'prefix',
|
|
40
|
+
:'current' => :'current',
|
|
41
|
+
:'peak_last_hour' => :'peakLastHour',
|
|
42
|
+
:'peak_last_day' => :'peakLastDay'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns all the JSON keys this model knows about
|
|
47
|
+
def self.acceptable_attributes
|
|
48
|
+
attribute_map.values
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Attribute type mapping.
|
|
52
|
+
def self.openapi_types
|
|
53
|
+
{
|
|
54
|
+
:'id' => :'String',
|
|
55
|
+
:'name' => :'String',
|
|
56
|
+
:'prefix' => :'String',
|
|
57
|
+
:'current' => :'Integer',
|
|
58
|
+
:'peak_last_hour' => :'Integer',
|
|
59
|
+
:'peak_last_day' => :'Integer'
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# List of attributes with nullable: true
|
|
64
|
+
def self.openapi_nullable
|
|
65
|
+
Set.new([
|
|
66
|
+
:'name',
|
|
67
|
+
:'prefix',
|
|
68
|
+
])
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Initializes the object
|
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SeatsChart::GetApiMonitoringRequests200ResponseConcurrencyApiKeysInner` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SeatsChart::GetApiMonitoringRequests200ResponseConcurrencyApiKeysInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
82
|
+
end
|
|
83
|
+
h[k.to_sym] = v
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'id')
|
|
87
|
+
self.id = attributes[:'id']
|
|
88
|
+
else
|
|
89
|
+
self.id = nil
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'name')
|
|
93
|
+
self.name = attributes[:'name']
|
|
94
|
+
else
|
|
95
|
+
self.name = nil
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'prefix')
|
|
99
|
+
self.prefix = attributes[:'prefix']
|
|
100
|
+
else
|
|
101
|
+
self.prefix = nil
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'current')
|
|
105
|
+
self.current = attributes[:'current']
|
|
106
|
+
else
|
|
107
|
+
self.current = nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'peak_last_hour')
|
|
111
|
+
self.peak_last_hour = attributes[:'peak_last_hour']
|
|
112
|
+
else
|
|
113
|
+
self.peak_last_hour = nil
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'peak_last_day')
|
|
117
|
+
self.peak_last_day = attributes[:'peak_last_day']
|
|
118
|
+
else
|
|
119
|
+
self.peak_last_day = nil
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
124
|
+
# @return Array for valid properties with the reasons
|
|
125
|
+
def list_invalid_properties
|
|
126
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
127
|
+
invalid_properties = Array.new
|
|
128
|
+
if @id.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if @current.nil?
|
|
133
|
+
invalid_properties.push('invalid value for "current", current cannot be nil.')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if @peak_last_hour.nil?
|
|
137
|
+
invalid_properties.push('invalid value for "peak_last_hour", peak_last_hour cannot be nil.')
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if @peak_last_day.nil?
|
|
141
|
+
invalid_properties.push('invalid value for "peak_last_day", peak_last_day cannot be nil.')
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
invalid_properties
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Check to see if the all the properties in the model are valid
|
|
148
|
+
# @return true if the model is valid
|
|
149
|
+
def valid?
|
|
150
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
151
|
+
return false if @id.nil?
|
|
152
|
+
return false if @current.nil?
|
|
153
|
+
return false if @peak_last_hour.nil?
|
|
154
|
+
return false if @peak_last_day.nil?
|
|
155
|
+
true
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Checks equality by comparing each attribute.
|
|
159
|
+
# @param [Object] Object to be compared
|
|
160
|
+
def ==(o)
|
|
161
|
+
return true if self.equal?(o)
|
|
162
|
+
self.class == o.class &&
|
|
163
|
+
id == o.id &&
|
|
164
|
+
name == o.name &&
|
|
165
|
+
prefix == o.prefix &&
|
|
166
|
+
current == o.current &&
|
|
167
|
+
peak_last_hour == o.peak_last_hour &&
|
|
168
|
+
peak_last_day == o.peak_last_day
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# @see the `==` method
|
|
172
|
+
# @param [Object] Object to be compared
|
|
173
|
+
def eql?(o)
|
|
174
|
+
self == o
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Calculates hash code according to all attributes.
|
|
178
|
+
# @return [Integer] Hash code
|
|
179
|
+
def hash
|
|
180
|
+
[id, name, prefix, current, peak_last_hour, peak_last_day].hash
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Builds the object from hash
|
|
184
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
185
|
+
# @return [Object] Returns the model itself
|
|
186
|
+
def self.build_from_hash(attributes)
|
|
187
|
+
return nil unless attributes.is_a?(Hash)
|
|
188
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
189
|
+
transformed_hash = {}
|
|
190
|
+
openapi_types.each_pair do |key, type|
|
|
191
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
192
|
+
transformed_hash["#{key}"] = nil
|
|
193
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
194
|
+
# check to ensure the input is an array given that the attribute
|
|
195
|
+
# is documented as an array but the input is not
|
|
196
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
197
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
198
|
+
end
|
|
199
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
200
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
new(transformed_hash)
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Deserializes the data based on type
|
|
207
|
+
# @param string type Data type
|
|
208
|
+
# @param string value Value to be deserialized
|
|
209
|
+
# @return [Object] Deserialized data
|
|
210
|
+
def self._deserialize(type, value)
|
|
211
|
+
case type.to_sym
|
|
212
|
+
when :Time
|
|
213
|
+
Time.parse(value)
|
|
214
|
+
when :Date
|
|
215
|
+
Date.parse(value)
|
|
216
|
+
when :String
|
|
217
|
+
value.to_s
|
|
218
|
+
when :Integer
|
|
219
|
+
value.to_i
|
|
220
|
+
when :Float
|
|
221
|
+
value.to_f
|
|
222
|
+
when :Boolean
|
|
223
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
224
|
+
true
|
|
225
|
+
else
|
|
226
|
+
false
|
|
227
|
+
end
|
|
228
|
+
when :Object
|
|
229
|
+
# generic object (usually a Hash), return directly
|
|
230
|
+
value
|
|
231
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
232
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
233
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
234
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
235
|
+
k_type = Regexp.last_match[:k_type]
|
|
236
|
+
v_type = Regexp.last_match[:v_type]
|
|
237
|
+
{}.tap do |hash|
|
|
238
|
+
value.each do |k, v|
|
|
239
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
else # model
|
|
243
|
+
# models (e.g. Pet) or oneOf
|
|
244
|
+
klass = SeatsChart.const_get(type)
|
|
245
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Returns the string representation of the object
|
|
250
|
+
# @return [String] String presentation of the object
|
|
251
|
+
def to_s
|
|
252
|
+
to_hash.to_s
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
256
|
+
# @return [Hash] Returns the object in the form of hash
|
|
257
|
+
def to_body
|
|
258
|
+
to_hash
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Returns the object in the form of hash
|
|
262
|
+
# @return [Hash] Returns the object in the form of hash
|
|
263
|
+
def to_hash
|
|
264
|
+
hash = {}
|
|
265
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
266
|
+
value = self.send(attr)
|
|
267
|
+
if value.nil?
|
|
268
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
269
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
hash[param] = _to_hash(value)
|
|
273
|
+
end
|
|
274
|
+
hash
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Outputs non-array value in the form of hash
|
|
278
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
279
|
+
# @param [Object] value Any valid value
|
|
280
|
+
# @return [Hash] Returns the value in the form of hash
|
|
281
|
+
def _to_hash(value)
|
|
282
|
+
if value.is_a?(Array)
|
|
283
|
+
value.compact.map { |v| _to_hash(v) }
|
|
284
|
+
elsif value.is_a?(Hash)
|
|
285
|
+
{}.tap do |hash|
|
|
286
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
287
|
+
end
|
|
288
|
+
elsif value.respond_to? :to_hash
|
|
289
|
+
value.to_hash
|
|
290
|
+
else
|
|
291
|
+
value
|
|
292
|
+
end
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
end
|
|
@@ -26,6 +26,9 @@ module SeatsChart
|
|
|
26
26
|
|
|
27
27
|
attr_accessor :api_rejected
|
|
28
28
|
|
|
29
|
+
# Peak in-flight (concurrent) requests in the bucket.
|
|
30
|
+
attr_accessor :concurrent
|
|
31
|
+
|
|
29
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
33
|
def self.attribute_map
|
|
31
34
|
{
|
|
@@ -33,7 +36,8 @@ module SeatsChart
|
|
|
33
36
|
:'sales' => :'sales',
|
|
34
37
|
:'api' => :'api',
|
|
35
38
|
:'sales_rejected' => :'salesRejected',
|
|
36
|
-
:'api_rejected' => :'apiRejected'
|
|
39
|
+
:'api_rejected' => :'apiRejected',
|
|
40
|
+
:'concurrent' => :'concurrent'
|
|
37
41
|
}
|
|
38
42
|
end
|
|
39
43
|
|
|
@@ -49,7 +53,8 @@ module SeatsChart
|
|
|
49
53
|
:'sales' => :'Integer',
|
|
50
54
|
:'api' => :'Integer',
|
|
51
55
|
:'sales_rejected' => :'Integer',
|
|
52
|
-
:'api_rejected' => :'Integer'
|
|
56
|
+
:'api_rejected' => :'Integer',
|
|
57
|
+
:'concurrent' => :'Integer'
|
|
53
58
|
}
|
|
54
59
|
end
|
|
55
60
|
|
|
@@ -103,6 +108,12 @@ module SeatsChart
|
|
|
103
108
|
else
|
|
104
109
|
self.api_rejected = nil
|
|
105
110
|
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'concurrent')
|
|
113
|
+
self.concurrent = attributes[:'concurrent']
|
|
114
|
+
else
|
|
115
|
+
self.concurrent = nil
|
|
116
|
+
end
|
|
106
117
|
end
|
|
107
118
|
|
|
108
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -130,6 +141,10 @@ module SeatsChart
|
|
|
130
141
|
invalid_properties.push('invalid value for "api_rejected", api_rejected cannot be nil.')
|
|
131
142
|
end
|
|
132
143
|
|
|
144
|
+
if @concurrent.nil?
|
|
145
|
+
invalid_properties.push('invalid value for "concurrent", concurrent cannot be nil.')
|
|
146
|
+
end
|
|
147
|
+
|
|
133
148
|
invalid_properties
|
|
134
149
|
end
|
|
135
150
|
|
|
@@ -142,6 +157,7 @@ module SeatsChart
|
|
|
142
157
|
return false if @api.nil?
|
|
143
158
|
return false if @sales_rejected.nil?
|
|
144
159
|
return false if @api_rejected.nil?
|
|
160
|
+
return false if @concurrent.nil?
|
|
145
161
|
true
|
|
146
162
|
end
|
|
147
163
|
|
|
@@ -154,7 +170,8 @@ module SeatsChart
|
|
|
154
170
|
sales == o.sales &&
|
|
155
171
|
api == o.api &&
|
|
156
172
|
sales_rejected == o.sales_rejected &&
|
|
157
|
-
api_rejected == o.api_rejected
|
|
173
|
+
api_rejected == o.api_rejected &&
|
|
174
|
+
concurrent == o.concurrent
|
|
158
175
|
end
|
|
159
176
|
|
|
160
177
|
# @see the `==` method
|
|
@@ -166,7 +183,7 @@ module SeatsChart
|
|
|
166
183
|
# Calculates hash code according to all attributes.
|
|
167
184
|
# @return [Integer] Hash code
|
|
168
185
|
def hash
|
|
169
|
-
[t, sales, api, sales_rejected, api_rejected].hash
|
|
186
|
+
[t, sales, api, sales_rejected, api_rejected, concurrent].hash
|
|
170
187
|
end
|
|
171
188
|
|
|
172
189
|
# Builds the object from hash
|