launchdarkly_api 18.0.2 → 19.0.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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -4
  3. data/docs/AIConfig.md +3 -1
  4. data/docs/AiConfigsMetricDataSourceRefRep.md +1 -1
  5. data/docs/AiConfigsMetricListingRep.md +1 -1
  6. data/docs/DataExportDestinationsApi.md +74 -0
  7. data/docs/Environment.md +2 -0
  8. data/docs/Experiment.md +2 -0
  9. data/docs/ExperimentPost.md +3 -1
  10. data/docs/FeatureFlagsApi.md +2 -2
  11. data/docs/GenerateTrustPolicyPostRep.md +18 -0
  12. data/docs/MetricDataSourceRefRep.md +1 -1
  13. data/docs/MetricGroupRep.md +1 -5
  14. data/docs/MetricListingRep.md +1 -1
  15. data/docs/MetricRep.md +1 -1
  16. data/docs/Metrics.md +7 -1
  17. data/docs/MetricsApi.md +3 -3
  18. data/docs/MetricsBetaApi.md +3 -3
  19. data/docs/PostReleasePolicyRequest.md +1 -1
  20. data/docs/PutReleasePolicyRequest.md +1 -1
  21. data/docs/RelayAutoConfigRep.md +1 -1
  22. data/docs/ReleasePolicy.md +1 -1
  23. data/docs/ScheduledChangesApi.md +1 -1
  24. data/docs/SegmentsApi.md +1 -1
  25. data/docs/TrustPolicyDetails.md +20 -0
  26. data/docs/TrustPolicyStatement.md +24 -0
  27. data/lib/launchdarkly_api/api/data_export_destinations_api.rb +69 -0
  28. data/lib/launchdarkly_api/api/feature_flags_api.rb +2 -2
  29. data/lib/launchdarkly_api/api/metrics_api.rb +4 -4
  30. data/lib/launchdarkly_api/api/metrics_beta_api.rb +4 -4
  31. data/lib/launchdarkly_api/api/scheduled_changes_api.rb +2 -2
  32. data/lib/launchdarkly_api/api/segments_api.rb +2 -2
  33. data/lib/launchdarkly_api/models/ai_config.rb +16 -4
  34. data/lib/launchdarkly_api/models/ai_configs_metric_data_source_ref_rep.rb +17 -0
  35. data/lib/launchdarkly_api/models/ai_configs_metric_listing_rep.rb +17 -0
  36. data/lib/launchdarkly_api/models/destination.rb +2 -2
  37. data/lib/launchdarkly_api/models/destination_post.rb +2 -2
  38. data/lib/launchdarkly_api/models/environment.rb +10 -1
  39. data/lib/launchdarkly_api/models/experiment.rb +13 -1
  40. data/lib/launchdarkly_api/models/experiment_post.rb +16 -4
  41. data/lib/launchdarkly_api/models/generate_trust_policy_post_rep.rb +220 -0
  42. data/lib/launchdarkly_api/models/iteration_rep.rb +29 -5
  43. data/lib/launchdarkly_api/models/metric_data_source_ref_rep.rb +17 -0
  44. data/lib/launchdarkly_api/models/metric_group_rep.rb +4 -24
  45. data/lib/launchdarkly_api/models/metric_listing_rep.rb +17 -0
  46. data/lib/launchdarkly_api/models/metric_rep.rb +17 -0
  47. data/lib/launchdarkly_api/models/metrics.rb +118 -4
  48. data/lib/launchdarkly_api/models/naming_convention.rb +2 -2
  49. data/lib/launchdarkly_api/models/relay_auto_config_rep.rb +0 -17
  50. data/lib/launchdarkly_api/models/trust_policy_details.rb +233 -0
  51. data/lib/launchdarkly_api/models/trust_policy_statement.rb +255 -0
  52. data/lib/launchdarkly_api/version.rb +1 -1
  53. data/lib/launchdarkly_api.rb +3 -0
  54. data/spec/api/data_export_destinations_api_spec.rb +13 -0
  55. data/spec/api/feature_flags_api_spec.rb +1 -1
  56. data/spec/api/metrics_api_spec.rb +2 -2
  57. data/spec/api/metrics_beta_api_spec.rb +2 -2
  58. data/spec/api/scheduled_changes_api_spec.rb +1 -1
  59. data/spec/api/segments_api_spec.rb +1 -1
  60. data/spec/models/ai_config_spec.rb +6 -0
  61. data/spec/models/destination_post_spec.rb +1 -1
  62. data/spec/models/destination_spec.rb +1 -1
  63. data/spec/models/environment_spec.rb +6 -0
  64. data/spec/models/experiment_post_spec.rb +6 -0
  65. data/spec/models/experiment_spec.rb +6 -0
  66. data/spec/models/generate_trust_policy_post_rep_spec.rb +36 -0
  67. data/spec/models/iteration_rep_spec.rb +4 -0
  68. data/spec/models/metric_group_rep_spec.rb +0 -12
  69. data/spec/models/metrics_spec.rb +18 -0
  70. data/spec/models/naming_convention_spec.rb +1 -1
  71. data/spec/models/trust_policy_details_spec.rb +42 -0
  72. data/spec/models/trust_policy_statement_spec.rb +54 -0
  73. metadata +14 -2
@@ -61,12 +61,6 @@ module LaunchDarklyApi
61
61
  # The number of active guarded rollouts using this metric group
62
62
  attr_accessor :active_guarded_rollout_count
63
63
 
64
- # The total number of connections using this metric group
65
- attr_accessor :total_connections_count
66
-
67
- # The total number of active connections using this metric group
68
- attr_accessor :total_active_connections_count
69
-
70
64
  class EnumAttributeValidator
71
65
  attr_reader :datatype
72
66
  attr_reader :allowable_values
@@ -108,9 +102,7 @@ module LaunchDarklyApi
108
102
  :'experiments' => :'experiments',
109
103
  :'experiment_count' => :'experimentCount',
110
104
  :'active_experiment_count' => :'activeExperimentCount',
111
- :'active_guarded_rollout_count' => :'activeGuardedRolloutCount',
112
- :'total_connections_count' => :'totalConnectionsCount',
113
- :'total_active_connections_count' => :'totalActiveConnectionsCount'
105
+ :'active_guarded_rollout_count' => :'activeGuardedRolloutCount'
114
106
  }
115
107
  end
116
108
 
@@ -143,9 +135,7 @@ module LaunchDarklyApi
143
135
  :'experiments' => :'Array<DependentExperimentRep>',
144
136
  :'experiment_count' => :'Integer',
145
137
  :'active_experiment_count' => :'Integer',
146
- :'active_guarded_rollout_count' => :'Integer',
147
- :'total_connections_count' => :'Integer',
148
- :'total_active_connections_count' => :'Integer'
138
+ :'active_guarded_rollout_count' => :'Integer'
149
139
  }
150
140
  end
151
141
 
@@ -268,14 +258,6 @@ module LaunchDarklyApi
268
258
  if attributes.key?(:'active_guarded_rollout_count')
269
259
  self.active_guarded_rollout_count = attributes[:'active_guarded_rollout_count']
270
260
  end
271
-
272
- if attributes.key?(:'total_connections_count')
273
- self.total_connections_count = attributes[:'total_connections_count']
274
- end
275
-
276
- if attributes.key?(:'total_active_connections_count')
277
- self.total_active_connections_count = attributes[:'total_active_connections_count']
278
- end
279
261
  end
280
262
 
281
263
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -481,9 +463,7 @@ module LaunchDarklyApi
481
463
  experiments == o.experiments &&
482
464
  experiment_count == o.experiment_count &&
483
465
  active_experiment_count == o.active_experiment_count &&
484
- active_guarded_rollout_count == o.active_guarded_rollout_count &&
485
- total_connections_count == o.total_connections_count &&
486
- total_active_connections_count == o.total_active_connections_count
466
+ active_guarded_rollout_count == o.active_guarded_rollout_count
487
467
  end
488
468
 
489
469
  # @see the `==` method
@@ -495,7 +475,7 @@ module LaunchDarklyApi
495
475
  # Calculates hash code according to all attributes.
496
476
  # @return [Integer] Hash code
497
477
  def hash
498
- [_id, key, name, kind, description, _links, _access, tags, _creation_date, _last_modified, maintainer, metrics, _version, experiments, experiment_count, active_experiment_count, active_guarded_rollout_count, total_connections_count, total_active_connections_count].hash
478
+ [_id, key, name, kind, description, _links, _access, tags, _creation_date, _last_modified, maintainer, metrics, _version, experiments, experiment_count, active_experiment_count, active_guarded_rollout_count].hash
499
479
  end
500
480
 
501
481
  # Builds the object from hash
@@ -399,6 +399,8 @@ module LaunchDarklyApi
399
399
 
400
400
  if attributes.key?(:'data_source')
401
401
  self.data_source = attributes[:'data_source']
402
+ else
403
+ self.data_source = nil
402
404
  end
403
405
 
404
406
  if attributes.key?(:'archived')
@@ -457,6 +459,10 @@ module LaunchDarklyApi
457
459
  invalid_properties.push('invalid value for "_creation_date", _creation_date cannot be nil.')
458
460
  end
459
461
 
462
+ if @data_source.nil?
463
+ invalid_properties.push('invalid value for "data_source", data_source cannot be nil.')
464
+ end
465
+
460
466
  invalid_properties
461
467
  end
462
468
 
@@ -480,6 +486,7 @@ module LaunchDarklyApi
480
486
  return false unless unit_aggregation_type_validator.valid?(@unit_aggregation_type)
481
487
  analysis_type_validator = EnumAttributeValidator.new('String', ["mean", "percentile"])
482
488
  return false unless analysis_type_validator.valid?(@analysis_type)
489
+ return false if @data_source.nil?
483
490
  true
484
491
  end
485
492
 
@@ -593,6 +600,16 @@ module LaunchDarklyApi
593
600
  @analysis_type = analysis_type
594
601
  end
595
602
 
603
+ # Custom attribute writer method with validation
604
+ # @param [Object] data_source Value to be assigned
605
+ def data_source=(data_source)
606
+ if data_source.nil?
607
+ fail ArgumentError, 'data_source cannot be nil'
608
+ end
609
+
610
+ @data_source = data_source
611
+ end
612
+
596
613
  # Checks equality by comparing each attribute.
597
614
  # @param [Object] Object to be compared
598
615
  def ==(o)
@@ -426,6 +426,8 @@ module LaunchDarklyApi
426
426
 
427
427
  if attributes.key?(:'data_source')
428
428
  self.data_source = attributes[:'data_source']
429
+ else
430
+ self.data_source = nil
429
431
  end
430
432
 
431
433
  if attributes.key?(:'archived')
@@ -514,6 +516,10 @@ module LaunchDarklyApi
514
516
  invalid_properties.push('invalid value for "_creation_date", _creation_date cannot be nil.')
515
517
  end
516
518
 
519
+ if @data_source.nil?
520
+ invalid_properties.push('invalid value for "data_source", data_source cannot be nil.')
521
+ end
522
+
517
523
  invalid_properties
518
524
  end
519
525
 
@@ -537,6 +543,7 @@ module LaunchDarklyApi
537
543
  return false unless unit_aggregation_type_validator.valid?(@unit_aggregation_type)
538
544
  analysis_type_validator = EnumAttributeValidator.new('String', ["mean", "percentile"])
539
545
  return false unless analysis_type_validator.valid?(@analysis_type)
546
+ return false if @data_source.nil?
540
547
  true
541
548
  end
542
549
 
@@ -650,6 +657,16 @@ module LaunchDarklyApi
650
657
  @analysis_type = analysis_type
651
658
  end
652
659
 
660
+ # Custom attribute writer method with validation
661
+ # @param [Object] data_source Value to be assigned
662
+ def data_source=(data_source)
663
+ if data_source.nil?
664
+ fail ArgumentError, 'data_source cannot be nil'
665
+ end
666
+
667
+ @data_source = data_source
668
+ end
669
+
653
670
  # Checks equality by comparing each attribute.
654
671
  # @param [Object] Object to be compared
655
672
  def ==(o)
@@ -47,6 +47,15 @@ module LaunchDarklyApi
47
47
  # Cost of output tokens in USD
48
48
  attr_accessor :output_cost
49
49
 
50
+ # Average accuracy judge score (0.0-1.0)
51
+ attr_accessor :judge_accuracy
52
+
53
+ # Average relevance judge score (0.0-1.0)
54
+ attr_accessor :judge_relevance
55
+
56
+ # Average toxicity judge score (0.0-1.0)
57
+ attr_accessor :judge_toxicity
58
+
50
59
  # Attribute mapping from ruby-style variable name to JSON key.
51
60
  def self.attribute_map
52
61
  {
@@ -62,7 +71,10 @@ module LaunchDarklyApi
62
71
  :'time_to_first_token_ms' => :'timeToFirstTokenMs',
63
72
  :'satisfaction_rating' => :'satisfactionRating',
64
73
  :'input_cost' => :'inputCost',
65
- :'output_cost' => :'outputCost'
74
+ :'output_cost' => :'outputCost',
75
+ :'judge_accuracy' => :'judgeAccuracy',
76
+ :'judge_relevance' => :'judgeRelevance',
77
+ :'judge_toxicity' => :'judgeToxicity'
66
78
  }
67
79
  end
68
80
 
@@ -91,7 +103,10 @@ module LaunchDarklyApi
91
103
  :'time_to_first_token_ms' => :'Integer',
92
104
  :'satisfaction_rating' => :'Float',
93
105
  :'input_cost' => :'Float',
94
- :'output_cost' => :'Float'
106
+ :'output_cost' => :'Float',
107
+ :'judge_accuracy' => :'Float',
108
+ :'judge_relevance' => :'Float',
109
+ :'judge_toxicity' => :'Float'
95
110
  }
96
111
  end
97
112
 
@@ -168,6 +183,18 @@ module LaunchDarklyApi
168
183
  if attributes.key?(:'output_cost')
169
184
  self.output_cost = attributes[:'output_cost']
170
185
  end
186
+
187
+ if attributes.key?(:'judge_accuracy')
188
+ self.judge_accuracy = attributes[:'judge_accuracy']
189
+ end
190
+
191
+ if attributes.key?(:'judge_relevance')
192
+ self.judge_relevance = attributes[:'judge_relevance']
193
+ end
194
+
195
+ if attributes.key?(:'judge_toxicity')
196
+ self.judge_toxicity = attributes[:'judge_toxicity']
197
+ end
171
198
  end
172
199
 
173
200
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -183,6 +210,30 @@ module LaunchDarklyApi
183
210
  invalid_properties.push('invalid value for "satisfaction_rating", must be greater than or equal to 0.')
184
211
  end
185
212
 
213
+ if !@judge_accuracy.nil? && @judge_accuracy > 1
214
+ invalid_properties.push('invalid value for "judge_accuracy", must be smaller than or equal to 1.')
215
+ end
216
+
217
+ if !@judge_accuracy.nil? && @judge_accuracy < 0
218
+ invalid_properties.push('invalid value for "judge_accuracy", must be greater than or equal to 0.')
219
+ end
220
+
221
+ if !@judge_relevance.nil? && @judge_relevance > 1
222
+ invalid_properties.push('invalid value for "judge_relevance", must be smaller than or equal to 1.')
223
+ end
224
+
225
+ if !@judge_relevance.nil? && @judge_relevance < 0
226
+ invalid_properties.push('invalid value for "judge_relevance", must be greater than or equal to 0.')
227
+ end
228
+
229
+ if !@judge_toxicity.nil? && @judge_toxicity > 1
230
+ invalid_properties.push('invalid value for "judge_toxicity", must be smaller than or equal to 1.')
231
+ end
232
+
233
+ if !@judge_toxicity.nil? && @judge_toxicity < 0
234
+ invalid_properties.push('invalid value for "judge_toxicity", must be greater than or equal to 0.')
235
+ end
236
+
186
237
  invalid_properties
187
238
  end
188
239
 
@@ -192,6 +243,12 @@ module LaunchDarklyApi
192
243
  warn '[DEPRECATED] the `valid?` method is obsolete'
193
244
  return false if !@satisfaction_rating.nil? && @satisfaction_rating > 1
194
245
  return false if !@satisfaction_rating.nil? && @satisfaction_rating < 0
246
+ return false if !@judge_accuracy.nil? && @judge_accuracy > 1
247
+ return false if !@judge_accuracy.nil? && @judge_accuracy < 0
248
+ return false if !@judge_relevance.nil? && @judge_relevance > 1
249
+ return false if !@judge_relevance.nil? && @judge_relevance < 0
250
+ return false if !@judge_toxicity.nil? && @judge_toxicity > 1
251
+ return false if !@judge_toxicity.nil? && @judge_toxicity < 0
195
252
  true
196
253
  end
197
254
 
@@ -213,6 +270,60 @@ module LaunchDarklyApi
213
270
  @satisfaction_rating = satisfaction_rating
214
271
  end
215
272
 
273
+ # Custom attribute writer method with validation
274
+ # @param [Object] judge_accuracy Value to be assigned
275
+ def judge_accuracy=(judge_accuracy)
276
+ if judge_accuracy.nil?
277
+ fail ArgumentError, 'judge_accuracy cannot be nil'
278
+ end
279
+
280
+ if judge_accuracy > 1
281
+ fail ArgumentError, 'invalid value for "judge_accuracy", must be smaller than or equal to 1.'
282
+ end
283
+
284
+ if judge_accuracy < 0
285
+ fail ArgumentError, 'invalid value for "judge_accuracy", must be greater than or equal to 0.'
286
+ end
287
+
288
+ @judge_accuracy = judge_accuracy
289
+ end
290
+
291
+ # Custom attribute writer method with validation
292
+ # @param [Object] judge_relevance Value to be assigned
293
+ def judge_relevance=(judge_relevance)
294
+ if judge_relevance.nil?
295
+ fail ArgumentError, 'judge_relevance cannot be nil'
296
+ end
297
+
298
+ if judge_relevance > 1
299
+ fail ArgumentError, 'invalid value for "judge_relevance", must be smaller than or equal to 1.'
300
+ end
301
+
302
+ if judge_relevance < 0
303
+ fail ArgumentError, 'invalid value for "judge_relevance", must be greater than or equal to 0.'
304
+ end
305
+
306
+ @judge_relevance = judge_relevance
307
+ end
308
+
309
+ # Custom attribute writer method with validation
310
+ # @param [Object] judge_toxicity Value to be assigned
311
+ def judge_toxicity=(judge_toxicity)
312
+ if judge_toxicity.nil?
313
+ fail ArgumentError, 'judge_toxicity cannot be nil'
314
+ end
315
+
316
+ if judge_toxicity > 1
317
+ fail ArgumentError, 'invalid value for "judge_toxicity", must be smaller than or equal to 1.'
318
+ end
319
+
320
+ if judge_toxicity < 0
321
+ fail ArgumentError, 'invalid value for "judge_toxicity", must be greater than or equal to 0.'
322
+ end
323
+
324
+ @judge_toxicity = judge_toxicity
325
+ end
326
+
216
327
  # Checks equality by comparing each attribute.
217
328
  # @param [Object] Object to be compared
218
329
  def ==(o)
@@ -230,7 +341,10 @@ module LaunchDarklyApi
230
341
  time_to_first_token_ms == o.time_to_first_token_ms &&
231
342
  satisfaction_rating == o.satisfaction_rating &&
232
343
  input_cost == o.input_cost &&
233
- output_cost == o.output_cost
344
+ output_cost == o.output_cost &&
345
+ judge_accuracy == o.judge_accuracy &&
346
+ judge_relevance == o.judge_relevance &&
347
+ judge_toxicity == o.judge_toxicity
234
348
  end
235
349
 
236
350
  # @see the `==` method
@@ -242,7 +356,7 @@ module LaunchDarklyApi
242
356
  # Calculates hash code according to all attributes.
243
357
  # @return [Integer] Hash code
244
358
  def hash
245
- [input_tokens, output_tokens, total_tokens, generation_count, generation_success_count, generation_error_count, thumbs_up, thumbs_down, duration_ms, time_to_first_token_ms, satisfaction_rating, input_cost, output_cost].hash
359
+ [input_tokens, output_tokens, total_tokens, generation_count, generation_success_count, generation_error_count, thumbs_up, thumbs_down, duration_ms, time_to_first_token_ms, satisfaction_rating, input_cost, output_cost, judge_accuracy, judge_relevance, judge_toxicity].hash
246
360
  end
247
361
 
248
362
  # Builds the object from hash
@@ -112,7 +112,7 @@ module LaunchDarklyApi
112
112
  # @return true if the model is valid
113
113
  def valid?
114
114
  warn '[DEPRECATED] the `valid?` method is obsolete'
115
- _case_validator = EnumAttributeValidator.new('String', ["camelCase", "upperCamelCase", "snakeCase", "kebabCase"])
115
+ _case_validator = EnumAttributeValidator.new('String', ["camelCase", "upperCamelCase", "snakeCase", "kebabCase", "constantCase"])
116
116
  return false unless _case_validator.valid?(@_case)
117
117
  true
118
118
  end
@@ -120,7 +120,7 @@ module LaunchDarklyApi
120
120
  # Custom attribute writer method checking allowed values (enum).
121
121
  # @param [Object] _case Object to be assigned
122
122
  def _case=(_case)
123
- validator = EnumAttributeValidator.new('String', ["camelCase", "upperCamelCase", "snakeCase", "kebabCase"])
123
+ validator = EnumAttributeValidator.new('String', ["camelCase", "upperCamelCase", "snakeCase", "kebabCase", "constantCase"])
124
124
  unless validator.valid?(_case)
125
125
  fail ArgumentError, "invalid value for \"_case\", must be one of #{validator.allowable_values}."
126
126
  end
@@ -129,8 +129,6 @@ module LaunchDarklyApi
129
129
 
130
130
  if attributes.key?(:'full_key')
131
131
  self.full_key = attributes[:'full_key']
132
- else
133
- self.full_key = nil
134
132
  end
135
133
 
136
134
  if attributes.key?(:'display_key')
@@ -169,10 +167,6 @@ module LaunchDarklyApi
169
167
  invalid_properties.push('invalid value for "policy", policy cannot be nil.')
170
168
  end
171
169
 
172
- if @full_key.nil?
173
- invalid_properties.push('invalid value for "full_key", full_key cannot be nil.')
174
- end
175
-
176
170
  if @display_key.nil?
177
171
  invalid_properties.push('invalid value for "display_key", display_key cannot be nil.')
178
172
  end
@@ -195,7 +189,6 @@ module LaunchDarklyApi
195
189
  return false if @_id.nil?
196
190
  return false if @name.nil?
197
191
  return false if @policy.nil?
198
- return false if @full_key.nil?
199
192
  return false if @display_key.nil?
200
193
  return false if @creation_date.nil?
201
194
  return false if @last_modified.nil?
@@ -232,16 +225,6 @@ module LaunchDarklyApi
232
225
  @policy = policy
233
226
  end
234
227
 
235
- # Custom attribute writer method with validation
236
- # @param [Object] full_key Value to be assigned
237
- def full_key=(full_key)
238
- if full_key.nil?
239
- fail ArgumentError, 'full_key cannot be nil'
240
- end
241
-
242
- @full_key = full_key
243
- end
244
-
245
228
  # Custom attribute writer method with validation
246
229
  # @param [Object] display_key Value to be assigned
247
230
  def display_key=(display_key)