launchdarkly_api 2.0.32 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +168 -154
- data/docs/Clause.md +1 -0
- data/docs/FeatureFlags.md +1 -0
- data/docs/FeatureFlagsApi.md +133 -4
- data/docs/Member.md +1 -0
- data/docs/Members.md +1 -0
- data/docs/SemanticPatchOperation.md +9 -0
- data/docs/SemanticPatchOperationInstructions.md +8 -0
- data/docs/TeamMembersApi.md +63 -3
- data/docs/UserSegmentsApi.md +121 -0
- data/docs/UserSettingsApi.md +121 -0
- data/docs/UserTargetingExpirationForFlag.md +14 -0
- data/docs/UserTargetingExpirationForFlags.md +9 -0
- data/docs/UserTargetingExpirationForSegment.md +14 -0
- data/docs/UserTargetingExpirationOnFlagsForUser.md +9 -0
- data/docs/UserTargetingExpirationResourceIdForFlag.md +12 -0
- data/docs/Variation.md +1 -0
- data/launchdarkly_api.gemspec +1 -1
- data/lib/launchdarkly_api.rb +8 -1
- data/lib/launchdarkly_api/api/audit_log_api.rb +1 -1
- data/lib/launchdarkly_api/api/custom_roles_api.rb +1 -1
- data/lib/launchdarkly_api/api/customer_metrics_api.rb +1 -1
- data/lib/launchdarkly_api/api/data_export_destinations_api.rb +1 -1
- data/lib/launchdarkly_api/api/environments_api.rb +1 -1
- data/lib/launchdarkly_api/api/feature_flags_api.rb +153 -7
- data/lib/launchdarkly_api/api/projects_api.rb +1 -1
- data/lib/launchdarkly_api/api/root_api.rb +1 -1
- data/lib/launchdarkly_api/api/team_members_api.rb +59 -1
- data/lib/launchdarkly_api/api/user_segments_api.rb +135 -1
- data/lib/launchdarkly_api/api/user_settings_api.rb +135 -1
- data/lib/launchdarkly_api/api/users_api.rb +1 -1
- data/lib/launchdarkly_api/api/webhooks_api.rb +1 -1
- data/lib/launchdarkly_api/api_client.rb +1 -1
- data/lib/launchdarkly_api/api_error.rb +1 -1
- data/lib/launchdarkly_api/configuration.rb +1 -1
- data/lib/launchdarkly_api/models/audit_log_entries.rb +1 -1
- data/lib/launchdarkly_api/models/audit_log_entry.rb +1 -1
- data/lib/launchdarkly_api/models/audit_log_entry_target.rb +1 -1
- data/lib/launchdarkly_api/models/clause.rb +11 -2
- data/lib/launchdarkly_api/models/copy_actions.rb +1 -1
- data/lib/launchdarkly_api/models/custom_property.rb +1 -1
- data/lib/launchdarkly_api/models/custom_property_values.rb +1 -1
- data/lib/launchdarkly_api/models/custom_role.rb +1 -1
- data/lib/launchdarkly_api/models/custom_role_body.rb +1 -1
- data/lib/launchdarkly_api/models/custom_roles.rb +1 -1
- data/lib/launchdarkly_api/models/defaults.rb +1 -1
- data/lib/launchdarkly_api/models/destination.rb +1 -1
- data/lib/launchdarkly_api/models/destination_amazon_kinesis.rb +1 -1
- data/lib/launchdarkly_api/models/destination_body.rb +1 -1
- data/lib/launchdarkly_api/models/destination_google_pub_sub.rb +1 -1
- data/lib/launchdarkly_api/models/destination_m_particle.rb +1 -1
- data/lib/launchdarkly_api/models/destination_segment.rb +1 -1
- data/lib/launchdarkly_api/models/destinations.rb +1 -1
- data/lib/launchdarkly_api/models/environment.rb +1 -1
- data/lib/launchdarkly_api/models/environment_post.rb +1 -1
- data/lib/launchdarkly_api/models/evaluation_usage_error.rb +1 -1
- data/lib/launchdarkly_api/models/events.rb +1 -1
- data/lib/launchdarkly_api/models/fallthrough.rb +1 -1
- data/lib/launchdarkly_api/models/feature_flag.rb +1 -1
- data/lib/launchdarkly_api/models/feature_flag_body.rb +1 -1
- data/lib/launchdarkly_api/models/feature_flag_config.rb +1 -1
- data/lib/launchdarkly_api/models/feature_flag_copy_body.rb +1 -1
- data/lib/launchdarkly_api/models/feature_flag_copy_object.rb +1 -1
- data/lib/launchdarkly_api/models/feature_flag_status.rb +1 -1
- data/lib/launchdarkly_api/models/feature_flag_status_across_environments.rb +1 -1
- data/lib/launchdarkly_api/models/feature_flag_status_for_queried_environment.rb +1 -1
- data/lib/launchdarkly_api/models/feature_flag_statuses.rb +1 -1
- data/lib/launchdarkly_api/models/feature_flags.rb +14 -5
- data/lib/launchdarkly_api/models/flag_list_item.rb +1 -1
- data/lib/launchdarkly_api/models/id.rb +1 -1
- data/lib/launchdarkly_api/models/link.rb +1 -1
- data/lib/launchdarkly_api/models/links.rb +1 -1
- data/lib/launchdarkly_api/models/ma_uby_category.rb +1 -1
- data/lib/launchdarkly_api/models/mau.rb +1 -1
- data/lib/launchdarkly_api/models/mau_metadata.rb +1 -1
- data/lib/launchdarkly_api/models/member.rb +11 -2
- data/lib/launchdarkly_api/models/members.rb +14 -5
- data/lib/launchdarkly_api/models/members_body.rb +1 -1
- data/lib/launchdarkly_api/models/patch_comment.rb +1 -1
- data/lib/launchdarkly_api/models/patch_operation.rb +1 -1
- data/lib/launchdarkly_api/models/policy.rb +1 -1
- data/lib/launchdarkly_api/models/prerequisite.rb +1 -1
- data/lib/launchdarkly_api/models/project.rb +1 -1
- data/lib/launchdarkly_api/models/project_body.rb +1 -1
- data/lib/launchdarkly_api/models/projects.rb +1 -1
- data/lib/launchdarkly_api/models/role.rb +1 -1
- data/lib/launchdarkly_api/models/rollout.rb +1 -1
- data/lib/launchdarkly_api/models/rule.rb +1 -1
- data/lib/launchdarkly_api/models/semantic_patch_operation.rb +199 -0
- data/lib/launchdarkly_api/models/semantic_patch_operation_instructions.rb +184 -0
- data/lib/launchdarkly_api/models/site.rb +1 -1
- data/lib/launchdarkly_api/models/statement.rb +1 -1
- data/lib/launchdarkly_api/models/stream.rb +1 -1
- data/lib/launchdarkly_api/models/stream_by_sdk.rb +1 -1
- data/lib/launchdarkly_api/models/stream_by_sdk_links.rb +1 -1
- data/lib/launchdarkly_api/models/stream_by_sdk_links_metadata.rb +1 -1
- data/lib/launchdarkly_api/models/stream_links.rb +1 -1
- data/lib/launchdarkly_api/models/stream_sdk_version.rb +1 -1
- data/lib/launchdarkly_api/models/stream_sdk_version_data.rb +1 -1
- data/lib/launchdarkly_api/models/stream_usage_error.rb +1 -1
- data/lib/launchdarkly_api/models/stream_usage_links.rb +1 -1
- data/lib/launchdarkly_api/models/stream_usage_metadata.rb +1 -1
- data/lib/launchdarkly_api/models/stream_usage_series.rb +1 -1
- data/lib/launchdarkly_api/models/streams.rb +1 -1
- data/lib/launchdarkly_api/models/target.rb +1 -1
- data/lib/launchdarkly_api/models/usage.rb +1 -1
- data/lib/launchdarkly_api/models/usage_error.rb +1 -1
- data/lib/launchdarkly_api/models/usage_links.rb +1 -1
- data/lib/launchdarkly_api/models/user.rb +1 -1
- data/lib/launchdarkly_api/models/user_flag_setting.rb +1 -1
- data/lib/launchdarkly_api/models/user_flag_settings.rb +1 -1
- data/lib/launchdarkly_api/models/user_record.rb +1 -1
- data/lib/launchdarkly_api/models/user_segment.rb +1 -1
- data/lib/launchdarkly_api/models/user_segment_body.rb +1 -1
- data/lib/launchdarkly_api/models/user_segment_rule.rb +1 -1
- data/lib/launchdarkly_api/models/user_segments.rb +1 -1
- data/lib/launchdarkly_api/models/user_settings_body.rb +1 -1
- data/lib/launchdarkly_api/models/user_targeting_expiration_for_flag.rb +240 -0
- data/lib/launchdarkly_api/models/user_targeting_expiration_for_flags.rb +194 -0
- data/lib/launchdarkly_api/models/user_targeting_expiration_for_segment.rb +240 -0
- data/lib/launchdarkly_api/models/user_targeting_expiration_on_flags_for_user.rb +194 -0
- data/lib/launchdarkly_api/models/user_targeting_expiration_resource_id_for_flag.rb +219 -0
- data/lib/launchdarkly_api/models/users.rb +1 -1
- data/lib/launchdarkly_api/models/variation.rb +11 -2
- data/lib/launchdarkly_api/models/webhook.rb +1 -1
- data/lib/launchdarkly_api/models/webhook_body.rb +1 -1
- data/lib/launchdarkly_api/models/webhooks.rb +1 -1
- data/lib/launchdarkly_api/models/weighted_variation.rb +1 -1
- data/lib/launchdarkly_api/version.rb +2 -2
- data/openapi.yml +297 -4
- data/spec/api/audit_log_api_spec.rb +1 -1
- data/spec/api/custom_roles_api_spec.rb +1 -1
- data/spec/api/customer_metrics_api_spec.rb +1 -1
- data/spec/api/data_export_destinations_api_spec.rb +1 -1
- data/spec/api/environments_api_spec.rb +1 -1
- data/spec/api/feature_flags_api_spec.rb +34 -3
- data/spec/api/projects_api_spec.rb +1 -1
- data/spec/api/root_api_spec.rb +1 -1
- data/spec/api/team_members_api_spec.rb +15 -1
- data/spec/api/user_segments_api_spec.rb +28 -1
- data/spec/api/user_settings_api_spec.rb +28 -1
- data/spec/api/users_api_spec.rb +1 -1
- data/spec/api/webhooks_api_spec.rb +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/audit_log_entries_spec.rb +1 -1
- data/spec/models/audit_log_entry_spec.rb +1 -1
- data/spec/models/audit_log_entry_target_spec.rb +1 -1
- data/spec/models/clause_spec.rb +7 -1
- data/spec/models/copy_actions_spec.rb +1 -1
- data/spec/models/custom_property_spec.rb +1 -1
- data/spec/models/custom_property_values_spec.rb +1 -1
- data/spec/models/custom_role_body_spec.rb +1 -1
- data/spec/models/custom_role_spec.rb +1 -1
- data/spec/models/custom_roles_spec.rb +1 -1
- data/spec/models/defaults_spec.rb +1 -1
- data/spec/models/destination_amazon_kinesis_spec.rb +1 -1
- data/spec/models/destination_body_spec.rb +1 -1
- data/spec/models/destination_google_pub_sub_spec.rb +1 -1
- data/spec/models/destination_m_particle_spec.rb +1 -1
- data/spec/models/destination_segment_spec.rb +1 -1
- data/spec/models/destination_spec.rb +1 -1
- data/spec/models/destinations_spec.rb +1 -1
- data/spec/models/environment_post_spec.rb +1 -1
- data/spec/models/environment_spec.rb +1 -1
- data/spec/models/evaluation_usage_error_spec.rb +1 -1
- data/spec/models/events_spec.rb +1 -1
- data/spec/models/fallthrough_spec.rb +1 -1
- data/spec/models/feature_flag_body_spec.rb +1 -1
- data/spec/models/feature_flag_config_spec.rb +1 -1
- data/spec/models/feature_flag_copy_body_spec.rb +1 -1
- data/spec/models/feature_flag_copy_object_spec.rb +1 -1
- data/spec/models/feature_flag_spec.rb +1 -1
- data/spec/models/feature_flag_status_across_environments_spec.rb +1 -1
- data/spec/models/feature_flag_status_for_queried_environment_spec.rb +1 -1
- data/spec/models/feature_flag_status_spec.rb +1 -1
- data/spec/models/feature_flag_statuses_spec.rb +1 -1
- data/spec/models/feature_flags_spec.rb +7 -1
- data/spec/models/flag_list_item_spec.rb +1 -1
- data/spec/models/id_spec.rb +1 -1
- data/spec/models/link_spec.rb +1 -1
- data/spec/models/links_spec.rb +1 -1
- data/spec/models/ma_uby_category_spec.rb +1 -1
- data/spec/models/mau_metadata_spec.rb +1 -1
- data/spec/models/mau_spec.rb +1 -1
- data/spec/models/member_spec.rb +7 -1
- data/spec/models/members_body_spec.rb +1 -1
- data/spec/models/members_spec.rb +7 -1
- data/spec/models/patch_comment_spec.rb +1 -1
- data/spec/models/patch_operation_spec.rb +1 -1
- data/spec/models/policy_spec.rb +1 -1
- data/spec/models/prerequisite_spec.rb +1 -1
- data/spec/models/project_body_spec.rb +1 -1
- data/spec/models/project_spec.rb +1 -1
- data/spec/models/projects_spec.rb +1 -1
- data/spec/models/role_spec.rb +1 -1
- data/spec/models/rollout_spec.rb +1 -1
- data/spec/models/rule_spec.rb +1 -1
- data/spec/models/semantic_patch_operation_instructions_spec.rb +41 -0
- data/spec/models/semantic_patch_operation_spec.rb +47 -0
- data/spec/models/site_spec.rb +1 -1
- data/spec/models/statement_spec.rb +1 -1
- data/spec/models/stream_by_sdk_links_metadata_spec.rb +1 -1
- data/spec/models/stream_by_sdk_links_spec.rb +1 -1
- data/spec/models/stream_by_sdk_spec.rb +1 -1
- data/spec/models/stream_links_spec.rb +1 -1
- data/spec/models/stream_sdk_version_data_spec.rb +1 -1
- data/spec/models/stream_sdk_version_spec.rb +1 -1
- data/spec/models/stream_spec.rb +1 -1
- data/spec/models/stream_usage_error_spec.rb +1 -1
- data/spec/models/stream_usage_links_spec.rb +1 -1
- data/spec/models/stream_usage_metadata_spec.rb +1 -1
- data/spec/models/stream_usage_series_spec.rb +1 -1
- data/spec/models/streams_spec.rb +1 -1
- data/spec/models/target_spec.rb +1 -1
- data/spec/models/usage_error_spec.rb +1 -1
- data/spec/models/usage_links_spec.rb +1 -1
- data/spec/models/usage_spec.rb +1 -1
- data/spec/models/user_flag_setting_spec.rb +1 -1
- data/spec/models/user_flag_settings_spec.rb +1 -1
- data/spec/models/user_record_spec.rb +1 -1
- data/spec/models/user_segment_body_spec.rb +1 -1
- data/spec/models/user_segment_rule_spec.rb +1 -1
- data/spec/models/user_segment_spec.rb +1 -1
- data/spec/models/user_segments_spec.rb +1 -1
- data/spec/models/user_settings_body_spec.rb +1 -1
- data/spec/models/user_spec.rb +1 -1
- data/spec/models/user_targeting_expiration_for_flag_spec.rb +77 -0
- data/spec/models/user_targeting_expiration_for_flags_spec.rb +47 -0
- data/spec/models/user_targeting_expiration_for_segment_spec.rb +77 -0
- data/spec/models/user_targeting_expiration_on_flags_for_user_spec.rb +47 -0
- data/spec/models/user_targeting_expiration_resource_id_for_flag_spec.rb +65 -0
- data/spec/models/users_spec.rb +1 -1
- data/spec/models/variation_spec.rb +7 -1
- data/spec/models/webhook_body_spec.rb +1 -1
- data/spec/models/webhook_spec.rb +1 -1
- data/spec/models/webhooks_spec.rb +1 -1
- data/spec/models/weighted_variation_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +109 -81
@@ -0,0 +1,219 @@
|
|
1
|
+
=begin
|
2
|
+
#LaunchDarkly REST API
|
3
|
+
|
4
|
+
#Build custom integrations with the LaunchDarkly REST API
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.3.0
|
7
|
+
Contact: support@launchdarkly.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.8
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module LaunchDarklyApi
|
16
|
+
class UserTargetingExpirationResourceIdForFlag
|
17
|
+
attr_accessor :kind
|
18
|
+
|
19
|
+
attr_accessor :project_key
|
20
|
+
|
21
|
+
attr_accessor :environment_key
|
22
|
+
|
23
|
+
attr_accessor :flag_key
|
24
|
+
|
25
|
+
attr_accessor :key
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'kind' => :'kind',
|
31
|
+
:'project_key' => :'projectKey',
|
32
|
+
:'environment_key' => :'environmentKey',
|
33
|
+
:'flag_key' => :'flagKey',
|
34
|
+
:'key' => :'key'
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
# Attribute type mapping.
|
39
|
+
def self.swagger_types
|
40
|
+
{
|
41
|
+
:'kind' => :'String',
|
42
|
+
:'project_key' => :'String',
|
43
|
+
:'environment_key' => :'String',
|
44
|
+
:'flag_key' => :'String',
|
45
|
+
:'key' => :'String'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
return unless attributes.is_a?(Hash)
|
53
|
+
|
54
|
+
# convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
|
+
|
57
|
+
if attributes.has_key?(:'kind')
|
58
|
+
self.kind = attributes[:'kind']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'projectKey')
|
62
|
+
self.project_key = attributes[:'projectKey']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'environmentKey')
|
66
|
+
self.environment_key = attributes[:'environmentKey']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'flagKey')
|
70
|
+
self.flag_key = attributes[:'flagKey']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'key')
|
74
|
+
self.key = attributes[:'key']
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properties with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
invalid_properties
|
83
|
+
end
|
84
|
+
|
85
|
+
# Check to see if the all the properties in the model are valid
|
86
|
+
# @return true if the model is valid
|
87
|
+
def valid?
|
88
|
+
true
|
89
|
+
end
|
90
|
+
|
91
|
+
# Checks equality by comparing each attribute.
|
92
|
+
# @param [Object] Object to be compared
|
93
|
+
def ==(o)
|
94
|
+
return true if self.equal?(o)
|
95
|
+
self.class == o.class &&
|
96
|
+
kind == o.kind &&
|
97
|
+
project_key == o.project_key &&
|
98
|
+
environment_key == o.environment_key &&
|
99
|
+
flag_key == o.flag_key &&
|
100
|
+
key == o.key
|
101
|
+
end
|
102
|
+
|
103
|
+
# @see the `==` method
|
104
|
+
# @param [Object] Object to be compared
|
105
|
+
def eql?(o)
|
106
|
+
self == o
|
107
|
+
end
|
108
|
+
|
109
|
+
# Calculates hash code according to all attributes.
|
110
|
+
# @return [Fixnum] Hash code
|
111
|
+
def hash
|
112
|
+
[kind, project_key, environment_key, flag_key, key].hash
|
113
|
+
end
|
114
|
+
|
115
|
+
# Builds the object from hash
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
117
|
+
# @return [Object] Returns the model itself
|
118
|
+
def build_from_hash(attributes)
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
120
|
+
self.class.swagger_types.each_pair do |key, type|
|
121
|
+
if type =~ /\AArray<(.*)>/i
|
122
|
+
# check to ensure the input is an array given that the the attribute
|
123
|
+
# is documented as an array but the input is not
|
124
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
125
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
126
|
+
end
|
127
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
128
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
129
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
130
|
+
end
|
131
|
+
|
132
|
+
self
|
133
|
+
end
|
134
|
+
|
135
|
+
# Deserializes the data based on type
|
136
|
+
# @param string type Data type
|
137
|
+
# @param string value Value to be deserialized
|
138
|
+
# @return [Object] Deserialized data
|
139
|
+
def _deserialize(type, value)
|
140
|
+
case type.to_sym
|
141
|
+
when :DateTime
|
142
|
+
DateTime.parse(value)
|
143
|
+
when :Date
|
144
|
+
Date.parse(value)
|
145
|
+
when :String
|
146
|
+
value.to_s
|
147
|
+
when :Integer
|
148
|
+
value.to_i
|
149
|
+
when :Float
|
150
|
+
value.to_f
|
151
|
+
when :BOOLEAN
|
152
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
153
|
+
true
|
154
|
+
else
|
155
|
+
false
|
156
|
+
end
|
157
|
+
when :Object
|
158
|
+
# generic object (usually a Hash), return directly
|
159
|
+
value
|
160
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
161
|
+
inner_type = Regexp.last_match[:inner_type]
|
162
|
+
value.map { |v| _deserialize(inner_type, v) }
|
163
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
164
|
+
k_type = Regexp.last_match[:k_type]
|
165
|
+
v_type = Regexp.last_match[:v_type]
|
166
|
+
{}.tap do |hash|
|
167
|
+
value.each do |k, v|
|
168
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
else # model
|
172
|
+
temp_model = LaunchDarklyApi.const_get(type).new
|
173
|
+
temp_model.build_from_hash(value)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
# Returns the string representation of the object
|
178
|
+
# @return [String] String presentation of the object
|
179
|
+
def to_s
|
180
|
+
to_hash.to_s
|
181
|
+
end
|
182
|
+
|
183
|
+
# to_body is an alias to to_hash (backward compatibility)
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_body
|
186
|
+
to_hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the object in the form of hash
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
191
|
+
def to_hash
|
192
|
+
hash = {}
|
193
|
+
self.class.attribute_map.each_pair do |attr, param|
|
194
|
+
value = self.send(attr)
|
195
|
+
next if value.nil?
|
196
|
+
hash[param] = _to_hash(value)
|
197
|
+
end
|
198
|
+
hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Outputs non-array value in the form of hash
|
202
|
+
# For object, use to_hash. Otherwise, just return the value
|
203
|
+
# @param [Object] value Any valid value
|
204
|
+
# @return [Hash] Returns the value in the form of hash
|
205
|
+
def _to_hash(value)
|
206
|
+
if value.is_a?(Array)
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
208
|
+
elsif value.is_a?(Hash)
|
209
|
+
{}.tap do |hash|
|
210
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
211
|
+
end
|
212
|
+
elsif value.respond_to? :to_hash
|
213
|
+
value.to_hash
|
214
|
+
else
|
215
|
+
value
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 3.3.0
|
7
7
|
Contact: support@launchdarkly.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.8
|
@@ -14,6 +14,8 @@ require 'date'
|
|
14
14
|
|
15
15
|
module LaunchDarklyApi
|
16
16
|
class Variation
|
17
|
+
attr_accessor :_id
|
18
|
+
|
17
19
|
attr_accessor :name
|
18
20
|
|
19
21
|
attr_accessor :description
|
@@ -23,6 +25,7 @@ module LaunchDarklyApi
|
|
23
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
26
|
def self.attribute_map
|
25
27
|
{
|
28
|
+
:'_id' => :'_id',
|
26
29
|
:'name' => :'name',
|
27
30
|
:'description' => :'description',
|
28
31
|
:'value' => :'value'
|
@@ -32,6 +35,7 @@ module LaunchDarklyApi
|
|
32
35
|
# Attribute type mapping.
|
33
36
|
def self.swagger_types
|
34
37
|
{
|
38
|
+
:'_id' => :'String',
|
35
39
|
:'name' => :'String',
|
36
40
|
:'description' => :'String',
|
37
41
|
:'value' => :'Object'
|
@@ -46,6 +50,10 @@ module LaunchDarklyApi
|
|
46
50
|
# convert string to symbol for hash key
|
47
51
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
48
52
|
|
53
|
+
if attributes.has_key?(:'_id')
|
54
|
+
self._id = attributes[:'_id']
|
55
|
+
end
|
56
|
+
|
49
57
|
if attributes.has_key?(:'name')
|
50
58
|
self.name = attributes[:'name']
|
51
59
|
end
|
@@ -82,6 +90,7 @@ module LaunchDarklyApi
|
|
82
90
|
def ==(o)
|
83
91
|
return true if self.equal?(o)
|
84
92
|
self.class == o.class &&
|
93
|
+
_id == o._id &&
|
85
94
|
name == o.name &&
|
86
95
|
description == o.description &&
|
87
96
|
value == o.value
|
@@ -96,7 +105,7 @@ module LaunchDarklyApi
|
|
96
105
|
# Calculates hash code according to all attributes.
|
97
106
|
# @return [Fixnum] Hash code
|
98
107
|
def hash
|
99
|
-
[name, description, value].hash
|
108
|
+
[_id, name, description, value].hash
|
100
109
|
end
|
101
110
|
|
102
111
|
# Builds the object from hash
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#Build custom integrations with the LaunchDarkly REST API
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 3.3.0
|
7
7
|
Contact: support@launchdarkly.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.8
|
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.8
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module LaunchDarklyApi
|
14
|
-
VERSION = '
|
14
|
+
VERSION = '3.3.0'
|
15
15
|
end
|
data/openapi.yml
CHANGED
@@ -10,7 +10,7 @@ info:
|
|
10
10
|
license:
|
11
11
|
name: Apache 2.0
|
12
12
|
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
|
13
|
-
version:
|
13
|
+
version: 3.3.0
|
14
14
|
host: app.launchdarkly.com
|
15
15
|
basePath: /api/v2
|
16
16
|
schemes:
|
@@ -188,6 +188,10 @@ paths:
|
|
188
188
|
- $ref: '#/parameters/EnvironmentKeyQuery'
|
189
189
|
- $ref: '#/parameters/SummaryQuery'
|
190
190
|
- $ref: '#/parameters/ArchivedQuery'
|
191
|
+
- $ref: '#/parameters/LimitQuery'
|
192
|
+
- $ref: '#/parameters/OffsetQuery'
|
193
|
+
- $ref: '#/parameters/FilterQuery'
|
194
|
+
- $ref: '#/parameters/SortQuery'
|
191
195
|
- $ref: '#/parameters/Tag'
|
192
196
|
responses:
|
193
197
|
'200':
|
@@ -353,6 +357,46 @@ paths:
|
|
353
357
|
$ref: '#/responses/BetaApi403'
|
354
358
|
tags:
|
355
359
|
- Feature flags
|
360
|
+
'/flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey}':
|
361
|
+
get:
|
362
|
+
summary: Get expiring user targets for feature flag
|
363
|
+
operationId: getExpiringUserTargets
|
364
|
+
parameters:
|
365
|
+
- $ref: '#/parameters/ProjectKey'
|
366
|
+
- $ref: '#/parameters/EnvironmentKey'
|
367
|
+
- $ref: '#/parameters/FeatureFlagKey'
|
368
|
+
responses:
|
369
|
+
'200':
|
370
|
+
description: User targets of the requested feature flag.
|
371
|
+
schema:
|
372
|
+
$ref: '#/definitions/UserTargetingExpirationForFlags'
|
373
|
+
'401':
|
374
|
+
$ref: '#/responses/Standard401'
|
375
|
+
tags:
|
376
|
+
- Feature flags
|
377
|
+
patch:
|
378
|
+
summary: 'Update, add, or delete expiring user targets on feature flag'
|
379
|
+
operationId: patchExpiringUserTargets
|
380
|
+
parameters:
|
381
|
+
- $ref: '#/parameters/ProjectKey'
|
382
|
+
- $ref: '#/parameters/EnvironmentKey'
|
383
|
+
- $ref: '#/parameters/FeatureFlagKey'
|
384
|
+
- $ref: '#/parameters/SemanticPatchWithComment'
|
385
|
+
responses:
|
386
|
+
'200':
|
387
|
+
description: User targeting expirations on feature flag response.
|
388
|
+
schema:
|
389
|
+
$ref: '#/definitions/UserTargetingExpirationForFlags'
|
390
|
+
'400':
|
391
|
+
$ref: '#/responses/Standard400'
|
392
|
+
'401':
|
393
|
+
$ref: '#/responses/Standard401'
|
394
|
+
'404':
|
395
|
+
$ref: '#/responses/Standard404'
|
396
|
+
'409':
|
397
|
+
$ref: '#/responses/Standard409'
|
398
|
+
tags:
|
399
|
+
- Feature flags
|
356
400
|
'/segments/{projectKey}/{environmentKey}':
|
357
401
|
get:
|
358
402
|
summary: Get a list of all user segments in the given project.
|
@@ -442,6 +486,48 @@ paths:
|
|
442
486
|
$ref: '#/responses/Standard404'
|
443
487
|
tags:
|
444
488
|
- User segments
|
489
|
+
'/segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey}':
|
490
|
+
get:
|
491
|
+
summary: Get expiring user targets for user segment
|
492
|
+
operationId: getExpiringUserTargetsOnSegment
|
493
|
+
parameters:
|
494
|
+
- $ref: '#/parameters/ProjectKey'
|
495
|
+
- $ref: '#/parameters/EnvironmentKey'
|
496
|
+
- $ref: '#/parameters/UserSegmentKey'
|
497
|
+
responses:
|
498
|
+
'200':
|
499
|
+
description: User targeting expirations on user segment response.
|
500
|
+
schema:
|
501
|
+
$ref: '#/definitions/UserTargetingExpirationForSegment'
|
502
|
+
'401':
|
503
|
+
$ref: '#/responses/Standard401'
|
504
|
+
'404':
|
505
|
+
$ref: '#/responses/Standard404'
|
506
|
+
tags:
|
507
|
+
- User segments
|
508
|
+
patch:
|
509
|
+
summary: 'Update, add, or delete expiring user targets on user segment'
|
510
|
+
operationId: patchExpiringUserTargetsOnSegment
|
511
|
+
parameters:
|
512
|
+
- $ref: '#/parameters/ProjectKey'
|
513
|
+
- $ref: '#/parameters/EnvironmentKey'
|
514
|
+
- $ref: '#/parameters/UserSegmentKey'
|
515
|
+
- $ref: '#/parameters/SemanticPatchWithComment'
|
516
|
+
responses:
|
517
|
+
'200':
|
518
|
+
description: User targeting expirations on user segment response.
|
519
|
+
schema:
|
520
|
+
$ref: '#/definitions/UserTargetingExpirationForSegment'
|
521
|
+
'400':
|
522
|
+
$ref: '#/responses/Standard400'
|
523
|
+
'401':
|
524
|
+
$ref: '#/responses/Standard401'
|
525
|
+
'404':
|
526
|
+
$ref: '#/responses/Standard404'
|
527
|
+
'409':
|
528
|
+
$ref: '#/responses/Standard409'
|
529
|
+
tags:
|
530
|
+
- User segments
|
445
531
|
'/users/{projectKey}/{environmentKey}':
|
446
532
|
get:
|
447
533
|
summary: >-
|
@@ -585,6 +671,48 @@ paths:
|
|
585
671
|
$ref: '#/responses/Standard404'
|
586
672
|
tags:
|
587
673
|
- User settings
|
674
|
+
'/users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey}':
|
675
|
+
get:
|
676
|
+
summary: Get expiring dates on flags for user
|
677
|
+
operationId: getExpiringUserTargetsForUser
|
678
|
+
parameters:
|
679
|
+
- $ref: '#/parameters/ProjectKey'
|
680
|
+
- $ref: '#/parameters/EnvironmentKey'
|
681
|
+
- $ref: '#/parameters/UserKey'
|
682
|
+
responses:
|
683
|
+
'200':
|
684
|
+
description: User targets of the requested feature flag.
|
685
|
+
schema:
|
686
|
+
$ref: '#/definitions/UserTargetingExpirationOnFlagsForUser'
|
687
|
+
'401':
|
688
|
+
$ref: '#/responses/Standard401'
|
689
|
+
tags:
|
690
|
+
- User settings
|
691
|
+
patch:
|
692
|
+
summary: >-
|
693
|
+
Update, add, or delete expiring user targets for a single user on all
|
694
|
+
flags
|
695
|
+
operationId: patchExpiringUserTargetsForFlags
|
696
|
+
parameters:
|
697
|
+
- $ref: '#/parameters/ProjectKey'
|
698
|
+
- $ref: '#/parameters/EnvironmentKey'
|
699
|
+
- $ref: '#/parameters/UserKey'
|
700
|
+
- $ref: '#/parameters/SemanticPatchWithComment'
|
701
|
+
responses:
|
702
|
+
'200':
|
703
|
+
description: User Targeting expiration for single user on all flags response.
|
704
|
+
schema:
|
705
|
+
$ref: '#/definitions/UserTargetingExpirationOnFlagsForUser'
|
706
|
+
'400':
|
707
|
+
$ref: '#/responses/Standard400'
|
708
|
+
'401':
|
709
|
+
$ref: '#/responses/Standard401'
|
710
|
+
'404':
|
711
|
+
$ref: '#/responses/Standard404'
|
712
|
+
'409':
|
713
|
+
$ref: '#/responses/Standard409'
|
714
|
+
tags:
|
715
|
+
- User settings
|
588
716
|
/auditlog:
|
589
717
|
get:
|
590
718
|
summary: >-
|
@@ -782,6 +910,11 @@ paths:
|
|
782
910
|
get:
|
783
911
|
summary: Returns a list of all members in the account.
|
784
912
|
operationId: getMembers
|
913
|
+
parameters:
|
914
|
+
- $ref: '#/parameters/LimitQuery'
|
915
|
+
- $ref: '#/parameters/OffsetQuery'
|
916
|
+
- $ref: '#/parameters/FilterQuery'
|
917
|
+
- $ref: '#/parameters/SortQuery'
|
785
918
|
responses:
|
786
919
|
'200':
|
787
920
|
description: Members response.
|
@@ -809,6 +942,19 @@ paths:
|
|
809
942
|
$ref: '#/responses/Standard409'
|
810
943
|
tags:
|
811
944
|
- Team members
|
945
|
+
/members/me:
|
946
|
+
get:
|
947
|
+
summary: Get the current team member associated with the token
|
948
|
+
operationId: getMe
|
949
|
+
responses:
|
950
|
+
'200':
|
951
|
+
$ref: '#/responses/Member2xx'
|
952
|
+
'400':
|
953
|
+
$ref: '#/responses/Standard400'
|
954
|
+
'401':
|
955
|
+
$ref: '#/responses/Standard401'
|
956
|
+
tags:
|
957
|
+
- Team members
|
812
958
|
'/members/{memberId}':
|
813
959
|
get:
|
814
960
|
summary: Get a single team member by ID.
|
@@ -1285,6 +1431,8 @@ definitions:
|
|
1285
1431
|
type: array
|
1286
1432
|
items:
|
1287
1433
|
$ref: '#/definitions/FeatureFlag'
|
1434
|
+
totalCount:
|
1435
|
+
type: number
|
1288
1436
|
Member:
|
1289
1437
|
type: object
|
1290
1438
|
properties:
|
@@ -1303,6 +1451,8 @@ definitions:
|
|
1303
1451
|
lastName:
|
1304
1452
|
type: string
|
1305
1453
|
example: Turing
|
1454
|
+
_verified:
|
1455
|
+
type: boolean
|
1306
1456
|
_pendingInvite:
|
1307
1457
|
type: boolean
|
1308
1458
|
isBeta:
|
@@ -1320,6 +1470,8 @@ definitions:
|
|
1320
1470
|
type: array
|
1321
1471
|
items:
|
1322
1472
|
$ref: '#/definitions/Member'
|
1473
|
+
totalCount:
|
1474
|
+
type: number
|
1323
1475
|
FeatureFlagConfig:
|
1324
1476
|
type: object
|
1325
1477
|
properties:
|
@@ -1417,6 +1569,8 @@ definitions:
|
|
1417
1569
|
Clause:
|
1418
1570
|
type: object
|
1419
1571
|
properties:
|
1572
|
+
_id:
|
1573
|
+
type: string
|
1420
1574
|
attribute:
|
1421
1575
|
type: string
|
1422
1576
|
example: groups
|
@@ -1435,6 +1589,9 @@ definitions:
|
|
1435
1589
|
required:
|
1436
1590
|
- value
|
1437
1591
|
properties:
|
1592
|
+
_id:
|
1593
|
+
type: string
|
1594
|
+
example: 24b32dd3-0ba6-46ee-86af-230eebf3c7cb
|
1438
1595
|
name:
|
1439
1596
|
type: string
|
1440
1597
|
example: 'True'
|
@@ -1551,6 +1708,79 @@ definitions:
|
|
1551
1708
|
type: object
|
1552
1709
|
additionalProperties:
|
1553
1710
|
$ref: '#/definitions/FeatureFlagStatusForQueriedEnvironment'
|
1711
|
+
UserTargetingExpirationForFlags:
|
1712
|
+
type: object
|
1713
|
+
properties:
|
1714
|
+
_links:
|
1715
|
+
$ref: '#/definitions/Links'
|
1716
|
+
items:
|
1717
|
+
type: array
|
1718
|
+
items:
|
1719
|
+
$ref: '#/definitions/UserTargetingExpirationForFlag'
|
1720
|
+
UserTargetingExpirationOnFlagsForUser:
|
1721
|
+
type: object
|
1722
|
+
properties:
|
1723
|
+
_links:
|
1724
|
+
$ref: '#/definitions/Links'
|
1725
|
+
items:
|
1726
|
+
type: array
|
1727
|
+
items:
|
1728
|
+
$ref: '#/definitions/UserTargetingExpirationForFlag'
|
1729
|
+
UserTargetingExpirationForFlag:
|
1730
|
+
type: object
|
1731
|
+
properties:
|
1732
|
+
expirationDate:
|
1733
|
+
type: integer
|
1734
|
+
description: Date scheduled for expiration
|
1735
|
+
variationId:
|
1736
|
+
type: string
|
1737
|
+
description: the ID of the variation that the user is targeted on a flag
|
1738
|
+
userKey:
|
1739
|
+
type: string
|
1740
|
+
description: Unique identifier for the user
|
1741
|
+
_id:
|
1742
|
+
type: string
|
1743
|
+
_resourceId:
|
1744
|
+
$ref: '#/definitions/UserTargetingExpirationResourceIdForFlag'
|
1745
|
+
_links:
|
1746
|
+
$ref: '#/definitions/Links'
|
1747
|
+
_version:
|
1748
|
+
type: integer
|
1749
|
+
UserTargetingExpirationForSegment:
|
1750
|
+
type: object
|
1751
|
+
properties:
|
1752
|
+
expirationDate:
|
1753
|
+
type: integer
|
1754
|
+
description: Date scheduled for expiration
|
1755
|
+
targetType:
|
1756
|
+
type: string
|
1757
|
+
description: >-
|
1758
|
+
either the included or excluded variation that the user is targeted on
|
1759
|
+
a segment
|
1760
|
+
userKey:
|
1761
|
+
type: string
|
1762
|
+
description: Unique identifier for the user
|
1763
|
+
_id:
|
1764
|
+
type: string
|
1765
|
+
_resourceId:
|
1766
|
+
$ref: '#/definitions/UserTargetingExpirationResourceIdForFlag'
|
1767
|
+
_links:
|
1768
|
+
$ref: '#/definitions/Links'
|
1769
|
+
_version:
|
1770
|
+
type: integer
|
1771
|
+
UserTargetingExpirationResourceIdForFlag:
|
1772
|
+
type: object
|
1773
|
+
properties:
|
1774
|
+
kind:
|
1775
|
+
type: string
|
1776
|
+
projectKey:
|
1777
|
+
type: string
|
1778
|
+
environmentKey:
|
1779
|
+
type: string
|
1780
|
+
flagKey:
|
1781
|
+
type: string
|
1782
|
+
key:
|
1783
|
+
type: string
|
1554
1784
|
UserSegment:
|
1555
1785
|
type: object
|
1556
1786
|
required:
|
@@ -2159,6 +2389,24 @@ definitions:
|
|
2159
2389
|
- op
|
2160
2390
|
- path
|
2161
2391
|
- value
|
2392
|
+
SemanticPatchOperation:
|
2393
|
+
type: object
|
2394
|
+
properties:
|
2395
|
+
comment:
|
2396
|
+
type: string
|
2397
|
+
example: This is a comment string
|
2398
|
+
instructions:
|
2399
|
+
type: array
|
2400
|
+
items:
|
2401
|
+
properties:
|
2402
|
+
kind:
|
2403
|
+
type: string
|
2404
|
+
example: removeUserTargets
|
2405
|
+
description: >-
|
2406
|
+
The name of the modification you would like to perform on a
|
2407
|
+
resource.
|
2408
|
+
required:
|
2409
|
+
- instructions
|
2162
2410
|
CustomProperty:
|
2163
2411
|
type: object
|
2164
2412
|
description: A name and value describing a custom property.
|
@@ -2738,9 +2986,12 @@ parameters:
|
|
2738
2986
|
description: >-
|
2739
2987
|
By default, each feature will include configurations for each environment.
|
2740
2988
|
You can filter environments with the env query parameter. For example,
|
2741
|
-
setting env=production will restrict the returned configurations to
|
2742
|
-
your production environment.
|
2743
|
-
type:
|
2989
|
+
setting env=["production"] will restrict the returned configurations to
|
2990
|
+
just your production environment.
|
2991
|
+
type: array
|
2992
|
+
items:
|
2993
|
+
type: string
|
2994
|
+
collectionFormat: multi
|
2744
2995
|
SummaryQuery:
|
2745
2996
|
name: summary
|
2746
2997
|
in: query
|
@@ -2759,6 +3010,35 @@ parameters:
|
|
2759
3010
|
returned. By default, archived flags are not included in the list of
|
2760
3011
|
flags.
|
2761
3012
|
type: boolean
|
3013
|
+
LimitQuery:
|
3014
|
+
name: limit
|
3015
|
+
in: query
|
3016
|
+
required: false
|
3017
|
+
description: 'The number of objects to return. Defaults to -1, which returns everything.'
|
3018
|
+
type: number
|
3019
|
+
OffsetQuery:
|
3020
|
+
name: offset
|
3021
|
+
in: query
|
3022
|
+
required: false
|
3023
|
+
description: >-
|
3024
|
+
Where to start in the list. This is for use with pagination. For example,
|
3025
|
+
an offset of 10 would skip the first 10 items and then return the next
|
3026
|
+
limit items.
|
3027
|
+
type: number
|
3028
|
+
FilterQuery:
|
3029
|
+
name: filter
|
3030
|
+
in: query
|
3031
|
+
required: false
|
3032
|
+
description: 'A comma-separated list of filters. Each filter is of the form field:value.'
|
3033
|
+
type: string
|
3034
|
+
SortQuery:
|
3035
|
+
name: sort
|
3036
|
+
in: query
|
3037
|
+
required: false
|
3038
|
+
description: >-
|
3039
|
+
A comma-separated list of fields to sort by. A field prefixed by a - will
|
3040
|
+
be sorted in descending order.
|
3041
|
+
type: string
|
2762
3042
|
FeatureFlagKey:
|
2763
3043
|
name: featureFlagKey
|
2764
3044
|
in: path
|
@@ -3001,6 +3281,19 @@ parameters:
|
|
3001
3281
|
type: array
|
3002
3282
|
items:
|
3003
3283
|
$ref: '#/definitions/PatchOperation'
|
3284
|
+
SemanticPatchWithComment:
|
3285
|
+
name: SemanticPatchWithComment
|
3286
|
+
in: body
|
3287
|
+
required: true
|
3288
|
+
description: >-
|
3289
|
+
Requires a Semantic Patch representation of the desired changes to the
|
3290
|
+
resource.
|
3291
|
+
'https://apidocs.launchdarkly.com/reference#updates-via-semantic-patches'.
|
3292
|
+
The addition of comments is also supported.
|
3293
|
+
schema:
|
3294
|
+
type: object
|
3295
|
+
items:
|
3296
|
+
$ref: '#/definitions/SemanticPatchOperation'
|
3004
3297
|
StreamSource:
|
3005
3298
|
name: source
|
3006
3299
|
in: path
|