ff-ruby-server-sdk 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/api.yaml +319 -30
- data/lib/ff/ruby/server/generated/lib/openapi_client/api/client_api.rb +27 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/api/metrics_api.rb +13 -10
- data/lib/ff/ruby/server/generated/lib/openapi_client/api/proxy_api.rb +159 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/configuration.rb +7 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/clause.rb +6 -5
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/distribution.rb +3 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/error.rb +16 -4
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/group_serving_rule.rb +257 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/inline_object.rb +223 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/pagination.rb +5 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/prerequisite.rb +3 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/proxy_config.rb +299 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/proxy_config_all_of.rb +220 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/proxy_config_all_of_environments.rb +251 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/segment.rb +23 -4
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/serve.rb +1 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/serving_rule.rb +4 -5
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/tag.rb +15 -8
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/target.rb +11 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/target_map.rb +8 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/variation.rb +5 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/variation_map.rb +4 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client/models/weighted_variation.rb +3 -0
- data/lib/ff/ruby/server/generated/lib/openapi_client.rb +6 -0
- data/lib/ff/ruby/server/sdk/api/config.rb +1 -1
- data/lib/ff/ruby/server/sdk/api/evaluator.rb +32 -73
- data/lib/ff/ruby/server/sdk/api/metrics_processor.rb +95 -50
- data/lib/ff/ruby/server/sdk/common/sdk_codes.rb +9 -0
- data/lib/ff/ruby/server/sdk/connector/harness_connector.rb +12 -3
- data/lib/ff/ruby/server/sdk/version.rb +1 -1
- data/scripts/sdk_specs.sh +1 -1
- metadata +9 -3
data/lib/ff/ruby/server/generated/lib/openapi_client/models/proxy_config_all_of_environments.rb
ADDED
@@ -0,0 +1,251 @@
|
|
1
|
+
=begin
|
2
|
+
#Harness feature flag service client apis
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: cf@harness.io
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.2.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module OpenapiClient
|
17
|
+
class ProxyConfigAllOfEnvironments
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
attr_accessor :api_keys
|
21
|
+
|
22
|
+
attr_accessor :feature_configs
|
23
|
+
|
24
|
+
attr_accessor :segments
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'id' => :'id',
|
30
|
+
:'api_keys' => :'apiKeys',
|
31
|
+
:'feature_configs' => :'featureConfigs',
|
32
|
+
:'segments' => :'segments'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'id' => :'String',
|
45
|
+
:'api_keys' => :'Array<String>',
|
46
|
+
:'feature_configs' => :'Array<FeatureConfig>',
|
47
|
+
:'segments' => :'Array<Segment>'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Initializes the object
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
+
def initialize(attributes = {})
|
60
|
+
if (!attributes.is_a?(Hash))
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ProxyConfigAllOfEnvironments` initialize method"
|
62
|
+
end
|
63
|
+
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ProxyConfigAllOfEnvironments`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
|
+
end
|
69
|
+
h[k.to_sym] = v
|
70
|
+
}
|
71
|
+
|
72
|
+
if attributes.key?(:'id')
|
73
|
+
self.id = attributes[:'id']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'api_keys')
|
77
|
+
if (value = attributes[:'api_keys']).is_a?(Array)
|
78
|
+
self.api_keys = value
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'feature_configs')
|
83
|
+
if (value = attributes[:'feature_configs']).is_a?(Array)
|
84
|
+
self.feature_configs = value
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'segments')
|
89
|
+
if (value = attributes[:'segments']).is_a?(Array)
|
90
|
+
self.segments = value
|
91
|
+
end
|
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
|
+
invalid_properties = Array.new
|
99
|
+
invalid_properties
|
100
|
+
end
|
101
|
+
|
102
|
+
# Check to see if the all the properties in the model are valid
|
103
|
+
# @return true if the model is valid
|
104
|
+
def valid?
|
105
|
+
true
|
106
|
+
end
|
107
|
+
|
108
|
+
# Checks equality by comparing each attribute.
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def ==(o)
|
111
|
+
return true if self.equal?(o)
|
112
|
+
self.class == o.class &&
|
113
|
+
id == o.id &&
|
114
|
+
api_keys == o.api_keys &&
|
115
|
+
feature_configs == o.feature_configs &&
|
116
|
+
segments == o.segments
|
117
|
+
end
|
118
|
+
|
119
|
+
# @see the `==` method
|
120
|
+
# @param [Object] Object to be compared
|
121
|
+
def eql?(o)
|
122
|
+
self == o
|
123
|
+
end
|
124
|
+
|
125
|
+
# Calculates hash code according to all attributes.
|
126
|
+
# @return [Integer] Hash code
|
127
|
+
def hash
|
128
|
+
[id, api_keys, feature_configs, segments].hash
|
129
|
+
end
|
130
|
+
|
131
|
+
# Builds the object from hash
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
133
|
+
# @return [Object] Returns the model itself
|
134
|
+
def self.build_from_hash(attributes)
|
135
|
+
new.build_from_hash(attributes)
|
136
|
+
end
|
137
|
+
|
138
|
+
# Builds the object from hash
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
+
# @return [Object] Returns the model itself
|
141
|
+
def build_from_hash(attributes)
|
142
|
+
return nil unless attributes.is_a?(Hash)
|
143
|
+
self.class.openapi_types.each_pair do |key, type|
|
144
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
145
|
+
self.send("#{key}=", nil)
|
146
|
+
elsif type =~ /\AArray<(.*)>/i
|
147
|
+
# check to ensure the input is an array given that the attribute
|
148
|
+
# is documented as an array but the input is not
|
149
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
150
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
151
|
+
end
|
152
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
153
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
self
|
158
|
+
end
|
159
|
+
|
160
|
+
# Deserializes the data based on type
|
161
|
+
# @param string type Data type
|
162
|
+
# @param string value Value to be deserialized
|
163
|
+
# @return [Object] Deserialized data
|
164
|
+
def _deserialize(type, value)
|
165
|
+
case type.to_sym
|
166
|
+
when :Time
|
167
|
+
Time.parse(value)
|
168
|
+
when :Date
|
169
|
+
Date.parse(value)
|
170
|
+
when :String
|
171
|
+
value.to_s
|
172
|
+
when :Integer
|
173
|
+
value.to_i
|
174
|
+
when :Float
|
175
|
+
value.to_f
|
176
|
+
when :Boolean
|
177
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
178
|
+
true
|
179
|
+
else
|
180
|
+
false
|
181
|
+
end
|
182
|
+
when :Object
|
183
|
+
# generic object (usually a Hash), return directly
|
184
|
+
value
|
185
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
186
|
+
inner_type = Regexp.last_match[:inner_type]
|
187
|
+
value.map { |v| _deserialize(inner_type, v) }
|
188
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
189
|
+
k_type = Regexp.last_match[:k_type]
|
190
|
+
v_type = Regexp.last_match[:v_type]
|
191
|
+
{}.tap do |hash|
|
192
|
+
value.each do |k, v|
|
193
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
else # model
|
197
|
+
# models (e.g. Pet) or oneOf
|
198
|
+
klass = OpenapiClient.const_get(type)
|
199
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
# Returns the string representation of the object
|
204
|
+
# @return [String] String presentation of the object
|
205
|
+
def to_s
|
206
|
+
to_hash.to_s
|
207
|
+
end
|
208
|
+
|
209
|
+
# to_body is an alias to to_hash (backward compatibility)
|
210
|
+
# @return [Hash] Returns the object in the form of hash
|
211
|
+
def to_body
|
212
|
+
to_hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns the object in the form of hash
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
217
|
+
def to_hash
|
218
|
+
hash = {}
|
219
|
+
self.class.attribute_map.each_pair do |attr, param|
|
220
|
+
value = self.send(attr)
|
221
|
+
if value.nil?
|
222
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
223
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
224
|
+
end
|
225
|
+
|
226
|
+
hash[param] = _to_hash(value)
|
227
|
+
end
|
228
|
+
hash
|
229
|
+
end
|
230
|
+
|
231
|
+
# Outputs non-array value in the form of hash
|
232
|
+
# For object, use to_hash. Otherwise, just return the value
|
233
|
+
# @param [Object] value Any valid value
|
234
|
+
# @return [Hash] Returns the value in the form of hash
|
235
|
+
def _to_hash(value)
|
236
|
+
if value.is_a?(Array)
|
237
|
+
value.compact.map { |v| _to_hash(v) }
|
238
|
+
elsif value.is_a?(Hash)
|
239
|
+
{}.tap do |hash|
|
240
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
241
|
+
end
|
242
|
+
elsif value.respond_to? :to_hash
|
243
|
+
value.to_hash
|
244
|
+
else
|
245
|
+
value
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
end
|
250
|
+
|
251
|
+
end
|
@@ -14,28 +14,38 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module OpenapiClient
|
17
|
+
# A Target Group (Segment) response
|
17
18
|
class Segment
|
18
|
-
# Unique identifier for the
|
19
|
+
# Unique identifier for the target group.
|
19
20
|
attr_accessor :identifier
|
20
21
|
|
21
|
-
# Name of the
|
22
|
+
# Name of the target group.
|
22
23
|
attr_accessor :name
|
23
24
|
|
25
|
+
# The environment this target group belongs to
|
24
26
|
attr_accessor :environment
|
25
27
|
|
28
|
+
# Tags for this target group
|
26
29
|
attr_accessor :tags
|
27
30
|
|
31
|
+
# A list of Targets who belong to this target group
|
28
32
|
attr_accessor :included
|
29
33
|
|
34
|
+
# A list of Targets who are excluded from this target group
|
30
35
|
attr_accessor :excluded
|
31
36
|
|
32
|
-
# An array of rules that can cause a user to be included in this segment.
|
33
37
|
attr_accessor :rules
|
34
38
|
|
39
|
+
# An array of rules that can cause a user to be included in this segment.
|
40
|
+
attr_accessor :serving_rules
|
41
|
+
|
42
|
+
# The data and time in milliseconds when the group was created
|
35
43
|
attr_accessor :created_at
|
36
44
|
|
45
|
+
# The data and time in milliseconds when the group was last modified
|
37
46
|
attr_accessor :modified_at
|
38
47
|
|
48
|
+
# The version of this group. Each time it is modified the version is incremented
|
39
49
|
attr_accessor :version
|
40
50
|
|
41
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -48,6 +58,7 @@ module OpenapiClient
|
|
48
58
|
:'included' => :'included',
|
49
59
|
:'excluded' => :'excluded',
|
50
60
|
:'rules' => :'rules',
|
61
|
+
:'serving_rules' => :'servingRules',
|
51
62
|
:'created_at' => :'createdAt',
|
52
63
|
:'modified_at' => :'modifiedAt',
|
53
64
|
:'version' => :'version'
|
@@ -69,6 +80,7 @@ module OpenapiClient
|
|
69
80
|
:'included' => :'Array<Target>',
|
70
81
|
:'excluded' => :'Array<Target>',
|
71
82
|
:'rules' => :'Array<Clause>',
|
83
|
+
:'serving_rules' => :'Array<GroupServingRule>',
|
72
84
|
:'created_at' => :'Integer',
|
73
85
|
:'modified_at' => :'Integer',
|
74
86
|
:'version' => :'Integer'
|
@@ -132,6 +144,12 @@ module OpenapiClient
|
|
132
144
|
end
|
133
145
|
end
|
134
146
|
|
147
|
+
if attributes.key?(:'serving_rules')
|
148
|
+
if (value = attributes[:'serving_rules']).is_a?(Array)
|
149
|
+
self.serving_rules = value
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
135
153
|
if attributes.key?(:'created_at')
|
136
154
|
self.created_at = attributes[:'created_at']
|
137
155
|
end
|
@@ -180,6 +198,7 @@ module OpenapiClient
|
|
180
198
|
included == o.included &&
|
181
199
|
excluded == o.excluded &&
|
182
200
|
rules == o.rules &&
|
201
|
+
serving_rules == o.serving_rules &&
|
183
202
|
created_at == o.created_at &&
|
184
203
|
modified_at == o.modified_at &&
|
185
204
|
version == o.version
|
@@ -194,7 +213,7 @@ module OpenapiClient
|
|
194
213
|
# Calculates hash code according to all attributes.
|
195
214
|
# @return [Integer] Hash code
|
196
215
|
def hash
|
197
|
-
[identifier, name, environment, tags, included, excluded, rules, created_at, modified_at, version].hash
|
216
|
+
[identifier, name, environment, tags, included, excluded, rules, serving_rules, created_at, modified_at, version].hash
|
198
217
|
end
|
199
218
|
|
200
219
|
# Builds the object from hash
|
@@ -14,11 +14,15 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module OpenapiClient
|
17
|
+
# The rule used to determine what variation to serve to a target
|
17
18
|
class ServingRule
|
19
|
+
# The unique identifier for this rule
|
18
20
|
attr_accessor :rule_id
|
19
21
|
|
22
|
+
# The rules priority relative to other rules. The rules are evaluated in order with 1 being the highest
|
20
23
|
attr_accessor :priority
|
21
24
|
|
25
|
+
# A list of clauses to use in the rule
|
22
26
|
attr_accessor :clauses
|
23
27
|
|
24
28
|
attr_accessor :serve
|
@@ -92,10 +96,6 @@ module OpenapiClient
|
|
92
96
|
# @return Array for valid properties with the reasons
|
93
97
|
def list_invalid_properties
|
94
98
|
invalid_properties = Array.new
|
95
|
-
if @rule_id.nil?
|
96
|
-
invalid_properties.push('invalid value for "rule_id", rule_id cannot be nil.')
|
97
|
-
end
|
98
|
-
|
99
99
|
if @priority.nil?
|
100
100
|
invalid_properties.push('invalid value for "priority", priority cannot be nil.')
|
101
101
|
end
|
@@ -114,7 +114,6 @@ module OpenapiClient
|
|
114
114
|
# Check to see if the all the properties in the model are valid
|
115
115
|
# @return true if the model is valid
|
116
116
|
def valid?
|
117
|
-
return false if @rule_id.nil?
|
118
117
|
return false if @priority.nil?
|
119
118
|
return false if @clauses.nil?
|
120
119
|
return false if @serve.nil?
|
@@ -14,17 +14,19 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module OpenapiClient
|
17
|
-
# A name and
|
17
|
+
# A Tag object used to tag feature flags - consists of name and identifier
|
18
18
|
class Tag
|
19
|
+
# The name of the tag
|
19
20
|
attr_accessor :name
|
20
21
|
|
21
|
-
|
22
|
+
# The identifier of the tag
|
23
|
+
attr_accessor :identifier
|
22
24
|
|
23
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
26
|
def self.attribute_map
|
25
27
|
{
|
26
28
|
:'name' => :'name',
|
27
|
-
:'
|
29
|
+
:'identifier' => :'identifier'
|
28
30
|
}
|
29
31
|
end
|
30
32
|
|
@@ -37,7 +39,7 @@ module OpenapiClient
|
|
37
39
|
def self.openapi_types
|
38
40
|
{
|
39
41
|
:'name' => :'String',
|
40
|
-
:'
|
42
|
+
:'identifier' => :'String'
|
41
43
|
}
|
42
44
|
end
|
43
45
|
|
@@ -66,8 +68,8 @@ module OpenapiClient
|
|
66
68
|
self.name = attributes[:'name']
|
67
69
|
end
|
68
70
|
|
69
|
-
if attributes.key?(:'
|
70
|
-
self.
|
71
|
+
if attributes.key?(:'identifier')
|
72
|
+
self.identifier = attributes[:'identifier']
|
71
73
|
end
|
72
74
|
end
|
73
75
|
|
@@ -79,6 +81,10 @@ module OpenapiClient
|
|
79
81
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
80
82
|
end
|
81
83
|
|
84
|
+
if @identifier.nil?
|
85
|
+
invalid_properties.push('invalid value for "identifier", identifier cannot be nil.')
|
86
|
+
end
|
87
|
+
|
82
88
|
invalid_properties
|
83
89
|
end
|
84
90
|
|
@@ -86,6 +92,7 @@ module OpenapiClient
|
|
86
92
|
# @return true if the model is valid
|
87
93
|
def valid?
|
88
94
|
return false if @name.nil?
|
95
|
+
return false if @identifier.nil?
|
89
96
|
true
|
90
97
|
end
|
91
98
|
|
@@ -95,7 +102,7 @@ module OpenapiClient
|
|
95
102
|
return true if self.equal?(o)
|
96
103
|
self.class == o.class &&
|
97
104
|
name == o.name &&
|
98
|
-
|
105
|
+
identifier == o.identifier
|
99
106
|
end
|
100
107
|
|
101
108
|
# @see the `==` method
|
@@ -107,7 +114,7 @@ module OpenapiClient
|
|
107
114
|
# Calculates hash code according to all attributes.
|
108
115
|
# @return [Integer] Hash code
|
109
116
|
def hash
|
110
|
-
[name,
|
117
|
+
[name, identifier].hash
|
111
118
|
end
|
112
119
|
|
113
120
|
# Builds the object from hash
|
@@ -14,25 +14,36 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module OpenapiClient
|
17
|
+
# A Target object
|
17
18
|
class Target
|
19
|
+
# The unique identifier for this target
|
18
20
|
attr_accessor :identifier
|
19
21
|
|
22
|
+
# The account ID that the target belongs to
|
20
23
|
attr_accessor :account
|
21
24
|
|
25
|
+
# The identifier for the organization that the target belongs to
|
22
26
|
attr_accessor :org
|
23
27
|
|
28
|
+
# The identifier for the environment that the target belongs to
|
24
29
|
attr_accessor :environment
|
25
30
|
|
31
|
+
# The identifier for the project that this target belongs to
|
26
32
|
attr_accessor :project
|
27
33
|
|
34
|
+
# The name of this Target
|
28
35
|
attr_accessor :name
|
29
36
|
|
37
|
+
# Indicates if this target is anonymous
|
30
38
|
attr_accessor :anonymous
|
31
39
|
|
40
|
+
# a JSON representation of the attributes for this target
|
32
41
|
attr_accessor :attributes
|
33
42
|
|
43
|
+
# The date and time in milliseconds when this Target was created
|
34
44
|
attr_accessor :created_at
|
35
45
|
|
46
|
+
# A list of Target Groups (Segments) that this Target belongs to
|
36
47
|
attr_accessor :segments
|
37
48
|
|
38
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -14,9 +14,12 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module OpenapiClient
|
17
|
+
# Target map provides the details of a target that belongs to a flag
|
17
18
|
class TargetMap
|
19
|
+
# The identifier for the target
|
18
20
|
attr_accessor :identifier
|
19
21
|
|
22
|
+
# The name of the target
|
20
23
|
attr_accessor :name
|
21
24
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -74,6 +77,10 @@ module OpenapiClient
|
|
74
77
|
# @return Array for valid properties with the reasons
|
75
78
|
def list_invalid_properties
|
76
79
|
invalid_properties = Array.new
|
80
|
+
if @identifier.nil?
|
81
|
+
invalid_properties.push('invalid value for "identifier", identifier cannot be nil.')
|
82
|
+
end
|
83
|
+
|
77
84
|
if @name.nil?
|
78
85
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
79
86
|
end
|
@@ -84,6 +91,7 @@ module OpenapiClient
|
|
84
91
|
# Check to see if the all the properties in the model are valid
|
85
92
|
# @return true if the model is valid
|
86
93
|
def valid?
|
94
|
+
return false if @identifier.nil?
|
87
95
|
return false if @name.nil?
|
88
96
|
true
|
89
97
|
end
|
@@ -14,13 +14,18 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module OpenapiClient
|
17
|
+
# A variation of a flag that can be returned to a target
|
17
18
|
class Variation
|
19
|
+
# The unique identifier for the variation
|
18
20
|
attr_accessor :identifier
|
19
21
|
|
22
|
+
# The variation value to serve such as true or false for a boolean flag
|
20
23
|
attr_accessor :value
|
21
24
|
|
25
|
+
# The user friendly name of the variation
|
22
26
|
attr_accessor :name
|
23
27
|
|
28
|
+
# A description of the variation
|
24
29
|
attr_accessor :description
|
25
30
|
|
26
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -14,11 +14,15 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module OpenapiClient
|
17
|
+
# A mapping of variations to targets and target groups (segments). The targets listed here should receive this variation.
|
17
18
|
class VariationMap
|
19
|
+
# The variation identifier
|
18
20
|
attr_accessor :variation
|
19
21
|
|
22
|
+
# A list of target mappings
|
20
23
|
attr_accessor :targets
|
21
24
|
|
25
|
+
# A list of target groups (segments)
|
22
26
|
attr_accessor :target_segments
|
23
27
|
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -14,9 +14,12 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module OpenapiClient
|
17
|
+
# A variation and the weighting it should receive as part of a percentage rollout
|
17
18
|
class WeightedVariation
|
19
|
+
# The variation identifier
|
18
20
|
attr_accessor :variation
|
19
21
|
|
22
|
+
# The weight to be given to the variation in percent
|
20
23
|
attr_accessor :weight
|
21
24
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -26,11 +26,16 @@ require 'openapi_client/models/error'
|
|
26
26
|
require 'openapi_client/models/evaluation'
|
27
27
|
require 'openapi_client/models/feature_config'
|
28
28
|
require 'openapi_client/models/feature_state'
|
29
|
+
require 'openapi_client/models/group_serving_rule'
|
30
|
+
require 'openapi_client/models/inline_object'
|
29
31
|
require 'openapi_client/models/key_value'
|
30
32
|
require 'openapi_client/models/metrics'
|
31
33
|
require 'openapi_client/models/metrics_data'
|
32
34
|
require 'openapi_client/models/pagination'
|
33
35
|
require 'openapi_client/models/prerequisite'
|
36
|
+
require 'openapi_client/models/proxy_config'
|
37
|
+
require 'openapi_client/models/proxy_config_all_of'
|
38
|
+
require 'openapi_client/models/proxy_config_all_of_environments'
|
34
39
|
require 'openapi_client/models/segment'
|
35
40
|
require 'openapi_client/models/serve'
|
36
41
|
require 'openapi_client/models/serving_rule'
|
@@ -45,6 +50,7 @@ require 'openapi_client/models/weighted_variation'
|
|
45
50
|
# APIs
|
46
51
|
require 'openapi_client/api/client_api'
|
47
52
|
require 'openapi_client/api/metrics_api'
|
53
|
+
require 'openapi_client/api/proxy_api'
|
48
54
|
|
49
55
|
module OpenapiClient
|
50
56
|
class << self
|