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