launchdarkly_api 25.2.0 → 25.3.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 +64 -39
- data/docs/AIConfig.md +7 -5
- data/docs/AIConfigPatch.md +8 -4
- data/docs/AIConfigPost.md +8 -6
- data/docs/AIConfigTargeting.md +3 -3
- data/docs/AIConfigTargetingEnvironmentRule.md +8 -0
- data/docs/AIConfigTargetingEnvironmentRuleClause.md +2 -0
- data/docs/AIConfigVariation.md +1 -1
- data/docs/AIConfigVariationPatch.md +1 -1
- data/docs/AgentControlApi.md +110 -110
- data/docs/AgentOptimization.md +1 -1
- data/docs/AgentOptimizationJudge.md +1 -1
- data/docs/AgentOptimizationPost.md +1 -1
- data/docs/AgentSkill.md +3 -1
- data/docs/AgentSkillPatch.md +3 -1
- data/docs/AgentSkillPost.md +3 -1
- data/docs/AiConfigsMetricListingRep.md +2 -0
- data/docs/ApprovalsApi.md +1 -1
- data/docs/CreateFlagReleasePlanRequest.md +32 -0
- data/docs/EnvironmentReleasePlan.md +38 -0
- data/docs/EnvironmentReleasePlanClause.md +28 -0
- data/docs/EnvironmentReleasePlanMetric.md +20 -0
- data/docs/EnvironmentReleasePlanPhase.md +24 -0
- data/docs/EnvironmentReleasePlanProgressiveRelease.md +26 -0
- data/docs/EnvironmentReleasePlanProgressiveReleaseRep.md +26 -0
- data/docs/EnvironmentReleasePlanStep.md +22 -0
- data/docs/EnvironmentReleasePlans.md +22 -0
- data/docs/EnvironmentReleasePlansBetaApi.md +633 -0
- data/docs/EnvironmentReleasePlansLink.md +20 -0
- data/docs/EnvironmentReleasePlansPaginatedLinks.md +26 -0
- data/docs/EnvironmentReleasesMetricListingRep.md +2 -0
- data/docs/{ReleaseMethod.md → ExecutionMode.md} +2 -2
- data/docs/FeatureFlagsApi.md +1 -1
- data/docs/FlagReleasePlan.md +36 -0
- data/docs/FlagReleasePlanEnvironment.md +24 -0
- data/docs/FlagReleasePlanRequest.md +30 -0
- data/docs/FlagReleasePlansBetaApi.md +392 -0
- data/docs/FlagReleasePlansError.md +20 -0
- data/docs/FlagReleasePlansLink.md +20 -0
- data/docs/FlagReleasePlansPaginatedLinks.md +26 -0
- data/docs/ListFlagReleasePlansResponse.md +22 -0
- data/docs/MaintainerIdentifier.md +79 -0
- data/docs/MaintainerIdentifierMember.md +20 -0
- data/docs/MaintainerIdentifierTeam.md +20 -0
- data/docs/MaintainerResponse.md +79 -0
- data/docs/MaintainerResponseMember.md +26 -0
- data/docs/MaintainerResponseTeam.md +22 -0
- data/docs/PinnedSkillToolRef.md +20 -0
- data/docs/PostEnvironmentReleasePlanRequest.md +26 -0
- data/docs/PutDefaultEnvironmentReleasePlanRequest.md +18 -0
- data/docs/PutEnvironmentReleasePlanRequest.md +26 -0
- data/docs/PutFlagReleasePlanRequest.md +32 -0
- data/docs/QuickStats.md +2 -2
- data/docs/SkillToolRef.md +20 -0
- data/docs/ToolReferences.md +5 -1
- data/docs/ToolSkillReference.md +22 -0
- data/docs/TriggerType.md +15 -0
- data/lib/launchdarkly_api/api/agent_control_api.rb +98 -98
- data/lib/launchdarkly_api/api/approvals_api.rb +2 -2
- data/lib/launchdarkly_api/api/environment_release_plans_beta_api.rb +730 -0
- data/lib/launchdarkly_api/api/feature_flags_api.rb +2 -2
- data/lib/launchdarkly_api/api/{release_policies_beta_api.rb → flag_release_plans_beta_api.rb} +173 -212
- data/lib/launchdarkly_api/models/agent_optimization.rb +1 -1
- data/lib/launchdarkly_api/models/agent_optimization_judge.rb +1 -1
- data/lib/launchdarkly_api/models/agent_optimization_post.rb +1 -1
- data/lib/launchdarkly_api/models/agent_skill.rb +14 -2
- data/lib/launchdarkly_api/models/agent_skill_patch.rb +16 -4
- data/lib/launchdarkly_api/models/agent_skill_post.rb +16 -4
- data/lib/launchdarkly_api/models/ai_config.rb +16 -6
- data/lib/launchdarkly_api/models/ai_config_patch.rb +27 -7
- data/lib/launchdarkly_api/models/ai_config_post.rb +19 -9
- data/lib/launchdarkly_api/models/ai_config_targeting.rb +3 -3
- data/lib/launchdarkly_api/models/ai_config_targeting_environment_rule.rb +40 -1
- data/lib/launchdarkly_api/models/ai_config_targeting_environment_rule_clause.rb +11 -1
- data/lib/launchdarkly_api/models/ai_config_variation.rb +1 -1
- data/lib/launchdarkly_api/models/ai_config_variation_patch.rb +1 -1
- data/lib/launchdarkly_api/models/ai_configs_metric_listing_rep.rb +11 -1
- data/lib/launchdarkly_api/models/create_flag_release_plan_request.rb +335 -0
- data/lib/launchdarkly_api/models/environment_release_plan.rb +426 -0
- data/lib/launchdarkly_api/models/{release_policies_access_allowed_reason.rb → environment_release_plan_clause.rb} +98 -65
- data/lib/launchdarkly_api/models/{release_policies_access_allowed_rep.rb → environment_release_plan_metric.rb} +28 -41
- data/lib/launchdarkly_api/models/environment_release_plan_phase.rb +208 -0
- data/lib/launchdarkly_api/models/environment_release_plan_progressive_release.rb +285 -0
- data/lib/launchdarkly_api/models/{release_policies_access_denied_reason.rb → environment_release_plan_progressive_release_rep.rb} +85 -67
- data/lib/launchdarkly_api/models/{release_policy_stage.rb → environment_release_plan_step.rb} +43 -4
- data/lib/launchdarkly_api/models/{release_policies_response.rb → environment_release_plans.rb} +16 -7
- data/lib/launchdarkly_api/models/{release_policies_access_denied.rb → environment_release_plans_link.rb} +16 -50
- data/lib/launchdarkly_api/models/environment_release_plans_paginated_links.rb +200 -0
- data/lib/launchdarkly_api/models/environment_releases_metric_listing_rep.rb +11 -1
- data/lib/launchdarkly_api/models/{release_method.rb → execution_mode.rb} +6 -7
- data/lib/launchdarkly_api/models/expanded_ai_config.rb +1 -1
- data/lib/launchdarkly_api/models/flag_release_plan.rb +359 -0
- data/lib/launchdarkly_api/models/{put_release_policy_request.rb → flag_release_plan_environment.rb} +47 -65
- data/lib/launchdarkly_api/models/{post_release_policy_request.rb → flag_release_plan_request.rb} +64 -67
- data/lib/launchdarkly_api/models/flag_release_plans_error.rb +208 -0
- data/lib/launchdarkly_api/models/flag_release_plans_link.rb +156 -0
- data/lib/launchdarkly_api/models/flag_release_plans_paginated_links.rb +200 -0
- data/lib/launchdarkly_api/models/list_flag_release_plans_response.rb +202 -0
- data/lib/launchdarkly_api/models/maintainer_identifier.rb +56 -0
- data/lib/launchdarkly_api/models/maintainer_identifier_member.rb +214 -0
- data/lib/launchdarkly_api/models/{progressive_release_config.rb → maintainer_identifier_team.rb} +66 -32
- data/lib/launchdarkly_api/models/maintainer_response.rb +56 -0
- data/lib/launchdarkly_api/models/maintainer_response_member.rb +225 -0
- data/lib/launchdarkly_api/models/maintainer_response_team.rb +206 -0
- data/lib/launchdarkly_api/models/{release_policies_access_rep.rb → pinned_skill_tool_ref.rb} +46 -45
- data/lib/launchdarkly_api/models/{release_policy.rb → post_environment_release_plan_request.rb} +93 -120
- data/lib/launchdarkly_api/models/{release_policies_access.rb → put_default_environment_release_plan_request.rb} +33 -44
- data/lib/launchdarkly_api/models/put_environment_release_plan_request.rb +285 -0
- data/lib/launchdarkly_api/models/put_flag_release_plan_request.rb +309 -0
- data/lib/launchdarkly_api/models/quick_stats.rb +2 -2
- data/lib/launchdarkly_api/models/skill_tool_ref.rb +195 -0
- data/lib/launchdarkly_api/models/tool_references.rb +26 -4
- data/lib/launchdarkly_api/models/tool_skill_reference.rb +220 -0
- data/lib/launchdarkly_api/models/trigger_type.rb +42 -0
- data/lib/launchdarkly_api/version.rb +1 -1
- data/lib/launchdarkly_api.rb +35 -16
- data/spec/api/agent_control_api_spec.rb +49 -49
- data/spec/api/approvals_api_spec.rb +1 -1
- data/spec/api/environment_release_plans_beta_api_spec.rb +156 -0
- data/spec/api/feature_flags_api_spec.rb +1 -1
- data/spec/api/{release_policies_beta_api_spec.rb → flag_release_plans_beta_api_spec.rb} +43 -56
- data/spec/models/agent_skill_patch_spec.rb +6 -0
- data/spec/models/agent_skill_post_spec.rb +6 -0
- data/spec/models/agent_skill_spec.rb +6 -0
- data/spec/models/ai_config_patch_spec.rb +12 -0
- data/spec/models/ai_config_post_spec.rb +6 -0
- data/spec/models/ai_config_spec.rb +6 -0
- data/spec/models/ai_config_targeting_environment_rule_clause_spec.rb +6 -0
- data/spec/models/ai_config_targeting_environment_rule_spec.rb +24 -0
- data/spec/models/ai_configs_metric_listing_rep_spec.rb +6 -0
- data/spec/models/{release_policy_spec.rb → create_flag_release_plan_request_spec.rb} +13 -19
- data/spec/models/{release_policies_access_allowed_reason_spec.rb → environment_release_plan_clause_spec.rb} +16 -16
- data/spec/models/{release_policies_access_rep_spec.rb → environment_release_plan_metric_spec.rb} +8 -8
- data/spec/models/environment_release_plan_phase_spec.rb +54 -0
- data/spec/models/environment_release_plan_progressive_release_rep_spec.rb +68 -0
- data/spec/models/environment_release_plan_progressive_release_spec.rb +68 -0
- data/spec/models/environment_release_plan_spec.rb +100 -0
- data/spec/models/{release_policies_access_allowed_rep_spec.rb → environment_release_plan_step_spec.rb} +14 -8
- data/spec/models/{release_policies_access_denied_spec.rb → environment_release_plans_link_spec.rb} +8 -8
- data/spec/models/{guarded_release_config_spec.rb → environment_release_plans_paginated_links_spec.rb} +11 -17
- data/spec/models/environment_release_plans_spec.rb +48 -0
- data/spec/models/environment_releases_metric_listing_rep_spec.rb +6 -0
- data/spec/models/{release_method_spec.rb → execution_mode_spec.rb} +6 -6
- data/spec/models/flag_release_plan_environment_spec.rb +54 -0
- data/spec/models/{release_policies_access_denied_reason_spec.rb → flag_release_plan_request_spec.rb} +18 -16
- data/spec/models/flag_release_plan_spec.rb +90 -0
- data/spec/models/{release_policy_scope_spec.rb → flag_release_plans_error_spec.rb} +8 -8
- data/spec/models/{release_policy_stage_spec.rb → flag_release_plans_link_spec.rb} +8 -8
- data/spec/models/{put_release_policy_request_spec.rb → flag_release_plans_paginated_links_spec.rb} +11 -11
- data/spec/models/list_flag_release_plans_response_spec.rb +48 -0
- data/spec/models/maintainer_identifier_member_spec.rb +46 -0
- data/spec/models/maintainer_identifier_spec.rb +44 -0
- data/spec/models/{progressive_release_config_spec.rb → maintainer_identifier_team_spec.rb} +12 -8
- data/spec/models/maintainer_response_member_spec.rb +64 -0
- data/spec/models/maintainer_response_spec.rb +44 -0
- data/spec/models/maintainer_response_team_spec.rb +52 -0
- data/spec/models/{release_policies_access_spec.rb → pinned_skill_tool_ref_spec.rb} +8 -8
- data/spec/models/{post_release_policy_request_spec.rb → post_environment_release_plan_request_spec.rb} +15 -17
- data/spec/models/put_default_environment_release_plan_request_spec.rb +36 -0
- data/spec/models/put_environment_release_plan_request_spec.rb +64 -0
- data/spec/models/put_flag_release_plan_request_spec.rb +78 -0
- data/spec/models/{release_policies_response_spec.rb → skill_tool_ref_spec.rb} +8 -8
- data/spec/models/tool_references_spec.rb +12 -0
- data/spec/models/tool_skill_reference_spec.rb +48 -0
- data/spec/models/trigger_type_spec.rb +30 -0
- metadata +141 -65
- data/docs/GuardedReleaseConfig.md +0 -28
- data/docs/PostReleasePolicyRequest.md +0 -28
- data/docs/ProgressiveReleaseConfig.md +0 -20
- data/docs/PutReleasePolicyRequest.md +0 -26
- data/docs/ReleasePoliciesAccess.md +0 -20
- data/docs/ReleasePoliciesAccessAllowedReason.md +0 -28
- data/docs/ReleasePoliciesAccessAllowedRep.md +0 -20
- data/docs/ReleasePoliciesAccessDenied.md +0 -20
- data/docs/ReleasePoliciesAccessDeniedReason.md +0 -28
- data/docs/ReleasePoliciesAccessRep.md +0 -20
- data/docs/ReleasePoliciesBetaApi.md +0 -466
- data/docs/ReleasePoliciesResponse.md +0 -20
- data/docs/ReleasePolicy.md +0 -34
- data/docs/ReleasePolicyScope.md +0 -20
- data/docs/ReleasePolicyStage.md +0 -20
- data/lib/launchdarkly_api/models/guarded_release_config.rb +0 -224
- data/lib/launchdarkly_api/models/release_policy_scope.rb +0 -181
|
@@ -14,23 +14,24 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module LaunchDarklyApi
|
|
17
|
-
class
|
|
18
|
-
#
|
|
19
|
-
attr_accessor :
|
|
17
|
+
class EnvironmentReleasePlanClause < ApiModelBase
|
|
18
|
+
# The clause's server-generated identifier
|
|
19
|
+
attr_accessor :_id
|
|
20
20
|
|
|
21
|
-
#
|
|
22
|
-
attr_accessor :
|
|
21
|
+
# Context kind this clause applies to
|
|
22
|
+
attr_accessor :context_kind
|
|
23
23
|
|
|
24
|
-
#
|
|
25
|
-
attr_accessor :
|
|
24
|
+
# Context attribute to match on (may be empty for segmentMatch)
|
|
25
|
+
attr_accessor :attribute
|
|
26
26
|
|
|
27
|
-
#
|
|
28
|
-
attr_accessor :
|
|
27
|
+
# Clause operator
|
|
28
|
+
attr_accessor :op
|
|
29
29
|
|
|
30
|
-
#
|
|
31
|
-
attr_accessor :
|
|
30
|
+
# Values to match against (strings, numbers, or booleans). Each string value can be at most 1,024 bytes when UTF-8 encoded, so a value with multibyte characters can be rejected even if it has fewer than 1,024 characters.
|
|
31
|
+
attr_accessor :values
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
# Whether to negate the clause
|
|
34
|
+
attr_accessor :negate
|
|
34
35
|
|
|
35
36
|
class EnumAttributeValidator
|
|
36
37
|
attr_reader :datatype
|
|
@@ -57,12 +58,12 @@ module LaunchDarklyApi
|
|
|
57
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
58
59
|
def self.attribute_map
|
|
59
60
|
{
|
|
60
|
-
:'
|
|
61
|
-
:'
|
|
62
|
-
:'
|
|
63
|
-
:'
|
|
64
|
-
:'
|
|
65
|
-
:'
|
|
61
|
+
:'_id' => :'_id',
|
|
62
|
+
:'context_kind' => :'contextKind',
|
|
63
|
+
:'attribute' => :'attribute',
|
|
64
|
+
:'op' => :'op',
|
|
65
|
+
:'values' => :'values',
|
|
66
|
+
:'negate' => :'negate'
|
|
66
67
|
}
|
|
67
68
|
end
|
|
68
69
|
|
|
@@ -79,12 +80,12 @@ module LaunchDarklyApi
|
|
|
79
80
|
# Attribute type mapping.
|
|
80
81
|
def self.openapi_types
|
|
81
82
|
{
|
|
82
|
-
:'
|
|
83
|
-
:'
|
|
84
|
-
:'
|
|
85
|
-
:'
|
|
86
|
-
:'
|
|
87
|
-
:'
|
|
83
|
+
:'_id' => :'String',
|
|
84
|
+
:'context_kind' => :'String',
|
|
85
|
+
:'attribute' => :'String',
|
|
86
|
+
:'op' => :'String',
|
|
87
|
+
:'values' => :'Array<Object>',
|
|
88
|
+
:'negate' => :'Boolean'
|
|
88
89
|
}
|
|
89
90
|
end
|
|
90
91
|
|
|
@@ -98,50 +99,52 @@ module LaunchDarklyApi
|
|
|
98
99
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
99
100
|
def initialize(attributes = {})
|
|
100
101
|
if (!attributes.is_a?(Hash))
|
|
101
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::
|
|
102
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::EnvironmentReleasePlanClause` initialize method"
|
|
102
103
|
end
|
|
103
104
|
|
|
104
105
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
105
106
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
106
107
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
107
108
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
108
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::
|
|
109
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::EnvironmentReleasePlanClause`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
109
110
|
end
|
|
110
111
|
h[k.to_sym] = v
|
|
111
112
|
}
|
|
112
113
|
|
|
113
|
-
if attributes.key?(:'
|
|
114
|
-
|
|
115
|
-
self.resources = value
|
|
116
|
-
end
|
|
114
|
+
if attributes.key?(:'_id')
|
|
115
|
+
self._id = attributes[:'_id']
|
|
117
116
|
end
|
|
118
117
|
|
|
119
|
-
if attributes.key?(:'
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
118
|
+
if attributes.key?(:'context_kind')
|
|
119
|
+
self.context_kind = attributes[:'context_kind']
|
|
120
|
+
else
|
|
121
|
+
self.context_kind = 'user'
|
|
123
122
|
end
|
|
124
123
|
|
|
125
|
-
if attributes.key?(:'
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
if attributes.key?(:'attribute')
|
|
125
|
+
self.attribute = attributes[:'attribute']
|
|
126
|
+
else
|
|
127
|
+
self.attribute = nil
|
|
129
128
|
end
|
|
130
129
|
|
|
131
|
-
if attributes.key?(:'
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
if attributes.key?(:'op')
|
|
131
|
+
self.op = attributes[:'op']
|
|
132
|
+
else
|
|
133
|
+
self.op = nil
|
|
135
134
|
end
|
|
136
135
|
|
|
137
|
-
if attributes.key?(:'
|
|
138
|
-
|
|
136
|
+
if attributes.key?(:'values')
|
|
137
|
+
if (value = attributes[:'values']).is_a?(Array)
|
|
138
|
+
self.values = value
|
|
139
|
+
end
|
|
139
140
|
else
|
|
140
|
-
self.
|
|
141
|
+
self.values = nil
|
|
141
142
|
end
|
|
142
143
|
|
|
143
|
-
if attributes.key?(:'
|
|
144
|
-
self.
|
|
144
|
+
if attributes.key?(:'negate')
|
|
145
|
+
self.negate = attributes[:'negate']
|
|
146
|
+
else
|
|
147
|
+
self.negate = false
|
|
145
148
|
end
|
|
146
149
|
end
|
|
147
150
|
|
|
@@ -150,8 +153,16 @@ module LaunchDarklyApi
|
|
|
150
153
|
def list_invalid_properties
|
|
151
154
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
152
155
|
invalid_properties = Array.new
|
|
153
|
-
if @
|
|
154
|
-
invalid_properties.push('invalid value for "
|
|
156
|
+
if @attribute.nil?
|
|
157
|
+
invalid_properties.push('invalid value for "attribute", attribute cannot be nil.')
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if @op.nil?
|
|
161
|
+
invalid_properties.push('invalid value for "op", op cannot be nil.')
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if @values.nil?
|
|
165
|
+
invalid_properties.push('invalid value for "values", values cannot be nil.')
|
|
155
166
|
end
|
|
156
167
|
|
|
157
168
|
invalid_properties
|
|
@@ -161,20 +172,42 @@ module LaunchDarklyApi
|
|
|
161
172
|
# @return true if the model is valid
|
|
162
173
|
def valid?
|
|
163
174
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
164
|
-
return false if @
|
|
165
|
-
|
|
166
|
-
|
|
175
|
+
return false if @attribute.nil?
|
|
176
|
+
return false if @op.nil?
|
|
177
|
+
op_validator = EnumAttributeValidator.new('String', ["in", "endsWith", "startsWith", "matches", "contains", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual", "before", "after", "semVerEqual", "semVerLessThan", "semVerGreaterThan", "segmentMatch"])
|
|
178
|
+
return false unless op_validator.valid?(@op)
|
|
179
|
+
return false if @values.nil?
|
|
167
180
|
true
|
|
168
181
|
end
|
|
169
182
|
|
|
183
|
+
# Custom attribute writer method with validation
|
|
184
|
+
# @param [Object] attribute Value to be assigned
|
|
185
|
+
def attribute=(attribute)
|
|
186
|
+
if attribute.nil?
|
|
187
|
+
fail ArgumentError, 'attribute cannot be nil'
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
@attribute = attribute
|
|
191
|
+
end
|
|
192
|
+
|
|
170
193
|
# Custom attribute writer method checking allowed values (enum).
|
|
171
|
-
# @param [Object]
|
|
172
|
-
def
|
|
173
|
-
validator = EnumAttributeValidator.new('String', ["
|
|
174
|
-
unless validator.valid?(
|
|
175
|
-
fail ArgumentError, "invalid value for \"
|
|
194
|
+
# @param [Object] op Object to be assigned
|
|
195
|
+
def op=(op)
|
|
196
|
+
validator = EnumAttributeValidator.new('String', ["in", "endsWith", "startsWith", "matches", "contains", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual", "before", "after", "semVerEqual", "semVerLessThan", "semVerGreaterThan", "segmentMatch"])
|
|
197
|
+
unless validator.valid?(op)
|
|
198
|
+
fail ArgumentError, "invalid value for \"op\", must be one of #{validator.allowable_values}."
|
|
176
199
|
end
|
|
177
|
-
@
|
|
200
|
+
@op = op
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Custom attribute writer method with validation
|
|
204
|
+
# @param [Object] values Value to be assigned
|
|
205
|
+
def values=(values)
|
|
206
|
+
if values.nil?
|
|
207
|
+
fail ArgumentError, 'values cannot be nil'
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
@values = values
|
|
178
211
|
end
|
|
179
212
|
|
|
180
213
|
# Checks equality by comparing each attribute.
|
|
@@ -182,12 +215,12 @@ module LaunchDarklyApi
|
|
|
182
215
|
def ==(o)
|
|
183
216
|
return true if self.equal?(o)
|
|
184
217
|
self.class == o.class &&
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
218
|
+
_id == o._id &&
|
|
219
|
+
context_kind == o.context_kind &&
|
|
220
|
+
attribute == o.attribute &&
|
|
221
|
+
op == o.op &&
|
|
222
|
+
values == o.values &&
|
|
223
|
+
negate == o.negate
|
|
191
224
|
end
|
|
192
225
|
|
|
193
226
|
# @see the `==` method
|
|
@@ -199,7 +232,7 @@ module LaunchDarklyApi
|
|
|
199
232
|
# Calculates hash code according to all attributes.
|
|
200
233
|
# @return [Integer] Hash code
|
|
201
234
|
def hash
|
|
202
|
-
[
|
|
235
|
+
[_id, context_kind, attribute, op, values, negate].hash
|
|
203
236
|
end
|
|
204
237
|
|
|
205
238
|
# Builds the object from hash
|
|
@@ -14,16 +14,18 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module LaunchDarklyApi
|
|
17
|
-
class
|
|
18
|
-
|
|
17
|
+
class EnvironmentReleasePlanMetric < ApiModelBase
|
|
18
|
+
# true if this key identifies a metric group, false if it identifies a single metric
|
|
19
|
+
attr_accessor :is_group
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
# Whether to automatically roll back the release if this metric/group regresses
|
|
22
|
+
attr_accessor :auto_rollback
|
|
21
23
|
|
|
22
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
25
|
def self.attribute_map
|
|
24
26
|
{
|
|
25
|
-
:'
|
|
26
|
-
:'
|
|
27
|
+
:'is_group' => :'isGroup',
|
|
28
|
+
:'auto_rollback' => :'autoRollback'
|
|
27
29
|
}
|
|
28
30
|
end
|
|
29
31
|
|
|
@@ -40,8 +42,8 @@ module LaunchDarklyApi
|
|
|
40
42
|
# Attribute type mapping.
|
|
41
43
|
def self.openapi_types
|
|
42
44
|
{
|
|
43
|
-
:'
|
|
44
|
-
:'
|
|
45
|
+
:'is_group' => :'Boolean',
|
|
46
|
+
:'auto_rollback' => :'Boolean'
|
|
45
47
|
}
|
|
46
48
|
end
|
|
47
49
|
|
|
@@ -55,28 +57,28 @@ module LaunchDarklyApi
|
|
|
55
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
58
|
def initialize(attributes = {})
|
|
57
59
|
if (!attributes.is_a?(Hash))
|
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::EnvironmentReleasePlanMetric` initialize method"
|
|
59
61
|
end
|
|
60
62
|
|
|
61
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
64
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
65
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
66
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::EnvironmentReleasePlanMetric`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
68
|
end
|
|
67
69
|
h[k.to_sym] = v
|
|
68
70
|
}
|
|
69
71
|
|
|
70
|
-
if attributes.key?(:'
|
|
71
|
-
self.
|
|
72
|
+
if attributes.key?(:'is_group')
|
|
73
|
+
self.is_group = attributes[:'is_group']
|
|
72
74
|
else
|
|
73
|
-
self.
|
|
75
|
+
self.is_group = nil
|
|
74
76
|
end
|
|
75
77
|
|
|
76
|
-
if attributes.key?(:'
|
|
77
|
-
self.
|
|
78
|
+
if attributes.key?(:'auto_rollback')
|
|
79
|
+
self.auto_rollback = attributes[:'auto_rollback']
|
|
78
80
|
else
|
|
79
|
-
self.
|
|
81
|
+
self.auto_rollback = false
|
|
80
82
|
end
|
|
81
83
|
end
|
|
82
84
|
|
|
@@ -85,12 +87,8 @@ module LaunchDarklyApi
|
|
|
85
87
|
def list_invalid_properties
|
|
86
88
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
89
|
invalid_properties = Array.new
|
|
88
|
-
if @
|
|
89
|
-
invalid_properties.push('invalid value for "
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
if @reason.nil?
|
|
93
|
-
invalid_properties.push('invalid value for "reason", reason cannot be nil.')
|
|
90
|
+
if @is_group.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "is_group", is_group cannot be nil.')
|
|
94
92
|
end
|
|
95
93
|
|
|
96
94
|
invalid_properties
|
|
@@ -100,29 +98,18 @@ module LaunchDarklyApi
|
|
|
100
98
|
# @return true if the model is valid
|
|
101
99
|
def valid?
|
|
102
100
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
-
return false if @
|
|
104
|
-
return false if @reason.nil?
|
|
101
|
+
return false if @is_group.nil?
|
|
105
102
|
true
|
|
106
103
|
end
|
|
107
104
|
|
|
108
105
|
# Custom attribute writer method with validation
|
|
109
|
-
# @param [Object]
|
|
110
|
-
def
|
|
111
|
-
if
|
|
112
|
-
fail ArgumentError, '
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
@action = action
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
# Custom attribute writer method with validation
|
|
119
|
-
# @param [Object] reason Value to be assigned
|
|
120
|
-
def reason=(reason)
|
|
121
|
-
if reason.nil?
|
|
122
|
-
fail ArgumentError, 'reason cannot be nil'
|
|
106
|
+
# @param [Object] is_group Value to be assigned
|
|
107
|
+
def is_group=(is_group)
|
|
108
|
+
if is_group.nil?
|
|
109
|
+
fail ArgumentError, 'is_group cannot be nil'
|
|
123
110
|
end
|
|
124
111
|
|
|
125
|
-
@
|
|
112
|
+
@is_group = is_group
|
|
126
113
|
end
|
|
127
114
|
|
|
128
115
|
# Checks equality by comparing each attribute.
|
|
@@ -130,8 +117,8 @@ module LaunchDarklyApi
|
|
|
130
117
|
def ==(o)
|
|
131
118
|
return true if self.equal?(o)
|
|
132
119
|
self.class == o.class &&
|
|
133
|
-
|
|
134
|
-
|
|
120
|
+
is_group == o.is_group &&
|
|
121
|
+
auto_rollback == o.auto_rollback
|
|
135
122
|
end
|
|
136
123
|
|
|
137
124
|
# @see the `==` method
|
|
@@ -143,7 +130,7 @@ module LaunchDarklyApi
|
|
|
143
130
|
# Calculates hash code according to all attributes.
|
|
144
131
|
# @return [Integer] Hash code
|
|
145
132
|
def hash
|
|
146
|
-
[
|
|
133
|
+
[is_group, auto_rollback].hash
|
|
147
134
|
end
|
|
148
135
|
|
|
149
136
|
# Builds the object from hash
|