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
data/lib/launchdarkly_api/models/{release_policies_access_rep.rb → pinned_skill_tool_ref.rb}
RENAMED
|
@@ -14,16 +14,19 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module LaunchDarklyApi
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
# A version of an AI tool in the same project that an agent skill version pins.
|
|
18
|
+
class PinnedSkillToolRef < ApiModelBase
|
|
19
|
+
# The key of the AI tool.
|
|
20
|
+
attr_accessor :key
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
# The pinned version of the AI tool.
|
|
23
|
+
attr_accessor :version
|
|
21
24
|
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
26
|
def self.attribute_map
|
|
24
27
|
{
|
|
25
|
-
:'
|
|
26
|
-
:'
|
|
28
|
+
:'key' => :'key',
|
|
29
|
+
:'version' => :'version'
|
|
27
30
|
}
|
|
28
31
|
end
|
|
29
32
|
|
|
@@ -40,8 +43,8 @@ module LaunchDarklyApi
|
|
|
40
43
|
# Attribute type mapping.
|
|
41
44
|
def self.openapi_types
|
|
42
45
|
{
|
|
43
|
-
:'
|
|
44
|
-
:'
|
|
46
|
+
:'key' => :'String',
|
|
47
|
+
:'version' => :'Integer'
|
|
45
48
|
}
|
|
46
49
|
end
|
|
47
50
|
|
|
@@ -51,43 +54,32 @@ module LaunchDarklyApi
|
|
|
51
54
|
])
|
|
52
55
|
end
|
|
53
56
|
|
|
54
|
-
# List of class defined in allOf (OpenAPI v3)
|
|
55
|
-
def self.openapi_all_of
|
|
56
|
-
[
|
|
57
|
-
:'ReleasePoliciesAccess'
|
|
58
|
-
]
|
|
59
|
-
end
|
|
60
|
-
|
|
61
57
|
# Initializes the object
|
|
62
58
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
59
|
def initialize(attributes = {})
|
|
64
60
|
if (!attributes.is_a?(Hash))
|
|
65
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::PinnedSkillToolRef` initialize method"
|
|
66
62
|
end
|
|
67
63
|
|
|
68
64
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
65
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
66
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
67
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::PinnedSkillToolRef`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
69
|
end
|
|
74
70
|
h[k.to_sym] = v
|
|
75
71
|
}
|
|
76
72
|
|
|
77
|
-
if attributes.key?(:'
|
|
78
|
-
|
|
79
|
-
self.denied = value
|
|
80
|
-
end
|
|
73
|
+
if attributes.key?(:'key')
|
|
74
|
+
self.key = attributes[:'key']
|
|
81
75
|
else
|
|
82
|
-
self.
|
|
76
|
+
self.key = nil
|
|
83
77
|
end
|
|
84
78
|
|
|
85
|
-
if attributes.key?(:'
|
|
86
|
-
|
|
87
|
-
self.allowed = value
|
|
88
|
-
end
|
|
79
|
+
if attributes.key?(:'version')
|
|
80
|
+
self.version = attributes[:'version']
|
|
89
81
|
else
|
|
90
|
-
self.
|
|
82
|
+
self.version = nil
|
|
91
83
|
end
|
|
92
84
|
end
|
|
93
85
|
|
|
@@ -96,12 +88,16 @@ module LaunchDarklyApi
|
|
|
96
88
|
def list_invalid_properties
|
|
97
89
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
98
90
|
invalid_properties = Array.new
|
|
99
|
-
if @
|
|
100
|
-
invalid_properties.push('invalid value for "
|
|
91
|
+
if @key.nil?
|
|
92
|
+
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
101
93
|
end
|
|
102
94
|
|
|
103
|
-
if @
|
|
104
|
-
invalid_properties.push('invalid value for "
|
|
95
|
+
if @version.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "version", version cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if @version < 1
|
|
100
|
+
invalid_properties.push('invalid value for "version", must be greater than or equal to 1.')
|
|
105
101
|
end
|
|
106
102
|
|
|
107
103
|
invalid_properties
|
|
@@ -111,29 +107,34 @@ module LaunchDarklyApi
|
|
|
111
107
|
# @return true if the model is valid
|
|
112
108
|
def valid?
|
|
113
109
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
114
|
-
return false if @
|
|
115
|
-
return false if @
|
|
110
|
+
return false if @key.nil?
|
|
111
|
+
return false if @version.nil?
|
|
112
|
+
return false if @version < 1
|
|
116
113
|
true
|
|
117
114
|
end
|
|
118
115
|
|
|
119
116
|
# Custom attribute writer method with validation
|
|
120
|
-
# @param [Object]
|
|
121
|
-
def
|
|
122
|
-
if
|
|
123
|
-
fail ArgumentError, '
|
|
117
|
+
# @param [Object] key Value to be assigned
|
|
118
|
+
def key=(key)
|
|
119
|
+
if key.nil?
|
|
120
|
+
fail ArgumentError, 'key cannot be nil'
|
|
124
121
|
end
|
|
125
122
|
|
|
126
|
-
@
|
|
123
|
+
@key = key
|
|
127
124
|
end
|
|
128
125
|
|
|
129
126
|
# Custom attribute writer method with validation
|
|
130
|
-
# @param [Object]
|
|
131
|
-
def
|
|
132
|
-
if
|
|
133
|
-
fail ArgumentError, '
|
|
127
|
+
# @param [Object] version Value to be assigned
|
|
128
|
+
def version=(version)
|
|
129
|
+
if version.nil?
|
|
130
|
+
fail ArgumentError, 'version cannot be nil'
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if version < 1
|
|
134
|
+
fail ArgumentError, 'invalid value for "version", must be greater than or equal to 1.'
|
|
134
135
|
end
|
|
135
136
|
|
|
136
|
-
@
|
|
137
|
+
@version = version
|
|
137
138
|
end
|
|
138
139
|
|
|
139
140
|
# Checks equality by comparing each attribute.
|
|
@@ -141,8 +142,8 @@ module LaunchDarklyApi
|
|
|
141
142
|
def ==(o)
|
|
142
143
|
return true if self.equal?(o)
|
|
143
144
|
self.class == o.class &&
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
key == o.key &&
|
|
146
|
+
version == o.version
|
|
146
147
|
end
|
|
147
148
|
|
|
148
149
|
# @see the `==` method
|
|
@@ -154,7 +155,7 @@ module LaunchDarklyApi
|
|
|
154
155
|
# Calculates hash code according to all attributes.
|
|
155
156
|
# @return [Integer] Hash code
|
|
156
157
|
def hash
|
|
157
|
-
[
|
|
158
|
+
[key, version].hash
|
|
158
159
|
end
|
|
159
160
|
|
|
160
161
|
# Builds the object from hash
|
data/lib/launchdarkly_api/models/{release_policy.rb → post_environment_release_plan_request.rb}
RENAMED
|
@@ -14,28 +14,20 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module LaunchDarklyApi
|
|
17
|
-
class
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
# The unique identifier of the release policy
|
|
21
|
-
attr_accessor :_id
|
|
17
|
+
class PostEnvironmentReleasePlanRequest < ApiModelBase
|
|
18
|
+
# Human-readable name for this release plan
|
|
19
|
+
attr_accessor :name
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
# Unique key identifying this release plan within the project. Immutable once created. Unique only among active (non-deleted) plans — a soft-deleted plan's key can be reused by a new plan.
|
|
22
|
+
attr_accessor :key
|
|
24
23
|
|
|
25
|
-
#
|
|
26
|
-
attr_accessor :
|
|
24
|
+
# Human-readable description of this release plan's purpose
|
|
25
|
+
attr_accessor :description
|
|
27
26
|
|
|
27
|
+
# Discriminates which nested config object is required
|
|
28
28
|
attr_accessor :release_method
|
|
29
29
|
|
|
30
|
-
attr_accessor :
|
|
31
|
-
|
|
32
|
-
attr_accessor :progressive_release_config
|
|
33
|
-
|
|
34
|
-
# The name of the release policy
|
|
35
|
-
attr_accessor :name
|
|
36
|
-
|
|
37
|
-
# The human-readable key of the release policy
|
|
38
|
-
attr_accessor :key
|
|
30
|
+
attr_accessor :progressive_release
|
|
39
31
|
|
|
40
32
|
class EnumAttributeValidator
|
|
41
33
|
attr_reader :datatype
|
|
@@ -62,15 +54,11 @@ module LaunchDarklyApi
|
|
|
62
54
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
63
55
|
def self.attribute_map
|
|
64
56
|
{
|
|
65
|
-
:'_access' => :'_access',
|
|
66
|
-
:'_id' => :'_id',
|
|
67
|
-
:'scope' => :'scope',
|
|
68
|
-
:'rank' => :'rank',
|
|
69
|
-
:'release_method' => :'releaseMethod',
|
|
70
|
-
:'guarded_release_config' => :'guardedReleaseConfig',
|
|
71
|
-
:'progressive_release_config' => :'progressiveReleaseConfig',
|
|
72
57
|
:'name' => :'name',
|
|
73
|
-
:'key' => :'key'
|
|
58
|
+
:'key' => :'key',
|
|
59
|
+
:'description' => :'description',
|
|
60
|
+
:'release_method' => :'releaseMethod',
|
|
61
|
+
:'progressive_release' => :'progressiveRelease'
|
|
74
62
|
}
|
|
75
63
|
end
|
|
76
64
|
|
|
@@ -87,15 +75,11 @@ module LaunchDarklyApi
|
|
|
87
75
|
# Attribute type mapping.
|
|
88
76
|
def self.openapi_types
|
|
89
77
|
{
|
|
90
|
-
:'_access' => :'ReleasePoliciesAccessRep',
|
|
91
|
-
:'_id' => :'String',
|
|
92
|
-
:'scope' => :'ReleasePolicyScope',
|
|
93
|
-
:'rank' => :'Integer',
|
|
94
|
-
:'release_method' => :'ReleaseMethod',
|
|
95
|
-
:'guarded_release_config' => :'GuardedReleaseConfig',
|
|
96
|
-
:'progressive_release_config' => :'ProgressiveReleaseConfig',
|
|
97
78
|
:'name' => :'String',
|
|
98
|
-
:'key' => :'String'
|
|
79
|
+
:'key' => :'String',
|
|
80
|
+
:'description' => :'String',
|
|
81
|
+
:'release_method' => :'String',
|
|
82
|
+
:'progressive_release' => :'EnvironmentReleasePlanProgressiveRelease'
|
|
99
83
|
}
|
|
100
84
|
end
|
|
101
85
|
|
|
@@ -109,62 +93,44 @@ module LaunchDarklyApi
|
|
|
109
93
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
94
|
def initialize(attributes = {})
|
|
111
95
|
if (!attributes.is_a?(Hash))
|
|
112
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::
|
|
96
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::PostEnvironmentReleasePlanRequest` initialize method"
|
|
113
97
|
end
|
|
114
98
|
|
|
115
99
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
116
100
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
117
101
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
118
102
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
119
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::
|
|
103
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::PostEnvironmentReleasePlanRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
120
104
|
end
|
|
121
105
|
h[k.to_sym] = v
|
|
122
106
|
}
|
|
123
107
|
|
|
124
|
-
if attributes.key?(:'
|
|
125
|
-
self.
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
if attributes.key?(:'_id')
|
|
129
|
-
self._id = attributes[:'_id']
|
|
108
|
+
if attributes.key?(:'name')
|
|
109
|
+
self.name = attributes[:'name']
|
|
130
110
|
else
|
|
131
|
-
self.
|
|
111
|
+
self.name = nil
|
|
132
112
|
end
|
|
133
113
|
|
|
134
|
-
if attributes.key?(:'
|
|
135
|
-
self.
|
|
114
|
+
if attributes.key?(:'key')
|
|
115
|
+
self.key = attributes[:'key']
|
|
116
|
+
else
|
|
117
|
+
self.key = nil
|
|
136
118
|
end
|
|
137
119
|
|
|
138
|
-
if attributes.key?(:'
|
|
139
|
-
self.
|
|
140
|
-
else
|
|
141
|
-
self.rank = nil
|
|
120
|
+
if attributes.key?(:'description')
|
|
121
|
+
self.description = attributes[:'description']
|
|
142
122
|
end
|
|
143
123
|
|
|
144
124
|
if attributes.key?(:'release_method')
|
|
145
125
|
self.release_method = attributes[:'release_method']
|
|
146
126
|
else
|
|
147
|
-
self.release_method =
|
|
127
|
+
self.release_method = 'progressive_release'
|
|
148
128
|
end
|
|
149
129
|
|
|
150
|
-
if attributes.key?(:'
|
|
151
|
-
self.
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
if attributes.key?(:'progressive_release_config')
|
|
155
|
-
self.progressive_release_config = attributes[:'progressive_release_config']
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
if attributes.key?(:'name')
|
|
159
|
-
self.name = attributes[:'name']
|
|
160
|
-
else
|
|
161
|
-
self.name = nil
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
if attributes.key?(:'key')
|
|
165
|
-
self.key = attributes[:'key']
|
|
130
|
+
if attributes.key?(:'progressive_release')
|
|
131
|
+
self.progressive_release = attributes[:'progressive_release']
|
|
166
132
|
else
|
|
167
|
-
self.
|
|
133
|
+
self.progressive_release = nil
|
|
168
134
|
end
|
|
169
135
|
end
|
|
170
136
|
|
|
@@ -173,18 +139,6 @@ module LaunchDarklyApi
|
|
|
173
139
|
def list_invalid_properties
|
|
174
140
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
175
141
|
invalid_properties = Array.new
|
|
176
|
-
if @_id.nil?
|
|
177
|
-
invalid_properties.push('invalid value for "_id", _id cannot be nil.')
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
if @rank.nil?
|
|
181
|
-
invalid_properties.push('invalid value for "rank", rank cannot be nil.')
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
if @release_method.nil?
|
|
185
|
-
invalid_properties.push('invalid value for "release_method", release_method cannot be nil.')
|
|
186
|
-
end
|
|
187
|
-
|
|
188
142
|
if @name.nil?
|
|
189
143
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
190
144
|
end
|
|
@@ -197,6 +151,23 @@ module LaunchDarklyApi
|
|
|
197
151
|
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
198
152
|
end
|
|
199
153
|
|
|
154
|
+
if @key.to_s.length > 256
|
|
155
|
+
invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 256.')
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if @key.to_s.length < 1
|
|
159
|
+
invalid_properties.push('invalid value for "key", the character length must be greater than or equal to 1.')
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
pattern = Regexp.new(/^[a-zA-Z0-9][._\-a-zA-Z0-9]*$/)
|
|
163
|
+
if @key !~ pattern
|
|
164
|
+
invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if @progressive_release.nil?
|
|
168
|
+
invalid_properties.push('invalid value for "progressive_release", progressive_release cannot be nil.')
|
|
169
|
+
end
|
|
170
|
+
|
|
200
171
|
invalid_properties
|
|
201
172
|
end
|
|
202
173
|
|
|
@@ -204,45 +175,18 @@ module LaunchDarklyApi
|
|
|
204
175
|
# @return true if the model is valid
|
|
205
176
|
def valid?
|
|
206
177
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
207
|
-
return false if @_id.nil?
|
|
208
|
-
return false if @rank.nil?
|
|
209
|
-
return false if @release_method.nil?
|
|
210
178
|
return false if @name.nil?
|
|
211
179
|
return false if @name.to_s.length > 256
|
|
212
180
|
return false if @key.nil?
|
|
181
|
+
return false if @key.to_s.length > 256
|
|
182
|
+
return false if @key.to_s.length < 1
|
|
183
|
+
return false if @key !~ Regexp.new(/^[a-zA-Z0-9][._\-a-zA-Z0-9]*$/)
|
|
184
|
+
release_method_validator = EnumAttributeValidator.new('String', ["progressive_release"])
|
|
185
|
+
return false unless release_method_validator.valid?(@release_method)
|
|
186
|
+
return false if @progressive_release.nil?
|
|
213
187
|
true
|
|
214
188
|
end
|
|
215
189
|
|
|
216
|
-
# Custom attribute writer method with validation
|
|
217
|
-
# @param [Object] _id Value to be assigned
|
|
218
|
-
def _id=(_id)
|
|
219
|
-
if _id.nil?
|
|
220
|
-
fail ArgumentError, '_id cannot be nil'
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
@_id = _id
|
|
224
|
-
end
|
|
225
|
-
|
|
226
|
-
# Custom attribute writer method with validation
|
|
227
|
-
# @param [Object] rank Value to be assigned
|
|
228
|
-
def rank=(rank)
|
|
229
|
-
if rank.nil?
|
|
230
|
-
fail ArgumentError, 'rank cannot be nil'
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
@rank = rank
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
# Custom attribute writer method with validation
|
|
237
|
-
# @param [Object] release_method Value to be assigned
|
|
238
|
-
def release_method=(release_method)
|
|
239
|
-
if release_method.nil?
|
|
240
|
-
fail ArgumentError, 'release_method cannot be nil'
|
|
241
|
-
end
|
|
242
|
-
|
|
243
|
-
@release_method = release_method
|
|
244
|
-
end
|
|
245
|
-
|
|
246
190
|
# Custom attribute writer method with validation
|
|
247
191
|
# @param [Object] name Value to be assigned
|
|
248
192
|
def name=(name)
|
|
@@ -264,23 +208,52 @@ module LaunchDarklyApi
|
|
|
264
208
|
fail ArgumentError, 'key cannot be nil'
|
|
265
209
|
end
|
|
266
210
|
|
|
211
|
+
if key.to_s.length > 256
|
|
212
|
+
fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 256.'
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if key.to_s.length < 1
|
|
216
|
+
fail ArgumentError, 'invalid value for "key", the character length must be greater than or equal to 1.'
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
pattern = Regexp.new(/^[a-zA-Z0-9][._\-a-zA-Z0-9]*$/)
|
|
220
|
+
if key !~ pattern
|
|
221
|
+
fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
|
|
222
|
+
end
|
|
223
|
+
|
|
267
224
|
@key = key
|
|
268
225
|
end
|
|
269
226
|
|
|
227
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
228
|
+
# @param [Object] release_method Object to be assigned
|
|
229
|
+
def release_method=(release_method)
|
|
230
|
+
validator = EnumAttributeValidator.new('String', ["progressive_release"])
|
|
231
|
+
unless validator.valid?(release_method)
|
|
232
|
+
fail ArgumentError, "invalid value for \"release_method\", must be one of #{validator.allowable_values}."
|
|
233
|
+
end
|
|
234
|
+
@release_method = release_method
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Custom attribute writer method with validation
|
|
238
|
+
# @param [Object] progressive_release Value to be assigned
|
|
239
|
+
def progressive_release=(progressive_release)
|
|
240
|
+
if progressive_release.nil?
|
|
241
|
+
fail ArgumentError, 'progressive_release cannot be nil'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
@progressive_release = progressive_release
|
|
245
|
+
end
|
|
246
|
+
|
|
270
247
|
# Checks equality by comparing each attribute.
|
|
271
248
|
# @param [Object] Object to be compared
|
|
272
249
|
def ==(o)
|
|
273
250
|
return true if self.equal?(o)
|
|
274
251
|
self.class == o.class &&
|
|
275
|
-
_access == o._access &&
|
|
276
|
-
_id == o._id &&
|
|
277
|
-
scope == o.scope &&
|
|
278
|
-
rank == o.rank &&
|
|
279
|
-
release_method == o.release_method &&
|
|
280
|
-
guarded_release_config == o.guarded_release_config &&
|
|
281
|
-
progressive_release_config == o.progressive_release_config &&
|
|
282
252
|
name == o.name &&
|
|
283
|
-
key == o.key
|
|
253
|
+
key == o.key &&
|
|
254
|
+
description == o.description &&
|
|
255
|
+
release_method == o.release_method &&
|
|
256
|
+
progressive_release == o.progressive_release
|
|
284
257
|
end
|
|
285
258
|
|
|
286
259
|
# @see the `==` method
|
|
@@ -292,7 +265,7 @@ module LaunchDarklyApi
|
|
|
292
265
|
# Calculates hash code according to all attributes.
|
|
293
266
|
# @return [Integer] Hash code
|
|
294
267
|
def hash
|
|
295
|
-
[
|
|
268
|
+
[name, key, description, release_method, progressive_release].hash
|
|
296
269
|
end
|
|
297
270
|
|
|
298
271
|
# Builds the object from hash
|
|
@@ -14,16 +14,14 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module LaunchDarklyApi
|
|
17
|
-
class
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
attr_accessor :allowed
|
|
17
|
+
class PutDefaultEnvironmentReleasePlanRequest < ApiModelBase
|
|
18
|
+
# Key of the release plan to set as the environment's default
|
|
19
|
+
attr_accessor :key
|
|
21
20
|
|
|
22
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
22
|
def self.attribute_map
|
|
24
23
|
{
|
|
25
|
-
:'
|
|
26
|
-
:'allowed' => :'allowed'
|
|
24
|
+
:'key' => :'key'
|
|
27
25
|
}
|
|
28
26
|
end
|
|
29
27
|
|
|
@@ -40,8 +38,7 @@ module LaunchDarklyApi
|
|
|
40
38
|
# Attribute type mapping.
|
|
41
39
|
def self.openapi_types
|
|
42
40
|
{
|
|
43
|
-
:'
|
|
44
|
-
:'allowed' => :'Array<ReleasePoliciesAccessAllowedRep>'
|
|
41
|
+
:'key' => :'String'
|
|
45
42
|
}
|
|
46
43
|
end
|
|
47
44
|
|
|
@@ -55,32 +52,22 @@ module LaunchDarklyApi
|
|
|
55
52
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
53
|
def initialize(attributes = {})
|
|
57
54
|
if (!attributes.is_a?(Hash))
|
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::PutDefaultEnvironmentReleasePlanRequest` initialize method"
|
|
59
56
|
end
|
|
60
57
|
|
|
61
58
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
59
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
60
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
61
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::PutDefaultEnvironmentReleasePlanRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
63
|
end
|
|
67
64
|
h[k.to_sym] = v
|
|
68
65
|
}
|
|
69
66
|
|
|
70
|
-
if attributes.key?(:'
|
|
71
|
-
|
|
72
|
-
self.denied = value
|
|
73
|
-
end
|
|
74
|
-
else
|
|
75
|
-
self.denied = nil
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
if attributes.key?(:'allowed')
|
|
79
|
-
if (value = attributes[:'allowed']).is_a?(Array)
|
|
80
|
-
self.allowed = value
|
|
81
|
-
end
|
|
67
|
+
if attributes.key?(:'key')
|
|
68
|
+
self.key = attributes[:'key']
|
|
82
69
|
else
|
|
83
|
-
self.
|
|
70
|
+
self.key = nil
|
|
84
71
|
end
|
|
85
72
|
end
|
|
86
73
|
|
|
@@ -89,12 +76,16 @@ module LaunchDarklyApi
|
|
|
89
76
|
def list_invalid_properties
|
|
90
77
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
91
78
|
invalid_properties = Array.new
|
|
92
|
-
if @
|
|
93
|
-
invalid_properties.push('invalid value for "
|
|
79
|
+
if @key.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
|
94
81
|
end
|
|
95
82
|
|
|
96
|
-
if @
|
|
97
|
-
invalid_properties.push('invalid value for "
|
|
83
|
+
if @key.to_s.length > 256
|
|
84
|
+
invalid_properties.push('invalid value for "key", the character length must be smaller than or equal to 256.')
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if @key.to_s.length < 1
|
|
88
|
+
invalid_properties.push('invalid value for "key", the character length must be greater than or equal to 1.')
|
|
98
89
|
end
|
|
99
90
|
|
|
100
91
|
invalid_properties
|
|
@@ -104,29 +95,28 @@ module LaunchDarklyApi
|
|
|
104
95
|
# @return true if the model is valid
|
|
105
96
|
def valid?
|
|
106
97
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
107
|
-
return false if @
|
|
108
|
-
return false if @
|
|
98
|
+
return false if @key.nil?
|
|
99
|
+
return false if @key.to_s.length > 256
|
|
100
|
+
return false if @key.to_s.length < 1
|
|
109
101
|
true
|
|
110
102
|
end
|
|
111
103
|
|
|
112
104
|
# Custom attribute writer method with validation
|
|
113
|
-
# @param [Object]
|
|
114
|
-
def
|
|
115
|
-
if
|
|
116
|
-
fail ArgumentError, '
|
|
105
|
+
# @param [Object] key Value to be assigned
|
|
106
|
+
def key=(key)
|
|
107
|
+
if key.nil?
|
|
108
|
+
fail ArgumentError, 'key cannot be nil'
|
|
117
109
|
end
|
|
118
110
|
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
if key.to_s.length > 256
|
|
112
|
+
fail ArgumentError, 'invalid value for "key", the character length must be smaller than or equal to 256.'
|
|
113
|
+
end
|
|
121
114
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
def allowed=(allowed)
|
|
125
|
-
if allowed.nil?
|
|
126
|
-
fail ArgumentError, 'allowed cannot be nil'
|
|
115
|
+
if key.to_s.length < 1
|
|
116
|
+
fail ArgumentError, 'invalid value for "key", the character length must be greater than or equal to 1.'
|
|
127
117
|
end
|
|
128
118
|
|
|
129
|
-
@
|
|
119
|
+
@key = key
|
|
130
120
|
end
|
|
131
121
|
|
|
132
122
|
# Checks equality by comparing each attribute.
|
|
@@ -134,8 +124,7 @@ module LaunchDarklyApi
|
|
|
134
124
|
def ==(o)
|
|
135
125
|
return true if self.equal?(o)
|
|
136
126
|
self.class == o.class &&
|
|
137
|
-
|
|
138
|
-
allowed == o.allowed
|
|
127
|
+
key == o.key
|
|
139
128
|
end
|
|
140
129
|
|
|
141
130
|
# @see the `==` method
|
|
@@ -147,7 +136,7 @@ module LaunchDarklyApi
|
|
|
147
136
|
# Calculates hash code according to all attributes.
|
|
148
137
|
# @return [Integer] Hash code
|
|
149
138
|
def hash
|
|
150
|
-
[
|
|
139
|
+
[key].hash
|
|
151
140
|
end
|
|
152
141
|
|
|
153
142
|
# Builds the object from hash
|