smplkit 3.0.11 → 3.0.12
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.
- checksums.yaml +4 -4
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/api/flag_sources_api.rb +18 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/api/flags_api.rb +11 -2
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/api/usage_api.rb +9 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_list_response.rb +30 -4
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_source_list_response.rb +30 -4
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/list_meta.rb +165 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/pagination_meta.rb +215 -0
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/usage_list_response.rb +30 -4
- data/lib/smplkit/_generated/flags/lib/smplkit_flags_client.rb +2 -0
- data/lib/smplkit/_generated/flags/spec/api/flag_sources_api_spec.rb +6 -0
- data/lib/smplkit/_generated/flags/spec/api/flags_api_spec.rb +4 -1
- data/lib/smplkit/_generated/flags/spec/api/usage_api_spec.rb +3 -0
- data/lib/smplkit/_generated/flags/spec/models/flag_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/flags/spec/models/flag_source_list_response_spec.rb +6 -0
- data/lib/smplkit/_generated/flags/spec/models/list_meta_spec.rb +36 -0
- data/lib/smplkit/_generated/flags/spec/models/pagination_meta_spec.rb +54 -0
- data/lib/smplkit/_generated/flags/spec/models/usage_list_response_spec.rb +6 -0
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 452c41c7d9386720cf76e9ef3cb99348c9e2e3a8bba083efcada7f71d14545aa
|
|
4
|
+
data.tar.gz: 3e05dad1e42e65d7d32fab6cf49b8e12f8f664fd1e13b220ad965ff20c1fd735
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 584bbe949dcab9ed190c1ba805ca9122d98a4efb164ab1fc303faaba36bd19f2c695d730d8991387840de2df04480e4ee6e38939a25b6808f5ff088434644c34
|
|
7
|
+
data.tar.gz: 7fe832f08fcf67518a427bc69800bd9258f7af4841f44c24e67ecb2db37df3721e0f113d9d39cdb7c62798d6ab4212f43784040f2b68c74e2ac8285ce4fee136
|
|
@@ -25,6 +25,9 @@ module SmplkitGeneratedClient::Flags
|
|
|
25
25
|
# @option opts [String] :filter_environment
|
|
26
26
|
# @option opts [String] :filter_service
|
|
27
27
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `-last_seen`. Allowed values: `created_at`, `-created_at`, `environment`, `-environment`, `last_seen`, `-last_seen`, `service`, `-service`. (default to '-last_seen')
|
|
28
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
29
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
30
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
|
|
28
31
|
# @return [FlagSourceListResponse]
|
|
29
32
|
def list_all_flag_sources(opts = {})
|
|
30
33
|
data, _status_code, _headers = list_all_flag_sources_with_http_info(opts)
|
|
@@ -37,6 +40,9 @@ module SmplkitGeneratedClient::Flags
|
|
|
37
40
|
# @option opts [String] :filter_environment
|
|
38
41
|
# @option opts [String] :filter_service
|
|
39
42
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `-last_seen`. Allowed values: `created_at`, `-created_at`, `environment`, `-environment`, `last_seen`, `-last_seen`, `service`, `-service`. (default to '-last_seen')
|
|
43
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
44
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
45
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
|
|
40
46
|
# @return [Array<(FlagSourceListResponse, Integer, Hash)>] FlagSourceListResponse data, response status code and response headers
|
|
41
47
|
def list_all_flag_sources_with_http_info(opts = {})
|
|
42
48
|
if @api_client.config.debugging
|
|
@@ -54,6 +60,9 @@ module SmplkitGeneratedClient::Flags
|
|
|
54
60
|
query_params[:'filter[environment]'] = opts[:'filter_environment'] if !opts[:'filter_environment'].nil?
|
|
55
61
|
query_params[:'filter[service]'] = opts[:'filter_service'] if !opts[:'filter_service'].nil?
|
|
56
62
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
63
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
|
64
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
65
|
+
query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil?
|
|
57
66
|
|
|
58
67
|
# header parameters
|
|
59
68
|
header_params = opts[:header_params] || {}
|
|
@@ -94,6 +103,9 @@ module SmplkitGeneratedClient::Flags
|
|
|
94
103
|
# @param id [String]
|
|
95
104
|
# @param [Hash] opts the optional parameters
|
|
96
105
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `-last_seen`. Allowed values: `created_at`, `-created_at`, `environment`, `-environment`, `last_seen`, `-last_seen`, `service`, `-service`. (default to '-last_seen')
|
|
106
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
107
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
108
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
|
|
97
109
|
# @return [FlagSourceListResponse]
|
|
98
110
|
def list_flag_sources(id, opts = {})
|
|
99
111
|
data, _status_code, _headers = list_flag_sources_with_http_info(id, opts)
|
|
@@ -105,6 +117,9 @@ module SmplkitGeneratedClient::Flags
|
|
|
105
117
|
# @param id [String]
|
|
106
118
|
# @param [Hash] opts the optional parameters
|
|
107
119
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `-last_seen`. Allowed values: `created_at`, `-created_at`, `environment`, `-environment`, `last_seen`, `-last_seen`, `service`, `-service`. (default to '-last_seen')
|
|
120
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
121
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
122
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
|
|
108
123
|
# @return [Array<(FlagSourceListResponse, Integer, Hash)>] FlagSourceListResponse data, response status code and response headers
|
|
109
124
|
def list_flag_sources_with_http_info(id, opts = {})
|
|
110
125
|
if @api_client.config.debugging
|
|
@@ -124,6 +139,9 @@ module SmplkitGeneratedClient::Flags
|
|
|
124
139
|
# query parameters
|
|
125
140
|
query_params = opts[:query_params] || {}
|
|
126
141
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
142
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
|
143
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
144
|
+
query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil?
|
|
127
145
|
|
|
128
146
|
# header parameters
|
|
129
147
|
header_params = opts[:header_params] || {}
|
|
@@ -280,13 +280,16 @@ module SmplkitGeneratedClient::Flags
|
|
|
280
280
|
end
|
|
281
281
|
|
|
282
282
|
# List Flags
|
|
283
|
-
# List feature flags for this account. Default sort is `key` ascending.
|
|
283
|
+
# List feature flags for this account. Default sort is `key` ascending. ``filter[references_context]`` and ``filter[references_context_type]`` walk the rules JSON in Python after the SQL fetch, so pagination for those calls is applied in memory after the filter; for the common case (no rules-traversal filter) pagination is applied at the SQL level.
|
|
284
284
|
# @param [Hash] opts the optional parameters
|
|
285
285
|
# @option opts [String] :filter_type
|
|
286
286
|
# @option opts [Boolean] :filter_managed
|
|
287
287
|
# @option opts [String] :filter_references_context Return flags whose rules reference this context instance. Format: {type}:{key}
|
|
288
288
|
# @option opts [String] :filter_references_context_type Return flags whose rules reference any attribute of the given context type.
|
|
289
289
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `created_at`, `-created_at`, `key`, `-key`, `name`, `-name`, `type`, `-type`, `updated_at`, `-updated_at`. (default to 'key')
|
|
290
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
291
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
292
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
|
|
290
293
|
# @return [FlagListResponse]
|
|
291
294
|
def list_flags(opts = {})
|
|
292
295
|
data, _status_code, _headers = list_flags_with_http_info(opts)
|
|
@@ -294,13 +297,16 @@ module SmplkitGeneratedClient::Flags
|
|
|
294
297
|
end
|
|
295
298
|
|
|
296
299
|
# List Flags
|
|
297
|
-
# List feature flags for this account. Default sort is `key` ascending.
|
|
300
|
+
# List feature flags for this account. Default sort is `key` ascending. ``filter[references_context]`` and ``filter[references_context_type]`` walk the rules JSON in Python after the SQL fetch, so pagination for those calls is applied in memory after the filter; for the common case (no rules-traversal filter) pagination is applied at the SQL level.
|
|
298
301
|
# @param [Hash] opts the optional parameters
|
|
299
302
|
# @option opts [String] :filter_type
|
|
300
303
|
# @option opts [Boolean] :filter_managed
|
|
301
304
|
# @option opts [String] :filter_references_context Return flags whose rules reference this context instance. Format: {type}:{key}
|
|
302
305
|
# @option opts [String] :filter_references_context_type Return flags whose rules reference any attribute of the given context type.
|
|
303
306
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `created_at`, `-created_at`, `key`, `-key`, `name`, `-name`, `type`, `-type`, `updated_at`, `-updated_at`. (default to 'key')
|
|
307
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
308
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
309
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
|
|
304
310
|
# @return [Array<(FlagListResponse, Integer, Hash)>] FlagListResponse data, response status code and response headers
|
|
305
311
|
def list_flags_with_http_info(opts = {})
|
|
306
312
|
if @api_client.config.debugging
|
|
@@ -320,6 +326,9 @@ module SmplkitGeneratedClient::Flags
|
|
|
320
326
|
query_params[:'filter[references_context]'] = opts[:'filter_references_context'] if !opts[:'filter_references_context'].nil?
|
|
321
327
|
query_params[:'filter[references_context_type]'] = opts[:'filter_references_context_type'] if !opts[:'filter_references_context_type'].nil?
|
|
322
328
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
329
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
|
330
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
331
|
+
query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil?
|
|
323
332
|
|
|
324
333
|
# header parameters
|
|
325
334
|
header_params = opts[:header_params] || {}
|
|
@@ -23,6 +23,9 @@ module SmplkitGeneratedClient::Flags
|
|
|
23
23
|
# Report current-period usage counters for this account.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @option opts [String] :filter_period
|
|
26
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
27
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
28
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
|
|
26
29
|
# @return [UsageListResponse]
|
|
27
30
|
def list_flags_usage(opts = {})
|
|
28
31
|
data, _status_code, _headers = list_flags_usage_with_http_info(opts)
|
|
@@ -33,6 +36,9 @@ module SmplkitGeneratedClient::Flags
|
|
|
33
36
|
# Report current-period usage counters for this account.
|
|
34
37
|
# @param [Hash] opts the optional parameters
|
|
35
38
|
# @option opts [String] :filter_period
|
|
39
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1)
|
|
40
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000)
|
|
41
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false)
|
|
36
42
|
# @return [Array<(UsageListResponse, Integer, Hash)>] UsageListResponse data, response status code and response headers
|
|
37
43
|
def list_flags_usage_with_http_info(opts = {})
|
|
38
44
|
if @api_client.config.debugging
|
|
@@ -44,6 +50,9 @@ module SmplkitGeneratedClient::Flags
|
|
|
44
50
|
# query parameters
|
|
45
51
|
query_params = opts[:query_params] || {}
|
|
46
52
|
query_params[:'filter[period]'] = opts[:'filter_period'] if !opts[:'filter_period'].nil?
|
|
53
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
|
54
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
55
|
+
query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil?
|
|
47
56
|
|
|
48
57
|
# header parameters
|
|
49
58
|
header_params = opts[:header_params] || {}
|
|
@@ -18,10 +18,13 @@ module SmplkitGeneratedClient::Flags
|
|
|
18
18
|
class FlagListResponse < ApiModelBase
|
|
19
19
|
attr_accessor :data
|
|
20
20
|
|
|
21
|
+
attr_accessor :meta
|
|
22
|
+
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
24
|
def self.attribute_map
|
|
23
25
|
{
|
|
24
|
-
:'data' => :'data'
|
|
26
|
+
:'data' => :'data',
|
|
27
|
+
:'meta' => :'meta'
|
|
25
28
|
}
|
|
26
29
|
end
|
|
27
30
|
|
|
@@ -38,7 +41,8 @@ module SmplkitGeneratedClient::Flags
|
|
|
38
41
|
# Attribute type mapping.
|
|
39
42
|
def self.openapi_types
|
|
40
43
|
{
|
|
41
|
-
:'data' => :'Array<FlagResource>'
|
|
44
|
+
:'data' => :'Array<FlagResource>',
|
|
45
|
+
:'meta' => :'ListMeta'
|
|
42
46
|
}
|
|
43
47
|
end
|
|
44
48
|
|
|
@@ -71,6 +75,12 @@ module SmplkitGeneratedClient::Flags
|
|
|
71
75
|
else
|
|
72
76
|
self.data = nil
|
|
73
77
|
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'meta')
|
|
80
|
+
self.meta = attributes[:'meta']
|
|
81
|
+
else
|
|
82
|
+
self.meta = nil
|
|
83
|
+
end
|
|
74
84
|
end
|
|
75
85
|
|
|
76
86
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -82,6 +92,10 @@ module SmplkitGeneratedClient::Flags
|
|
|
82
92
|
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
83
93
|
end
|
|
84
94
|
|
|
95
|
+
if @meta.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "meta", meta cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
85
99
|
invalid_properties
|
|
86
100
|
end
|
|
87
101
|
|
|
@@ -90,6 +104,7 @@ module SmplkitGeneratedClient::Flags
|
|
|
90
104
|
def valid?
|
|
91
105
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
92
106
|
return false if @data.nil?
|
|
107
|
+
return false if @meta.nil?
|
|
93
108
|
true
|
|
94
109
|
end
|
|
95
110
|
|
|
@@ -103,12 +118,23 @@ module SmplkitGeneratedClient::Flags
|
|
|
103
118
|
@data = data
|
|
104
119
|
end
|
|
105
120
|
|
|
121
|
+
# Custom attribute writer method with validation
|
|
122
|
+
# @param [Object] meta Value to be assigned
|
|
123
|
+
def meta=(meta)
|
|
124
|
+
if meta.nil?
|
|
125
|
+
fail ArgumentError, 'meta cannot be nil'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
@meta = meta
|
|
129
|
+
end
|
|
130
|
+
|
|
106
131
|
# Checks equality by comparing each attribute.
|
|
107
132
|
# @param [Object] Object to be compared
|
|
108
133
|
def ==(o)
|
|
109
134
|
return true if self.equal?(o)
|
|
110
135
|
self.class == o.class &&
|
|
111
|
-
data == o.data
|
|
136
|
+
data == o.data &&
|
|
137
|
+
meta == o.meta
|
|
112
138
|
end
|
|
113
139
|
|
|
114
140
|
# @see the `==` method
|
|
@@ -120,7 +146,7 @@ module SmplkitGeneratedClient::Flags
|
|
|
120
146
|
# Calculates hash code according to all attributes.
|
|
121
147
|
# @return [Integer] Hash code
|
|
122
148
|
def hash
|
|
123
|
-
[data].hash
|
|
149
|
+
[data, meta].hash
|
|
124
150
|
end
|
|
125
151
|
|
|
126
152
|
# Builds the object from hash
|
data/lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_source_list_response.rb
CHANGED
|
@@ -18,10 +18,13 @@ module SmplkitGeneratedClient::Flags
|
|
|
18
18
|
class FlagSourceListResponse < ApiModelBase
|
|
19
19
|
attr_accessor :data
|
|
20
20
|
|
|
21
|
+
attr_accessor :meta
|
|
22
|
+
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
24
|
def self.attribute_map
|
|
23
25
|
{
|
|
24
|
-
:'data' => :'data'
|
|
26
|
+
:'data' => :'data',
|
|
27
|
+
:'meta' => :'meta'
|
|
25
28
|
}
|
|
26
29
|
end
|
|
27
30
|
|
|
@@ -38,7 +41,8 @@ module SmplkitGeneratedClient::Flags
|
|
|
38
41
|
# Attribute type mapping.
|
|
39
42
|
def self.openapi_types
|
|
40
43
|
{
|
|
41
|
-
:'data' => :'Array<FlagSourceResource>'
|
|
44
|
+
:'data' => :'Array<FlagSourceResource>',
|
|
45
|
+
:'meta' => :'ListMeta'
|
|
42
46
|
}
|
|
43
47
|
end
|
|
44
48
|
|
|
@@ -71,6 +75,12 @@ module SmplkitGeneratedClient::Flags
|
|
|
71
75
|
else
|
|
72
76
|
self.data = nil
|
|
73
77
|
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'meta')
|
|
80
|
+
self.meta = attributes[:'meta']
|
|
81
|
+
else
|
|
82
|
+
self.meta = nil
|
|
83
|
+
end
|
|
74
84
|
end
|
|
75
85
|
|
|
76
86
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -82,6 +92,10 @@ module SmplkitGeneratedClient::Flags
|
|
|
82
92
|
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
83
93
|
end
|
|
84
94
|
|
|
95
|
+
if @meta.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "meta", meta cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
85
99
|
invalid_properties
|
|
86
100
|
end
|
|
87
101
|
|
|
@@ -90,6 +104,7 @@ module SmplkitGeneratedClient::Flags
|
|
|
90
104
|
def valid?
|
|
91
105
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
92
106
|
return false if @data.nil?
|
|
107
|
+
return false if @meta.nil?
|
|
93
108
|
true
|
|
94
109
|
end
|
|
95
110
|
|
|
@@ -103,12 +118,23 @@ module SmplkitGeneratedClient::Flags
|
|
|
103
118
|
@data = data
|
|
104
119
|
end
|
|
105
120
|
|
|
121
|
+
# Custom attribute writer method with validation
|
|
122
|
+
# @param [Object] meta Value to be assigned
|
|
123
|
+
def meta=(meta)
|
|
124
|
+
if meta.nil?
|
|
125
|
+
fail ArgumentError, 'meta cannot be nil'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
@meta = meta
|
|
129
|
+
end
|
|
130
|
+
|
|
106
131
|
# Checks equality by comparing each attribute.
|
|
107
132
|
# @param [Object] Object to be compared
|
|
108
133
|
def ==(o)
|
|
109
134
|
return true if self.equal?(o)
|
|
110
135
|
self.class == o.class &&
|
|
111
|
-
data == o.data
|
|
136
|
+
data == o.data &&
|
|
137
|
+
meta == o.meta
|
|
112
138
|
end
|
|
113
139
|
|
|
114
140
|
# @see the `==` method
|
|
@@ -120,7 +146,7 @@ module SmplkitGeneratedClient::Flags
|
|
|
120
146
|
# Calculates hash code according to all attributes.
|
|
121
147
|
# @return [Integer] Hash code
|
|
122
148
|
def hash
|
|
123
|
-
[data].hash
|
|
149
|
+
[data, meta].hash
|
|
124
150
|
end
|
|
125
151
|
|
|
126
152
|
# Builds the object from hash
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Flags API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SmplkitGeneratedClient::Flags
|
|
17
|
+
# Top-level ``meta`` block included on every JSON:API list response.
|
|
18
|
+
class ListMeta < ApiModelBase
|
|
19
|
+
attr_accessor :pagination
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'pagination' => :'pagination'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns attribute mapping this model knows about
|
|
29
|
+
def self.acceptable_attribute_map
|
|
30
|
+
attribute_map
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
acceptable_attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'pagination' => :'PaginationMeta'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Flags::ListMeta` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
61
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Flags::ListMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
63
|
+
end
|
|
64
|
+
h[k.to_sym] = v
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if attributes.key?(:'pagination')
|
|
68
|
+
self.pagination = attributes[:'pagination']
|
|
69
|
+
else
|
|
70
|
+
self.pagination = nil
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
75
|
+
# @return Array for valid properties with the reasons
|
|
76
|
+
def list_invalid_properties
|
|
77
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
if @pagination.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
90
|
+
return false if @pagination.nil?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Custom attribute writer method with validation
|
|
95
|
+
# @param [Object] pagination Value to be assigned
|
|
96
|
+
def pagination=(pagination)
|
|
97
|
+
if pagination.nil?
|
|
98
|
+
fail ArgumentError, 'pagination cannot be nil'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
@pagination = pagination
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Checks equality by comparing each attribute.
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def ==(o)
|
|
107
|
+
return true if self.equal?(o)
|
|
108
|
+
self.class == o.class &&
|
|
109
|
+
pagination == o.pagination
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[pagination].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
130
|
+
transformed_hash = {}
|
|
131
|
+
openapi_types.each_pair do |key, type|
|
|
132
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = nil
|
|
134
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
135
|
+
# check to ensure the input is an array given that the attribute
|
|
136
|
+
# is documented as an array but the input is not
|
|
137
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
138
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
139
|
+
end
|
|
140
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
new(transformed_hash)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Returns the object in the form of hash
|
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
|
149
|
+
def to_hash
|
|
150
|
+
hash = {}
|
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
152
|
+
value = self.send(attr)
|
|
153
|
+
if value.nil?
|
|
154
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
155
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
hash[param] = _to_hash(value)
|
|
159
|
+
end
|
|
160
|
+
hash
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
end
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Flags API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module SmplkitGeneratedClient::Flags
|
|
17
|
+
# Pagination block returned inside ``meta`` on every list response. ``page`` and ``size`` are always present and echo the parameters that served the response (their defaults when the client omitted them). ``total`` and ``total_pages`` are present only when the request included ``meta[total]=true``.
|
|
18
|
+
class PaginationMeta < ApiModelBase
|
|
19
|
+
# 1-based page number returned.
|
|
20
|
+
attr_accessor :page
|
|
21
|
+
|
|
22
|
+
# Number of items per page.
|
|
23
|
+
attr_accessor :size
|
|
24
|
+
|
|
25
|
+
# Total number of matching items across all pages. Present only when the request included `meta[total]=true`.
|
|
26
|
+
attr_accessor :total
|
|
27
|
+
|
|
28
|
+
# Total number of pages at the requested page size. Present only when the request included `meta[total]=true`.
|
|
29
|
+
attr_accessor :total_pages
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'page' => :'page',
|
|
35
|
+
:'size' => :'size',
|
|
36
|
+
:'total' => :'total',
|
|
37
|
+
:'total_pages' => :'total_pages'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns attribute mapping this model knows about
|
|
42
|
+
def self.acceptable_attribute_map
|
|
43
|
+
attribute_map
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns all the JSON keys this model knows about
|
|
47
|
+
def self.acceptable_attributes
|
|
48
|
+
acceptable_attribute_map.values
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Attribute type mapping.
|
|
52
|
+
def self.openapi_types
|
|
53
|
+
{
|
|
54
|
+
:'page' => :'Integer',
|
|
55
|
+
:'size' => :'Integer',
|
|
56
|
+
:'total' => :'Integer',
|
|
57
|
+
:'total_pages' => :'Integer'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# List of attributes with nullable: true
|
|
62
|
+
def self.openapi_nullable
|
|
63
|
+
Set.new([
|
|
64
|
+
:'total',
|
|
65
|
+
:'total_pages'
|
|
66
|
+
])
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Initializes the object
|
|
70
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
71
|
+
def initialize(attributes = {})
|
|
72
|
+
if (!attributes.is_a?(Hash))
|
|
73
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SmplkitGeneratedClient::Flags::PaginationMeta` initialize method"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
77
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
78
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
79
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
80
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SmplkitGeneratedClient::Flags::PaginationMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
81
|
+
end
|
|
82
|
+
h[k.to_sym] = v
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'page')
|
|
86
|
+
self.page = attributes[:'page']
|
|
87
|
+
else
|
|
88
|
+
self.page = nil
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'size')
|
|
92
|
+
self.size = attributes[:'size']
|
|
93
|
+
else
|
|
94
|
+
self.size = nil
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'total')
|
|
98
|
+
self.total = attributes[:'total']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'total_pages')
|
|
102
|
+
self.total_pages = attributes[:'total_pages']
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
107
|
+
# @return Array for valid properties with the reasons
|
|
108
|
+
def list_invalid_properties
|
|
109
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
110
|
+
invalid_properties = Array.new
|
|
111
|
+
if @page.nil?
|
|
112
|
+
invalid_properties.push('invalid value for "page", page cannot be nil.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if @size.nil?
|
|
116
|
+
invalid_properties.push('invalid value for "size", size cannot be nil.')
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
invalid_properties
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Check to see if the all the properties in the model are valid
|
|
123
|
+
# @return true if the model is valid
|
|
124
|
+
def valid?
|
|
125
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
126
|
+
return false if @page.nil?
|
|
127
|
+
return false if @size.nil?
|
|
128
|
+
true
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Custom attribute writer method with validation
|
|
132
|
+
# @param [Object] page Value to be assigned
|
|
133
|
+
def page=(page)
|
|
134
|
+
if page.nil?
|
|
135
|
+
fail ArgumentError, 'page cannot be nil'
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
@page = page
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Custom attribute writer method with validation
|
|
142
|
+
# @param [Object] size Value to be assigned
|
|
143
|
+
def size=(size)
|
|
144
|
+
if size.nil?
|
|
145
|
+
fail ArgumentError, 'size cannot be nil'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
@size = size
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Checks equality by comparing each attribute.
|
|
152
|
+
# @param [Object] Object to be compared
|
|
153
|
+
def ==(o)
|
|
154
|
+
return true if self.equal?(o)
|
|
155
|
+
self.class == o.class &&
|
|
156
|
+
page == o.page &&
|
|
157
|
+
size == o.size &&
|
|
158
|
+
total == o.total &&
|
|
159
|
+
total_pages == o.total_pages
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# @see the `==` method
|
|
163
|
+
# @param [Object] Object to be compared
|
|
164
|
+
def eql?(o)
|
|
165
|
+
self == o
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Calculates hash code according to all attributes.
|
|
169
|
+
# @return [Integer] Hash code
|
|
170
|
+
def hash
|
|
171
|
+
[page, size, total, total_pages].hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Builds the object from hash
|
|
175
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
176
|
+
# @return [Object] Returns the model itself
|
|
177
|
+
def self.build_from_hash(attributes)
|
|
178
|
+
return nil unless attributes.is_a?(Hash)
|
|
179
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
180
|
+
transformed_hash = {}
|
|
181
|
+
openapi_types.each_pair do |key, type|
|
|
182
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
183
|
+
transformed_hash["#{key}"] = nil
|
|
184
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
185
|
+
# check to ensure the input is an array given that the attribute
|
|
186
|
+
# is documented as an array but the input is not
|
|
187
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
188
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
189
|
+
end
|
|
190
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
191
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
new(transformed_hash)
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Returns the object in the form of hash
|
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
|
199
|
+
def to_hash
|
|
200
|
+
hash = {}
|
|
201
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
202
|
+
value = self.send(attr)
|
|
203
|
+
if value.nil?
|
|
204
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
205
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
hash[param] = _to_hash(value)
|
|
209
|
+
end
|
|
210
|
+
hash
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
end
|
|
@@ -18,10 +18,13 @@ module SmplkitGeneratedClient::Flags
|
|
|
18
18
|
class UsageListResponse < ApiModelBase
|
|
19
19
|
attr_accessor :data
|
|
20
20
|
|
|
21
|
+
attr_accessor :meta
|
|
22
|
+
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
24
|
def self.attribute_map
|
|
23
25
|
{
|
|
24
|
-
:'data' => :'data'
|
|
26
|
+
:'data' => :'data',
|
|
27
|
+
:'meta' => :'meta'
|
|
25
28
|
}
|
|
26
29
|
end
|
|
27
30
|
|
|
@@ -38,7 +41,8 @@ module SmplkitGeneratedClient::Flags
|
|
|
38
41
|
# Attribute type mapping.
|
|
39
42
|
def self.openapi_types
|
|
40
43
|
{
|
|
41
|
-
:'data' => :'Array<UsageResource>'
|
|
44
|
+
:'data' => :'Array<UsageResource>',
|
|
45
|
+
:'meta' => :'ListMeta'
|
|
42
46
|
}
|
|
43
47
|
end
|
|
44
48
|
|
|
@@ -71,6 +75,12 @@ module SmplkitGeneratedClient::Flags
|
|
|
71
75
|
else
|
|
72
76
|
self.data = nil
|
|
73
77
|
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'meta')
|
|
80
|
+
self.meta = attributes[:'meta']
|
|
81
|
+
else
|
|
82
|
+
self.meta = nil
|
|
83
|
+
end
|
|
74
84
|
end
|
|
75
85
|
|
|
76
86
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -82,6 +92,10 @@ module SmplkitGeneratedClient::Flags
|
|
|
82
92
|
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
83
93
|
end
|
|
84
94
|
|
|
95
|
+
if @meta.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "meta", meta cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
85
99
|
invalid_properties
|
|
86
100
|
end
|
|
87
101
|
|
|
@@ -90,6 +104,7 @@ module SmplkitGeneratedClient::Flags
|
|
|
90
104
|
def valid?
|
|
91
105
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
92
106
|
return false if @data.nil?
|
|
107
|
+
return false if @meta.nil?
|
|
93
108
|
true
|
|
94
109
|
end
|
|
95
110
|
|
|
@@ -103,12 +118,23 @@ module SmplkitGeneratedClient::Flags
|
|
|
103
118
|
@data = data
|
|
104
119
|
end
|
|
105
120
|
|
|
121
|
+
# Custom attribute writer method with validation
|
|
122
|
+
# @param [Object] meta Value to be assigned
|
|
123
|
+
def meta=(meta)
|
|
124
|
+
if meta.nil?
|
|
125
|
+
fail ArgumentError, 'meta cannot be nil'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
@meta = meta
|
|
129
|
+
end
|
|
130
|
+
|
|
106
131
|
# Checks equality by comparing each attribute.
|
|
107
132
|
# @param [Object] Object to be compared
|
|
108
133
|
def ==(o)
|
|
109
134
|
return true if self.equal?(o)
|
|
110
135
|
self.class == o.class &&
|
|
111
|
-
data == o.data
|
|
136
|
+
data == o.data &&
|
|
137
|
+
meta == o.meta
|
|
112
138
|
end
|
|
113
139
|
|
|
114
140
|
# @see the `==` method
|
|
@@ -120,7 +146,7 @@ module SmplkitGeneratedClient::Flags
|
|
|
120
146
|
# Calculates hash code according to all attributes.
|
|
121
147
|
# @return [Integer] Hash code
|
|
122
148
|
def hash
|
|
123
|
-
[data].hash
|
|
149
|
+
[data, meta].hash
|
|
124
150
|
end
|
|
125
151
|
|
|
126
152
|
# Builds the object from hash
|
|
@@ -32,7 +32,9 @@ require 'smplkit_flags_client/models/flag_source'
|
|
|
32
32
|
require 'smplkit_flags_client/models/flag_source_list_response'
|
|
33
33
|
require 'smplkit_flags_client/models/flag_source_resource'
|
|
34
34
|
require 'smplkit_flags_client/models/flag_value'
|
|
35
|
+
require 'smplkit_flags_client/models/list_meta'
|
|
35
36
|
require 'smplkit_flags_client/models/manual_review_item'
|
|
37
|
+
require 'smplkit_flags_client/models/pagination_meta'
|
|
36
38
|
require 'smplkit_flags_client/models/remove_references_attributes'
|
|
37
39
|
require 'smplkit_flags_client/models/remove_references_request'
|
|
38
40
|
require 'smplkit_flags_client/models/remove_references_result_envelope'
|
|
@@ -39,6 +39,9 @@ describe 'FlagSourcesApi' do
|
|
|
39
39
|
# @option opts [String] :filter_environment
|
|
40
40
|
# @option opts [String] :filter_service
|
|
41
41
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `-last_seen`. Allowed values: `created_at`, `-created_at`, `environment`, `-environment`, `last_seen`, `-last_seen`, `service`, `-service`.
|
|
42
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
|
|
43
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
|
|
44
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
|
|
42
45
|
# @return [FlagSourceListResponse]
|
|
43
46
|
describe 'list_all_flag_sources test' do
|
|
44
47
|
it 'should work' do
|
|
@@ -52,6 +55,9 @@ describe 'FlagSourcesApi' do
|
|
|
52
55
|
# @param id
|
|
53
56
|
# @param [Hash] opts the optional parameters
|
|
54
57
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `-last_seen`. Allowed values: `created_at`, `-created_at`, `environment`, `-environment`, `last_seen`, `-last_seen`, `service`, `-service`.
|
|
58
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
|
|
59
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
|
|
60
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
|
|
55
61
|
# @return [FlagSourceListResponse]
|
|
56
62
|
describe 'list_flag_sources test' do
|
|
57
63
|
it 'should work' do
|
|
@@ -82,13 +82,16 @@ describe 'FlagsApi' do
|
|
|
82
82
|
|
|
83
83
|
# unit tests for list_flags
|
|
84
84
|
# List Flags
|
|
85
|
-
# List feature flags for this account. Default sort is `key` ascending.
|
|
85
|
+
# List feature flags for this account. Default sort is `key` ascending. ``filter[references_context]`` and ``filter[references_context_type]`` walk the rules JSON in Python after the SQL fetch, so pagination for those calls is applied in memory after the filter; for the common case (no rules-traversal filter) pagination is applied at the SQL level.
|
|
86
86
|
# @param [Hash] opts the optional parameters
|
|
87
87
|
# @option opts [String] :filter_type
|
|
88
88
|
# @option opts [Boolean] :filter_managed
|
|
89
89
|
# @option opts [String] :filter_references_context Return flags whose rules reference this context instance. Format: {type}:{key}
|
|
90
90
|
# @option opts [String] :filter_references_context_type Return flags whose rules reference any attribute of the given context type.
|
|
91
91
|
# @option opts [String] :sort Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `created_at`, `-created_at`, `key`, `-key`, `name`, `-name`, `type`, `-type`, `updated_at`, `-updated_at`.
|
|
92
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
|
|
93
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
|
|
94
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
|
|
92
95
|
# @return [FlagListResponse]
|
|
93
96
|
describe 'list_flags test' do
|
|
94
97
|
it 'should work' do
|
|
@@ -37,6 +37,9 @@ describe 'UsageApi' do
|
|
|
37
37
|
# Report current-period usage counters for this account.
|
|
38
38
|
# @param [Hash] opts the optional parameters
|
|
39
39
|
# @option opts [String] :filter_period
|
|
40
|
+
# @option opts [Integer] :page_number 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
|
|
41
|
+
# @option opts [Integer] :page_size Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
|
|
42
|
+
# @option opts [Boolean] :meta_total When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
|
|
40
43
|
# @return [UsageListResponse]
|
|
41
44
|
describe 'list_flags_usage test' do
|
|
42
45
|
it 'should work' do
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::Flags::FlagListResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::Flags::FlagSourceListResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Flags API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for SmplkitGeneratedClient::Flags::ListMeta
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe SmplkitGeneratedClient::Flags::ListMeta do
|
|
21
|
+
#let(:instance) { SmplkitGeneratedClient::Flags::ListMeta.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ListMeta' do
|
|
24
|
+
it 'should create an instance of ListMeta' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(SmplkitGeneratedClient::Flags::ListMeta)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "pagination"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#smplkit Flags API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for SmplkitGeneratedClient::Flags::PaginationMeta
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe SmplkitGeneratedClient::Flags::PaginationMeta do
|
|
21
|
+
#let(:instance) { SmplkitGeneratedClient::Flags::PaginationMeta.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of PaginationMeta' do
|
|
24
|
+
it 'should create an instance of PaginationMeta' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(SmplkitGeneratedClient::Flags::PaginationMeta)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "page"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "size"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "total"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "total_pages"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
@@ -33,4 +33,10 @@ describe SmplkitGeneratedClient::Flags::UsageListResponse do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "meta"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smplkit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Smpl Solutions LLC
|
|
@@ -553,7 +553,9 @@ files:
|
|
|
553
553
|
- lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_source_list_response.rb
|
|
554
554
|
- lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_source_resource.rb
|
|
555
555
|
- lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/flag_value.rb
|
|
556
|
+
- lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/list_meta.rb
|
|
556
557
|
- lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/manual_review_item.rb
|
|
558
|
+
- lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/pagination_meta.rb
|
|
557
559
|
- lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/remove_references_attributes.rb
|
|
558
560
|
- lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/remove_references_request.rb
|
|
559
561
|
- lib/smplkit/_generated/flags/lib/smplkit_flags_client/models/remove_references_result_envelope.rb
|
|
@@ -580,7 +582,9 @@ files:
|
|
|
580
582
|
- lib/smplkit/_generated/flags/spec/models/flag_source_spec.rb
|
|
581
583
|
- lib/smplkit/_generated/flags/spec/models/flag_spec.rb
|
|
582
584
|
- lib/smplkit/_generated/flags/spec/models/flag_value_spec.rb
|
|
585
|
+
- lib/smplkit/_generated/flags/spec/models/list_meta_spec.rb
|
|
583
586
|
- lib/smplkit/_generated/flags/spec/models/manual_review_item_spec.rb
|
|
587
|
+
- lib/smplkit/_generated/flags/spec/models/pagination_meta_spec.rb
|
|
584
588
|
- lib/smplkit/_generated/flags/spec/models/remove_references_attributes_spec.rb
|
|
585
589
|
- lib/smplkit/_generated/flags/spec/models/remove_references_request_spec.rb
|
|
586
590
|
- lib/smplkit/_generated/flags/spec/models/remove_references_result_envelope_spec.rb
|