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/api/{release_policies_beta_api.rb → flag_release_plans_beta_api.rb}
RENAMED
|
@@ -13,38 +13,38 @@ Generator version: 7.18.0
|
|
|
13
13
|
require 'cgi'
|
|
14
14
|
|
|
15
15
|
module LaunchDarklyApi
|
|
16
|
-
class
|
|
16
|
+
class FlagReleasePlansBetaApi
|
|
17
17
|
attr_accessor :api_client
|
|
18
18
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
#
|
|
22
|
+
# Create a flag release plan for a project
|
|
23
|
+
# Creates a flag release plan. The key must not be in use by another active plan in the project, or the request is rejected with 409. The request is rejected with 400 when an environment isn't in the project, the maintainer isn't in the account, an environment release plan doesn't exist, is incomplete, or is in another environment, `default` is set while the project already has a default plan, or the project already has the maximum number of plans. To make a new plan the project's default, create it, then update it with `default` set, which demotes the current default.
|
|
24
24
|
# @param ld_api_version [String] Version of the endpoint.
|
|
25
|
-
# @param project_key [String]
|
|
26
|
-
# @param
|
|
25
|
+
# @param project_key [String]
|
|
26
|
+
# @param create_flag_release_plan_request [CreateFlagReleasePlanRequest]
|
|
27
27
|
# @param [Hash] opts the optional parameters
|
|
28
|
-
# @return [
|
|
29
|
-
def
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
# @return [FlagReleasePlan]
|
|
29
|
+
def create_flag_release_plan(ld_api_version, project_key, create_flag_release_plan_request, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_flag_release_plan_with_http_info(ld_api_version, project_key, create_flag_release_plan_request, opts)
|
|
31
|
+
data
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
#
|
|
35
|
-
#
|
|
34
|
+
# Create a flag release plan for a project
|
|
35
|
+
# Creates a flag release plan. The key must not be in use by another active plan in the project, or the request is rejected with 409. The request is rejected with 400 when an environment isn't in the project, the maintainer isn't in the account, an environment release plan doesn't exist, is incomplete, or is in another environment, `default` is set while the project already has a default plan, or the project already has the maximum number of plans. To make a new plan the project's default, create it, then update it with `default` set, which demotes the current default.
|
|
36
36
|
# @param ld_api_version [String] Version of the endpoint.
|
|
37
|
-
# @param project_key [String]
|
|
38
|
-
# @param
|
|
37
|
+
# @param project_key [String]
|
|
38
|
+
# @param create_flag_release_plan_request [CreateFlagReleasePlanRequest]
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
|
-
# @return [Array<(
|
|
41
|
-
def
|
|
40
|
+
# @return [Array<(FlagReleasePlan, Integer, Hash)>] FlagReleasePlan data, response status code and response headers
|
|
41
|
+
def create_flag_release_plan_with_http_info(ld_api_version, project_key, create_flag_release_plan_request, opts = {})
|
|
42
42
|
if @api_client.config.debugging
|
|
43
|
-
@api_client.config.logger.debug 'Calling API:
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: FlagReleasePlansBetaApi.create_flag_release_plan ...'
|
|
44
44
|
end
|
|
45
45
|
# verify the required parameter 'ld_api_version' is set
|
|
46
46
|
if @api_client.config.client_side_validation && ld_api_version.nil?
|
|
47
|
-
fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling FlagReleasePlansBetaApi.create_flag_release_plan"
|
|
48
48
|
end
|
|
49
49
|
# verify enum value
|
|
50
50
|
allowable_values = ["beta"]
|
|
@@ -53,14 +53,18 @@ module LaunchDarklyApi
|
|
|
53
53
|
end
|
|
54
54
|
# verify the required parameter 'project_key' is set
|
|
55
55
|
if @api_client.config.client_side_validation && project_key.nil?
|
|
56
|
-
fail ArgumentError, "Missing the required parameter 'project_key' when calling
|
|
56
|
+
fail ArgumentError, "Missing the required parameter 'project_key' when calling FlagReleasePlansBetaApi.create_flag_release_plan"
|
|
57
57
|
end
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
if @api_client.config.client_side_validation && project_key.to_s.length < 1
|
|
59
|
+
fail ArgumentError, 'invalid value for "project_key" when calling FlagReleasePlansBetaApi.create_flag_release_plan, the character length must be greater than or equal to 1.'
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# verify the required parameter 'create_flag_release_plan_request' is set
|
|
63
|
+
if @api_client.config.client_side_validation && create_flag_release_plan_request.nil?
|
|
64
|
+
fail ArgumentError, "Missing the required parameter 'create_flag_release_plan_request' when calling FlagReleasePlansBetaApi.create_flag_release_plan"
|
|
61
65
|
end
|
|
62
66
|
# resource path
|
|
63
|
-
local_var_path = '/api/v2/projects/{projectKey}/release-
|
|
67
|
+
local_var_path = '/api/v2/projects/{projectKey}/flag-release-plans'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s))
|
|
64
68
|
|
|
65
69
|
# query parameters
|
|
66
70
|
query_params = opts[:query_params] || {}
|
|
@@ -69,22 +73,27 @@ module LaunchDarklyApi
|
|
|
69
73
|
header_params = opts[:header_params] || {}
|
|
70
74
|
# HTTP header 'Accept' (if needed)
|
|
71
75
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
76
|
+
# HTTP header 'Content-Type'
|
|
77
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
78
|
+
if !content_type.nil?
|
|
79
|
+
header_params['Content-Type'] = content_type
|
|
80
|
+
end
|
|
72
81
|
header_params[:'LD-API-Version'] = ld_api_version
|
|
73
82
|
|
|
74
83
|
# form parameters
|
|
75
84
|
form_params = opts[:form_params] || {}
|
|
76
85
|
|
|
77
86
|
# http body (model)
|
|
78
|
-
post_body = opts[:debug_body]
|
|
87
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_flag_release_plan_request)
|
|
79
88
|
|
|
80
89
|
# return_type
|
|
81
|
-
return_type = opts[:debug_return_type]
|
|
90
|
+
return_type = opts[:debug_return_type] || 'FlagReleasePlan'
|
|
82
91
|
|
|
83
92
|
# auth_names
|
|
84
93
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
85
94
|
|
|
86
95
|
new_options = opts.merge(
|
|
87
|
-
:operation => :"
|
|
96
|
+
:operation => :"FlagReleasePlansBetaApi.create_flag_release_plan",
|
|
88
97
|
:header_params => header_params,
|
|
89
98
|
:query_params => query_params,
|
|
90
99
|
:form_params => form_params,
|
|
@@ -93,39 +102,39 @@ module LaunchDarklyApi
|
|
|
93
102
|
:return_type => return_type
|
|
94
103
|
)
|
|
95
104
|
|
|
96
|
-
data, status_code, headers = @api_client.call_api(:
|
|
105
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
97
106
|
if @api_client.config.debugging
|
|
98
|
-
@api_client.config.logger.debug "API called:
|
|
107
|
+
@api_client.config.logger.debug "API called: FlagReleasePlansBetaApi#create_flag_release_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
99
108
|
end
|
|
100
109
|
return data, status_code, headers
|
|
101
110
|
end
|
|
102
111
|
|
|
103
|
-
#
|
|
104
|
-
#
|
|
112
|
+
# Delete a flag release plan in a project
|
|
113
|
+
# Delete a flag release plan in a project.
|
|
105
114
|
# @param ld_api_version [String] Version of the endpoint.
|
|
106
|
-
# @param project_key [String]
|
|
115
|
+
# @param project_key [String]
|
|
116
|
+
# @param plan_key [String]
|
|
107
117
|
# @param [Hash] opts the optional parameters
|
|
108
|
-
# @
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
data
|
|
118
|
+
# @return [nil]
|
|
119
|
+
def delete_flag_release_plan(ld_api_version, project_key, plan_key, opts = {})
|
|
120
|
+
delete_flag_release_plan_with_http_info(ld_api_version, project_key, plan_key, opts)
|
|
121
|
+
nil
|
|
113
122
|
end
|
|
114
123
|
|
|
115
|
-
#
|
|
116
|
-
#
|
|
124
|
+
# Delete a flag release plan in a project
|
|
125
|
+
# Delete a flag release plan in a project.
|
|
117
126
|
# @param ld_api_version [String] Version of the endpoint.
|
|
118
|
-
# @param project_key [String]
|
|
127
|
+
# @param project_key [String]
|
|
128
|
+
# @param plan_key [String]
|
|
119
129
|
# @param [Hash] opts the optional parameters
|
|
120
|
-
# @
|
|
121
|
-
|
|
122
|
-
def get_release_policies_with_http_info(ld_api_version, project_key, opts = {})
|
|
130
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
131
|
+
def delete_flag_release_plan_with_http_info(ld_api_version, project_key, plan_key, opts = {})
|
|
123
132
|
if @api_client.config.debugging
|
|
124
|
-
@api_client.config.logger.debug 'Calling API:
|
|
133
|
+
@api_client.config.logger.debug 'Calling API: FlagReleasePlansBetaApi.delete_flag_release_plan ...'
|
|
125
134
|
end
|
|
126
135
|
# verify the required parameter 'ld_api_version' is set
|
|
127
136
|
if @api_client.config.client_side_validation && ld_api_version.nil?
|
|
128
|
-
fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling
|
|
137
|
+
fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling FlagReleasePlansBetaApi.delete_flag_release_plan"
|
|
129
138
|
end
|
|
130
139
|
# verify enum value
|
|
131
140
|
allowable_values = ["beta"]
|
|
@@ -134,14 +143,25 @@ module LaunchDarklyApi
|
|
|
134
143
|
end
|
|
135
144
|
# verify the required parameter 'project_key' is set
|
|
136
145
|
if @api_client.config.client_side_validation && project_key.nil?
|
|
137
|
-
fail ArgumentError, "Missing the required parameter 'project_key' when calling
|
|
146
|
+
fail ArgumentError, "Missing the required parameter 'project_key' when calling FlagReleasePlansBetaApi.delete_flag_release_plan"
|
|
138
147
|
end
|
|
148
|
+
if @api_client.config.client_side_validation && project_key.to_s.length < 1
|
|
149
|
+
fail ArgumentError, 'invalid value for "project_key" when calling FlagReleasePlansBetaApi.delete_flag_release_plan, the character length must be greater than or equal to 1.'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# verify the required parameter 'plan_key' is set
|
|
153
|
+
if @api_client.config.client_side_validation && plan_key.nil?
|
|
154
|
+
fail ArgumentError, "Missing the required parameter 'plan_key' when calling FlagReleasePlansBetaApi.delete_flag_release_plan"
|
|
155
|
+
end
|
|
156
|
+
if @api_client.config.client_side_validation && plan_key.to_s.length < 1
|
|
157
|
+
fail ArgumentError, 'invalid value for "plan_key" when calling FlagReleasePlansBetaApi.delete_flag_release_plan, the character length must be greater than or equal to 1.'
|
|
158
|
+
end
|
|
159
|
+
|
|
139
160
|
# resource path
|
|
140
|
-
local_var_path = '/api/v2/projects/{projectKey}/release-
|
|
161
|
+
local_var_path = '/api/v2/projects/{projectKey}/flag-release-plans/{planKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'planKey' + '}', CGI.escape(plan_key.to_s))
|
|
141
162
|
|
|
142
163
|
# query parameters
|
|
143
164
|
query_params = opts[:query_params] || {}
|
|
144
|
-
query_params[:'excludeDefault'] = opts[:'exclude_default'] if !opts[:'exclude_default'].nil?
|
|
145
165
|
|
|
146
166
|
# header parameters
|
|
147
167
|
header_params = opts[:header_params] || {}
|
|
@@ -156,13 +176,13 @@ module LaunchDarklyApi
|
|
|
156
176
|
post_body = opts[:debug_body]
|
|
157
177
|
|
|
158
178
|
# return_type
|
|
159
|
-
return_type = opts[:debug_return_type]
|
|
179
|
+
return_type = opts[:debug_return_type]
|
|
160
180
|
|
|
161
181
|
# auth_names
|
|
162
182
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
163
183
|
|
|
164
184
|
new_options = opts.merge(
|
|
165
|
-
:operation => :"
|
|
185
|
+
:operation => :"FlagReleasePlansBetaApi.delete_flag_release_plan",
|
|
166
186
|
:header_params => header_params,
|
|
167
187
|
:query_params => query_params,
|
|
168
188
|
:form_params => form_params,
|
|
@@ -171,39 +191,39 @@ module LaunchDarklyApi
|
|
|
171
191
|
:return_type => return_type
|
|
172
192
|
)
|
|
173
193
|
|
|
174
|
-
data, status_code, headers = @api_client.call_api(:
|
|
194
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
175
195
|
if @api_client.config.debugging
|
|
176
|
-
@api_client.config.logger.debug "API called:
|
|
196
|
+
@api_client.config.logger.debug "API called: FlagReleasePlansBetaApi#delete_flag_release_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
177
197
|
end
|
|
178
198
|
return data, status_code, headers
|
|
179
199
|
end
|
|
180
200
|
|
|
181
|
-
# Get a release
|
|
182
|
-
#
|
|
201
|
+
# Get a flag release plan in a project by plan key
|
|
202
|
+
# Get a flag release plan in a project by plan key.
|
|
183
203
|
# @param ld_api_version [String] Version of the endpoint.
|
|
184
|
-
# @param project_key [String]
|
|
185
|
-
# @param
|
|
204
|
+
# @param project_key [String]
|
|
205
|
+
# @param plan_key [String]
|
|
186
206
|
# @param [Hash] opts the optional parameters
|
|
187
|
-
# @return [
|
|
188
|
-
def
|
|
189
|
-
data, _status_code, _headers =
|
|
207
|
+
# @return [FlagReleasePlan]
|
|
208
|
+
def get_flag_release_plan(ld_api_version, project_key, plan_key, opts = {})
|
|
209
|
+
data, _status_code, _headers = get_flag_release_plan_with_http_info(ld_api_version, project_key, plan_key, opts)
|
|
190
210
|
data
|
|
191
211
|
end
|
|
192
212
|
|
|
193
|
-
# Get a release
|
|
194
|
-
#
|
|
213
|
+
# Get a flag release plan in a project by plan key
|
|
214
|
+
# Get a flag release plan in a project by plan key.
|
|
195
215
|
# @param ld_api_version [String] Version of the endpoint.
|
|
196
|
-
# @param project_key [String]
|
|
197
|
-
# @param
|
|
216
|
+
# @param project_key [String]
|
|
217
|
+
# @param plan_key [String]
|
|
198
218
|
# @param [Hash] opts the optional parameters
|
|
199
|
-
# @return [Array<(
|
|
200
|
-
def
|
|
219
|
+
# @return [Array<(FlagReleasePlan, Integer, Hash)>] FlagReleasePlan data, response status code and response headers
|
|
220
|
+
def get_flag_release_plan_with_http_info(ld_api_version, project_key, plan_key, opts = {})
|
|
201
221
|
if @api_client.config.debugging
|
|
202
|
-
@api_client.config.logger.debug 'Calling API:
|
|
222
|
+
@api_client.config.logger.debug 'Calling API: FlagReleasePlansBetaApi.get_flag_release_plan ...'
|
|
203
223
|
end
|
|
204
224
|
# verify the required parameter 'ld_api_version' is set
|
|
205
225
|
if @api_client.config.client_side_validation && ld_api_version.nil?
|
|
206
|
-
fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling
|
|
226
|
+
fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling FlagReleasePlansBetaApi.get_flag_release_plan"
|
|
207
227
|
end
|
|
208
228
|
# verify enum value
|
|
209
229
|
allowable_values = ["beta"]
|
|
@@ -212,14 +232,22 @@ module LaunchDarklyApi
|
|
|
212
232
|
end
|
|
213
233
|
# verify the required parameter 'project_key' is set
|
|
214
234
|
if @api_client.config.client_side_validation && project_key.nil?
|
|
215
|
-
fail ArgumentError, "Missing the required parameter 'project_key' when calling
|
|
235
|
+
fail ArgumentError, "Missing the required parameter 'project_key' when calling FlagReleasePlansBetaApi.get_flag_release_plan"
|
|
216
236
|
end
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
237
|
+
if @api_client.config.client_side_validation && project_key.to_s.length < 1
|
|
238
|
+
fail ArgumentError, 'invalid value for "project_key" when calling FlagReleasePlansBetaApi.get_flag_release_plan, the character length must be greater than or equal to 1.'
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# verify the required parameter 'plan_key' is set
|
|
242
|
+
if @api_client.config.client_side_validation && plan_key.nil?
|
|
243
|
+
fail ArgumentError, "Missing the required parameter 'plan_key' when calling FlagReleasePlansBetaApi.get_flag_release_plan"
|
|
220
244
|
end
|
|
245
|
+
if @api_client.config.client_side_validation && plan_key.to_s.length < 1
|
|
246
|
+
fail ArgumentError, 'invalid value for "plan_key" when calling FlagReleasePlansBetaApi.get_flag_release_plan, the character length must be greater than or equal to 1.'
|
|
247
|
+
end
|
|
248
|
+
|
|
221
249
|
# resource path
|
|
222
|
-
local_var_path = '/api/v2/projects/{projectKey}/release-
|
|
250
|
+
local_var_path = '/api/v2/projects/{projectKey}/flag-release-plans/{planKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'planKey' + '}', CGI.escape(plan_key.to_s))
|
|
223
251
|
|
|
224
252
|
# query parameters
|
|
225
253
|
query_params = opts[:query_params] || {}
|
|
@@ -237,13 +265,13 @@ module LaunchDarklyApi
|
|
|
237
265
|
post_body = opts[:debug_body]
|
|
238
266
|
|
|
239
267
|
# return_type
|
|
240
|
-
return_type = opts[:debug_return_type] || '
|
|
268
|
+
return_type = opts[:debug_return_type] || 'FlagReleasePlan'
|
|
241
269
|
|
|
242
270
|
# auth_names
|
|
243
271
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
244
272
|
|
|
245
273
|
new_options = opts.merge(
|
|
246
|
-
:operation => :"
|
|
274
|
+
:operation => :"FlagReleasePlansBetaApi.get_flag_release_plan",
|
|
247
275
|
:header_params => header_params,
|
|
248
276
|
:query_params => query_params,
|
|
249
277
|
:form_params => form_params,
|
|
@@ -254,37 +282,39 @@ module LaunchDarklyApi
|
|
|
254
282
|
|
|
255
283
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
256
284
|
if @api_client.config.debugging
|
|
257
|
-
@api_client.config.logger.debug "API called:
|
|
285
|
+
@api_client.config.logger.debug "API called: FlagReleasePlansBetaApi#get_flag_release_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
258
286
|
end
|
|
259
287
|
return data, status_code, headers
|
|
260
288
|
end
|
|
261
289
|
|
|
262
|
-
#
|
|
263
|
-
#
|
|
290
|
+
# List a project's flag release plans
|
|
291
|
+
# List a project's flag release plans, in creation order.
|
|
264
292
|
# @param ld_api_version [String] Version of the endpoint.
|
|
265
|
-
# @param project_key [String]
|
|
266
|
-
# @param request_body [Array<String>] Array of release policy keys in the desired rank order (scoped policies only). These keys must include _all_ of the scoped release policies for the project.
|
|
293
|
+
# @param project_key [String]
|
|
267
294
|
# @param [Hash] opts the optional parameters
|
|
268
|
-
# @
|
|
269
|
-
|
|
270
|
-
|
|
295
|
+
# @option opts [Integer] :limit The number of flag release plans to return. (default to 25)
|
|
296
|
+
# @option opts [Integer] :offset The number of flag release plans to skip. Used for pagination. (default to 0)
|
|
297
|
+
# @return [ListFlagReleasePlansResponse]
|
|
298
|
+
def list_flag_release_plans(ld_api_version, project_key, opts = {})
|
|
299
|
+
data, _status_code, _headers = list_flag_release_plans_with_http_info(ld_api_version, project_key, opts)
|
|
271
300
|
data
|
|
272
301
|
end
|
|
273
302
|
|
|
274
|
-
#
|
|
275
|
-
#
|
|
303
|
+
# List a project's flag release plans
|
|
304
|
+
# List a project's flag release plans, in creation order.
|
|
276
305
|
# @param ld_api_version [String] Version of the endpoint.
|
|
277
|
-
# @param project_key [String]
|
|
278
|
-
# @param request_body [Array<String>] Array of release policy keys in the desired rank order (scoped policies only). These keys must include _all_ of the scoped release policies for the project.
|
|
306
|
+
# @param project_key [String]
|
|
279
307
|
# @param [Hash] opts the optional parameters
|
|
280
|
-
# @
|
|
281
|
-
|
|
308
|
+
# @option opts [Integer] :limit The number of flag release plans to return. (default to 25)
|
|
309
|
+
# @option opts [Integer] :offset The number of flag release plans to skip. Used for pagination. (default to 0)
|
|
310
|
+
# @return [Array<(ListFlagReleasePlansResponse, Integer, Hash)>] ListFlagReleasePlansResponse data, response status code and response headers
|
|
311
|
+
def list_flag_release_plans_with_http_info(ld_api_version, project_key, opts = {})
|
|
282
312
|
if @api_client.config.debugging
|
|
283
|
-
@api_client.config.logger.debug 'Calling API:
|
|
313
|
+
@api_client.config.logger.debug 'Calling API: FlagReleasePlansBetaApi.list_flag_release_plans ...'
|
|
284
314
|
end
|
|
285
315
|
# verify the required parameter 'ld_api_version' is set
|
|
286
316
|
if @api_client.config.client_side_validation && ld_api_version.nil?
|
|
287
|
-
fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling
|
|
317
|
+
fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling FlagReleasePlansBetaApi.list_flag_release_plans"
|
|
288
318
|
end
|
|
289
319
|
# verify enum value
|
|
290
320
|
allowable_values = ["beta"]
|
|
@@ -293,129 +323,52 @@ module LaunchDarklyApi
|
|
|
293
323
|
end
|
|
294
324
|
# verify the required parameter 'project_key' is set
|
|
295
325
|
if @api_client.config.client_side_validation && project_key.nil?
|
|
296
|
-
fail ArgumentError, "Missing the required parameter 'project_key' when calling
|
|
326
|
+
fail ArgumentError, "Missing the required parameter 'project_key' when calling FlagReleasePlansBetaApi.list_flag_release_plans"
|
|
297
327
|
end
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
fail ArgumentError, "Missing the required parameter 'request_body' when calling ReleasePoliciesBetaApi.post_release_policies_order"
|
|
328
|
+
if @api_client.config.client_side_validation && project_key.to_s.length < 1
|
|
329
|
+
fail ArgumentError, 'invalid value for "project_key" when calling FlagReleasePlansBetaApi.list_flag_release_plans, the character length must be greater than or equal to 1.'
|
|
301
330
|
end
|
|
302
|
-
# resource path
|
|
303
|
-
local_var_path = '/api/v2/projects/{projectKey}/release-policies/order'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s))
|
|
304
331
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
# header parameters
|
|
309
|
-
header_params = opts[:header_params] || {}
|
|
310
|
-
# HTTP header 'Accept' (if needed)
|
|
311
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
312
|
-
# HTTP header 'Content-Type'
|
|
313
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
314
|
-
if !content_type.nil?
|
|
315
|
-
header_params['Content-Type'] = content_type
|
|
332
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
|
|
333
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FlagReleasePlansBetaApi.list_flag_release_plans, must be smaller than or equal to 50.'
|
|
316
334
|
end
|
|
317
|
-
header_params[:'LD-API-Version'] = ld_api_version
|
|
318
|
-
|
|
319
|
-
# form parameters
|
|
320
|
-
form_params = opts[:form_params] || {}
|
|
321
|
-
|
|
322
|
-
# http body (model)
|
|
323
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(request_body)
|
|
324
|
-
|
|
325
|
-
# return_type
|
|
326
|
-
return_type = opts[:debug_return_type] || 'Array<ReleasePolicy>'
|
|
327
|
-
|
|
328
|
-
# auth_names
|
|
329
|
-
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
330
|
-
|
|
331
|
-
new_options = opts.merge(
|
|
332
|
-
:operation => :"ReleasePoliciesBetaApi.post_release_policies_order",
|
|
333
|
-
:header_params => header_params,
|
|
334
|
-
:query_params => query_params,
|
|
335
|
-
:form_params => form_params,
|
|
336
|
-
:body => post_body,
|
|
337
|
-
:auth_names => auth_names,
|
|
338
|
-
:return_type => return_type
|
|
339
|
-
)
|
|
340
335
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
@api_client.config.logger.debug "API called: ReleasePoliciesBetaApi#post_release_policies_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
336
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
337
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FlagReleasePlansBetaApi.list_flag_release_plans, must be greater than or equal to 1.'
|
|
344
338
|
end
|
|
345
|
-
return data, status_code, headers
|
|
346
|
-
end
|
|
347
|
-
|
|
348
|
-
# Create a release policy
|
|
349
|
-
# Create a new release policy for the specified project.
|
|
350
|
-
# @param ld_api_version [String] Version of the endpoint.
|
|
351
|
-
# @param project_key [String] The project key
|
|
352
|
-
# @param post_release_policy_request [PostReleasePolicyRequest] Release policy to create
|
|
353
|
-
# @param [Hash] opts the optional parameters
|
|
354
|
-
# @return [ReleasePolicy]
|
|
355
|
-
def post_release_policy(ld_api_version, project_key, post_release_policy_request, opts = {})
|
|
356
|
-
data, _status_code, _headers = post_release_policy_with_http_info(ld_api_version, project_key, post_release_policy_request, opts)
|
|
357
|
-
data
|
|
358
|
-
end
|
|
359
339
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
# @param ld_api_version [String] Version of the endpoint.
|
|
363
|
-
# @param project_key [String] The project key
|
|
364
|
-
# @param post_release_policy_request [PostReleasePolicyRequest] Release policy to create
|
|
365
|
-
# @param [Hash] opts the optional parameters
|
|
366
|
-
# @return [Array<(ReleasePolicy, Integer, Hash)>] ReleasePolicy data, response status code and response headers
|
|
367
|
-
def post_release_policy_with_http_info(ld_api_version, project_key, post_release_policy_request, opts = {})
|
|
368
|
-
if @api_client.config.debugging
|
|
369
|
-
@api_client.config.logger.debug 'Calling API: ReleasePoliciesBetaApi.post_release_policy ...'
|
|
370
|
-
end
|
|
371
|
-
# verify the required parameter 'ld_api_version' is set
|
|
372
|
-
if @api_client.config.client_side_validation && ld_api_version.nil?
|
|
373
|
-
fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling ReleasePoliciesBetaApi.post_release_policy"
|
|
374
|
-
end
|
|
375
|
-
# verify enum value
|
|
376
|
-
allowable_values = ["beta"]
|
|
377
|
-
if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version)
|
|
378
|
-
fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}"
|
|
379
|
-
end
|
|
380
|
-
# verify the required parameter 'project_key' is set
|
|
381
|
-
if @api_client.config.client_side_validation && project_key.nil?
|
|
382
|
-
fail ArgumentError, "Missing the required parameter 'project_key' when calling ReleasePoliciesBetaApi.post_release_policy"
|
|
383
|
-
end
|
|
384
|
-
# verify the required parameter 'post_release_policy_request' is set
|
|
385
|
-
if @api_client.config.client_side_validation && post_release_policy_request.nil?
|
|
386
|
-
fail ArgumentError, "Missing the required parameter 'post_release_policy_request' when calling ReleasePoliciesBetaApi.post_release_policy"
|
|
340
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
341
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling FlagReleasePlansBetaApi.list_flag_release_plans, must be greater than or equal to 0.'
|
|
387
342
|
end
|
|
343
|
+
|
|
388
344
|
# resource path
|
|
389
|
-
local_var_path = '/api/v2/projects/{projectKey}/release-
|
|
345
|
+
local_var_path = '/api/v2/projects/{projectKey}/flag-release-plans'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s))
|
|
390
346
|
|
|
391
347
|
# query parameters
|
|
392
348
|
query_params = opts[:query_params] || {}
|
|
349
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
350
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
393
351
|
|
|
394
352
|
# header parameters
|
|
395
353
|
header_params = opts[:header_params] || {}
|
|
396
354
|
# HTTP header 'Accept' (if needed)
|
|
397
355
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
398
|
-
# HTTP header 'Content-Type'
|
|
399
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
400
|
-
if !content_type.nil?
|
|
401
|
-
header_params['Content-Type'] = content_type
|
|
402
|
-
end
|
|
403
356
|
header_params[:'LD-API-Version'] = ld_api_version
|
|
404
357
|
|
|
405
358
|
# form parameters
|
|
406
359
|
form_params = opts[:form_params] || {}
|
|
407
360
|
|
|
408
361
|
# http body (model)
|
|
409
|
-
post_body = opts[:debug_body]
|
|
362
|
+
post_body = opts[:debug_body]
|
|
410
363
|
|
|
411
364
|
# return_type
|
|
412
|
-
return_type = opts[:debug_return_type] || '
|
|
365
|
+
return_type = opts[:debug_return_type] || 'ListFlagReleasePlansResponse'
|
|
413
366
|
|
|
414
367
|
# auth_names
|
|
415
368
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
416
369
|
|
|
417
370
|
new_options = opts.merge(
|
|
418
|
-
:operation => :"
|
|
371
|
+
:operation => :"FlagReleasePlansBetaApi.list_flag_release_plans",
|
|
419
372
|
:header_params => header_params,
|
|
420
373
|
:query_params => query_params,
|
|
421
374
|
:form_params => form_params,
|
|
@@ -424,41 +377,41 @@ module LaunchDarklyApi
|
|
|
424
377
|
:return_type => return_type
|
|
425
378
|
)
|
|
426
379
|
|
|
427
|
-
data, status_code, headers = @api_client.call_api(:
|
|
380
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
428
381
|
if @api_client.config.debugging
|
|
429
|
-
@api_client.config.logger.debug "API called:
|
|
382
|
+
@api_client.config.logger.debug "API called: FlagReleasePlansBetaApi#list_flag_release_plans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
430
383
|
end
|
|
431
384
|
return data, status_code, headers
|
|
432
385
|
end
|
|
433
386
|
|
|
434
|
-
#
|
|
435
|
-
#
|
|
387
|
+
# Replace a flag release plan configuration in a project
|
|
388
|
+
# Replace a flag release plan configuration in a project. This is a full replace, not a merge, and anything omitted is overwritten. Omitting `default` clears it, so a request without it demotes the project's default plan. The flag release plan's key is immutable, and its version increments by 1 on every successful update. The request's version is an optional optimistic lock: when present it must match the plan's current version, and on mismatch the request is rejected with 409 and no changes are applied, meaning the plan was edited since it was read; get the plan again and retry with its current version. When omitted the update applies unconditionally to the plan currently holding the key. A flag release already started from the plan is not affected.
|
|
436
389
|
# @param ld_api_version [String] Version of the endpoint.
|
|
437
|
-
# @param project_key [String]
|
|
438
|
-
# @param
|
|
439
|
-
# @param
|
|
390
|
+
# @param project_key [String]
|
|
391
|
+
# @param plan_key [String]
|
|
392
|
+
# @param put_flag_release_plan_request [PutFlagReleasePlanRequest]
|
|
440
393
|
# @param [Hash] opts the optional parameters
|
|
441
|
-
# @return [
|
|
442
|
-
def
|
|
443
|
-
data, _status_code, _headers =
|
|
394
|
+
# @return [FlagReleasePlan]
|
|
395
|
+
def update_flag_release_plan(ld_api_version, project_key, plan_key, put_flag_release_plan_request, opts = {})
|
|
396
|
+
data, _status_code, _headers = update_flag_release_plan_with_http_info(ld_api_version, project_key, plan_key, put_flag_release_plan_request, opts)
|
|
444
397
|
data
|
|
445
398
|
end
|
|
446
399
|
|
|
447
|
-
#
|
|
448
|
-
#
|
|
400
|
+
# Replace a flag release plan configuration in a project
|
|
401
|
+
# Replace a flag release plan configuration in a project. This is a full replace, not a merge, and anything omitted is overwritten. Omitting `default` clears it, so a request without it demotes the project's default plan. The flag release plan's key is immutable, and its version increments by 1 on every successful update. The request's version is an optional optimistic lock: when present it must match the plan's current version, and on mismatch the request is rejected with 409 and no changes are applied, meaning the plan was edited since it was read; get the plan again and retry with its current version. When omitted the update applies unconditionally to the plan currently holding the key. A flag release already started from the plan is not affected.
|
|
449
402
|
# @param ld_api_version [String] Version of the endpoint.
|
|
450
|
-
# @param project_key [String]
|
|
451
|
-
# @param
|
|
452
|
-
# @param
|
|
403
|
+
# @param project_key [String]
|
|
404
|
+
# @param plan_key [String]
|
|
405
|
+
# @param put_flag_release_plan_request [PutFlagReleasePlanRequest]
|
|
453
406
|
# @param [Hash] opts the optional parameters
|
|
454
|
-
# @return [Array<(
|
|
455
|
-
def
|
|
407
|
+
# @return [Array<(FlagReleasePlan, Integer, Hash)>] FlagReleasePlan data, response status code and response headers
|
|
408
|
+
def update_flag_release_plan_with_http_info(ld_api_version, project_key, plan_key, put_flag_release_plan_request, opts = {})
|
|
456
409
|
if @api_client.config.debugging
|
|
457
|
-
@api_client.config.logger.debug 'Calling API:
|
|
410
|
+
@api_client.config.logger.debug 'Calling API: FlagReleasePlansBetaApi.update_flag_release_plan ...'
|
|
458
411
|
end
|
|
459
412
|
# verify the required parameter 'ld_api_version' is set
|
|
460
413
|
if @api_client.config.client_side_validation && ld_api_version.nil?
|
|
461
|
-
fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling
|
|
414
|
+
fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling FlagReleasePlansBetaApi.update_flag_release_plan"
|
|
462
415
|
end
|
|
463
416
|
# verify enum value
|
|
464
417
|
allowable_values = ["beta"]
|
|
@@ -467,18 +420,26 @@ module LaunchDarklyApi
|
|
|
467
420
|
end
|
|
468
421
|
# verify the required parameter 'project_key' is set
|
|
469
422
|
if @api_client.config.client_side_validation && project_key.nil?
|
|
470
|
-
fail ArgumentError, "Missing the required parameter 'project_key' when calling
|
|
423
|
+
fail ArgumentError, "Missing the required parameter 'project_key' when calling FlagReleasePlansBetaApi.update_flag_release_plan"
|
|
424
|
+
end
|
|
425
|
+
if @api_client.config.client_side_validation && project_key.to_s.length < 1
|
|
426
|
+
fail ArgumentError, 'invalid value for "project_key" when calling FlagReleasePlansBetaApi.update_flag_release_plan, the character length must be greater than or equal to 1.'
|
|
471
427
|
end
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
428
|
+
|
|
429
|
+
# verify the required parameter 'plan_key' is set
|
|
430
|
+
if @api_client.config.client_side_validation && plan_key.nil?
|
|
431
|
+
fail ArgumentError, "Missing the required parameter 'plan_key' when calling FlagReleasePlansBetaApi.update_flag_release_plan"
|
|
432
|
+
end
|
|
433
|
+
if @api_client.config.client_side_validation && plan_key.to_s.length < 1
|
|
434
|
+
fail ArgumentError, 'invalid value for "plan_key" when calling FlagReleasePlansBetaApi.update_flag_release_plan, the character length must be greater than or equal to 1.'
|
|
475
435
|
end
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
436
|
+
|
|
437
|
+
# verify the required parameter 'put_flag_release_plan_request' is set
|
|
438
|
+
if @api_client.config.client_side_validation && put_flag_release_plan_request.nil?
|
|
439
|
+
fail ArgumentError, "Missing the required parameter 'put_flag_release_plan_request' when calling FlagReleasePlansBetaApi.update_flag_release_plan"
|
|
479
440
|
end
|
|
480
441
|
# resource path
|
|
481
|
-
local_var_path = '/api/v2/projects/{projectKey}/release-
|
|
442
|
+
local_var_path = '/api/v2/projects/{projectKey}/flag-release-plans/{planKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'planKey' + '}', CGI.escape(plan_key.to_s))
|
|
482
443
|
|
|
483
444
|
# query parameters
|
|
484
445
|
query_params = opts[:query_params] || {}
|
|
@@ -498,16 +459,16 @@ module LaunchDarklyApi
|
|
|
498
459
|
form_params = opts[:form_params] || {}
|
|
499
460
|
|
|
500
461
|
# http body (model)
|
|
501
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
462
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(put_flag_release_plan_request)
|
|
502
463
|
|
|
503
464
|
# return_type
|
|
504
|
-
return_type = opts[:debug_return_type] || '
|
|
465
|
+
return_type = opts[:debug_return_type] || 'FlagReleasePlan'
|
|
505
466
|
|
|
506
467
|
# auth_names
|
|
507
468
|
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
508
469
|
|
|
509
470
|
new_options = opts.merge(
|
|
510
|
-
:operation => :"
|
|
471
|
+
:operation => :"FlagReleasePlansBetaApi.update_flag_release_plan",
|
|
511
472
|
:header_params => header_params,
|
|
512
473
|
:query_params => query_params,
|
|
513
474
|
:form_params => form_params,
|
|
@@ -518,7 +479,7 @@ module LaunchDarklyApi
|
|
|
518
479
|
|
|
519
480
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
520
481
|
if @api_client.config.debugging
|
|
521
|
-
@api_client.config.logger.debug "API called:
|
|
482
|
+
@api_client.config.logger.debug "API called: FlagReleasePlansBetaApi#update_flag_release_plan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
522
483
|
end
|
|
523
484
|
return data, status_code, headers
|
|
524
485
|
end
|