shipeasy-sdk 4.3.0 → 4.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4048cbb60393a08726c1b62c903c17a41202bf56a638e8f2a3879ec0e5f99d5
4
- data.tar.gz: cd03413c978bbc181a0d9cb0e530dc7ae3d5d7c35a7a78d06f13c394bdb82903
3
+ metadata.gz: b98a99a1e3d9f59d4c5e47a5915c7357d7f98c45b034e6ba6c93f1d501d899c4
4
+ data.tar.gz: 48f3bdc676beabcae9428d48c538ba98f04869eb677c068a41fefb3e108af688
5
5
  SHA512:
6
- metadata.gz: b0dc43d2fe844e38715bc5739d12bd945a80d6db93f7455878756f9891c830b02b4e91208b62212b30dcb24637e6d19f6c0139b2138dbf2e39cec43de237af27
7
- data.tar.gz: 7e5b21c377323694d1aa355b245239872c09a0b7c3d914588a0d92f4bf30b7ce9edcc497d33562cbf28ff5e00aa952a6e3fdae71ee3639038f92f98a9c84b129
6
+ metadata.gz: 14f28bc1276df857afca8cd9fbe44b10b6c0204aaac7d469dba8085f2c6346adc8a65ae069044fbc203585414b425c144d5d99c8f60807a085efab4f8fe97319
7
+ data.tar.gz: 889ddf65608b90921a57dc880b23ec58b97ba70dd870ad7decca1fe5f024b364136863542029d15895af2b83ce5bbf899e55e1fba253c9d11a862a165f885ffc
@@ -1,5 +1,5 @@
1
1
  module Shipeasy
2
2
  module SDK
3
- VERSION = "4.3.0"
3
+ VERSION = "4.4.0"
4
4
  end
5
5
  end
@@ -58,6 +58,9 @@ module Shipeasy::Admin::Generated
58
58
  # Arbitrary capture context, or `null`.
59
59
  attr_accessor :context
60
60
 
61
+ # The reporter's SDK identity — the same user attribute object your app passes to the Shipeasy SDK to evaluate flags (`user_id`, `anonymous_id`, `email`, plus any targeting attributes). When present, Shipeasy evaluates every feature flag, kill switch and running experiment for this user at filing time and stores the result on the ticket as `context.reporter`, so triage (and any agent working the ticket) sees exactly which features the reporter had on. The browser and React Native devtools attach the identified user automatically. Omit it (or send `null`) to file without a feature snapshot.
62
+ attr_accessor :user
63
+
61
64
  # Caller-chosen dedupe identity for this report, stored on the ticket. A repeat submission carrying the same key does NOT file a second ticket: the open ticket already holding that key is refreshed from this payload (title and the report fields overwritten, a \"re-triggered\" comment appended) and returned with `deduped: true` and `updated: true`. Triage state a human owns — status, priority, assignee, tags — is left untouched, and a `resolved`/`wont_fix` ticket no longer holds the key, so a failure that comes back after being closed files a fresh ticket. Omit it to fall back to the derived (title + `context.step`) dedupe, whose repeats return the existing ticket unchanged.
62
65
  attr_accessor :dedup_key
63
66
 
@@ -103,6 +106,7 @@ module Shipeasy::Admin::Generated
103
106
  :'user_agent' => :'userAgent',
104
107
  :'viewport' => :'viewport',
105
108
  :'context' => :'context',
109
+ :'user' => :'user',
106
110
  :'dedup_key' => :'dedupKey',
107
111
  :'notify' => :'notify'
108
112
  }
@@ -135,6 +139,7 @@ module Shipeasy::Admin::Generated
135
139
  :'user_agent' => :'String',
136
140
  :'viewport' => :'String',
137
141
  :'context' => :'Hash<String, Object>',
142
+ :'user' => :'Hash<String, Object>',
138
143
  :'dedup_key' => :'String',
139
144
  :'notify' => :'NotificationTarget'
140
145
  }
@@ -150,6 +155,7 @@ module Shipeasy::Admin::Generated
150
155
  :'user_agent',
151
156
  :'viewport',
152
157
  :'context',
158
+ :'user',
153
159
  :'notify'
154
160
  ])
155
161
  end
@@ -240,6 +246,12 @@ module Shipeasy::Admin::Generated
240
246
  end
241
247
  end
242
248
 
249
+ if attributes.key?(:'user')
250
+ if (value = attributes[:'user']).is_a?(Hash)
251
+ self.user = value
252
+ end
253
+ end
254
+
243
255
  if attributes.key?(:'dedup_key')
244
256
  self.dedup_key = attributes[:'dedup_key']
245
257
  end
@@ -295,6 +307,10 @@ module Shipeasy::Admin::Generated
295
307
  invalid_properties.push('invalid value for "viewport", the character length must be smaller than or equal to 40.')
296
308
  end
297
309
 
310
+ if !@user.nil? && @user.length > 50
311
+ invalid_properties.push('invalid value for "user", number of items must be less than or equal to 50.')
312
+ end
313
+
298
314
  if !@dedup_key.nil? && @dedup_key.to_s.length > 200
299
315
  invalid_properties.push('invalid value for "dedup_key", the character length must be smaller than or equal to 200.')
300
316
  end
@@ -316,6 +332,7 @@ module Shipeasy::Admin::Generated
316
332
  return false if !@tags.nil? && @tags.length > 50
317
333
  return false if !@user_agent.nil? && @user_agent.to_s.length > 500
318
334
  return false if !@viewport.nil? && @viewport.to_s.length > 40
335
+ return false if !@user.nil? && @user.length > 50
319
336
  return false if !@dedup_key.nil? && @dedup_key.to_s.length > 200
320
337
  true
321
338
  end
@@ -419,6 +436,16 @@ module Shipeasy::Admin::Generated
419
436
  @viewport = viewport
420
437
  end
421
438
 
439
+ # Custom attribute writer method with validation
440
+ # @param [Object] user Value to be assigned
441
+ def user=(user)
442
+ if !user.nil? && user.length > 50
443
+ fail ArgumentError, 'invalid value for "user", number of items must be less than or equal to 50.'
444
+ end
445
+
446
+ @user = user
447
+ end
448
+
422
449
  # Custom attribute writer method with validation
423
450
  # @param [Object] dedup_key Value to be assigned
424
451
  def dedup_key=(dedup_key)
@@ -452,6 +479,7 @@ module Shipeasy::Admin::Generated
452
479
  user_agent == o.user_agent &&
453
480
  viewport == o.viewport &&
454
481
  context == o.context &&
482
+ user == o.user &&
455
483
  dedup_key == o.dedup_key &&
456
484
  notify == o.notify
457
485
  end
@@ -465,7 +493,7 @@ module Shipeasy::Admin::Generated
465
493
  # Calculates hash code according to all attributes.
466
494
  # @return [Integer] Hash code
467
495
  def hash
468
- [title, steps_to_reproduce, actual_result, expected_result, priority, status, assignee_id, subscribers, tags, reporter_email, page_url, user_agent, viewport, context, dedup_key, notify].hash
496
+ [title, steps_to_reproduce, actual_result, expected_result, priority, status, assignee_id, subscribers, tags, reporter_email, page_url, user_agent, viewport, context, user, dedup_key, notify].hash
469
497
  end
470
498
 
471
499
  # Builds the object from hash
@@ -52,6 +52,9 @@ module Shipeasy::Admin::Generated
52
52
  # Arbitrary capture context, or `null`.
53
53
  attr_accessor :context
54
54
 
55
+ # The reporter's SDK identity — the same user attribute object your app passes to the Shipeasy SDK to evaluate flags (`user_id`, `anonymous_id`, `email`, plus any targeting attributes). When present, Shipeasy evaluates every feature flag, kill switch and running experiment for this user at filing time and stores the result on the ticket as `context.reporter`, so triage (and any agent working the ticket) sees exactly which features the reporter had on. The browser and React Native devtools attach the identified user automatically. Omit it (or send `null`) to file without a feature snapshot.
56
+ attr_accessor :user
57
+
55
58
  # Caller-chosen dedupe identity for this request, stored on the ticket. Behaves exactly as on `POST /ops/bug`: a repeat carrying the same key refreshes the open ticket already holding it (fields overwritten, a \"re-triggered\" comment appended) and returns `deduped: true` with `updated: true`, instead of filing a second one.
56
59
  attr_accessor :dedup_key
57
60
 
@@ -95,6 +98,7 @@ module Shipeasy::Admin::Generated
95
98
  :'page_url' => :'pageUrl',
96
99
  :'user_agent' => :'userAgent',
97
100
  :'context' => :'context',
101
+ :'user' => :'user',
98
102
  :'dedup_key' => :'dedupKey',
99
103
  :'notify' => :'notify'
100
104
  }
@@ -125,6 +129,7 @@ module Shipeasy::Admin::Generated
125
129
  :'page_url' => :'String',
126
130
  :'user_agent' => :'String',
127
131
  :'context' => :'Hash<String, Object>',
132
+ :'user' => :'Hash<String, Object>',
128
133
  :'dedup_key' => :'String',
129
134
  :'notify' => :'NotificationTarget'
130
135
  }
@@ -139,6 +144,7 @@ module Shipeasy::Admin::Generated
139
144
  :'page_url',
140
145
  :'user_agent',
141
146
  :'context',
147
+ :'user',
142
148
  :'notify'
143
149
  ])
144
150
  end
@@ -219,6 +225,12 @@ module Shipeasy::Admin::Generated
219
225
  end
220
226
  end
221
227
 
228
+ if attributes.key?(:'user')
229
+ if (value = attributes[:'user']).is_a?(Hash)
230
+ self.user = value
231
+ end
232
+ end
233
+
222
234
  if attributes.key?(:'dedup_key')
223
235
  self.dedup_key = attributes[:'dedup_key']
224
236
  end
@@ -266,6 +278,10 @@ module Shipeasy::Admin::Generated
266
278
  invalid_properties.push('invalid value for "user_agent", the character length must be smaller than or equal to 500.')
267
279
  end
268
280
 
281
+ if !@user.nil? && @user.length > 50
282
+ invalid_properties.push('invalid value for "user", number of items must be less than or equal to 50.')
283
+ end
284
+
269
285
  if !@dedup_key.nil? && @dedup_key.to_s.length > 200
270
286
  invalid_properties.push('invalid value for "dedup_key", the character length must be smaller than or equal to 200.')
271
287
  end
@@ -285,6 +301,7 @@ module Shipeasy::Admin::Generated
285
301
  return false if !@use_case.nil? && @use_case.to_s.length > 8000
286
302
  return false if !@tags.nil? && @tags.length > 50
287
303
  return false if !@user_agent.nil? && @user_agent.to_s.length > 500
304
+ return false if !@user.nil? && @user.length > 50
288
305
  return false if !@dedup_key.nil? && @dedup_key.to_s.length > 200
289
306
  true
290
307
  end
@@ -364,6 +381,16 @@ module Shipeasy::Admin::Generated
364
381
  @user_agent = user_agent
365
382
  end
366
383
 
384
+ # Custom attribute writer method with validation
385
+ # @param [Object] user Value to be assigned
386
+ def user=(user)
387
+ if !user.nil? && user.length > 50
388
+ fail ArgumentError, 'invalid value for "user", number of items must be less than or equal to 50.'
389
+ end
390
+
391
+ @user = user
392
+ end
393
+
367
394
  # Custom attribute writer method with validation
368
395
  # @param [Object] dedup_key Value to be assigned
369
396
  def dedup_key=(dedup_key)
@@ -395,6 +422,7 @@ module Shipeasy::Admin::Generated
395
422
  page_url == o.page_url &&
396
423
  user_agent == o.user_agent &&
397
424
  context == o.context &&
425
+ user == o.user &&
398
426
  dedup_key == o.dedup_key &&
399
427
  notify == o.notify
400
428
  end
@@ -408,7 +436,7 @@ module Shipeasy::Admin::Generated
408
436
  # Calculates hash code according to all attributes.
409
437
  # @return [Integer] Hash code
410
438
  def hash
411
- [title, description, use_case, priority, status, assignee_id, subscribers, tags, reporter_email, page_url, user_agent, context, dedup_key, notify].hash
439
+ [title, description, use_case, priority, status, assignee_id, subscribers, tags, reporter_email, page_url, user_agent, context, user, dedup_key, notify].hash
412
440
  end
413
441
 
414
442
  # Builds the object from hash
@@ -24,6 +24,8 @@ module Shipeasy::Admin::Generated
24
24
 
25
25
  attr_accessor :measure_plan
26
26
 
27
+ attr_accessor :reporter
28
+
27
29
  attr_accessor :error_chart
28
30
 
29
31
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -33,6 +35,7 @@ module Shipeasy::Admin::Generated
33
35
  :'error' => :'error',
34
36
  :'alert' => :'alert',
35
37
  :'measure_plan' => :'measurePlan',
38
+ :'reporter' => :'reporter',
36
39
  :'error_chart' => :'errorChart'
37
40
  }
38
41
  end
@@ -54,6 +57,7 @@ module Shipeasy::Admin::Generated
54
57
  :'error' => :'OpsErrorContext',
55
58
  :'alert' => :'OpsAlertContext',
56
59
  :'measure_plan' => :'OpsMeasurePlanContext',
60
+ :'reporter' => :'OpsReporterContext',
57
61
  :'error_chart' => :'OpsItemContextErrorChart'
58
62
  }
59
63
  end
@@ -96,6 +100,10 @@ module Shipeasy::Admin::Generated
96
100
  self.measure_plan = attributes[:'measure_plan']
97
101
  end
98
102
 
103
+ if attributes.key?(:'reporter')
104
+ self.reporter = attributes[:'reporter']
105
+ end
106
+
99
107
  if attributes.key?(:'error_chart')
100
108
  self.error_chart = attributes[:'error_chart']
101
109
  end
@@ -125,6 +133,7 @@ module Shipeasy::Admin::Generated
125
133
  error == o.error &&
126
134
  alert == o.alert &&
127
135
  measure_plan == o.measure_plan &&
136
+ reporter == o.reporter &&
128
137
  error_chart == o.error_chart
129
138
  end
130
139
 
@@ -137,7 +146,7 @@ module Shipeasy::Admin::Generated
137
146
  # Calculates hash code according to all attributes.
138
147
  # @return [Integer] Hash code
139
148
  def hash
140
- [browser, error, alert, measure_plan, error_chart].hash
149
+ [browser, error, alert, measure_plan, reporter, error_chart].hash
141
150
  end
142
151
 
143
152
  # Builds the object from hash
@@ -0,0 +1,328 @@
1
+ =begin
2
+ #Shipeasy Admin API (server-SDK surface)
3
+
4
+ #The slice of the Shipeasy admin API that the published server SDKs expose as their optional `AdminClient`. Authenticate with an admin SDK key (`Authorization: Bearer sdk_admin_…`) and scope every request to a project via the `X-Project-Id` header. Four capabilities, nothing else: - **List the ops queue** — read the project's tickets, filtered by type, status, priority, owner, reporter (`reporter`) and close time (`closedSince`). - **File a public ticket** — a bug or a feature request onto the project's ops queue. - **Toggle a kill switch** — flip the switch itself, or one of its named sub-switches, on one environment. - **Manage a flag's whitelist** — read, replace, add to, or remove from the allowlist that admits specific identities ahead of every targeting rule. Everything else in the admin API is reachable through the Shipeasy CLI and MCP server, which speak the complete contract (`openapi.yaml`).
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Shipeasy::Admin::Generated
17
+ # Who filed a public bug/feature request and what they had on. Present only when the report carried the reporter's SDK identity (`user`): Shipeasy evaluates every flag, kill switch and running experiment for that user at filing time — the same evaluation the SDK runs, without per-browser devtools overrides — and keeps the result here. It is a point-in-time snapshot: a flag flipped since then is not reflected.
18
+ class OpsReporterContext < ApiModelBase
19
+ # A reporter's SDK user attributes, keyed by attribute name — the same map your app passes to the SDK to evaluate flags. At most 50 attributes; each value is a string (≤500 chars), number, boolean, `null` (treated as unset) or a flat array of those scalars (≤50 entries) — anything else is rejected with a 400. `user_id` or `anonymous_id` is the bucketing unit.
20
+ attr_accessor :user
21
+
22
+ # The environment the snapshot was evaluated against — the filing client key's environment.
23
+ attr_accessor :env
24
+
25
+ # When the snapshot was taken (the moment the report was filed, or last re-triggered).
26
+ attr_accessor :evaluated_at
27
+
28
+ # Feature flags that evaluated ON for the reporter.
29
+ attr_accessor :flags
30
+
31
+ # Kill switches that were engaged when the report was filed.
32
+ attr_accessor :killswitches
33
+
34
+ # Running experiments the reporter was enrolled in, with their assigned group.
35
+ attr_accessor :experiments
36
+
37
+ # `true` when a list hit its 200-entry cap and was cut short.
38
+ attr_accessor :truncated
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'user' => :'user',
44
+ :'env' => :'env',
45
+ :'evaluated_at' => :'evaluatedAt',
46
+ :'flags' => :'flags',
47
+ :'killswitches' => :'killswitches',
48
+ :'experiments' => :'experiments',
49
+ :'truncated' => :'truncated'
50
+ }
51
+ end
52
+
53
+ # Returns attribute mapping this model knows about
54
+ def self.acceptable_attribute_map
55
+ attribute_map
56
+ end
57
+
58
+ # Returns all the JSON keys this model knows about
59
+ def self.acceptable_attributes
60
+ acceptable_attribute_map.values
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.openapi_types
65
+ {
66
+ :'user' => :'Hash<String, Object>',
67
+ :'env' => :'String',
68
+ :'evaluated_at' => :'Time',
69
+ :'flags' => :'Array<OpsReporterFlag>',
70
+ :'killswitches' => :'Array<OpsReporterKillswitch>',
71
+ :'experiments' => :'Array<OpsReporterExperiment>',
72
+ :'truncated' => :'Boolean'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ ])
80
+ end
81
+
82
+ # Initializes the object
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ def initialize(attributes = {})
85
+ if (!attributes.is_a?(Hash))
86
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::OpsReporterContext` initialize method"
87
+ end
88
+
89
+ # check to see if the attribute exists and convert string to symbol for hash key
90
+ acceptable_attribute_map = self.class.acceptable_attribute_map
91
+ attributes = attributes.each_with_object({}) { |(k, v), h|
92
+ if (!acceptable_attribute_map.key?(k.to_sym))
93
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::OpsReporterContext`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
+ end
95
+ h[k.to_sym] = v
96
+ }
97
+
98
+ if attributes.key?(:'user')
99
+ if (value = attributes[:'user']).is_a?(Hash)
100
+ self.user = value
101
+ end
102
+ else
103
+ self.user = nil
104
+ end
105
+
106
+ if attributes.key?(:'env')
107
+ self.env = attributes[:'env']
108
+ else
109
+ self.env = nil
110
+ end
111
+
112
+ if attributes.key?(:'evaluated_at')
113
+ self.evaluated_at = attributes[:'evaluated_at']
114
+ else
115
+ self.evaluated_at = nil
116
+ end
117
+
118
+ if attributes.key?(:'flags')
119
+ if (value = attributes[:'flags']).is_a?(Array)
120
+ self.flags = value
121
+ end
122
+ else
123
+ self.flags = nil
124
+ end
125
+
126
+ if attributes.key?(:'killswitches')
127
+ if (value = attributes[:'killswitches']).is_a?(Array)
128
+ self.killswitches = value
129
+ end
130
+ else
131
+ self.killswitches = nil
132
+ end
133
+
134
+ if attributes.key?(:'experiments')
135
+ if (value = attributes[:'experiments']).is_a?(Array)
136
+ self.experiments = value
137
+ end
138
+ else
139
+ self.experiments = nil
140
+ end
141
+
142
+ if attributes.key?(:'truncated')
143
+ self.truncated = attributes[:'truncated']
144
+ end
145
+ end
146
+
147
+ # Show invalid properties with the reasons. Usually used together with valid?
148
+ # @return Array for valid properties with the reasons
149
+ def list_invalid_properties
150
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
151
+ invalid_properties = Array.new
152
+ if @user.nil?
153
+ invalid_properties.push('invalid value for "user", user cannot be nil.')
154
+ end
155
+
156
+ if @user.length > 50
157
+ invalid_properties.push('invalid value for "user", number of items must be less than or equal to 50.')
158
+ end
159
+
160
+ if @env.nil?
161
+ invalid_properties.push('invalid value for "env", env cannot be nil.')
162
+ end
163
+
164
+ if @evaluated_at.nil?
165
+ invalid_properties.push('invalid value for "evaluated_at", evaluated_at cannot be nil.')
166
+ end
167
+
168
+ if @flags.nil?
169
+ invalid_properties.push('invalid value for "flags", flags cannot be nil.')
170
+ end
171
+
172
+ if @killswitches.nil?
173
+ invalid_properties.push('invalid value for "killswitches", killswitches cannot be nil.')
174
+ end
175
+
176
+ if @experiments.nil?
177
+ invalid_properties.push('invalid value for "experiments", experiments cannot be nil.')
178
+ end
179
+
180
+ invalid_properties
181
+ end
182
+
183
+ # Check to see if the all the properties in the model are valid
184
+ # @return true if the model is valid
185
+ def valid?
186
+ warn '[DEPRECATED] the `valid?` method is obsolete'
187
+ return false if @user.nil?
188
+ return false if @user.length > 50
189
+ return false if @env.nil?
190
+ return false if @evaluated_at.nil?
191
+ return false if @flags.nil?
192
+ return false if @killswitches.nil?
193
+ return false if @experiments.nil?
194
+ true
195
+ end
196
+
197
+ # Custom attribute writer method with validation
198
+ # @param [Object] user Value to be assigned
199
+ def user=(user)
200
+ if user.nil?
201
+ fail ArgumentError, 'user cannot be nil'
202
+ end
203
+
204
+ if user.length > 50
205
+ fail ArgumentError, 'invalid value for "user", number of items must be less than or equal to 50.'
206
+ end
207
+
208
+ @user = user
209
+ end
210
+
211
+ # Custom attribute writer method with validation
212
+ # @param [Object] env Value to be assigned
213
+ def env=(env)
214
+ if env.nil?
215
+ fail ArgumentError, 'env cannot be nil'
216
+ end
217
+
218
+ @env = env
219
+ end
220
+
221
+ # Custom attribute writer method with validation
222
+ # @param [Object] evaluated_at Value to be assigned
223
+ def evaluated_at=(evaluated_at)
224
+ if evaluated_at.nil?
225
+ fail ArgumentError, 'evaluated_at cannot be nil'
226
+ end
227
+
228
+ @evaluated_at = evaluated_at
229
+ end
230
+
231
+ # Custom attribute writer method with validation
232
+ # @param [Object] flags Value to be assigned
233
+ def flags=(flags)
234
+ if flags.nil?
235
+ fail ArgumentError, 'flags cannot be nil'
236
+ end
237
+
238
+ @flags = flags
239
+ end
240
+
241
+ # Custom attribute writer method with validation
242
+ # @param [Object] killswitches Value to be assigned
243
+ def killswitches=(killswitches)
244
+ if killswitches.nil?
245
+ fail ArgumentError, 'killswitches cannot be nil'
246
+ end
247
+
248
+ @killswitches = killswitches
249
+ end
250
+
251
+ # Custom attribute writer method with validation
252
+ # @param [Object] experiments Value to be assigned
253
+ def experiments=(experiments)
254
+ if experiments.nil?
255
+ fail ArgumentError, 'experiments cannot be nil'
256
+ end
257
+
258
+ @experiments = experiments
259
+ end
260
+
261
+ # Checks equality by comparing each attribute.
262
+ # @param [Object] Object to be compared
263
+ def ==(o)
264
+ return true if self.equal?(o)
265
+ self.class == o.class &&
266
+ user == o.user &&
267
+ env == o.env &&
268
+ evaluated_at == o.evaluated_at &&
269
+ flags == o.flags &&
270
+ killswitches == o.killswitches &&
271
+ experiments == o.experiments &&
272
+ truncated == o.truncated
273
+ end
274
+
275
+ # @see the `==` method
276
+ # @param [Object] Object to be compared
277
+ def eql?(o)
278
+ self == o
279
+ end
280
+
281
+ # Calculates hash code according to all attributes.
282
+ # @return [Integer] Hash code
283
+ def hash
284
+ [user, env, evaluated_at, flags, killswitches, experiments, truncated].hash
285
+ end
286
+
287
+ # Builds the object from hash
288
+ # @param [Hash] attributes Model attributes in the form of hash
289
+ # @return [Object] Returns the model itself
290
+ def self.build_from_hash(attributes)
291
+ return nil unless attributes.is_a?(Hash)
292
+ attributes = attributes.transform_keys(&:to_sym)
293
+ transformed_hash = {}
294
+ openapi_types.each_pair do |key, type|
295
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
296
+ transformed_hash["#{key}"] = nil
297
+ elsif type =~ /\AArray<(.*)>/i
298
+ # check to ensure the input is an array given that the attribute
299
+ # is documented as an array but the input is not
300
+ if attributes[attribute_map[key]].is_a?(Array)
301
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
302
+ end
303
+ elsif !attributes[attribute_map[key]].nil?
304
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
305
+ end
306
+ end
307
+ new(transformed_hash)
308
+ end
309
+
310
+ # Returns the object in the form of hash
311
+ # @return [Hash] Returns the object in the form of hash
312
+ def to_hash
313
+ hash = {}
314
+ self.class.attribute_map.each_pair do |attr, param|
315
+ value = self.send(attr)
316
+ if value.nil?
317
+ is_nullable = self.class.openapi_nullable.include?(attr)
318
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
319
+ end
320
+
321
+ hash[param] = _to_hash(value)
322
+ end
323
+ hash
324
+ end
325
+
326
+ end
327
+
328
+ end
@@ -0,0 +1,230 @@
1
+ =begin
2
+ #Shipeasy Admin API (server-SDK surface)
3
+
4
+ #The slice of the Shipeasy admin API that the published server SDKs expose as their optional `AdminClient`. Authenticate with an admin SDK key (`Authorization: Bearer sdk_admin_…`) and scope every request to a project via the `X-Project-Id` header. Four capabilities, nothing else: - **List the ops queue** — read the project's tickets, filtered by type, status, priority, owner, reporter (`reporter`) and close time (`closedSince`). - **File a public ticket** — a bug or a feature request onto the project's ops queue. - **Toggle a kill switch** — flip the switch itself, or one of its named sub-switches, on one environment. - **Manage a flag's whitelist** — read, replace, add to, or remove from the allowlist that admits specific identities ahead of every targeting rule. Everything else in the admin API is reachable through the Shipeasy CLI and MCP server, which speak the complete contract (`openapi.yaml`).
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Shipeasy::Admin::Generated
17
+ # A running experiment the reporter was enrolled in.
18
+ class OpsReporterExperiment < ApiModelBase
19
+ # The experiment's SDK key — what code passes to `getExperiment`.
20
+ attr_accessor :key
21
+
22
+ # The experiment's admin name — the handle the admin API, CLI and MCP address it by.
23
+ attr_accessor :name
24
+
25
+ # The group (arm) the reporter was assigned to, e.g. `control` or `treatment`.
26
+ attr_accessor :group
27
+
28
+ # The universe the experiment runs in.
29
+ attr_accessor :universe
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'key' => :'key',
35
+ :'name' => :'name',
36
+ :'group' => :'group',
37
+ :'universe' => :'universe'
38
+ }
39
+ end
40
+
41
+ # Returns attribute mapping this model knows about
42
+ def self.acceptable_attribute_map
43
+ attribute_map
44
+ end
45
+
46
+ # Returns all the JSON keys this model knows about
47
+ def self.acceptable_attributes
48
+ acceptable_attribute_map.values
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'key' => :'String',
55
+ :'name' => :'String',
56
+ :'group' => :'String',
57
+ :'universe' => :'String'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::OpsReporterExperiment` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!acceptable_attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::OpsReporterExperiment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'key')
84
+ self.key = attributes[:'key']
85
+ else
86
+ self.key = nil
87
+ end
88
+
89
+ if attributes.key?(:'name')
90
+ self.name = attributes[:'name']
91
+ else
92
+ self.name = nil
93
+ end
94
+
95
+ if attributes.key?(:'group')
96
+ self.group = attributes[:'group']
97
+ else
98
+ self.group = nil
99
+ end
100
+
101
+ if attributes.key?(:'universe')
102
+ self.universe = attributes[:'universe']
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
110
+ invalid_properties = Array.new
111
+ if @key.nil?
112
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
113
+ end
114
+
115
+ if @name.nil?
116
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
117
+ end
118
+
119
+ if @group.nil?
120
+ invalid_properties.push('invalid value for "group", group cannot be nil.')
121
+ end
122
+
123
+ invalid_properties
124
+ end
125
+
126
+ # Check to see if the all the properties in the model are valid
127
+ # @return true if the model is valid
128
+ def valid?
129
+ warn '[DEPRECATED] the `valid?` method is obsolete'
130
+ return false if @key.nil?
131
+ return false if @name.nil?
132
+ return false if @group.nil?
133
+ true
134
+ end
135
+
136
+ # Custom attribute writer method with validation
137
+ # @param [Object] key Value to be assigned
138
+ def key=(key)
139
+ if key.nil?
140
+ fail ArgumentError, 'key cannot be nil'
141
+ end
142
+
143
+ @key = key
144
+ end
145
+
146
+ # Custom attribute writer method with validation
147
+ # @param [Object] name Value to be assigned
148
+ def name=(name)
149
+ if name.nil?
150
+ fail ArgumentError, 'name cannot be nil'
151
+ end
152
+
153
+ @name = name
154
+ end
155
+
156
+ # Custom attribute writer method with validation
157
+ # @param [Object] group Value to be assigned
158
+ def group=(group)
159
+ if group.nil?
160
+ fail ArgumentError, 'group cannot be nil'
161
+ end
162
+
163
+ @group = group
164
+ end
165
+
166
+ # Checks equality by comparing each attribute.
167
+ # @param [Object] Object to be compared
168
+ def ==(o)
169
+ return true if self.equal?(o)
170
+ self.class == o.class &&
171
+ key == o.key &&
172
+ name == o.name &&
173
+ group == o.group &&
174
+ universe == o.universe
175
+ end
176
+
177
+ # @see the `==` method
178
+ # @param [Object] Object to be compared
179
+ def eql?(o)
180
+ self == o
181
+ end
182
+
183
+ # Calculates hash code according to all attributes.
184
+ # @return [Integer] Hash code
185
+ def hash
186
+ [key, name, group, universe].hash
187
+ end
188
+
189
+ # Builds the object from hash
190
+ # @param [Hash] attributes Model attributes in the form of hash
191
+ # @return [Object] Returns the model itself
192
+ def self.build_from_hash(attributes)
193
+ return nil unless attributes.is_a?(Hash)
194
+ attributes = attributes.transform_keys(&:to_sym)
195
+ transformed_hash = {}
196
+ openapi_types.each_pair do |key, type|
197
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
198
+ transformed_hash["#{key}"] = nil
199
+ elsif type =~ /\AArray<(.*)>/i
200
+ # check to ensure the input is an array given that the attribute
201
+ # is documented as an array but the input is not
202
+ if attributes[attribute_map[key]].is_a?(Array)
203
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
204
+ end
205
+ elsif !attributes[attribute_map[key]].nil?
206
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
207
+ end
208
+ end
209
+ new(transformed_hash)
210
+ end
211
+
212
+ # Returns the object in the form of hash
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_hash
215
+ hash = {}
216
+ self.class.attribute_map.each_pair do |attr, param|
217
+ value = self.send(attr)
218
+ if value.nil?
219
+ is_nullable = self.class.openapi_nullable.include?(attr)
220
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
221
+ end
222
+
223
+ hash[param] = _to_hash(value)
224
+ end
225
+ hash
226
+ end
227
+
228
+ end
229
+
230
+ end
@@ -0,0 +1,193 @@
1
+ =begin
2
+ #Shipeasy Admin API (server-SDK surface)
3
+
4
+ #The slice of the Shipeasy admin API that the published server SDKs expose as their optional `AdminClient`. Authenticate with an admin SDK key (`Authorization: Bearer sdk_admin_…`) and scope every request to a project via the `X-Project-Id` header. Four capabilities, nothing else: - **List the ops queue** — read the project's tickets, filtered by type, status, priority, owner, reporter (`reporter`) and close time (`closedSince`). - **File a public ticket** — a bug or a feature request onto the project's ops queue. - **Toggle a kill switch** — flip the switch itself, or one of its named sub-switches, on one environment. - **Manage a flag's whitelist** — read, replace, add to, or remove from the allowlist that admits specific identities ahead of every targeting rule. Everything else in the admin API is reachable through the Shipeasy CLI and MCP server, which speak the complete contract (`openapi.yaml`).
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Shipeasy::Admin::Generated
17
+ # A feature flag that evaluated ON for the reporter.
18
+ class OpsReporterFlag < ApiModelBase
19
+ # The flag's SDK key — what code passes to `getFlag` (`folder/name` when foldered).
20
+ attr_accessor :key
21
+
22
+ # The flag's admin name (`folder.name` when foldered) — the handle the admin API, CLI and MCP address it by.
23
+ attr_accessor :name
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'key' => :'key',
29
+ :'name' => :'name'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'key' => :'String',
47
+ :'name' => :'String'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::OpsReporterFlag` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ acceptable_attribute_map = self.class.acceptable_attribute_map
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!acceptable_attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::OpsReporterFlag`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'key')
74
+ self.key = attributes[:'key']
75
+ else
76
+ self.key = nil
77
+ end
78
+
79
+ if attributes.key?(:'name')
80
+ self.name = attributes[:'name']
81
+ else
82
+ self.name = nil
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
90
+ invalid_properties = Array.new
91
+ if @key.nil?
92
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
93
+ end
94
+
95
+ if @name.nil?
96
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
97
+ end
98
+
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ warn '[DEPRECATED] the `valid?` method is obsolete'
106
+ return false if @key.nil?
107
+ return false if @name.nil?
108
+ true
109
+ end
110
+
111
+ # Custom attribute writer method with validation
112
+ # @param [Object] key Value to be assigned
113
+ def key=(key)
114
+ if key.nil?
115
+ fail ArgumentError, 'key cannot be nil'
116
+ end
117
+
118
+ @key = key
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] name Value to be assigned
123
+ def name=(name)
124
+ if name.nil?
125
+ fail ArgumentError, 'name cannot be nil'
126
+ end
127
+
128
+ @name = name
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ key == o.key &&
137
+ name == o.name
138
+ end
139
+
140
+ # @see the `==` method
141
+ # @param [Object] Object to be compared
142
+ def eql?(o)
143
+ self == o
144
+ end
145
+
146
+ # Calculates hash code according to all attributes.
147
+ # @return [Integer] Hash code
148
+ def hash
149
+ [key, name].hash
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def self.build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ attributes = attributes.transform_keys(&:to_sym)
158
+ transformed_hash = {}
159
+ openapi_types.each_pair do |key, type|
160
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = nil
162
+ elsif type =~ /\AArray<(.*)>/i
163
+ # check to ensure the input is an array given that the attribute
164
+ # is documented as an array but the input is not
165
+ if attributes[attribute_map[key]].is_a?(Array)
166
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
167
+ end
168
+ elsif !attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
170
+ end
171
+ end
172
+ new(transformed_hash)
173
+ end
174
+
175
+ # Returns the object in the form of hash
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_hash
178
+ hash = {}
179
+ self.class.attribute_map.each_pair do |attr, param|
180
+ value = self.send(attr)
181
+ if value.nil?
182
+ is_nullable = self.class.openapi_nullable.include?(attr)
183
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
184
+ end
185
+
186
+ hash[param] = _to_hash(value)
187
+ end
188
+ hash
189
+ end
190
+
191
+ end
192
+
193
+ end
@@ -0,0 +1,205 @@
1
+ =begin
2
+ #Shipeasy Admin API (server-SDK surface)
3
+
4
+ #The slice of the Shipeasy admin API that the published server SDKs expose as their optional `AdminClient`. Authenticate with an admin SDK key (`Authorization: Bearer sdk_admin_…`) and scope every request to a project via the `X-Project-Id` header. Four capabilities, nothing else: - **List the ops queue** — read the project's tickets, filtered by type, status, priority, owner, reporter (`reporter`) and close time (`closedSince`). - **File a public ticket** — a bug or a feature request onto the project's ops queue. - **Toggle a kill switch** — flip the switch itself, or one of its named sub-switches, on one environment. - **Manage a flag's whitelist** — read, replace, add to, or remove from the allowlist that admits specific identities ahead of every targeting rule. Everything else in the admin API is reachable through the Shipeasy CLI and MCP server, which speak the complete contract (`openapi.yaml`).
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Shipeasy::Admin::Generated
17
+ # A kill switch that was engaged (killed) when the report was filed.
18
+ class OpsReporterKillswitch < ApiModelBase
19
+ # The kill switch's SDK key — what code passes to `getKillSwitch`.
20
+ attr_accessor :key
21
+
22
+ # The kill switch's admin name — the handle the admin API, CLI and MCP address it by.
23
+ attr_accessor :name
24
+
25
+ # For a kill switch with named sub-switches, the ones that were killed. Absent for a flat kill switch.
26
+ attr_accessor :switches
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'key' => :'key',
32
+ :'name' => :'name',
33
+ :'switches' => :'switches'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'key' => :'String',
51
+ :'name' => :'String',
52
+ :'switches' => :'Array<String>'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Shipeasy::Admin::Generated::OpsReporterKillswitch` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Shipeasy::Admin::Generated::OpsReporterKillswitch`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'key')
79
+ self.key = attributes[:'key']
80
+ else
81
+ self.key = nil
82
+ end
83
+
84
+ if attributes.key?(:'name')
85
+ self.name = attributes[:'name']
86
+ else
87
+ self.name = nil
88
+ end
89
+
90
+ if attributes.key?(:'switches')
91
+ if (value = attributes[:'switches']).is_a?(Array)
92
+ self.switches = value
93
+ end
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @key.nil?
103
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
104
+ end
105
+
106
+ if @name.nil?
107
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
108
+ end
109
+
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ return false if @key.nil?
118
+ return false if @name.nil?
119
+ true
120
+ end
121
+
122
+ # Custom attribute writer method with validation
123
+ # @param [Object] key Value to be assigned
124
+ def key=(key)
125
+ if key.nil?
126
+ fail ArgumentError, 'key cannot be nil'
127
+ end
128
+
129
+ @key = key
130
+ end
131
+
132
+ # Custom attribute writer method with validation
133
+ # @param [Object] name Value to be assigned
134
+ def name=(name)
135
+ if name.nil?
136
+ fail ArgumentError, 'name cannot be nil'
137
+ end
138
+
139
+ @name = name
140
+ end
141
+
142
+ # Checks equality by comparing each attribute.
143
+ # @param [Object] Object to be compared
144
+ def ==(o)
145
+ return true if self.equal?(o)
146
+ self.class == o.class &&
147
+ key == o.key &&
148
+ name == o.name &&
149
+ switches == o.switches
150
+ end
151
+
152
+ # @see the `==` method
153
+ # @param [Object] Object to be compared
154
+ def eql?(o)
155
+ self == o
156
+ end
157
+
158
+ # Calculates hash code according to all attributes.
159
+ # @return [Integer] Hash code
160
+ def hash
161
+ [key, name, switches].hash
162
+ end
163
+
164
+ # Builds the object from hash
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ # @return [Object] Returns the model itself
167
+ def self.build_from_hash(attributes)
168
+ return nil unless attributes.is_a?(Hash)
169
+ attributes = attributes.transform_keys(&:to_sym)
170
+ transformed_hash = {}
171
+ openapi_types.each_pair do |key, type|
172
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
173
+ transformed_hash["#{key}"] = nil
174
+ elsif type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[attribute_map[key]].is_a?(Array)
178
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
179
+ end
180
+ elsif !attributes[attribute_map[key]].nil?
181
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
182
+ end
183
+ end
184
+ new(transformed_hash)
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ if value.nil?
194
+ is_nullable = self.class.openapi_nullable.include?(attr)
195
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
+ end
197
+
198
+ hash[param] = _to_hash(value)
199
+ end
200
+ hash
201
+ end
202
+
203
+ end
204
+
205
+ end
@@ -52,6 +52,10 @@ require 'shipeasy_admin/models/ops_item_owner_user'
52
52
  require 'shipeasy_admin/models/ops_item_priority'
53
53
  require 'shipeasy_admin/models/ops_item_status'
54
54
  require 'shipeasy_admin/models/ops_measure_plan_context'
55
+ require 'shipeasy_admin/models/ops_reporter_context'
56
+ require 'shipeasy_admin/models/ops_reporter_experiment'
57
+ require 'shipeasy_admin/models/ops_reporter_flag'
58
+ require 'shipeasy_admin/models/ops_reporter_killswitch'
55
59
  require 'shipeasy_admin/models/ops_run'
56
60
  require 'shipeasy_admin/models/ops_run_action'
57
61
  require 'shipeasy_admin/models/ops_run_action_or_null'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shipeasy-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.0
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shipeasy, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-03 00:00:00.000000000 Z
11
+ date: 2026-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -196,6 +196,10 @@ files:
196
196
  - lib/shipeasy_admin/models/ops_item_priority.rb
197
197
  - lib/shipeasy_admin/models/ops_item_status.rb
198
198
  - lib/shipeasy_admin/models/ops_measure_plan_context.rb
199
+ - lib/shipeasy_admin/models/ops_reporter_context.rb
200
+ - lib/shipeasy_admin/models/ops_reporter_experiment.rb
201
+ - lib/shipeasy_admin/models/ops_reporter_flag.rb
202
+ - lib/shipeasy_admin/models/ops_reporter_killswitch.rb
199
203
  - lib/shipeasy_admin/models/ops_run.rb
200
204
  - lib/shipeasy_admin/models/ops_run_action.rb
201
205
  - lib/shipeasy_admin/models/ops_run_action_or_null.rb