launchdarkly_api 18.0.1 → 18.1.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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -5
  3. data/docs/AIConfigVariationPost.md +1 -1
  4. data/docs/AIConfigsBetaApi.md +1 -1
  5. data/docs/AccountMembersApi.md +72 -0
  6. data/docs/CovarianceInfoRep.md +22 -0
  7. data/docs/Environment.md +2 -0
  8. data/docs/Experiment.md +2 -0
  9. data/docs/ExperimentPost.md +3 -1
  10. data/docs/IterationInput.md +2 -0
  11. data/docs/IterationRep.md +3 -1
  12. data/docs/MetricsApi.md +2 -2
  13. data/docs/MetricsBetaApi.md +3 -3
  14. data/docs/PostReleasePolicyRequest.md +1 -1
  15. data/docs/PutReleasePolicyRequest.md +1 -1
  16. data/docs/ReleasePolicy.md +1 -1
  17. data/lib/launchdarkly_api/api/account_members_api.rb +68 -0
  18. data/lib/launchdarkly_api/api/metrics_api.rb +2 -2
  19. data/lib/launchdarkly_api/api/metrics_beta_api.rb +4 -4
  20. data/lib/launchdarkly_api/models/ai_config_variation_post.rb +0 -17
  21. data/lib/launchdarkly_api/{api/account_members_beta_api.rb → models/covariance_info_rep.rb} +264 -63
  22. data/lib/launchdarkly_api/models/environment.rb +10 -1
  23. data/lib/launchdarkly_api/models/experiment.rb +13 -1
  24. data/lib/launchdarkly_api/models/experiment_post.rb +16 -4
  25. data/lib/launchdarkly_api/models/iteration_input.rb +11 -1
  26. data/lib/launchdarkly_api/models/iteration_rep.rb +13 -4
  27. data/lib/launchdarkly_api/version.rb +1 -1
  28. data/lib/launchdarkly_api.rb +1 -1
  29. data/spec/api/account_members_api_spec.rb +12 -0
  30. data/spec/api/metrics_api_spec.rb +1 -1
  31. data/spec/api/metrics_beta_api_spec.rb +2 -2
  32. data/spec/{api/account_members_beta_api_spec.rb → models/covariance_info_rep_spec.rb} +18 -17
  33. data/spec/models/environment_spec.rb +6 -0
  34. data/spec/models/experiment_post_spec.rb +6 -0
  35. data/spec/models/experiment_spec.rb +6 -0
  36. data/spec/models/iteration_input_spec.rb +6 -0
  37. data/spec/models/iteration_rep_spec.rb +6 -0
  38. metadata +6 -6
  39. data/docs/AccountMembersBetaApi.md +0 -79
@@ -10,81 +10,282 @@ Generator version: 7.16.0
10
10
 
11
11
  =end
12
12
 
13
- require 'cgi'
13
+ require 'date'
14
+ require 'time'
14
15
 
15
16
  module LaunchDarklyApi
16
- class AccountMembersBetaApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Modify account members
23
- # > ### Full use of this API resource is an Enterprise feature > > The ability to perform a partial update to multiple members is available to customers on an Enterprise plan. If you are on another plan, you can update members individually. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/). Perform a partial update to multiple members. Updating members uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating members. <details> <summary>Click to expand instructions for <strong>updating members</strong></summary> #### replaceMembersRoles Replaces the roles of the specified members. This also removes all custom roles assigned to the specified members. ##### Parameters - `value`: The new role. Must be a valid [base role](https://launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](https://launchdarkly.com/docs/home/account/roles). - `memberIDs`: List of member IDs. Here's an example: ```json { \"instructions\": [{ \"kind\": \"replaceMemberRoles\", \"value\": \"reader\", \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ] }] } ``` #### replaceAllMembersRoles Replaces the roles of all members. This also removes all custom roles assigned to the specified members. Members that match any of the filters are **excluded** from the update. ##### Parameters - `value`: The new role. Must be a valid [base role](https://launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](https://launchdarkly.com/docs/home/account/roles). - `filterLastSeen`: (Optional) A JSON object with one of the following formats: - `{\"never\": true}` - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM. - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps. - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds. - `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive. - `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`. - `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive. - `ignoredMemberIDs`: (Optional) A list of member IDs. Here's an example: ```json { \"instructions\": [{ \"kind\": \"replaceAllMembersRoles\", \"value\": \"reader\", \"filterLastSeen\": { \"never\": true } }] } ``` #### replaceMembersCustomRoles Replaces the custom roles of the specified members. ##### Parameters - `values`: List of new custom roles. Must be a valid custom role key or ID. - `memberIDs`: List of member IDs. Here's an example: ```json { \"instructions\": [{ \"kind\": \"replaceMembersCustomRoles\", \"values\": [ \"example-custom-role\" ], \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ] }] } ``` #### replaceAllMembersCustomRoles Replaces the custom roles of all members. Members that match any of the filters are **excluded** from the update. ##### Parameters - `values`: List of new roles. Must be a valid custom role key or ID. - `filterLastSeen`: (Optional) A JSON object with one of the following formats: - `{\"never\": true}` - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM. - `{\"noData\": true}` - Members that have not been active since LaunchDarkly began recording last seen timestamps. - `{\"before\": 1608672063611}` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds. - `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive. - `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`. - `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive. - `ignoredMemberIDs`: (Optional) A list of member IDs. Here's an example: ```json { \"instructions\": [{ \"kind\": \"replaceAllMembersCustomRoles\", \"values\": [ \"example-custom-role\" ], \"filterLastSeen\": { \"never\": true } }] } ``` #### replaceMembersRoleAttributes Replaces the role attributes of the specified members. ##### Parameters - `value`: Map of role attribute keys to lists of values. - `memberIDs`: List of member IDs. Here's an example: ```json { \"instructions\": [{ \"kind\": \"replaceMembersRoleAttributes\", \"value\": { \"myRoleProjectKey\": [\"mobile\", \"web\"], \"myRoleEnvironmentKey\": [\"production\"] }, \"memberIDs\": [ \"1234a56b7c89d012345e678f\", \"507f1f77bcf86cd799439011\" ] }] } ``` </details>
24
- # @param members_patch_input [MembersPatchInput]
25
- # @param [Hash] opts the optional parameters
26
- # @return [BulkEditMembersRep]
27
- def patch_members(members_patch_input, opts = {})
28
- data, _status_code, _headers = patch_members_with_http_info(members_patch_input, opts)
29
- data
30
- end
31
-
32
- # Modify account members
33
- # &gt; ### Full use of this API resource is an Enterprise feature &gt; &gt; The ability to perform a partial update to multiple members is available to customers on an Enterprise plan. If you are on another plan, you can update members individually. To learn more, [read about our pricing](https://launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](https://launchdarkly.com/contact-sales/). Perform a partial update to multiple members. Updating members uses the semantic patch format. To make a semantic patch request, you must append &#x60;domain-model&#x3D;launchdarkly.semanticpatch&#x60; to your &#x60;Content-Type&#x60; header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following &#x60;kind&#x60; instructions for updating members. &lt;details&gt; &lt;summary&gt;Click to expand instructions for &lt;strong&gt;updating members&lt;/strong&gt;&lt;/summary&gt; #### replaceMembersRoles Replaces the roles of the specified members. This also removes all custom roles assigned to the specified members. ##### Parameters - &#x60;value&#x60;: The new role. Must be a valid [base role](https://launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](https://launchdarkly.com/docs/home/account/roles). - &#x60;memberIDs&#x60;: List of member IDs. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;replaceMemberRoles\&quot;, \&quot;value\&quot;: \&quot;reader\&quot;, \&quot;memberIDs\&quot;: [ \&quot;1234a56b7c89d012345e678f\&quot;, \&quot;507f1f77bcf86cd799439011\&quot; ] }] } &#x60;&#x60;&#x60; #### replaceAllMembersRoles Replaces the roles of all members. This also removes all custom roles assigned to the specified members. Members that match any of the filters are **excluded** from the update. ##### Parameters - &#x60;value&#x60;: The new role. Must be a valid [base role](https://launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](https://launchdarkly.com/docs/home/account/roles). - &#x60;filterLastSeen&#x60;: (Optional) A JSON object with one of the following formats: - &#x60;{\&quot;never\&quot;: true}&#x60; - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM. - &#x60;{\&quot;noData\&quot;: true}&#x60; - Members that have not been active since LaunchDarkly began recording last seen timestamps. - &#x60;{\&quot;before\&quot;: 1608672063611}&#x60; - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds. - &#x60;filterQuery&#x60;: (Optional) A string that matches against the members&#39; emails and names. It is not case sensitive. - &#x60;filterRoles&#x60;: (Optional) A &#x60;|&#x60; separated list of roles and custom roles. For the purposes of this filtering, &#x60;Owner&#x60; counts as &#x60;Admin&#x60;. - &#x60;filterTeamKey&#x60;: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive. - &#x60;ignoredMemberIDs&#x60;: (Optional) A list of member IDs. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;replaceAllMembersRoles\&quot;, \&quot;value\&quot;: \&quot;reader\&quot;, \&quot;filterLastSeen\&quot;: { \&quot;never\&quot;: true } }] } &#x60;&#x60;&#x60; #### replaceMembersCustomRoles Replaces the custom roles of the specified members. ##### Parameters - &#x60;values&#x60;: List of new custom roles. Must be a valid custom role key or ID. - &#x60;memberIDs&#x60;: List of member IDs. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;replaceMembersCustomRoles\&quot;, \&quot;values\&quot;: [ \&quot;example-custom-role\&quot; ], \&quot;memberIDs\&quot;: [ \&quot;1234a56b7c89d012345e678f\&quot;, \&quot;507f1f77bcf86cd799439011\&quot; ] }] } &#x60;&#x60;&#x60; #### replaceAllMembersCustomRoles Replaces the custom roles of all members. Members that match any of the filters are **excluded** from the update. ##### Parameters - &#x60;values&#x60;: List of new roles. Must be a valid custom role key or ID. - &#x60;filterLastSeen&#x60;: (Optional) A JSON object with one of the following formats: - &#x60;{\&quot;never\&quot;: true}&#x60; - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM. - &#x60;{\&quot;noData\&quot;: true}&#x60; - Members that have not been active since LaunchDarkly began recording last seen timestamps. - &#x60;{\&quot;before\&quot;: 1608672063611}&#x60; - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds. - &#x60;filterQuery&#x60;: (Optional) A string that matches against the members&#39; emails and names. It is not case sensitive. - &#x60;filterRoles&#x60;: (Optional) A &#x60;|&#x60; separated list of roles and custom roles. For the purposes of this filtering, &#x60;Owner&#x60; counts as &#x60;Admin&#x60;. - &#x60;filterTeamKey&#x60;: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive. - &#x60;ignoredMemberIDs&#x60;: (Optional) A list of member IDs. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;replaceAllMembersCustomRoles\&quot;, \&quot;values\&quot;: [ \&quot;example-custom-role\&quot; ], \&quot;filterLastSeen\&quot;: { \&quot;never\&quot;: true } }] } &#x60;&#x60;&#x60; #### replaceMembersRoleAttributes Replaces the role attributes of the specified members. ##### Parameters - &#x60;value&#x60;: Map of role attribute keys to lists of values. - &#x60;memberIDs&#x60;: List of member IDs. Here&#39;s an example: &#x60;&#x60;&#x60;json { \&quot;instructions\&quot;: [{ \&quot;kind\&quot;: \&quot;replaceMembersRoleAttributes\&quot;, \&quot;value\&quot;: { \&quot;myRoleProjectKey\&quot;: [\&quot;mobile\&quot;, \&quot;web\&quot;], \&quot;myRoleEnvironmentKey\&quot;: [\&quot;production\&quot;] }, \&quot;memberIDs\&quot;: [ \&quot;1234a56b7c89d012345e678f\&quot;, \&quot;507f1f77bcf86cd799439011\&quot; ] }] } &#x60;&#x60;&#x60; &lt;/details&gt;
34
- # @param members_patch_input [MembersPatchInput]
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(BulkEditMembersRep, Integer, Hash)>] BulkEditMembersRep data, response status code and response headers
37
- def patch_members_with_http_info(members_patch_input, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: AccountMembersBetaApi.patch_members ...'
17
+ class CovarianceInfoRep
18
+ # The ID of the covariance matrix
19
+ attr_accessor :id
20
+
21
+ # The file name of the uploaded covariance matrix
22
+ attr_accessor :file_name
23
+
24
+ attr_accessor :created_at
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'id' => :'id',
30
+ :'file_name' => :'fileName',
31
+ :'created_at' => :'createdAt'
32
+ }
33
+ end
34
+
35
+ # Returns attribute mapping this model knows about
36
+ def self.acceptable_attribute_map
37
+ attribute_map
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ acceptable_attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'id' => :'String',
49
+ :'file_name' => :'String',
50
+ :'created_at' => :'Integer'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ ])
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `LaunchDarklyApi::CovarianceInfoRep` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ acceptable_attribute_map = self.class.acceptable_attribute_map
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!acceptable_attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `LaunchDarklyApi::CovarianceInfoRep`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'id')
77
+ self.id = attributes[:'id']
78
+ else
79
+ self.id = nil
80
+ end
81
+
82
+ if attributes.key?(:'file_name')
83
+ self.file_name = attributes[:'file_name']
84
+ else
85
+ self.file_name = nil
86
+ end
87
+
88
+ if attributes.key?(:'created_at')
89
+ self.created_at = attributes[:'created_at']
90
+ else
91
+ self.created_at = nil
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ if @id.nil?
101
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
102
+ end
103
+
104
+ if @file_name.nil?
105
+ invalid_properties.push('invalid value for "file_name", file_name cannot be nil.')
106
+ end
107
+
108
+ if @created_at.nil?
109
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
110
+ end
111
+
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ warn '[DEPRECATED] the `valid?` method is obsolete'
119
+ return false if @id.nil?
120
+ return false if @file_name.nil?
121
+ return false if @created_at.nil?
122
+ true
123
+ end
124
+
125
+ # Custom attribute writer method with validation
126
+ # @param [Object] id Value to be assigned
127
+ def id=(id)
128
+ if id.nil?
129
+ fail ArgumentError, 'id cannot be nil'
40
130
  end
41
- # verify the required parameter 'members_patch_input' is set
42
- if @api_client.config.client_side_validation && members_patch_input.nil?
43
- fail ArgumentError, "Missing the required parameter 'members_patch_input' when calling AccountMembersBetaApi.patch_members"
131
+
132
+ @id = id
133
+ end
134
+
135
+ # Custom attribute writer method with validation
136
+ # @param [Object] file_name Value to be assigned
137
+ def file_name=(file_name)
138
+ if file_name.nil?
139
+ fail ArgumentError, 'file_name cannot be nil'
44
140
  end
45
- # resource path
46
- local_var_path = '/api/v2/members'
47
-
48
- # query parameters
49
- query_params = opts[:query_params] || {}
50
-
51
- # header parameters
52
- header_params = opts[:header_params] || {}
53
- # HTTP header 'Accept' (if needed)
54
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
- # HTTP header 'Content-Type'
56
- content_type = @api_client.select_header_content_type(['application/json'])
57
- if !content_type.nil?
58
- header_params['Content-Type'] = content_type
141
+
142
+ @file_name = file_name
143
+ end
144
+
145
+ # Custom attribute writer method with validation
146
+ # @param [Object] created_at Value to be assigned
147
+ def created_at=(created_at)
148
+ if created_at.nil?
149
+ fail ArgumentError, 'created_at cannot be nil'
59
150
  end
60
151
 
61
- # form parameters
62
- form_params = opts[:form_params] || {}
152
+ @created_at = created_at
153
+ end
63
154
 
64
- # http body (model)
65
- post_body = opts[:debug_body] || @api_client.object_to_http_body(members_patch_input)
155
+ # Checks equality by comparing each attribute.
156
+ # @param [Object] Object to be compared
157
+ def ==(o)
158
+ return true if self.equal?(o)
159
+ self.class == o.class &&
160
+ id == o.id &&
161
+ file_name == o.file_name &&
162
+ created_at == o.created_at
163
+ end
66
164
 
67
- # return_type
68
- return_type = opts[:debug_return_type] || 'BulkEditMembersRep'
165
+ # @see the `==` method
166
+ # @param [Object] Object to be compared
167
+ def eql?(o)
168
+ self == o
169
+ end
69
170
 
70
- # auth_names
71
- auth_names = opts[:debug_auth_names] || ['ApiKey']
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Integer] Hash code
173
+ def hash
174
+ [id, file_name, created_at].hash
175
+ end
72
176
 
73
- new_options = opts.merge(
74
- :operation => :"AccountMembersBetaApi.patch_members",
75
- :header_params => header_params,
76
- :query_params => query_params,
77
- :form_params => form_params,
78
- :body => post_body,
79
- :auth_names => auth_names,
80
- :return_type => return_type
81
- )
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def self.build_from_hash(attributes)
181
+ return nil unless attributes.is_a?(Hash)
182
+ attributes = attributes.transform_keys(&:to_sym)
183
+ transformed_hash = {}
184
+ openapi_types.each_pair do |key, type|
185
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = nil
187
+ elsif type =~ /\AArray<(.*)>/i
188
+ # check to ensure the input is an array given that the attribute
189
+ # is documented as an array but the input is not
190
+ if attributes[attribute_map[key]].is_a?(Array)
191
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
192
+ end
193
+ elsif !attributes[attribute_map[key]].nil?
194
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
195
+ end
196
+ end
197
+ new(transformed_hash)
198
+ end
199
+
200
+ # Deserializes the data based on type
201
+ # @param string type Data type
202
+ # @param string value Value to be deserialized
203
+ # @return [Object] Deserialized data
204
+ def self._deserialize(type, value)
205
+ case type.to_sym
206
+ when :Time
207
+ Time.parse(value)
208
+ when :Date
209
+ Date.parse(value)
210
+ when :String
211
+ value.to_s
212
+ when :Integer
213
+ value.to_i
214
+ when :Float
215
+ value.to_f
216
+ when :Boolean
217
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
218
+ true
219
+ else
220
+ false
221
+ end
222
+ when :Object
223
+ # generic object (usually a Hash), return directly
224
+ value
225
+ when /\AArray<(?<inner_type>.+)>\z/
226
+ inner_type = Regexp.last_match[:inner_type]
227
+ value.map { |v| _deserialize(inner_type, v) }
228
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
229
+ k_type = Regexp.last_match[:k_type]
230
+ v_type = Regexp.last_match[:v_type]
231
+ {}.tap do |hash|
232
+ value.each do |k, v|
233
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
234
+ end
235
+ end
236
+ else # model
237
+ # models (e.g. Pet) or oneOf
238
+ klass = LaunchDarklyApi.const_get(type)
239
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
240
+ end
241
+ end
242
+
243
+ # Returns the string representation of the object
244
+ # @return [String] String presentation of the object
245
+ def to_s
246
+ to_hash.to_s
247
+ end
248
+
249
+ # to_body is an alias to to_hash (backward compatibility)
250
+ # @return [Hash] Returns the object in the form of hash
251
+ def to_body
252
+ to_hash
253
+ end
254
+
255
+ # Returns the object in the form of hash
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_hash
258
+ hash = {}
259
+ self.class.attribute_map.each_pair do |attr, param|
260
+ value = self.send(attr)
261
+ if value.nil?
262
+ is_nullable = self.class.openapi_nullable.include?(attr)
263
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
264
+ end
82
265
 
83
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
84
- if @api_client.config.debugging
85
- @api_client.config.logger.debug "API called: AccountMembersBetaApi#patch_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
266
+ hash[param] = _to_hash(value)
86
267
  end
87
- return data, status_code, headers
268
+ hash
88
269
  end
270
+
271
+ # Outputs non-array value in the form of hash
272
+ # For object, use to_hash. Otherwise, just return the value
273
+ # @param [Object] value Any valid value
274
+ # @return [Hash] Returns the value in the form of hash
275
+ def _to_hash(value)
276
+ if value.is_a?(Array)
277
+ value.compact.map { |v| _to_hash(v) }
278
+ elsif value.is_a?(Hash)
279
+ {}.tap do |hash|
280
+ value.each { |k, v| hash[k] = _to_hash(v) }
281
+ end
282
+ elsif value.respond_to? :to_hash
283
+ value.to_hash
284
+ else
285
+ value
286
+ end
287
+ end
288
+
89
289
  end
290
+
90
291
  end
@@ -42,6 +42,8 @@ module LaunchDarklyApi
42
42
  # Ensures that one end user of the client-side SDK cannot inspect the variations for another end user
43
43
  attr_accessor :secure_mode
44
44
 
45
+ attr_accessor :_access
46
+
45
47
  # Enables tracking detailed information for new flags by default
46
48
  attr_accessor :default_track_events
47
49
 
@@ -74,6 +76,7 @@ module LaunchDarklyApi
74
76
  :'color' => :'color',
75
77
  :'default_ttl' => :'defaultTtl',
76
78
  :'secure_mode' => :'secureMode',
79
+ :'_access' => :'_access',
77
80
  :'default_track_events' => :'defaultTrackEvents',
78
81
  :'require_comments' => :'requireComments',
79
82
  :'confirm_changes' => :'confirmChanges',
@@ -106,6 +109,7 @@ module LaunchDarklyApi
106
109
  :'color' => :'String',
107
110
  :'default_ttl' => :'Integer',
108
111
  :'secure_mode' => :'Boolean',
112
+ :'_access' => :'Access',
109
113
  :'default_track_events' => :'Boolean',
110
114
  :'require_comments' => :'Boolean',
111
115
  :'confirm_changes' => :'Boolean',
@@ -194,6 +198,10 @@ module LaunchDarklyApi
194
198
  self.secure_mode = nil
195
199
  end
196
200
 
201
+ if attributes.key?(:'_access')
202
+ self._access = attributes[:'_access']
203
+ end
204
+
197
205
  if attributes.key?(:'default_track_events')
198
206
  self.default_track_events = attributes[:'default_track_events']
199
207
  else
@@ -476,6 +484,7 @@ module LaunchDarklyApi
476
484
  color == o.color &&
477
485
  default_ttl == o.default_ttl &&
478
486
  secure_mode == o.secure_mode &&
487
+ _access == o._access &&
479
488
  default_track_events == o.default_track_events &&
480
489
  require_comments == o.require_comments &&
481
490
  confirm_changes == o.confirm_changes &&
@@ -494,7 +503,7 @@ module LaunchDarklyApi
494
503
  # Calculates hash code according to all attributes.
495
504
  # @return [Integer] Hash code
496
505
  def hash
497
- [_links, _id, key, name, api_key, mobile_key, color, default_ttl, secure_mode, default_track_events, require_comments, confirm_changes, tags, approval_settings, resource_approval_settings, critical].hash
506
+ [_links, _id, key, name, api_key, mobile_key, color, default_ttl, secure_mode, _access, default_track_events, require_comments, confirm_changes, tags, approval_settings, resource_approval_settings, critical].hash
498
507
  end
499
508
 
500
509
  # Builds the object from hash
@@ -36,6 +36,9 @@ module LaunchDarklyApi
36
36
 
37
37
  attr_accessor :archived_date
38
38
 
39
+ # Tags for the experiment
40
+ attr_accessor :tags
41
+
39
42
  # The location and content type of related resources
40
43
  attr_accessor :_links
41
44
 
@@ -60,6 +63,7 @@ module LaunchDarklyApi
60
63
  :'_creation_date' => :'_creationDate',
61
64
  :'environment_key' => :'environmentKey',
62
65
  :'archived_date' => :'archivedDate',
66
+ :'tags' => :'tags',
63
67
  :'_links' => :'_links',
64
68
  :'holdout_id' => :'holdoutId',
65
69
  :'current_iteration' => :'currentIteration',
@@ -89,6 +93,7 @@ module LaunchDarklyApi
89
93
  :'_creation_date' => :'Integer',
90
94
  :'environment_key' => :'String',
91
95
  :'archived_date' => :'Integer',
96
+ :'tags' => :'Array<String>',
92
97
  :'_links' => :'Hash<String, Link>',
93
98
  :'holdout_id' => :'String',
94
99
  :'current_iteration' => :'IterationRep',
@@ -161,6 +166,12 @@ module LaunchDarklyApi
161
166
  self.archived_date = attributes[:'archived_date']
162
167
  end
163
168
 
169
+ if attributes.key?(:'tags')
170
+ if (value = attributes[:'tags']).is_a?(Array)
171
+ self.tags = value
172
+ end
173
+ end
174
+
164
175
  if attributes.key?(:'_links')
165
176
  if (value = attributes[:'_links']).is_a?(Hash)
166
177
  self._links = value
@@ -306,6 +317,7 @@ module LaunchDarklyApi
306
317
  _creation_date == o._creation_date &&
307
318
  environment_key == o.environment_key &&
308
319
  archived_date == o.archived_date &&
320
+ tags == o.tags &&
309
321
  _links == o._links &&
310
322
  holdout_id == o.holdout_id &&
311
323
  current_iteration == o.current_iteration &&
@@ -322,7 +334,7 @@ module LaunchDarklyApi
322
334
  # Calculates hash code according to all attributes.
323
335
  # @return [Integer] Hash code
324
336
  def hash
325
- [_id, key, name, description, _maintainer_id, _creation_date, environment_key, archived_date, _links, holdout_id, current_iteration, draft_iteration, previous_iterations].hash
337
+ [_id, key, name, description, _maintainer_id, _creation_date, environment_key, archived_date, tags, _links, holdout_id, current_iteration, draft_iteration, previous_iterations].hash
326
338
  end
327
339
 
328
340
  # Builds the object from hash
@@ -32,6 +32,9 @@ module LaunchDarklyApi
32
32
  # The ID of the holdout
33
33
  attr_accessor :holdout_id
34
34
 
35
+ # Tags for the experiment
36
+ attr_accessor :tags
37
+
35
38
  # Attribute mapping from ruby-style variable name to JSON key.
36
39
  def self.attribute_map
37
40
  {
@@ -40,7 +43,8 @@ module LaunchDarklyApi
40
43
  :'maintainer_id' => :'maintainerId',
41
44
  :'key' => :'key',
42
45
  :'iteration' => :'iteration',
43
- :'holdout_id' => :'holdoutId'
46
+ :'holdout_id' => :'holdoutId',
47
+ :'tags' => :'tags'
44
48
  }
45
49
  end
46
50
 
@@ -62,7 +66,8 @@ module LaunchDarklyApi
62
66
  :'maintainer_id' => :'String',
63
67
  :'key' => :'String',
64
68
  :'iteration' => :'IterationInput',
65
- :'holdout_id' => :'String'
69
+ :'holdout_id' => :'String',
70
+ :'tags' => :'Array<String>'
66
71
  }
67
72
  end
68
73
 
@@ -117,6 +122,12 @@ module LaunchDarklyApi
117
122
  if attributes.key?(:'holdout_id')
118
123
  self.holdout_id = attributes[:'holdout_id']
119
124
  end
125
+
126
+ if attributes.key?(:'tags')
127
+ if (value = attributes[:'tags']).is_a?(Array)
128
+ self.tags = value
129
+ end
130
+ end
120
131
  end
121
132
 
122
133
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -189,7 +200,8 @@ module LaunchDarklyApi
189
200
  maintainer_id == o.maintainer_id &&
190
201
  key == o.key &&
191
202
  iteration == o.iteration &&
192
- holdout_id == o.holdout_id
203
+ holdout_id == o.holdout_id &&
204
+ tags == o.tags
193
205
  end
194
206
 
195
207
  # @see the `==` method
@@ -201,7 +213,7 @@ module LaunchDarklyApi
201
213
  # Calculates hash code according to all attributes.
202
214
  # @return [Integer] Hash code
203
215
  def hash
204
- [name, description, maintainer_id, key, iteration, holdout_id].hash
216
+ [name, description, maintainer_id, key, iteration, holdout_id, tags].hash
205
217
  end
206
218
 
207
219
  # Builds the object from hash
@@ -36,6 +36,9 @@ module LaunchDarklyApi
36
36
  # The unit of randomization for this iteration. Defaults to user.
37
37
  attr_accessor :randomization_unit
38
38
 
39
+ # The ID of the covariance CSV
40
+ attr_accessor :covariance_id
41
+
39
42
  # The attributes that this iteration's results can be sliced by
40
43
  attr_accessor :attributes
41
44
 
@@ -50,6 +53,7 @@ module LaunchDarklyApi
50
53
  :'treatments' => :'treatments',
51
54
  :'flags' => :'flags',
52
55
  :'randomization_unit' => :'randomizationUnit',
56
+ :'covariance_id' => :'covarianceId',
53
57
  :'attributes' => :'attributes'
54
58
  }
55
59
  end
@@ -75,6 +79,7 @@ module LaunchDarklyApi
75
79
  :'treatments' => :'Array<TreatmentInput>',
76
80
  :'flags' => :'Hash<String, FlagInput>',
77
81
  :'randomization_unit' => :'String',
82
+ :'covariance_id' => :'String',
78
83
  :'attributes' => :'Array<String>'
79
84
  }
80
85
  end
@@ -147,6 +152,10 @@ module LaunchDarklyApi
147
152
  self.randomization_unit = attributes[:'randomization_unit']
148
153
  end
149
154
 
155
+ if attributes.key?(:'covariance_id')
156
+ self.covariance_id = attributes[:'covariance_id']
157
+ end
158
+
150
159
  if attributes.key?(:'attributes')
151
160
  if (value = attributes[:'attributes']).is_a?(Array)
152
161
  self.attributes = value
@@ -242,6 +251,7 @@ module LaunchDarklyApi
242
251
  treatments == o.treatments &&
243
252
  flags == o.flags &&
244
253
  randomization_unit == o.randomization_unit &&
254
+ covariance_id == o.covariance_id &&
245
255
  attributes == o.attributes
246
256
  end
247
257
 
@@ -254,7 +264,7 @@ module LaunchDarklyApi
254
264
  # Calculates hash code according to all attributes.
255
265
  # @return [Integer] Hash code
256
266
  def hash
257
- [hypothesis, can_reshuffle_traffic, metrics, primary_single_metric_key, primary_funnel_key, treatments, flags, randomization_unit, attributes].hash
267
+ [hypothesis, can_reshuffle_traffic, metrics, primary_single_metric_key, primary_funnel_key, treatments, flags, randomization_unit, covariance_id, attributes].hash
258
268
  end
259
269
 
260
270
  # Builds the object from hash
@@ -71,6 +71,8 @@ module LaunchDarklyApi
71
71
 
72
72
  attr_accessor :layer_snapshot
73
73
 
74
+ attr_accessor :covariance_info
75
+
74
76
  # Attribute mapping from ruby-style variable name to JSON key.
75
77
  def self.attribute_map
76
78
  {
@@ -94,7 +96,8 @@ module LaunchDarklyApi
94
96
  :'treatments' => :'treatments',
95
97
  :'secondary_metrics' => :'secondaryMetrics',
96
98
  :'metrics' => :'metrics',
97
- :'layer_snapshot' => :'layerSnapshot'
99
+ :'layer_snapshot' => :'layerSnapshot',
100
+ :'covariance_info' => :'covarianceInfo'
98
101
  }
99
102
  end
100
103
 
@@ -131,7 +134,8 @@ module LaunchDarklyApi
131
134
  :'treatments' => :'Array<TreatmentRep>',
132
135
  :'secondary_metrics' => :'Array<MetricV2Rep>',
133
136
  :'metrics' => :'Array<DependentMetricOrMetricGroupRep>',
134
- :'layer_snapshot' => :'LayerSnapshotRep'
137
+ :'layer_snapshot' => :'LayerSnapshotRep',
138
+ :'covariance_info' => :'CovarianceInfoRep'
135
139
  }
136
140
  end
137
141
 
@@ -256,6 +260,10 @@ module LaunchDarklyApi
256
260
  if attributes.key?(:'layer_snapshot')
257
261
  self.layer_snapshot = attributes[:'layer_snapshot']
258
262
  end
263
+
264
+ if attributes.key?(:'covariance_info')
265
+ self.covariance_info = attributes[:'covariance_info']
266
+ end
259
267
  end
260
268
 
261
269
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -343,7 +351,8 @@ module LaunchDarklyApi
343
351
  treatments == o.treatments &&
344
352
  secondary_metrics == o.secondary_metrics &&
345
353
  metrics == o.metrics &&
346
- layer_snapshot == o.layer_snapshot
354
+ layer_snapshot == o.layer_snapshot &&
355
+ covariance_info == o.covariance_info
347
356
  end
348
357
 
349
358
  # @see the `==` method
@@ -355,7 +364,7 @@ module LaunchDarklyApi
355
364
  # Calculates hash code according to all attributes.
356
365
  # @return [Integer] Hash code
357
366
  def hash
358
- [_id, hypothesis, status, created_at, started_at, ended_at, winning_treatment_id, winning_reason, can_reshuffle_traffic, flags, reallocation_frequency_millis, version, primary_metric, primary_single_metric, primary_funnel, randomization_unit, attributes, treatments, secondary_metrics, metrics, layer_snapshot].hash
367
+ [_id, hypothesis, status, created_at, started_at, ended_at, winning_treatment_id, winning_reason, can_reshuffle_traffic, flags, reallocation_frequency_millis, version, primary_metric, primary_single_metric, primary_funnel, randomization_unit, attributes, treatments, secondary_metrics, metrics, layer_snapshot, covariance_info].hash
359
368
  end
360
369
 
361
370
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.16.0
11
11
  =end
12
12
 
13
13
  module LaunchDarklyApi
14
- VERSION = '18.0.1'
14
+ VERSION = '18.1.0'
15
15
  end