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,21 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module LaunchDarklyApi
|
|
17
|
-
class
|
|
18
|
-
#
|
|
19
|
-
attr_accessor :
|
|
17
|
+
class EnvironmentReleasePlanProgressiveReleaseRep < ApiModelBase
|
|
18
|
+
# Context kind used to bucket contexts for allocation. Required when you create or update a plan.
|
|
19
|
+
attr_accessor :randomization_unit
|
|
20
20
|
|
|
21
|
-
#
|
|
22
|
-
attr_accessor :
|
|
21
|
+
# Whether a release started from this plan advances to the next phase automatically once the current phase's steps complete, or waits for a user/API action
|
|
22
|
+
attr_accessor :advancement_mode
|
|
23
23
|
|
|
24
|
-
#
|
|
25
|
-
attr_accessor :
|
|
24
|
+
# What happens to the flag's rules once a release started from this plan completes. `remove_rules_and_update_default_rule` removes the release's targeting rules and updates the flag's default rule to serve the target variation; `leave_rules_in_place` leaves the targeting rules untouched.
|
|
25
|
+
attr_accessor :cleanup_behavior
|
|
26
26
|
|
|
27
|
-
#
|
|
28
|
-
attr_accessor :
|
|
27
|
+
# Ordered list of phases this release plan configures
|
|
28
|
+
attr_accessor :phases
|
|
29
29
|
|
|
30
|
-
#
|
|
31
|
-
attr_accessor :
|
|
32
|
-
|
|
33
|
-
attr_accessor :role_name
|
|
30
|
+
# Metrics/metric groups to monitor during rollout, keyed by metric/group key
|
|
31
|
+
attr_accessor :metrics
|
|
34
32
|
|
|
35
33
|
class EnumAttributeValidator
|
|
36
34
|
attr_reader :datatype
|
|
@@ -57,12 +55,11 @@ module LaunchDarklyApi
|
|
|
57
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
58
56
|
def self.attribute_map
|
|
59
57
|
{
|
|
60
|
-
:'
|
|
61
|
-
:'
|
|
62
|
-
:'
|
|
63
|
-
:'
|
|
64
|
-
:'
|
|
65
|
-
:'role_name' => :'role_name'
|
|
58
|
+
:'randomization_unit' => :'randomizationUnit',
|
|
59
|
+
:'advancement_mode' => :'advancementMode',
|
|
60
|
+
:'cleanup_behavior' => :'cleanupBehavior',
|
|
61
|
+
:'phases' => :'phases',
|
|
62
|
+
:'metrics' => :'metrics'
|
|
66
63
|
}
|
|
67
64
|
end
|
|
68
65
|
|
|
@@ -79,12 +76,11 @@ module LaunchDarklyApi
|
|
|
79
76
|
# Attribute type mapping.
|
|
80
77
|
def self.openapi_types
|
|
81
78
|
{
|
|
82
|
-
:'
|
|
83
|
-
:'
|
|
84
|
-
:'
|
|
85
|
-
:'
|
|
86
|
-
:'
|
|
87
|
-
:'role_name' => :'String'
|
|
79
|
+
:'randomization_unit' => :'String',
|
|
80
|
+
:'advancement_mode' => :'String',
|
|
81
|
+
:'cleanup_behavior' => :'String',
|
|
82
|
+
:'phases' => :'Array<EnvironmentReleasePlanPhase>',
|
|
83
|
+
:'metrics' => :'Hash<String, EnvironmentReleasePlanMetric>'
|
|
88
84
|
}
|
|
89
85
|
end
|
|
90
86
|
|
|
@@ -98,50 +94,42 @@ module LaunchDarklyApi
|
|
|
98
94
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
99
95
|
def initialize(attributes = {})
|
|
100
96
|
if (!attributes.is_a?(Hash))
|
|
101
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::
|
|
97
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::EnvironmentReleasePlanProgressiveReleaseRep` initialize method"
|
|
102
98
|
end
|
|
103
99
|
|
|
104
100
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
105
101
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
106
102
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
107
103
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
108
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::
|
|
104
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::EnvironmentReleasePlanProgressiveReleaseRep`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
109
105
|
end
|
|
110
106
|
h[k.to_sym] = v
|
|
111
107
|
}
|
|
112
108
|
|
|
113
|
-
if attributes.key?(:'
|
|
114
|
-
|
|
115
|
-
self.resources = value
|
|
116
|
-
end
|
|
109
|
+
if attributes.key?(:'randomization_unit')
|
|
110
|
+
self.randomization_unit = attributes[:'randomization_unit']
|
|
117
111
|
end
|
|
118
112
|
|
|
119
|
-
if attributes.key?(:'
|
|
120
|
-
|
|
121
|
-
self.not_resources = value
|
|
122
|
-
end
|
|
113
|
+
if attributes.key?(:'advancement_mode')
|
|
114
|
+
self.advancement_mode = attributes[:'advancement_mode']
|
|
123
115
|
end
|
|
124
116
|
|
|
125
|
-
if attributes.key?(:'
|
|
126
|
-
|
|
127
|
-
self.actions = value
|
|
128
|
-
end
|
|
117
|
+
if attributes.key?(:'cleanup_behavior')
|
|
118
|
+
self.cleanup_behavior = attributes[:'cleanup_behavior']
|
|
129
119
|
end
|
|
130
120
|
|
|
131
|
-
if attributes.key?(:'
|
|
132
|
-
if (value = attributes[:'
|
|
133
|
-
self.
|
|
121
|
+
if attributes.key?(:'phases')
|
|
122
|
+
if (value = attributes[:'phases']).is_a?(Array)
|
|
123
|
+
self.phases = value
|
|
134
124
|
end
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
if attributes.key?(:'effect')
|
|
138
|
-
self.effect = attributes[:'effect']
|
|
139
125
|
else
|
|
140
|
-
self.
|
|
126
|
+
self.phases = nil
|
|
141
127
|
end
|
|
142
128
|
|
|
143
|
-
if attributes.key?(:'
|
|
144
|
-
|
|
129
|
+
if attributes.key?(:'metrics')
|
|
130
|
+
if (value = attributes[:'metrics']).is_a?(Hash)
|
|
131
|
+
self.metrics = value
|
|
132
|
+
end
|
|
145
133
|
end
|
|
146
134
|
end
|
|
147
135
|
|
|
@@ -150,8 +138,12 @@ module LaunchDarklyApi
|
|
|
150
138
|
def list_invalid_properties
|
|
151
139
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
152
140
|
invalid_properties = Array.new
|
|
153
|
-
if @
|
|
154
|
-
invalid_properties.push('invalid value for "
|
|
141
|
+
if @phases.nil?
|
|
142
|
+
invalid_properties.push('invalid value for "phases", phases cannot be nil.')
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if @phases.length < 1
|
|
146
|
+
invalid_properties.push('invalid value for "phases", number of items must be greater than or equal to 1.')
|
|
155
147
|
end
|
|
156
148
|
|
|
157
149
|
invalid_properties
|
|
@@ -161,20 +153,47 @@ module LaunchDarklyApi
|
|
|
161
153
|
# @return true if the model is valid
|
|
162
154
|
def valid?
|
|
163
155
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
156
|
+
advancement_mode_validator = EnumAttributeValidator.new('String', ["manual", "automatic"])
|
|
157
|
+
return false unless advancement_mode_validator.valid?(@advancement_mode)
|
|
158
|
+
cleanup_behavior_validator = EnumAttributeValidator.new('String', ["remove_rules_and_update_default_rule", "leave_rules_in_place"])
|
|
159
|
+
return false unless cleanup_behavior_validator.valid?(@cleanup_behavior)
|
|
160
|
+
return false if @phases.nil?
|
|
161
|
+
return false if @phases.length < 1
|
|
167
162
|
true
|
|
168
163
|
end
|
|
169
164
|
|
|
170
165
|
# 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 \"
|
|
166
|
+
# @param [Object] advancement_mode Object to be assigned
|
|
167
|
+
def advancement_mode=(advancement_mode)
|
|
168
|
+
validator = EnumAttributeValidator.new('String', ["manual", "automatic"])
|
|
169
|
+
unless validator.valid?(advancement_mode)
|
|
170
|
+
fail ArgumentError, "invalid value for \"advancement_mode\", must be one of #{validator.allowable_values}."
|
|
176
171
|
end
|
|
177
|
-
@
|
|
172
|
+
@advancement_mode = advancement_mode
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
176
|
+
# @param [Object] cleanup_behavior Object to be assigned
|
|
177
|
+
def cleanup_behavior=(cleanup_behavior)
|
|
178
|
+
validator = EnumAttributeValidator.new('String', ["remove_rules_and_update_default_rule", "leave_rules_in_place"])
|
|
179
|
+
unless validator.valid?(cleanup_behavior)
|
|
180
|
+
fail ArgumentError, "invalid value for \"cleanup_behavior\", must be one of #{validator.allowable_values}."
|
|
181
|
+
end
|
|
182
|
+
@cleanup_behavior = cleanup_behavior
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Custom attribute writer method with validation
|
|
186
|
+
# @param [Object] phases Value to be assigned
|
|
187
|
+
def phases=(phases)
|
|
188
|
+
if phases.nil?
|
|
189
|
+
fail ArgumentError, 'phases cannot be nil'
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if phases.length < 1
|
|
193
|
+
fail ArgumentError, 'invalid value for "phases", number of items must be greater than or equal to 1.'
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
@phases = phases
|
|
178
197
|
end
|
|
179
198
|
|
|
180
199
|
# Checks equality by comparing each attribute.
|
|
@@ -182,12 +201,11 @@ module LaunchDarklyApi
|
|
|
182
201
|
def ==(o)
|
|
183
202
|
return true if self.equal?(o)
|
|
184
203
|
self.class == o.class &&
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
role_name == o.role_name
|
|
204
|
+
randomization_unit == o.randomization_unit &&
|
|
205
|
+
advancement_mode == o.advancement_mode &&
|
|
206
|
+
cleanup_behavior == o.cleanup_behavior &&
|
|
207
|
+
phases == o.phases &&
|
|
208
|
+
metrics == o.metrics
|
|
191
209
|
end
|
|
192
210
|
|
|
193
211
|
# @see the `==` method
|
|
@@ -199,7 +217,7 @@ module LaunchDarklyApi
|
|
|
199
217
|
# Calculates hash code according to all attributes.
|
|
200
218
|
# @return [Integer] Hash code
|
|
201
219
|
def hash
|
|
202
|
-
[
|
|
220
|
+
[randomization_unit, advancement_mode, cleanup_behavior, phases, metrics].hash
|
|
203
221
|
end
|
|
204
222
|
|
|
205
223
|
# Builds the object from hash
|
data/lib/launchdarkly_api/models/{release_policy_stage.rb → environment_release_plan_step.rb}
RENAMED
|
@@ -14,14 +14,20 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module LaunchDarklyApi
|
|
17
|
-
class
|
|
17
|
+
class EnvironmentReleasePlanStep < ApiModelBase
|
|
18
|
+
# The step's server-generated identifier
|
|
19
|
+
attr_accessor :_id
|
|
20
|
+
|
|
21
|
+
# Traffic allocation in per-100k units (100000 = 100%)
|
|
18
22
|
attr_accessor :allocation
|
|
19
23
|
|
|
24
|
+
# How long this step holds before the next one starts
|
|
20
25
|
attr_accessor :duration_millis
|
|
21
26
|
|
|
22
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
28
|
def self.attribute_map
|
|
24
29
|
{
|
|
30
|
+
:'_id' => :'_id',
|
|
25
31
|
:'allocation' => :'allocation',
|
|
26
32
|
:'duration_millis' => :'durationMillis'
|
|
27
33
|
}
|
|
@@ -40,6 +46,7 @@ module LaunchDarklyApi
|
|
|
40
46
|
# Attribute type mapping.
|
|
41
47
|
def self.openapi_types
|
|
42
48
|
{
|
|
49
|
+
:'_id' => :'String',
|
|
43
50
|
:'allocation' => :'Integer',
|
|
44
51
|
:'duration_millis' => :'Integer'
|
|
45
52
|
}
|
|
@@ -55,18 +62,22 @@ module LaunchDarklyApi
|
|
|
55
62
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
63
|
def initialize(attributes = {})
|
|
57
64
|
if (!attributes.is_a?(Hash))
|
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::EnvironmentReleasePlanStep` initialize method"
|
|
59
66
|
end
|
|
60
67
|
|
|
61
68
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
69
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
70
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
71
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::EnvironmentReleasePlanStep`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
73
|
end
|
|
67
74
|
h[k.to_sym] = v
|
|
68
75
|
}
|
|
69
76
|
|
|
77
|
+
if attributes.key?(:'_id')
|
|
78
|
+
self._id = attributes[:'_id']
|
|
79
|
+
end
|
|
80
|
+
|
|
70
81
|
if attributes.key?(:'allocation')
|
|
71
82
|
self.allocation = attributes[:'allocation']
|
|
72
83
|
else
|
|
@@ -89,10 +100,22 @@ module LaunchDarklyApi
|
|
|
89
100
|
invalid_properties.push('invalid value for "allocation", allocation cannot be nil.')
|
|
90
101
|
end
|
|
91
102
|
|
|
103
|
+
if @allocation > 100000
|
|
104
|
+
invalid_properties.push('invalid value for "allocation", must be smaller than or equal to 100000.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if @allocation < 0
|
|
108
|
+
invalid_properties.push('invalid value for "allocation", must be greater than or equal to 0.')
|
|
109
|
+
end
|
|
110
|
+
|
|
92
111
|
if @duration_millis.nil?
|
|
93
112
|
invalid_properties.push('invalid value for "duration_millis", duration_millis cannot be nil.')
|
|
94
113
|
end
|
|
95
114
|
|
|
115
|
+
if @duration_millis < 0
|
|
116
|
+
invalid_properties.push('invalid value for "duration_millis", must be greater than or equal to 0.')
|
|
117
|
+
end
|
|
118
|
+
|
|
96
119
|
invalid_properties
|
|
97
120
|
end
|
|
98
121
|
|
|
@@ -101,7 +124,10 @@ module LaunchDarklyApi
|
|
|
101
124
|
def valid?
|
|
102
125
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
126
|
return false if @allocation.nil?
|
|
127
|
+
return false if @allocation > 100000
|
|
128
|
+
return false if @allocation < 0
|
|
104
129
|
return false if @duration_millis.nil?
|
|
130
|
+
return false if @duration_millis < 0
|
|
105
131
|
true
|
|
106
132
|
end
|
|
107
133
|
|
|
@@ -112,6 +138,14 @@ module LaunchDarklyApi
|
|
|
112
138
|
fail ArgumentError, 'allocation cannot be nil'
|
|
113
139
|
end
|
|
114
140
|
|
|
141
|
+
if allocation > 100000
|
|
142
|
+
fail ArgumentError, 'invalid value for "allocation", must be smaller than or equal to 100000.'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if allocation < 0
|
|
146
|
+
fail ArgumentError, 'invalid value for "allocation", must be greater than or equal to 0.'
|
|
147
|
+
end
|
|
148
|
+
|
|
115
149
|
@allocation = allocation
|
|
116
150
|
end
|
|
117
151
|
|
|
@@ -122,6 +156,10 @@ module LaunchDarklyApi
|
|
|
122
156
|
fail ArgumentError, 'duration_millis cannot be nil'
|
|
123
157
|
end
|
|
124
158
|
|
|
159
|
+
if duration_millis < 0
|
|
160
|
+
fail ArgumentError, 'invalid value for "duration_millis", must be greater than or equal to 0.'
|
|
161
|
+
end
|
|
162
|
+
|
|
125
163
|
@duration_millis = duration_millis
|
|
126
164
|
end
|
|
127
165
|
|
|
@@ -130,6 +168,7 @@ module LaunchDarklyApi
|
|
|
130
168
|
def ==(o)
|
|
131
169
|
return true if self.equal?(o)
|
|
132
170
|
self.class == o.class &&
|
|
171
|
+
_id == o._id &&
|
|
133
172
|
allocation == o.allocation &&
|
|
134
173
|
duration_millis == o.duration_millis
|
|
135
174
|
end
|
|
@@ -143,7 +182,7 @@ module LaunchDarklyApi
|
|
|
143
182
|
# Calculates hash code according to all attributes.
|
|
144
183
|
# @return [Integer] Hash code
|
|
145
184
|
def hash
|
|
146
|
-
[allocation, duration_millis].hash
|
|
185
|
+
[_id, allocation, duration_millis].hash
|
|
147
186
|
end
|
|
148
187
|
|
|
149
188
|
# Builds the object from hash
|
data/lib/launchdarkly_api/models/{release_policies_response.rb → environment_release_plans.rb}
RENAMED
|
@@ -14,16 +14,19 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module LaunchDarklyApi
|
|
17
|
-
class
|
|
18
|
-
|
|
17
|
+
class EnvironmentReleasePlans < ApiModelBase
|
|
18
|
+
attr_accessor :_links
|
|
19
|
+
|
|
20
|
+
# One page of the listed release plans, ordered by creation time
|
|
19
21
|
attr_accessor :items
|
|
20
22
|
|
|
21
|
-
#
|
|
23
|
+
# The total number of release plans in the listed scope, before pagination
|
|
22
24
|
attr_accessor :total_count
|
|
23
25
|
|
|
24
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
27
|
def self.attribute_map
|
|
26
28
|
{
|
|
29
|
+
:'_links' => :'_links',
|
|
27
30
|
:'items' => :'items',
|
|
28
31
|
:'total_count' => :'totalCount'
|
|
29
32
|
}
|
|
@@ -42,7 +45,8 @@ module LaunchDarklyApi
|
|
|
42
45
|
# Attribute type mapping.
|
|
43
46
|
def self.openapi_types
|
|
44
47
|
{
|
|
45
|
-
:'
|
|
48
|
+
:'_links' => :'EnvironmentReleasePlansPaginatedLinks',
|
|
49
|
+
:'items' => :'Array<EnvironmentReleasePlan>',
|
|
46
50
|
:'total_count' => :'Integer'
|
|
47
51
|
}
|
|
48
52
|
end
|
|
@@ -57,18 +61,22 @@ module LaunchDarklyApi
|
|
|
57
61
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
62
|
def initialize(attributes = {})
|
|
59
63
|
if (!attributes.is_a?(Hash))
|
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::
|
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::EnvironmentReleasePlans` initialize method"
|
|
61
65
|
end
|
|
62
66
|
|
|
63
67
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
68
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
69
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
70
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::EnvironmentReleasePlans`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
72
|
end
|
|
69
73
|
h[k.to_sym] = v
|
|
70
74
|
}
|
|
71
75
|
|
|
76
|
+
if attributes.key?(:'_links')
|
|
77
|
+
self._links = attributes[:'_links']
|
|
78
|
+
end
|
|
79
|
+
|
|
72
80
|
if attributes.key?(:'items')
|
|
73
81
|
if (value = attributes[:'items']).is_a?(Array)
|
|
74
82
|
self.items = value
|
|
@@ -134,6 +142,7 @@ module LaunchDarklyApi
|
|
|
134
142
|
def ==(o)
|
|
135
143
|
return true if self.equal?(o)
|
|
136
144
|
self.class == o.class &&
|
|
145
|
+
_links == o._links &&
|
|
137
146
|
items == o.items &&
|
|
138
147
|
total_count == o.total_count
|
|
139
148
|
end
|
|
@@ -147,7 +156,7 @@ module LaunchDarklyApi
|
|
|
147
156
|
# Calculates hash code according to all attributes.
|
|
148
157
|
# @return [Integer] Hash code
|
|
149
158
|
def hash
|
|
150
|
-
[items, total_count].hash
|
|
159
|
+
[_links, items, total_count].hash
|
|
151
160
|
end
|
|
152
161
|
|
|
153
162
|
# Builds the object from hash
|
|
@@ -14,16 +14,16 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module LaunchDarklyApi
|
|
17
|
-
class
|
|
18
|
-
attr_accessor :
|
|
17
|
+
class EnvironmentReleasePlansLink < ApiModelBase
|
|
18
|
+
attr_accessor :href
|
|
19
19
|
|
|
20
|
-
attr_accessor :
|
|
20
|
+
attr_accessor :type
|
|
21
21
|
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
23
|
def self.attribute_map
|
|
24
24
|
{
|
|
25
|
-
:'
|
|
26
|
-
:'
|
|
25
|
+
:'href' => :'href',
|
|
26
|
+
:'type' => :'type'
|
|
27
27
|
}
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -40,8 +40,8 @@ module LaunchDarklyApi
|
|
|
40
40
|
# Attribute type mapping.
|
|
41
41
|
def self.openapi_types
|
|
42
42
|
{
|
|
43
|
-
:'
|
|
44
|
-
:'
|
|
43
|
+
:'href' => :'String',
|
|
44
|
+
:'type' => :'String'
|
|
45
45
|
}
|
|
46
46
|
end
|
|
47
47
|
|
|
@@ -55,28 +55,24 @@ module LaunchDarklyApi
|
|
|
55
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
56
|
def initialize(attributes = {})
|
|
57
57
|
if (!attributes.is_a?(Hash))
|
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::EnvironmentReleasePlansLink` initialize method"
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
62
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
63
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
64
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::EnvironmentReleasePlansLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
66
|
end
|
|
67
67
|
h[k.to_sym] = v
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
if attributes.key?(:'
|
|
71
|
-
self.
|
|
72
|
-
else
|
|
73
|
-
self.action = nil
|
|
70
|
+
if attributes.key?(:'href')
|
|
71
|
+
self.href = attributes[:'href']
|
|
74
72
|
end
|
|
75
73
|
|
|
76
|
-
if attributes.key?(:'
|
|
77
|
-
self.
|
|
78
|
-
else
|
|
79
|
-
self.reason = nil
|
|
74
|
+
if attributes.key?(:'type')
|
|
75
|
+
self.type = attributes[:'type']
|
|
80
76
|
end
|
|
81
77
|
end
|
|
82
78
|
|
|
@@ -85,14 +81,6 @@ module LaunchDarklyApi
|
|
|
85
81
|
def list_invalid_properties
|
|
86
82
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
83
|
invalid_properties = Array.new
|
|
88
|
-
if @action.nil?
|
|
89
|
-
invalid_properties.push('invalid value for "action", action cannot be nil.')
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
if @reason.nil?
|
|
93
|
-
invalid_properties.push('invalid value for "reason", reason cannot be nil.')
|
|
94
|
-
end
|
|
95
|
-
|
|
96
84
|
invalid_properties
|
|
97
85
|
end
|
|
98
86
|
|
|
@@ -100,38 +88,16 @@ module LaunchDarklyApi
|
|
|
100
88
|
# @return true if the model is valid
|
|
101
89
|
def valid?
|
|
102
90
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
-
return false if @action.nil?
|
|
104
|
-
return false if @reason.nil?
|
|
105
91
|
true
|
|
106
92
|
end
|
|
107
93
|
|
|
108
|
-
# Custom attribute writer method with validation
|
|
109
|
-
# @param [Object] action Value to be assigned
|
|
110
|
-
def action=(action)
|
|
111
|
-
if action.nil?
|
|
112
|
-
fail ArgumentError, 'action cannot be nil'
|
|
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'
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
@reason = reason
|
|
126
|
-
end
|
|
127
|
-
|
|
128
94
|
# Checks equality by comparing each attribute.
|
|
129
95
|
# @param [Object] Object to be compared
|
|
130
96
|
def ==(o)
|
|
131
97
|
return true if self.equal?(o)
|
|
132
98
|
self.class == o.class &&
|
|
133
|
-
|
|
134
|
-
|
|
99
|
+
href == o.href &&
|
|
100
|
+
type == o.type
|
|
135
101
|
end
|
|
136
102
|
|
|
137
103
|
# @see the `==` method
|
|
@@ -143,7 +109,7 @@ module LaunchDarklyApi
|
|
|
143
109
|
# Calculates hash code according to all attributes.
|
|
144
110
|
# @return [Integer] Hash code
|
|
145
111
|
def hash
|
|
146
|
-
[
|
|
112
|
+
[href, type].hash
|
|
147
113
|
end
|
|
148
114
|
|
|
149
115
|
# Builds the object from hash
|