cloudsmith-api 0.52.5 → 0.53.3
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/Gemfile.lock +2 -2
- data/README.md +16 -4
- data/build.json +1 -1
- data/docs/EntitlementTokenMetric.md +9 -0
- data/docs/MetricsApi.md +158 -0
- data/docs/MetricsownerrepopackagesusageActivePackages.md +10 -0
- data/docs/PackageUsageMetric.md +11 -0
- data/docs/Quota.md +8 -0
- data/docs/QuotaApi.md +248 -0
- data/docs/QuotaHistory.md +8 -0
- data/docs/QuotaHistoryHistory.md +13 -0
- data/docs/RepositoryToken.md +3 -0
- data/docs/RepositoryTokenRefresh.md +3 -0
- data/docs/RepositoryTokenSyncTokens.md +3 -0
- data/lib/cloudsmith-api.rb +8 -0
- data/lib/cloudsmith-api/api/metrics_api.rb +167 -0
- data/lib/cloudsmith-api/api/quota_api.rb +227 -0
- data/lib/cloudsmith-api/models/entitlement_token_metric.rb +209 -0
- data/lib/cloudsmith-api/models/metricsownerrepopackagesusage_active_packages.rb +209 -0
- data/lib/cloudsmith-api/models/package_usage_metric.rb +243 -0
- data/lib/cloudsmith-api/models/quota.rb +194 -0
- data/lib/cloudsmith-api/models/quota_history.rb +196 -0
- data/lib/cloudsmith-api/models/quota_history_history.rb +239 -0
- data/lib/cloudsmith-api/models/repository_token.rb +31 -1
- data/lib/cloudsmith-api/models/repository_token_refresh.rb +31 -1
- data/lib/cloudsmith-api/models/repository_token_sync_tokens.rb +31 -1
- data/lib/cloudsmith-api/version.rb +1 -1
- data/spec/api/metrics_api_spec.rb +71 -0
- data/spec/api/quota_api_spec.rb +83 -0
- data/spec/models/entitlement_token_metric_spec.rb +48 -0
- data/spec/models/metricsownerrepopackagesusage_active_packages_spec.rb +54 -0
- data/spec/models/package_usage_metric_spec.rb +60 -0
- data/spec/models/quota_history_history_spec.rb +72 -0
- data/spec/models/quota_history_spec.rb +42 -0
- data/spec/models/quota_spec.rb +42 -0
- data/spec/models/repository_token_refresh_spec.rb +18 -0
- data/spec/models/repository_token_spec.rb +18 -0
- data/spec/models/repository_token_sync_tokens_spec.rb +18 -0
- data/vendor/bundle/ruby/2.6.0/cache/public_suffix-4.0.6.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/autotest-fsevent-0.2.17/gem_make.out +1 -1
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.13.1/gem_make.out +2 -2
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.3.1/gem_make.out +1 -1
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.13.1/ext/ffi_c/Makefile +3 -3
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/.github/FUNDING.yml +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/.github/workflows/tests.yml +1 -1
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/.gitignore +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/.rubocop.yml +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/.rubocop_opinionated.yml +1 -18
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/.travis.yml +1 -1
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/.yardopts +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/2.0-Upgrade.md +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/CHANGELOG.md +7 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/Gemfile +1 -1
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/LICENSE.txt +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/README.md +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/Rakefile +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/SECURITY.md +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/bin/console +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/codecov.yml +0 -2
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/data/list.txt +312 -78
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/lib/public_suffix.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/lib/public_suffix/domain.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/lib/public_suffix/errors.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/lib/public_suffix/list.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/lib/public_suffix/rule.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/lib/public_suffix/version.rb +1 -1
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/public_suffix.gemspec +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/.empty +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/acceptance_test.rb +2 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/benchmarks/bm_find.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/benchmarks/bm_find_all.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/benchmarks/bm_names.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/benchmarks/bm_select.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/benchmarks/bm_select_incremental.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/benchmarks/bm_valid.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/profilers/domain_profiler.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/profilers/find_profiler.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/profilers/find_profiler_jp.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/profilers/initialization_profiler.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/profilers/list_profsize.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/profilers/object_binsize.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/psl_test.rb +1 -1
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/test_helper.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/tests.txt +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/unit/domain_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/unit/errors_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/unit/list_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/unit/public_suffix_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{public_suffix-4.0.5 → public_suffix-4.0.6}/test/unit/rule_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/specifications/{public_suffix-4.0.5.gemspec → public_suffix-4.0.6.gemspec} +4 -4
- data/vendor/bundle/ruby/2.6.0/specifications/sys-uname-1.2.1.gemspec +1 -1
- metadata +167 -135
- data/vendor/bundle/ruby/2.6.0/cache/public_suffix-4.0.5.gem +0 -0
|
@@ -15,6 +15,9 @@ require 'date'
|
|
|
15
15
|
module CloudsmithApi
|
|
16
16
|
|
|
17
17
|
class RepositoryToken
|
|
18
|
+
#
|
|
19
|
+
attr_accessor :clients
|
|
20
|
+
|
|
18
21
|
# The datetime the token was updated at.
|
|
19
22
|
attr_accessor :created_at
|
|
20
23
|
|
|
@@ -27,6 +30,9 @@ module CloudsmithApi
|
|
|
27
30
|
# If selected this is the default token for this repository.
|
|
28
31
|
attr_accessor :default
|
|
29
32
|
|
|
33
|
+
#
|
|
34
|
+
attr_accessor :downloads
|
|
35
|
+
|
|
30
36
|
#
|
|
31
37
|
attr_accessor :has_limits
|
|
32
38
|
|
|
@@ -84,6 +90,9 @@ module CloudsmithApi
|
|
|
84
90
|
#
|
|
85
91
|
attr_accessor :updated_by_url
|
|
86
92
|
|
|
93
|
+
#
|
|
94
|
+
attr_accessor :usage
|
|
95
|
+
|
|
87
96
|
#
|
|
88
97
|
attr_accessor :user
|
|
89
98
|
|
|
@@ -94,10 +103,12 @@ module CloudsmithApi
|
|
|
94
103
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
95
104
|
def self.attribute_map
|
|
96
105
|
{
|
|
106
|
+
:'clients' => :'clients',
|
|
97
107
|
:'created_at' => :'created_at',
|
|
98
108
|
:'created_by' => :'created_by',
|
|
99
109
|
:'created_by_url' => :'created_by_url',
|
|
100
110
|
:'default' => :'default',
|
|
111
|
+
:'downloads' => :'downloads',
|
|
101
112
|
:'has_limits' => :'has_limits',
|
|
102
113
|
:'identifier' => :'identifier',
|
|
103
114
|
:'is_active' => :'is_active',
|
|
@@ -117,6 +128,7 @@ module CloudsmithApi
|
|
|
117
128
|
:'updated_at' => :'updated_at',
|
|
118
129
|
:'updated_by' => :'updated_by',
|
|
119
130
|
:'updated_by_url' => :'updated_by_url',
|
|
131
|
+
:'usage' => :'usage',
|
|
120
132
|
:'user' => :'user',
|
|
121
133
|
:'user_url' => :'user_url'
|
|
122
134
|
}
|
|
@@ -125,10 +137,12 @@ module CloudsmithApi
|
|
|
125
137
|
# Attribute type mapping.
|
|
126
138
|
def self.swagger_types
|
|
127
139
|
{
|
|
140
|
+
:'clients' => :'Integer',
|
|
128
141
|
:'created_at' => :'String',
|
|
129
142
|
:'created_by' => :'String',
|
|
130
143
|
:'created_by_url' => :'String',
|
|
131
144
|
:'default' => :'BOOLEAN',
|
|
145
|
+
:'downloads' => :'Integer',
|
|
132
146
|
:'has_limits' => :'BOOLEAN',
|
|
133
147
|
:'identifier' => :'Integer',
|
|
134
148
|
:'is_active' => :'BOOLEAN',
|
|
@@ -148,6 +162,7 @@ module CloudsmithApi
|
|
|
148
162
|
:'updated_at' => :'String',
|
|
149
163
|
:'updated_by' => :'String',
|
|
150
164
|
:'updated_by_url' => :'String',
|
|
165
|
+
:'usage' => :'String',
|
|
151
166
|
:'user' => :'String',
|
|
152
167
|
:'user_url' => :'String'
|
|
153
168
|
}
|
|
@@ -161,6 +176,10 @@ module CloudsmithApi
|
|
|
161
176
|
# convert string to symbol for hash key
|
|
162
177
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
163
178
|
|
|
179
|
+
if attributes.has_key?(:'clients')
|
|
180
|
+
self.clients = attributes[:'clients']
|
|
181
|
+
end
|
|
182
|
+
|
|
164
183
|
if attributes.has_key?(:'created_at')
|
|
165
184
|
self.created_at = attributes[:'created_at']
|
|
166
185
|
end
|
|
@@ -177,6 +196,10 @@ module CloudsmithApi
|
|
|
177
196
|
self.default = attributes[:'default']
|
|
178
197
|
end
|
|
179
198
|
|
|
199
|
+
if attributes.has_key?(:'downloads')
|
|
200
|
+
self.downloads = attributes[:'downloads']
|
|
201
|
+
end
|
|
202
|
+
|
|
180
203
|
if attributes.has_key?(:'has_limits')
|
|
181
204
|
self.has_limits = attributes[:'has_limits']
|
|
182
205
|
end
|
|
@@ -253,6 +276,10 @@ module CloudsmithApi
|
|
|
253
276
|
self.updated_by_url = attributes[:'updated_by_url']
|
|
254
277
|
end
|
|
255
278
|
|
|
279
|
+
if attributes.has_key?(:'usage')
|
|
280
|
+
self.usage = attributes[:'usage']
|
|
281
|
+
end
|
|
282
|
+
|
|
256
283
|
if attributes.has_key?(:'user')
|
|
257
284
|
self.user = attributes[:'user']
|
|
258
285
|
end
|
|
@@ -286,10 +313,12 @@ module CloudsmithApi
|
|
|
286
313
|
def ==(o)
|
|
287
314
|
return true if self.equal?(o)
|
|
288
315
|
self.class == o.class &&
|
|
316
|
+
clients == o.clients &&
|
|
289
317
|
created_at == o.created_at &&
|
|
290
318
|
created_by == o.created_by &&
|
|
291
319
|
created_by_url == o.created_by_url &&
|
|
292
320
|
default == o.default &&
|
|
321
|
+
downloads == o.downloads &&
|
|
293
322
|
has_limits == o.has_limits &&
|
|
294
323
|
identifier == o.identifier &&
|
|
295
324
|
is_active == o.is_active &&
|
|
@@ -309,6 +338,7 @@ module CloudsmithApi
|
|
|
309
338
|
updated_at == o.updated_at &&
|
|
310
339
|
updated_by == o.updated_by &&
|
|
311
340
|
updated_by_url == o.updated_by_url &&
|
|
341
|
+
usage == o.usage &&
|
|
312
342
|
user == o.user &&
|
|
313
343
|
user_url == o.user_url
|
|
314
344
|
end
|
|
@@ -322,7 +352,7 @@ module CloudsmithApi
|
|
|
322
352
|
# Calculates hash code according to all attributes.
|
|
323
353
|
# @return [Fixnum] Hash code
|
|
324
354
|
def hash
|
|
325
|
-
[created_at, created_by, created_by_url, default, has_limits, identifier, is_active, is_limited, limit_date_range_from, limit_date_range_to, limit_num_clients, limit_num_downloads, limit_package_query, limit_path_query, metadata, name, refresh_url, self_url, slug_perm, token, updated_at, updated_by, updated_by_url, user, user_url].hash
|
|
355
|
+
[clients, created_at, created_by, created_by_url, default, downloads, has_limits, identifier, is_active, is_limited, limit_date_range_from, limit_date_range_to, limit_num_clients, limit_num_downloads, limit_package_query, limit_path_query, metadata, name, refresh_url, self_url, slug_perm, token, updated_at, updated_by, updated_by_url, usage, user, user_url].hash
|
|
326
356
|
end
|
|
327
357
|
|
|
328
358
|
# Builds the object from hash
|
|
@@ -15,6 +15,9 @@ require 'date'
|
|
|
15
15
|
module CloudsmithApi
|
|
16
16
|
|
|
17
17
|
class RepositoryTokenRefresh
|
|
18
|
+
#
|
|
19
|
+
attr_accessor :clients
|
|
20
|
+
|
|
18
21
|
# The datetime the token was updated at.
|
|
19
22
|
attr_accessor :created_at
|
|
20
23
|
|
|
@@ -27,6 +30,9 @@ module CloudsmithApi
|
|
|
27
30
|
# If selected this is the default token for this repository.
|
|
28
31
|
attr_accessor :default
|
|
29
32
|
|
|
33
|
+
#
|
|
34
|
+
attr_accessor :downloads
|
|
35
|
+
|
|
30
36
|
#
|
|
31
37
|
attr_accessor :has_limits
|
|
32
38
|
|
|
@@ -84,6 +90,9 @@ module CloudsmithApi
|
|
|
84
90
|
#
|
|
85
91
|
attr_accessor :updated_by_url
|
|
86
92
|
|
|
93
|
+
#
|
|
94
|
+
attr_accessor :usage
|
|
95
|
+
|
|
87
96
|
#
|
|
88
97
|
attr_accessor :user
|
|
89
98
|
|
|
@@ -94,10 +103,12 @@ module CloudsmithApi
|
|
|
94
103
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
95
104
|
def self.attribute_map
|
|
96
105
|
{
|
|
106
|
+
:'clients' => :'clients',
|
|
97
107
|
:'created_at' => :'created_at',
|
|
98
108
|
:'created_by' => :'created_by',
|
|
99
109
|
:'created_by_url' => :'created_by_url',
|
|
100
110
|
:'default' => :'default',
|
|
111
|
+
:'downloads' => :'downloads',
|
|
101
112
|
:'has_limits' => :'has_limits',
|
|
102
113
|
:'identifier' => :'identifier',
|
|
103
114
|
:'is_active' => :'is_active',
|
|
@@ -117,6 +128,7 @@ module CloudsmithApi
|
|
|
117
128
|
:'updated_at' => :'updated_at',
|
|
118
129
|
:'updated_by' => :'updated_by',
|
|
119
130
|
:'updated_by_url' => :'updated_by_url',
|
|
131
|
+
:'usage' => :'usage',
|
|
120
132
|
:'user' => :'user',
|
|
121
133
|
:'user_url' => :'user_url'
|
|
122
134
|
}
|
|
@@ -125,10 +137,12 @@ module CloudsmithApi
|
|
|
125
137
|
# Attribute type mapping.
|
|
126
138
|
def self.swagger_types
|
|
127
139
|
{
|
|
140
|
+
:'clients' => :'Integer',
|
|
128
141
|
:'created_at' => :'String',
|
|
129
142
|
:'created_by' => :'String',
|
|
130
143
|
:'created_by_url' => :'String',
|
|
131
144
|
:'default' => :'BOOLEAN',
|
|
145
|
+
:'downloads' => :'Integer',
|
|
132
146
|
:'has_limits' => :'BOOLEAN',
|
|
133
147
|
:'identifier' => :'Integer',
|
|
134
148
|
:'is_active' => :'BOOLEAN',
|
|
@@ -148,6 +162,7 @@ module CloudsmithApi
|
|
|
148
162
|
:'updated_at' => :'String',
|
|
149
163
|
:'updated_by' => :'String',
|
|
150
164
|
:'updated_by_url' => :'String',
|
|
165
|
+
:'usage' => :'String',
|
|
151
166
|
:'user' => :'String',
|
|
152
167
|
:'user_url' => :'String'
|
|
153
168
|
}
|
|
@@ -161,6 +176,10 @@ module CloudsmithApi
|
|
|
161
176
|
# convert string to symbol for hash key
|
|
162
177
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
163
178
|
|
|
179
|
+
if attributes.has_key?(:'clients')
|
|
180
|
+
self.clients = attributes[:'clients']
|
|
181
|
+
end
|
|
182
|
+
|
|
164
183
|
if attributes.has_key?(:'created_at')
|
|
165
184
|
self.created_at = attributes[:'created_at']
|
|
166
185
|
end
|
|
@@ -177,6 +196,10 @@ module CloudsmithApi
|
|
|
177
196
|
self.default = attributes[:'default']
|
|
178
197
|
end
|
|
179
198
|
|
|
199
|
+
if attributes.has_key?(:'downloads')
|
|
200
|
+
self.downloads = attributes[:'downloads']
|
|
201
|
+
end
|
|
202
|
+
|
|
180
203
|
if attributes.has_key?(:'has_limits')
|
|
181
204
|
self.has_limits = attributes[:'has_limits']
|
|
182
205
|
end
|
|
@@ -253,6 +276,10 @@ module CloudsmithApi
|
|
|
253
276
|
self.updated_by_url = attributes[:'updated_by_url']
|
|
254
277
|
end
|
|
255
278
|
|
|
279
|
+
if attributes.has_key?(:'usage')
|
|
280
|
+
self.usage = attributes[:'usage']
|
|
281
|
+
end
|
|
282
|
+
|
|
256
283
|
if attributes.has_key?(:'user')
|
|
257
284
|
self.user = attributes[:'user']
|
|
258
285
|
end
|
|
@@ -281,10 +308,12 @@ module CloudsmithApi
|
|
|
281
308
|
def ==(o)
|
|
282
309
|
return true if self.equal?(o)
|
|
283
310
|
self.class == o.class &&
|
|
311
|
+
clients == o.clients &&
|
|
284
312
|
created_at == o.created_at &&
|
|
285
313
|
created_by == o.created_by &&
|
|
286
314
|
created_by_url == o.created_by_url &&
|
|
287
315
|
default == o.default &&
|
|
316
|
+
downloads == o.downloads &&
|
|
288
317
|
has_limits == o.has_limits &&
|
|
289
318
|
identifier == o.identifier &&
|
|
290
319
|
is_active == o.is_active &&
|
|
@@ -304,6 +333,7 @@ module CloudsmithApi
|
|
|
304
333
|
updated_at == o.updated_at &&
|
|
305
334
|
updated_by == o.updated_by &&
|
|
306
335
|
updated_by_url == o.updated_by_url &&
|
|
336
|
+
usage == o.usage &&
|
|
307
337
|
user == o.user &&
|
|
308
338
|
user_url == o.user_url
|
|
309
339
|
end
|
|
@@ -317,7 +347,7 @@ module CloudsmithApi
|
|
|
317
347
|
# Calculates hash code according to all attributes.
|
|
318
348
|
# @return [Fixnum] Hash code
|
|
319
349
|
def hash
|
|
320
|
-
[created_at, created_by, created_by_url, default, has_limits, identifier, is_active, is_limited, limit_date_range_from, limit_date_range_to, limit_num_clients, limit_num_downloads, limit_package_query, limit_path_query, metadata, name, refresh_url, self_url, slug_perm, token, updated_at, updated_by, updated_by_url, user, user_url].hash
|
|
350
|
+
[clients, created_at, created_by, created_by_url, default, downloads, has_limits, identifier, is_active, is_limited, limit_date_range_from, limit_date_range_to, limit_num_clients, limit_num_downloads, limit_package_query, limit_path_query, metadata, name, refresh_url, self_url, slug_perm, token, updated_at, updated_by, updated_by_url, usage, user, user_url].hash
|
|
321
351
|
end
|
|
322
352
|
|
|
323
353
|
# Builds the object from hash
|
|
@@ -15,6 +15,9 @@ require 'date'
|
|
|
15
15
|
module CloudsmithApi
|
|
16
16
|
|
|
17
17
|
class RepositoryTokenSyncTokens
|
|
18
|
+
#
|
|
19
|
+
attr_accessor :clients
|
|
20
|
+
|
|
18
21
|
# The datetime the token was updated at.
|
|
19
22
|
attr_accessor :created_at
|
|
20
23
|
|
|
@@ -27,6 +30,9 @@ module CloudsmithApi
|
|
|
27
30
|
# If selected this is the default token for this repository.
|
|
28
31
|
attr_accessor :default
|
|
29
32
|
|
|
33
|
+
#
|
|
34
|
+
attr_accessor :downloads
|
|
35
|
+
|
|
30
36
|
#
|
|
31
37
|
attr_accessor :has_limits
|
|
32
38
|
|
|
@@ -84,6 +90,9 @@ module CloudsmithApi
|
|
|
84
90
|
#
|
|
85
91
|
attr_accessor :updated_by_url
|
|
86
92
|
|
|
93
|
+
#
|
|
94
|
+
attr_accessor :usage
|
|
95
|
+
|
|
87
96
|
#
|
|
88
97
|
attr_accessor :user
|
|
89
98
|
|
|
@@ -94,10 +103,12 @@ module CloudsmithApi
|
|
|
94
103
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
95
104
|
def self.attribute_map
|
|
96
105
|
{
|
|
106
|
+
:'clients' => :'clients',
|
|
97
107
|
:'created_at' => :'created_at',
|
|
98
108
|
:'created_by' => :'created_by',
|
|
99
109
|
:'created_by_url' => :'created_by_url',
|
|
100
110
|
:'default' => :'default',
|
|
111
|
+
:'downloads' => :'downloads',
|
|
101
112
|
:'has_limits' => :'has_limits',
|
|
102
113
|
:'identifier' => :'identifier',
|
|
103
114
|
:'is_active' => :'is_active',
|
|
@@ -117,6 +128,7 @@ module CloudsmithApi
|
|
|
117
128
|
:'updated_at' => :'updated_at',
|
|
118
129
|
:'updated_by' => :'updated_by',
|
|
119
130
|
:'updated_by_url' => :'updated_by_url',
|
|
131
|
+
:'usage' => :'usage',
|
|
120
132
|
:'user' => :'user',
|
|
121
133
|
:'user_url' => :'user_url'
|
|
122
134
|
}
|
|
@@ -125,10 +137,12 @@ module CloudsmithApi
|
|
|
125
137
|
# Attribute type mapping.
|
|
126
138
|
def self.swagger_types
|
|
127
139
|
{
|
|
140
|
+
:'clients' => :'Integer',
|
|
128
141
|
:'created_at' => :'String',
|
|
129
142
|
:'created_by' => :'String',
|
|
130
143
|
:'created_by_url' => :'String',
|
|
131
144
|
:'default' => :'BOOLEAN',
|
|
145
|
+
:'downloads' => :'Integer',
|
|
132
146
|
:'has_limits' => :'BOOLEAN',
|
|
133
147
|
:'identifier' => :'Integer',
|
|
134
148
|
:'is_active' => :'BOOLEAN',
|
|
@@ -148,6 +162,7 @@ module CloudsmithApi
|
|
|
148
162
|
:'updated_at' => :'String',
|
|
149
163
|
:'updated_by' => :'String',
|
|
150
164
|
:'updated_by_url' => :'String',
|
|
165
|
+
:'usage' => :'String',
|
|
151
166
|
:'user' => :'String',
|
|
152
167
|
:'user_url' => :'String'
|
|
153
168
|
}
|
|
@@ -161,6 +176,10 @@ module CloudsmithApi
|
|
|
161
176
|
# convert string to symbol for hash key
|
|
162
177
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
163
178
|
|
|
179
|
+
if attributes.has_key?(:'clients')
|
|
180
|
+
self.clients = attributes[:'clients']
|
|
181
|
+
end
|
|
182
|
+
|
|
164
183
|
if attributes.has_key?(:'created_at')
|
|
165
184
|
self.created_at = attributes[:'created_at']
|
|
166
185
|
end
|
|
@@ -177,6 +196,10 @@ module CloudsmithApi
|
|
|
177
196
|
self.default = attributes[:'default']
|
|
178
197
|
end
|
|
179
198
|
|
|
199
|
+
if attributes.has_key?(:'downloads')
|
|
200
|
+
self.downloads = attributes[:'downloads']
|
|
201
|
+
end
|
|
202
|
+
|
|
180
203
|
if attributes.has_key?(:'has_limits')
|
|
181
204
|
self.has_limits = attributes[:'has_limits']
|
|
182
205
|
end
|
|
@@ -253,6 +276,10 @@ module CloudsmithApi
|
|
|
253
276
|
self.updated_by_url = attributes[:'updated_by_url']
|
|
254
277
|
end
|
|
255
278
|
|
|
279
|
+
if attributes.has_key?(:'usage')
|
|
280
|
+
self.usage = attributes[:'usage']
|
|
281
|
+
end
|
|
282
|
+
|
|
256
283
|
if attributes.has_key?(:'user')
|
|
257
284
|
self.user = attributes[:'user']
|
|
258
285
|
end
|
|
@@ -281,10 +308,12 @@ module CloudsmithApi
|
|
|
281
308
|
def ==(o)
|
|
282
309
|
return true if self.equal?(o)
|
|
283
310
|
self.class == o.class &&
|
|
311
|
+
clients == o.clients &&
|
|
284
312
|
created_at == o.created_at &&
|
|
285
313
|
created_by == o.created_by &&
|
|
286
314
|
created_by_url == o.created_by_url &&
|
|
287
315
|
default == o.default &&
|
|
316
|
+
downloads == o.downloads &&
|
|
288
317
|
has_limits == o.has_limits &&
|
|
289
318
|
identifier == o.identifier &&
|
|
290
319
|
is_active == o.is_active &&
|
|
@@ -304,6 +333,7 @@ module CloudsmithApi
|
|
|
304
333
|
updated_at == o.updated_at &&
|
|
305
334
|
updated_by == o.updated_by &&
|
|
306
335
|
updated_by_url == o.updated_by_url &&
|
|
336
|
+
usage == o.usage &&
|
|
307
337
|
user == o.user &&
|
|
308
338
|
user_url == o.user_url
|
|
309
339
|
end
|
|
@@ -317,7 +347,7 @@ module CloudsmithApi
|
|
|
317
347
|
# Calculates hash code according to all attributes.
|
|
318
348
|
# @return [Fixnum] Hash code
|
|
319
349
|
def hash
|
|
320
|
-
[created_at, created_by, created_by_url, default, has_limits, identifier, is_active, is_limited, limit_date_range_from, limit_date_range_to, limit_num_clients, limit_num_downloads, limit_package_query, limit_path_query, metadata, name, refresh_url, self_url, slug_perm, token, updated_at, updated_by, updated_by_url, user, user_url].hash
|
|
350
|
+
[clients, created_at, created_by, created_by_url, default, downloads, has_limits, identifier, is_active, is_limited, limit_date_range_from, limit_date_range_to, limit_num_clients, limit_num_downloads, limit_package_query, limit_path_query, metadata, name, refresh_url, self_url, slug_perm, token, updated_at, updated_by, updated_by_url, usage, user, user_url].hash
|
|
321
351
|
end
|
|
322
352
|
|
|
323
353
|
# Builds the object from hash
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Cloudsmith API
|
|
3
|
+
|
|
4
|
+
#The API to the Cloudsmith Service
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: v1
|
|
7
|
+
Contact: support@cloudsmith.io
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.2.3
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for CloudsmithApi::MetricsApi
|
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'MetricsApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@instance = CloudsmithApi::MetricsApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of MetricsApi' do
|
|
30
|
+
it 'should create an instance of MetricsApi' do
|
|
31
|
+
expect(@instance).to be_instance_of(CloudsmithApi::MetricsApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for metrics_entitlements_usage_list
|
|
36
|
+
# View for listing entitlement token usage as a metric.
|
|
37
|
+
# View for listing entitlement token usage as a metric.
|
|
38
|
+
# @param owner
|
|
39
|
+
# @param repo
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
42
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
43
|
+
# @option opts [Integer] :finish Filter token usage ending before this datetime (UTC by default unless otherwise specified). Defaults to now if not supplied.
|
|
44
|
+
# @option opts [Integer] :start Filter token usage starting from this datetime (UTC by default unless otherwise specified)).
|
|
45
|
+
# @option opts [String] :tokens A comma seperated list of tokens (slug perm) to include in the results.
|
|
46
|
+
# @return [Array<EntitlementTokenMetric>]
|
|
47
|
+
describe 'metrics_entitlements_usage_list test' do
|
|
48
|
+
it "should work" do
|
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# unit tests for metrics_packages_usage_list
|
|
54
|
+
# View for listing package usage metrics by user.
|
|
55
|
+
# View for listing package usage metrics by user.
|
|
56
|
+
# @param owner
|
|
57
|
+
# @param repo
|
|
58
|
+
# @param [Hash] opts the optional parameters
|
|
59
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
60
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
61
|
+
# @option opts [Integer] :finish Filter token usage ending before this datetime (UTC). Defaults to now if not supplied.
|
|
62
|
+
# @option opts [String] :packages A comma seperated list of packages (slug perm) to include in the results.
|
|
63
|
+
# @option opts [Integer] :start Filter token usage starting from this datetime (UTC)).
|
|
64
|
+
# @return [Array<PackageUsageMetric>]
|
|
65
|
+
describe 'metrics_packages_usage_list test' do
|
|
66
|
+
it "should work" do
|
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
end
|