launchdarkly_api 18.1.0 → 20.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.
- checksums.yaml +4 -4
- data/README.md +28 -10
- data/docs/AIConfig.md +3 -1
- data/docs/AIConfigPost.md +3 -1
- data/docs/AIConfigsBetaApi.md +387 -0
- data/docs/AccountUsageBetaApi.md +182 -0
- data/docs/AgentGraph.md +30 -0
- data/docs/AgentGraphEdge.md +24 -0
- data/docs/AgentGraphEdgePost.md +24 -0
- data/docs/AgentGraphPatch.md +24 -0
- data/docs/AgentGraphPost.md +26 -0
- data/docs/AgentGraphs.md +22 -0
- data/docs/AiConfigsMetricDataSourceRefRep.md +1 -1
- data/docs/AiConfigsMetricListingRep.md +1 -1
- data/docs/DataExportDestinationsApi.md +74 -0
- data/docs/FeatureFlagsApi.md +5 -3
- data/docs/GenerateTrustPolicyPostRep.md +18 -0
- data/docs/GuardedReleaseConfig.md +10 -2
- data/docs/IterationInput.md +0 -2
- data/docs/IterationRep.md +1 -3
- data/docs/MetricDataSourceRefRep.md +1 -1
- data/docs/MetricGroupRep.md +1 -5
- data/docs/MetricListingRep.md +1 -1
- data/docs/MetricRep.md +1 -1
- data/docs/Metrics.md +7 -1
- data/docs/MetricsApi.md +3 -3
- data/docs/PostReleasePolicyRequest.md +2 -2
- data/docs/ProgressiveReleaseConfig.md +20 -0
- data/docs/PutReleasePolicyRequest.md +2 -2
- data/docs/RelayAutoConfigRep.md +1 -1
- data/docs/ReleasePolicy.md +2 -2
- data/docs/ReleasePolicyScope.md +3 -1
- data/docs/ReleasePolicyStage.md +20 -0
- data/docs/Rule.md +2 -0
- data/docs/ScheduledChangesApi.md +1 -1
- data/docs/SegmentsApi.md +9 -5
- data/docs/TagsApi.md +2 -2
- data/docs/TrustPolicyDetails.md +20 -0
- data/docs/TrustPolicyStatement.md +24 -0
- data/lib/launchdarkly_api/api/account_usage_beta_api.rb +171 -0
- data/lib/launchdarkly_api/api/ai_configs_beta_api.rb +417 -0
- data/lib/launchdarkly_api/api/data_export_destinations_api.rb +69 -0
- data/lib/launchdarkly_api/api/feature_flags_api.rb +5 -2
- data/lib/launchdarkly_api/api/metrics_api.rb +4 -4
- data/lib/launchdarkly_api/api/scheduled_changes_api.rb +2 -2
- data/lib/launchdarkly_api/api/segments_api.rb +5 -2
- data/lib/launchdarkly_api/api/tags_api.rb +2 -2
- data/lib/launchdarkly_api/models/agent_graph.rb +350 -0
- data/lib/launchdarkly_api/models/agent_graph_edge.rb +303 -0
- data/lib/launchdarkly_api/models/agent_graph_edge_post.rb +303 -0
- data/lib/launchdarkly_api/models/agent_graph_patch.rb +254 -0
- data/lib/launchdarkly_api/models/agent_graph_post.rb +298 -0
- data/lib/launchdarkly_api/models/{covariance_info_rep.rb → agent_graphs.rb} +43 -59
- data/lib/launchdarkly_api/models/ai_config.rb +16 -4
- data/lib/launchdarkly_api/models/ai_config_post.rb +13 -4
- data/lib/launchdarkly_api/models/ai_configs_metric_data_source_ref_rep.rb +17 -0
- data/lib/launchdarkly_api/models/ai_configs_metric_listing_rep.rb +17 -0
- data/lib/launchdarkly_api/models/destination.rb +2 -2
- data/lib/launchdarkly_api/models/destination_post.rb +2 -2
- data/lib/launchdarkly_api/models/generate_trust_policy_post_rep.rb +220 -0
- data/lib/launchdarkly_api/models/guarded_release_config.rb +50 -21
- data/lib/launchdarkly_api/models/iteration_input.rb +1 -11
- data/lib/launchdarkly_api/models/iteration_rep.rb +32 -17
- data/lib/launchdarkly_api/models/metric_data_source_ref_rep.rb +17 -0
- data/lib/launchdarkly_api/models/metric_group_rep.rb +4 -24
- data/lib/launchdarkly_api/models/metric_listing_rep.rb +17 -0
- data/lib/launchdarkly_api/models/metric_rep.rb +17 -0
- data/lib/launchdarkly_api/models/metrics.rb +118 -4
- data/lib/launchdarkly_api/models/naming_convention.rb +2 -2
- data/lib/launchdarkly_api/models/post_release_policy_request.rb +1 -2
- data/lib/launchdarkly_api/models/progressive_release_config.rb +234 -0
- data/lib/launchdarkly_api/models/put_release_policy_request.rb +1 -2
- data/lib/launchdarkly_api/models/relay_auto_config_rep.rb +0 -17
- data/lib/launchdarkly_api/models/release_policy.rb +1 -2
- data/lib/launchdarkly_api/models/release_policy_scope.rb +16 -4
- data/lib/launchdarkly_api/models/release_policy_stage.rb +263 -0
- data/lib/launchdarkly_api/models/rule.rb +11 -1
- data/lib/launchdarkly_api/models/trust_policy_details.rb +233 -0
- data/lib/launchdarkly_api/models/trust_policy_statement.rb +255 -0
- data/lib/launchdarkly_api/version.rb +1 -1
- data/lib/launchdarkly_api.rb +11 -1
- data/spec/api/account_usage_beta_api_spec.rb +41 -0
- data/spec/api/ai_configs_beta_api_spec.rb +72 -0
- data/spec/api/data_export_destinations_api_spec.rb +13 -0
- data/spec/api/feature_flags_api_spec.rb +2 -1
- data/spec/api/metrics_api_spec.rb +2 -2
- data/spec/api/scheduled_changes_api_spec.rb +1 -1
- data/spec/api/segments_api_spec.rb +2 -1
- data/spec/api/tags_api_spec.rb +1 -1
- data/spec/models/agent_graph_edge_post_spec.rb +54 -0
- data/spec/models/agent_graph_edge_spec.rb +54 -0
- data/spec/models/agent_graph_patch_spec.rb +54 -0
- data/spec/models/agent_graph_post_spec.rb +60 -0
- data/spec/models/agent_graph_spec.rb +72 -0
- data/spec/models/{covariance_info_rep_spec.rb → agent_graphs_spec.rb} +9 -9
- data/spec/models/ai_config_post_spec.rb +6 -0
- data/spec/models/ai_config_spec.rb +6 -0
- data/spec/models/destination_post_spec.rb +1 -1
- data/spec/models/destination_spec.rb +1 -1
- data/spec/models/generate_trust_policy_post_rep_spec.rb +36 -0
- data/spec/models/guarded_release_config_spec.rb +24 -0
- data/spec/models/iteration_input_spec.rb +0 -6
- data/spec/models/iteration_rep_spec.rb +4 -6
- data/spec/models/metric_group_rep_spec.rb +0 -12
- data/spec/models/metrics_spec.rb +18 -0
- data/spec/models/naming_convention_spec.rb +1 -1
- data/spec/models/progressive_release_config_spec.rb +42 -0
- data/spec/models/release_policy_scope_spec.rb +6 -0
- data/spec/models/release_policy_stage_spec.rb +42 -0
- data/spec/models/rule_spec.rb +6 -0
- data/spec/models/trust_policy_details_spec.rb +42 -0
- data/spec/models/trust_policy_statement_spec.rb +54 -0
- metadata +46 -6
- data/docs/CovarianceInfoRep.md +0 -22
|
@@ -71,7 +71,27 @@ module LaunchDarklyApi
|
|
|
71
71
|
|
|
72
72
|
attr_accessor :layer_snapshot
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
class EnumAttributeValidator
|
|
75
|
+
attr_reader :datatype
|
|
76
|
+
attr_reader :allowable_values
|
|
77
|
+
|
|
78
|
+
def initialize(datatype, allowable_values)
|
|
79
|
+
@allowable_values = allowable_values.map do |value|
|
|
80
|
+
case datatype.to_s
|
|
81
|
+
when /Integer/i
|
|
82
|
+
value.to_i
|
|
83
|
+
when /Float/i
|
|
84
|
+
value.to_f
|
|
85
|
+
else
|
|
86
|
+
value
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def valid?(value)
|
|
92
|
+
!value || allowable_values.include?(value)
|
|
93
|
+
end
|
|
94
|
+
end
|
|
75
95
|
|
|
76
96
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
77
97
|
def self.attribute_map
|
|
@@ -96,8 +116,7 @@ module LaunchDarklyApi
|
|
|
96
116
|
:'treatments' => :'treatments',
|
|
97
117
|
:'secondary_metrics' => :'secondaryMetrics',
|
|
98
118
|
:'metrics' => :'metrics',
|
|
99
|
-
:'layer_snapshot' => :'layerSnapshot'
|
|
100
|
-
:'covariance_info' => :'covarianceInfo'
|
|
119
|
+
:'layer_snapshot' => :'layerSnapshot'
|
|
101
120
|
}
|
|
102
121
|
end
|
|
103
122
|
|
|
@@ -134,8 +153,7 @@ module LaunchDarklyApi
|
|
|
134
153
|
:'treatments' => :'Array<TreatmentRep>',
|
|
135
154
|
:'secondary_metrics' => :'Array<MetricV2Rep>',
|
|
136
155
|
:'metrics' => :'Array<DependentMetricOrMetricGroupRep>',
|
|
137
|
-
:'layer_snapshot' => :'LayerSnapshotRep'
|
|
138
|
-
:'covariance_info' => :'CovarianceInfoRep'
|
|
156
|
+
:'layer_snapshot' => :'LayerSnapshotRep'
|
|
139
157
|
}
|
|
140
158
|
end
|
|
141
159
|
|
|
@@ -260,10 +278,6 @@ module LaunchDarklyApi
|
|
|
260
278
|
if attributes.key?(:'layer_snapshot')
|
|
261
279
|
self.layer_snapshot = attributes[:'layer_snapshot']
|
|
262
280
|
end
|
|
263
|
-
|
|
264
|
-
if attributes.key?(:'covariance_info')
|
|
265
|
-
self.covariance_info = attributes[:'covariance_info']
|
|
266
|
-
end
|
|
267
281
|
end
|
|
268
282
|
|
|
269
283
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -292,6 +306,8 @@ module LaunchDarklyApi
|
|
|
292
306
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
293
307
|
return false if @hypothesis.nil?
|
|
294
308
|
return false if @status.nil?
|
|
309
|
+
status_validator = EnumAttributeValidator.new('String', ["not_started", "running", "stopped"])
|
|
310
|
+
return false unless status_validator.valid?(@status)
|
|
295
311
|
return false if @created_at.nil?
|
|
296
312
|
true
|
|
297
313
|
end
|
|
@@ -306,13 +322,13 @@ module LaunchDarklyApi
|
|
|
306
322
|
@hypothesis = hypothesis
|
|
307
323
|
end
|
|
308
324
|
|
|
309
|
-
# Custom attribute writer method
|
|
310
|
-
# @param [Object] status
|
|
325
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
326
|
+
# @param [Object] status Object to be assigned
|
|
311
327
|
def status=(status)
|
|
312
|
-
|
|
313
|
-
|
|
328
|
+
validator = EnumAttributeValidator.new('String', ["not_started", "running", "stopped"])
|
|
329
|
+
unless validator.valid?(status)
|
|
330
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
314
331
|
end
|
|
315
|
-
|
|
316
332
|
@status = status
|
|
317
333
|
end
|
|
318
334
|
|
|
@@ -351,8 +367,7 @@ module LaunchDarklyApi
|
|
|
351
367
|
treatments == o.treatments &&
|
|
352
368
|
secondary_metrics == o.secondary_metrics &&
|
|
353
369
|
metrics == o.metrics &&
|
|
354
|
-
layer_snapshot == o.layer_snapshot
|
|
355
|
-
covariance_info == o.covariance_info
|
|
370
|
+
layer_snapshot == o.layer_snapshot
|
|
356
371
|
end
|
|
357
372
|
|
|
358
373
|
# @see the `==` method
|
|
@@ -364,7 +379,7 @@ module LaunchDarklyApi
|
|
|
364
379
|
# Calculates hash code according to all attributes.
|
|
365
380
|
# @return [Integer] Hash code
|
|
366
381
|
def hash
|
|
367
|
-
[_id, hypothesis, status, created_at, started_at, ended_at, winning_treatment_id, winning_reason, can_reshuffle_traffic, flags, reallocation_frequency_millis, version, primary_metric, primary_single_metric, primary_funnel, randomization_unit, attributes, treatments, secondary_metrics, metrics, layer_snapshot
|
|
382
|
+
[_id, hypothesis, status, created_at, started_at, ended_at, winning_treatment_id, winning_reason, can_reshuffle_traffic, flags, reallocation_frequency_millis, version, primary_metric, primary_single_metric, primary_funnel, randomization_unit, attributes, treatments, secondary_metrics, metrics, layer_snapshot].hash
|
|
368
383
|
end
|
|
369
384
|
|
|
370
385
|
# Builds the object from hash
|
|
@@ -77,6 +77,8 @@ module LaunchDarklyApi
|
|
|
77
77
|
|
|
78
78
|
if attributes.key?(:'key')
|
|
79
79
|
self.key = attributes[:'key']
|
|
80
|
+
else
|
|
81
|
+
self.key = nil
|
|
80
82
|
end
|
|
81
83
|
|
|
82
84
|
if attributes.key?(:'environment_key')
|
|
@@ -97,6 +99,10 @@ module LaunchDarklyApi
|
|
|
97
99
|
def list_invalid_properties
|
|
98
100
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
101
|
invalid_properties = Array.new
|
|
102
|
+
if @key.nil?
|
|
103
|
+
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
104
|
+
end
|
|
105
|
+
|
|
100
106
|
invalid_properties
|
|
101
107
|
end
|
|
102
108
|
|
|
@@ -104,9 +110,20 @@ module LaunchDarklyApi
|
|
|
104
110
|
# @return true if the model is valid
|
|
105
111
|
def valid?
|
|
106
112
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
+
return false if @key.nil?
|
|
107
114
|
true
|
|
108
115
|
end
|
|
109
116
|
|
|
117
|
+
# Custom attribute writer method with validation
|
|
118
|
+
# @param [Object] key Value to be assigned
|
|
119
|
+
def key=(key)
|
|
120
|
+
if key.nil?
|
|
121
|
+
fail ArgumentError, 'key cannot be nil'
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
@key = key
|
|
125
|
+
end
|
|
126
|
+
|
|
110
127
|
# Checks equality by comparing each attribute.
|
|
111
128
|
# @param [Object] Object to be compared
|
|
112
129
|
def ==(o)
|
|
@@ -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
|
|
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
|
|
@@ -21,7 +21,6 @@ module LaunchDarklyApi
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :guarded_release_config
|
|
23
23
|
|
|
24
|
-
# Configuration for progressive releases
|
|
25
24
|
attr_accessor :progressive_release_config
|
|
26
25
|
|
|
27
26
|
# The name of the release policy
|
|
@@ -80,7 +79,7 @@ module LaunchDarklyApi
|
|
|
80
79
|
:'scope' => :'ReleasePolicyScope',
|
|
81
80
|
:'release_method' => :'ReleaseMethod',
|
|
82
81
|
:'guarded_release_config' => :'GuardedReleaseConfig',
|
|
83
|
-
:'progressive_release_config' => :'
|
|
82
|
+
:'progressive_release_config' => :'ProgressiveReleaseConfig',
|
|
84
83
|
:'name' => :'String',
|
|
85
84
|
:'key' => :'String'
|
|
86
85
|
}
|