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
@@ -84,6 +84,8 @@ module OpenapiClient
|
|
84
84
|
# Used to retrieve all segments for certain account id.
|
85
85
|
# @param environment_uuid [String] Unique identifier for the environment object in the API.
|
86
86
|
# @param [Hash] opts the optional parameters
|
87
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
88
|
+
# @option opts [String] :rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules.
|
87
89
|
# @return [Array<Segment>]
|
88
90
|
def get_all_segments(environment_uuid, opts = {})
|
89
91
|
data, _status_code, _headers = get_all_segments_with_http_info(environment_uuid, opts)
|
@@ -94,6 +96,8 @@ module OpenapiClient
|
|
94
96
|
# Used to retrieve all segments for certain account id.
|
95
97
|
# @param environment_uuid [String] Unique identifier for the environment object in the API.
|
96
98
|
# @param [Hash] opts the optional parameters
|
99
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
100
|
+
# @option opts [String] :rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules.
|
97
101
|
# @return [Array<(Array<Segment>, Integer, Hash)>] Array<Segment> data, response status code and response headers
|
98
102
|
def get_all_segments_with_http_info(environment_uuid, opts = {})
|
99
103
|
if @api_client.config.debugging
|
@@ -108,6 +112,8 @@ module OpenapiClient
|
|
108
112
|
|
109
113
|
# query parameters
|
110
114
|
query_params = opts[:query_params] || {}
|
115
|
+
query_params[:'cluster'] = opts[:'cluster'] if !opts[:'cluster'].nil?
|
116
|
+
query_params[:'rules'] = opts[:'rules'] if !opts[:'rules'].nil?
|
111
117
|
|
112
118
|
# header parameters
|
113
119
|
header_params = opts[:header_params] || {}
|
@@ -148,6 +154,7 @@ module OpenapiClient
|
|
148
154
|
# @param feature [String] Unique identifier for the flag object in the API.
|
149
155
|
# @param target [String] Unique identifier for the target object in the API.
|
150
156
|
# @param [Hash] opts the optional parameters
|
157
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
151
158
|
# @return [Evaluation]
|
152
159
|
def get_evaluation_by_identifier(environment_uuid, feature, target, opts = {})
|
153
160
|
data, _status_code, _headers = get_evaluation_by_identifier_with_http_info(environment_uuid, feature, target, opts)
|
@@ -159,6 +166,7 @@ module OpenapiClient
|
|
159
166
|
# @param feature [String] Unique identifier for the flag object in the API.
|
160
167
|
# @param target [String] Unique identifier for the target object in the API.
|
161
168
|
# @param [Hash] opts the optional parameters
|
169
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
162
170
|
# @return [Array<(Evaluation, Integer, Hash)>] Evaluation data, response status code and response headers
|
163
171
|
def get_evaluation_by_identifier_with_http_info(environment_uuid, feature, target, opts = {})
|
164
172
|
if @api_client.config.debugging
|
@@ -181,6 +189,7 @@ module OpenapiClient
|
|
181
189
|
|
182
190
|
# query parameters
|
183
191
|
query_params = opts[:query_params] || {}
|
192
|
+
query_params[:'cluster'] = opts[:'cluster'] if !opts[:'cluster'].nil?
|
184
193
|
|
185
194
|
# header parameters
|
186
195
|
header_params = opts[:header_params] || {}
|
@@ -220,6 +229,7 @@ module OpenapiClient
|
|
220
229
|
# @param environment_uuid [String] Unique identifier for the environment object in the API.
|
221
230
|
# @param target [String] Unique identifier for the target object in the API.
|
222
231
|
# @param [Hash] opts the optional parameters
|
232
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
223
233
|
# @return [Pagination]
|
224
234
|
def get_evaluations(environment_uuid, target, opts = {})
|
225
235
|
data, _status_code, _headers = get_evaluations_with_http_info(environment_uuid, target, opts)
|
@@ -230,6 +240,7 @@ module OpenapiClient
|
|
230
240
|
# @param environment_uuid [String] Unique identifier for the environment object in the API.
|
231
241
|
# @param target [String] Unique identifier for the target object in the API.
|
232
242
|
# @param [Hash] opts the optional parameters
|
243
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
233
244
|
# @return [Array<(Pagination, Integer, Hash)>] Pagination data, response status code and response headers
|
234
245
|
def get_evaluations_with_http_info(environment_uuid, target, opts = {})
|
235
246
|
if @api_client.config.debugging
|
@@ -248,6 +259,7 @@ module OpenapiClient
|
|
248
259
|
|
249
260
|
# query parameters
|
250
261
|
query_params = opts[:query_params] || {}
|
262
|
+
query_params[:'cluster'] = opts[:'cluster'] if !opts[:'cluster'].nil?
|
251
263
|
|
252
264
|
# header parameters
|
253
265
|
header_params = opts[:header_params] || {}
|
@@ -287,6 +299,7 @@ module OpenapiClient
|
|
287
299
|
# All feature flags with activations in project environment
|
288
300
|
# @param environment_uuid [String] Unique identifier for the environment object in the API.
|
289
301
|
# @param [Hash] opts the optional parameters
|
302
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
290
303
|
# @return [Array<FeatureConfig>]
|
291
304
|
def get_feature_config(environment_uuid, opts = {})
|
292
305
|
data, _status_code, _headers = get_feature_config_with_http_info(environment_uuid, opts)
|
@@ -297,6 +310,7 @@ module OpenapiClient
|
|
297
310
|
# All feature flags with activations in project environment
|
298
311
|
# @param environment_uuid [String] Unique identifier for the environment object in the API.
|
299
312
|
# @param [Hash] opts the optional parameters
|
313
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
300
314
|
# @return [Array<(Array<FeatureConfig>, Integer, Hash)>] Array<FeatureConfig> data, response status code and response headers
|
301
315
|
def get_feature_config_with_http_info(environment_uuid, opts = {})
|
302
316
|
if @api_client.config.debugging
|
@@ -311,6 +325,7 @@ module OpenapiClient
|
|
311
325
|
|
312
326
|
# query parameters
|
313
327
|
query_params = opts[:query_params] || {}
|
328
|
+
query_params[:'cluster'] = opts[:'cluster'] if !opts[:'cluster'].nil?
|
314
329
|
|
315
330
|
# header parameters
|
316
331
|
header_params = opts[:header_params] || {}
|
@@ -350,6 +365,7 @@ module OpenapiClient
|
|
350
365
|
# @param identifier [String] Unique identifier for the flag object in the API.
|
351
366
|
# @param environment_uuid [String] Unique identifier for the environment object in the API.
|
352
367
|
# @param [Hash] opts the optional parameters
|
368
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
353
369
|
# @return [FeatureConfig]
|
354
370
|
def get_feature_config_by_identifier(identifier, environment_uuid, opts = {})
|
355
371
|
data, _status_code, _headers = get_feature_config_by_identifier_with_http_info(identifier, environment_uuid, opts)
|
@@ -360,6 +376,7 @@ module OpenapiClient
|
|
360
376
|
# @param identifier [String] Unique identifier for the flag object in the API.
|
361
377
|
# @param environment_uuid [String] Unique identifier for the environment object in the API.
|
362
378
|
# @param [Hash] opts the optional parameters
|
379
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
363
380
|
# @return [Array<(FeatureConfig, Integer, Hash)>] FeatureConfig data, response status code and response headers
|
364
381
|
def get_feature_config_by_identifier_with_http_info(identifier, environment_uuid, opts = {})
|
365
382
|
if @api_client.config.debugging
|
@@ -378,6 +395,7 @@ module OpenapiClient
|
|
378
395
|
|
379
396
|
# query parameters
|
380
397
|
query_params = opts[:query_params] || {}
|
398
|
+
query_params[:'cluster'] = opts[:'cluster'] if !opts[:'cluster'].nil?
|
381
399
|
|
382
400
|
# header parameters
|
383
401
|
header_params = opts[:header_params] || {}
|
@@ -418,6 +436,8 @@ module OpenapiClient
|
|
418
436
|
# @param identifier [String] Unique identifier for the segment object in the API
|
419
437
|
# @param environment_uuid [String] Unique identifier for the environment object in the API
|
420
438
|
# @param [Hash] opts the optional parameters
|
439
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
440
|
+
# @option opts [String] :rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules.
|
421
441
|
# @return [Segment]
|
422
442
|
def get_segment_by_identifier(identifier, environment_uuid, opts = {})
|
423
443
|
data, _status_code, _headers = get_segment_by_identifier_with_http_info(identifier, environment_uuid, opts)
|
@@ -429,6 +449,8 @@ module OpenapiClient
|
|
429
449
|
# @param identifier [String] Unique identifier for the segment object in the API
|
430
450
|
# @param environment_uuid [String] Unique identifier for the environment object in the API
|
431
451
|
# @param [Hash] opts the optional parameters
|
452
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
453
|
+
# @option opts [String] :rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules.
|
432
454
|
# @return [Array<(Segment, Integer, Hash)>] Segment data, response status code and response headers
|
433
455
|
def get_segment_by_identifier_with_http_info(identifier, environment_uuid, opts = {})
|
434
456
|
if @api_client.config.debugging
|
@@ -447,6 +469,8 @@ module OpenapiClient
|
|
447
469
|
|
448
470
|
# query parameters
|
449
471
|
query_params = opts[:query_params] || {}
|
472
|
+
query_params[:'cluster'] = opts[:'cluster'] if !opts[:'cluster'].nil?
|
473
|
+
query_params[:'rules'] = opts[:'rules'] if !opts[:'rules'].nil?
|
450
474
|
|
451
475
|
# header parameters
|
452
476
|
header_params = opts[:header_params] || {}
|
@@ -485,6 +509,7 @@ module OpenapiClient
|
|
485
509
|
# Stream endpoint.
|
486
510
|
# @param api_key [String]
|
487
511
|
# @param [Hash] opts the optional parameters
|
512
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
488
513
|
# @return [nil]
|
489
514
|
def stream(api_key, opts = {})
|
490
515
|
stream_with_http_info(api_key, opts)
|
@@ -494,6 +519,7 @@ module OpenapiClient
|
|
494
519
|
# Stream endpoint.
|
495
520
|
# @param api_key [String]
|
496
521
|
# @param [Hash] opts the optional parameters
|
522
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
497
523
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
498
524
|
def stream_with_http_info(api_key, opts = {})
|
499
525
|
if @api_client.config.debugging
|
@@ -508,6 +534,7 @@ module OpenapiClient
|
|
508
534
|
|
509
535
|
# query parameters
|
510
536
|
query_params = opts[:query_params] || {}
|
537
|
+
query_params[:'cluster'] = opts[:'cluster'] if !opts[:'cluster'].nil?
|
511
538
|
|
512
539
|
# header parameters
|
513
540
|
header_params = opts[:header_params] || {}
|
@@ -21,34 +21,37 @@ module OpenapiClient
|
|
21
21
|
end
|
22
22
|
# Send metrics to the Analytics server.
|
23
23
|
# Send metrics to Analytics server
|
24
|
-
# @param
|
24
|
+
# @param environment_uuid [String] environment parameter in query.
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
26
27
|
# @option opts [Metrics] :metrics
|
27
28
|
# @return [nil]
|
28
|
-
def post_metrics(
|
29
|
-
post_metrics_with_http_info(
|
29
|
+
def post_metrics(environment_uuid, opts = {})
|
30
|
+
post_metrics_with_http_info(environment_uuid, opts)
|
30
31
|
nil
|
31
32
|
end
|
32
33
|
|
33
34
|
# Send metrics to the Analytics server.
|
34
35
|
# Send metrics to Analytics server
|
35
|
-
# @param
|
36
|
+
# @param environment_uuid [String] environment parameter in query.
|
36
37
|
# @param [Hash] opts the optional parameters
|
38
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
37
39
|
# @option opts [Metrics] :metrics
|
38
40
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
39
|
-
def post_metrics_with_http_info(
|
41
|
+
def post_metrics_with_http_info(environment_uuid, opts = {})
|
40
42
|
if @api_client.config.debugging
|
41
43
|
@api_client.config.logger.debug 'Calling API: MetricsApi.post_metrics ...'
|
42
44
|
end
|
43
|
-
# verify the required parameter '
|
44
|
-
if @api_client.config.client_side_validation &&
|
45
|
-
fail ArgumentError, "Missing the required parameter '
|
45
|
+
# verify the required parameter 'environment_uuid' is set
|
46
|
+
if @api_client.config.client_side_validation && environment_uuid.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'environment_uuid' when calling MetricsApi.post_metrics"
|
46
48
|
end
|
47
49
|
# resource path
|
48
|
-
local_var_path = '/metrics/{
|
50
|
+
local_var_path = '/metrics/{environmentUUID}'.sub('{' + 'environmentUUID' + '}', CGI.escape(environment_uuid.to_s))
|
49
51
|
|
50
52
|
# query parameters
|
51
53
|
query_params = opts[:query_params] || {}
|
54
|
+
query_params[:'cluster'] = opts[:'cluster'] if !opts[:'cluster'].nil?
|
52
55
|
|
53
56
|
# header parameters
|
54
57
|
header_params = opts[:header_params] || {}
|
@@ -67,7 +70,7 @@ module OpenapiClient
|
|
67
70
|
return_type = opts[:debug_return_type]
|
68
71
|
|
69
72
|
# auth_names
|
70
|
-
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
73
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth', 'BearerAuth']
|
71
74
|
|
72
75
|
new_options = opts.merge(
|
73
76
|
:operation => :"MetricsApi.post_metrics",
|
@@ -0,0 +1,159 @@
|
|
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 'cgi'
|
14
|
+
|
15
|
+
module OpenapiClient
|
16
|
+
class ProxyApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Endpoint that the Proxy can use to authenticate with the client server
|
23
|
+
# Endpoint that the Proxy can use to authenticate with the client server
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [InlineObject] :inline_object
|
26
|
+
# @return [AuthenticationResponse]
|
27
|
+
def authenticate_proxy_key(opts = {})
|
28
|
+
data, _status_code, _headers = authenticate_proxy_key_with_http_info(opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Endpoint that the Proxy can use to authenticate with the client server
|
33
|
+
# Endpoint that the Proxy can use to authenticate with the client server
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @option opts [InlineObject] :inline_object
|
36
|
+
# @return [Array<(AuthenticationResponse, Integer, Hash)>] AuthenticationResponse data, response status code and response headers
|
37
|
+
def authenticate_proxy_key_with_http_info(opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: ProxyApi.authenticate_proxy_key ...'
|
40
|
+
end
|
41
|
+
# resource path
|
42
|
+
local_var_path = '/proxy/auth'
|
43
|
+
|
44
|
+
# query parameters
|
45
|
+
query_params = opts[:query_params] || {}
|
46
|
+
|
47
|
+
# header parameters
|
48
|
+
header_params = opts[:header_params] || {}
|
49
|
+
# HTTP header 'Accept' (if needed)
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
51
|
+
# HTTP header 'Content-Type'
|
52
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = opts[:form_params] || {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'inline_object'])
|
59
|
+
|
60
|
+
# return_type
|
61
|
+
return_type = opts[:debug_return_type] || 'AuthenticationResponse'
|
62
|
+
|
63
|
+
# auth_names
|
64
|
+
auth_names = opts[:debug_auth_names] || []
|
65
|
+
|
66
|
+
new_options = opts.merge(
|
67
|
+
:operation => :"ProxyApi.authenticate_proxy_key",
|
68
|
+
:header_params => header_params,
|
69
|
+
:query_params => query_params,
|
70
|
+
:form_params => form_params,
|
71
|
+
:body => post_body,
|
72
|
+
:auth_names => auth_names,
|
73
|
+
:return_type => return_type
|
74
|
+
)
|
75
|
+
|
76
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: ProxyApi#authenticate_proxy_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
|
83
|
+
# Gets Proxy config for multiple environments
|
84
|
+
# Gets Proxy config for multiple environments if the Key query param is provided or gets config for a single environment if an environment query param is provided
|
85
|
+
# @param key [String] Accpets a Proxy Key.
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @option opts [Integer] :page_number PageNumber
|
88
|
+
# @option opts [Integer] :page_size PageSize
|
89
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
90
|
+
# @option opts [String] :environment Accepts an EnvironmentID. If this is provided then the endpoint will only return config for this environment. If this is left empty then the Proxy will return config for all environments associated with the Proxy Key.
|
91
|
+
# @return [ProxyConfig]
|
92
|
+
def get_proxy_config(key, opts = {})
|
93
|
+
data, _status_code, _headers = get_proxy_config_with_http_info(key, opts)
|
94
|
+
data
|
95
|
+
end
|
96
|
+
|
97
|
+
# Gets Proxy config for multiple environments
|
98
|
+
# Gets Proxy config for multiple environments if the Key query param is provided or gets config for a single environment if an environment query param is provided
|
99
|
+
# @param key [String] Accpets a Proxy Key.
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @option opts [Integer] :page_number PageNumber
|
102
|
+
# @option opts [Integer] :page_size PageSize
|
103
|
+
# @option opts [String] :cluster Unique identifier for the cluster for the account
|
104
|
+
# @option opts [String] :environment Accepts an EnvironmentID. If this is provided then the endpoint will only return config for this environment. If this is left empty then the Proxy will return config for all environments associated with the Proxy Key.
|
105
|
+
# @return [Array<(ProxyConfig, Integer, Hash)>] ProxyConfig data, response status code and response headers
|
106
|
+
def get_proxy_config_with_http_info(key, opts = {})
|
107
|
+
if @api_client.config.debugging
|
108
|
+
@api_client.config.logger.debug 'Calling API: ProxyApi.get_proxy_config ...'
|
109
|
+
end
|
110
|
+
# verify the required parameter 'key' is set
|
111
|
+
if @api_client.config.client_side_validation && key.nil?
|
112
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling ProxyApi.get_proxy_config"
|
113
|
+
end
|
114
|
+
# resource path
|
115
|
+
local_var_path = '/proxy/config'
|
116
|
+
|
117
|
+
# query parameters
|
118
|
+
query_params = opts[:query_params] || {}
|
119
|
+
query_params[:'key'] = key
|
120
|
+
query_params[:'pageNumber'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
121
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
122
|
+
query_params[:'cluster'] = opts[:'cluster'] if !opts[:'cluster'].nil?
|
123
|
+
query_params[:'environment'] = opts[:'environment'] if !opts[:'environment'].nil?
|
124
|
+
|
125
|
+
# header parameters
|
126
|
+
header_params = opts[:header_params] || {}
|
127
|
+
# HTTP header 'Accept' (if needed)
|
128
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
129
|
+
|
130
|
+
# form parameters
|
131
|
+
form_params = opts[:form_params] || {}
|
132
|
+
|
133
|
+
# http body (model)
|
134
|
+
post_body = opts[:debug_body]
|
135
|
+
|
136
|
+
# return_type
|
137
|
+
return_type = opts[:debug_return_type] || 'ProxyConfig'
|
138
|
+
|
139
|
+
# auth_names
|
140
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
141
|
+
|
142
|
+
new_options = opts.merge(
|
143
|
+
:operation => :"ProxyApi.get_proxy_config",
|
144
|
+
:header_params => header_params,
|
145
|
+
:query_params => query_params,
|
146
|
+
:form_params => form_params,
|
147
|
+
:body => post_body,
|
148
|
+
:auth_names => auth_names,
|
149
|
+
:return_type => return_type
|
150
|
+
)
|
151
|
+
|
152
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
153
|
+
if @api_client.config.debugging
|
154
|
+
@api_client.config.logger.debug "API called: ProxyApi#get_proxy_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
155
|
+
end
|
156
|
+
return data, status_code, headers
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
@@ -215,6 +215,13 @@ module OpenapiClient
|
|
215
215
|
# Returns Auth Settings hash for api client.
|
216
216
|
def auth_settings
|
217
217
|
{
|
218
|
+
'ApiKeyAuth' =>
|
219
|
+
{
|
220
|
+
type: 'api_key',
|
221
|
+
in: 'header',
|
222
|
+
key: 'api-key',
|
223
|
+
value: api_key_with_prefix('ApiKeyAuth')
|
224
|
+
},
|
218
225
|
'BearerAuth' =>
|
219
226
|
{
|
220
227
|
type: 'bearer',
|
@@ -14,15 +14,21 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module OpenapiClient
|
17
|
+
# A clause describes what conditions are used to evaluate a flag
|
17
18
|
class Clause
|
19
|
+
# The unique ID for the clause
|
18
20
|
attr_accessor :id
|
19
21
|
|
22
|
+
# The attribute to use in the clause. This can be any target attribute
|
20
23
|
attr_accessor :attribute
|
21
24
|
|
25
|
+
# The type of operation such as equals, starts_with, contains
|
22
26
|
attr_accessor :op
|
23
27
|
|
28
|
+
# The values that are compared against the operator
|
24
29
|
attr_accessor :values
|
25
30
|
|
31
|
+
# Is the operation negated?
|
26
32
|
attr_accessor :negate
|
27
33
|
|
28
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -100,10 +106,6 @@ module OpenapiClient
|
|
100
106
|
# @return Array for valid properties with the reasons
|
101
107
|
def list_invalid_properties
|
102
108
|
invalid_properties = Array.new
|
103
|
-
if @id.nil?
|
104
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
105
|
-
end
|
106
|
-
|
107
109
|
if @attribute.nil?
|
108
110
|
invalid_properties.push('invalid value for "attribute", attribute cannot be nil.')
|
109
111
|
end
|
@@ -126,7 +128,6 @@ module OpenapiClient
|
|
126
128
|
# Check to see if the all the properties in the model are valid
|
127
129
|
# @return true if the model is valid
|
128
130
|
def valid?
|
129
|
-
return false if @id.nil?
|
130
131
|
return false if @attribute.nil?
|
131
132
|
return false if @op.nil?
|
132
133
|
return false if @values.nil?
|
@@ -14,9 +14,12 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module OpenapiClient
|
17
|
+
# Describes a distribution rule
|
17
18
|
class Distribution
|
19
|
+
# The attribute to use when distributing targets across buckets
|
18
20
|
attr_accessor :bucket_by
|
19
21
|
|
22
|
+
# A list of variations and the weight that should be given to each
|
20
23
|
attr_accessor :variations
|
21
24
|
|
22
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -15,15 +15,21 @@ require 'time'
|
|
15
15
|
|
16
16
|
module OpenapiClient
|
17
17
|
class Error
|
18
|
+
# The http error code
|
18
19
|
attr_accessor :code
|
19
20
|
|
21
|
+
# The reason the request failed
|
20
22
|
attr_accessor :message
|
21
23
|
|
24
|
+
# Additional details about the error
|
25
|
+
attr_accessor :details
|
26
|
+
|
22
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
28
|
def self.attribute_map
|
24
29
|
{
|
25
30
|
:'code' => :'code',
|
26
|
-
:'message' => :'message'
|
31
|
+
:'message' => :'message',
|
32
|
+
:'details' => :'details'
|
27
33
|
}
|
28
34
|
end
|
29
35
|
|
@@ -36,7 +42,8 @@ module OpenapiClient
|
|
36
42
|
def self.openapi_types
|
37
43
|
{
|
38
44
|
:'code' => :'String',
|
39
|
-
:'message' => :'String'
|
45
|
+
:'message' => :'String',
|
46
|
+
:'details' => :'Object'
|
40
47
|
}
|
41
48
|
end
|
42
49
|
|
@@ -68,6 +75,10 @@ module OpenapiClient
|
|
68
75
|
if attributes.key?(:'message')
|
69
76
|
self.message = attributes[:'message']
|
70
77
|
end
|
78
|
+
|
79
|
+
if attributes.key?(:'details')
|
80
|
+
self.details = attributes[:'details']
|
81
|
+
end
|
71
82
|
end
|
72
83
|
|
73
84
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -99,7 +110,8 @@ module OpenapiClient
|
|
99
110
|
return true if self.equal?(o)
|
100
111
|
self.class == o.class &&
|
101
112
|
code == o.code &&
|
102
|
-
message == o.message
|
113
|
+
message == o.message &&
|
114
|
+
details == o.details
|
103
115
|
end
|
104
116
|
|
105
117
|
# @see the `==` method
|
@@ -111,7 +123,7 @@ module OpenapiClient
|
|
111
123
|
# Calculates hash code according to all attributes.
|
112
124
|
# @return [Integer] Hash code
|
113
125
|
def hash
|
114
|
-
[code, message].hash
|
126
|
+
[code, message, details].hash
|
115
127
|
end
|
116
128
|
|
117
129
|
# Builds the object from hash
|