rokka_client_codegen 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/LICENSE +21 -0
- data/README.md +123 -0
- data/Rakefile +8 -0
- data/config.json +5 -0
- data/docs/AdminApi.md +398 -0
- data/docs/ListSourceImagesResponse.md +11 -0
- data/docs/ListStacksResponse.md +8 -0
- data/docs/Membership.md +11 -0
- data/docs/Organization.md +14 -0
- data/docs/OrganizationDefinition.md +10 -0
- data/docs/OrganizationOptions.md +10 -0
- data/docs/Role.md +8 -0
- data/docs/SourceImage.md +24 -0
- data/docs/SourceimagesApi.md +1032 -0
- data/docs/Stack.md +14 -0
- data/docs/StackDefinition.md +10 -0
- data/docs/StackExpression.md +9 -0
- data/docs/StackExpressionOverrides.md +8 -0
- data/docs/StackOperation.md +9 -0
- data/docs/StackOperationDescription.md +11 -0
- data/docs/StackOptions.md +8 -0
- data/docs/StacksApi.md +329 -0
- data/docs/User.md +11 -0
- data/docs/UserDefinition.md +9 -0
- data/examples/createstack.rb +33 -0
- data/examples/liststacks.rb +19 -0
- data/examples/setsubjectarea.rb +37 -0
- data/examples/uploadimage.rb +28 -0
- data/generate.sh +3 -0
- data/git_push.sh +55 -0
- data/lib/rokka_client_codegen.rb +59 -0
- data/lib/rokka_client_codegen/api/admin_api.rb +439 -0
- data/lib/rokka_client_codegen/api/sourceimages_api.rb +1225 -0
- data/lib/rokka_client_codegen/api/stacks_api.rb +371 -0
- data/lib/rokka_client_codegen/api_client.rb +389 -0
- data/lib/rokka_client_codegen/api_error.rb +38 -0
- data/lib/rokka_client_codegen/configuration.rb +209 -0
- data/lib/rokka_client_codegen/models/list_source_images_response.rb +217 -0
- data/lib/rokka_client_codegen/models/list_stacks_response.rb +190 -0
- data/lib/rokka_client_codegen/models/membership.rb +215 -0
- data/lib/rokka_client_codegen/models/organization.rb +264 -0
- data/lib/rokka_client_codegen/models/organization_definition.rb +211 -0
- data/lib/rokka_client_codegen/models/organization_options.rb +208 -0
- data/lib/rokka_client_codegen/models/role.rb +194 -0
- data/lib/rokka_client_codegen/models/source_image.rb +333 -0
- data/lib/rokka_client_codegen/models/stack.rb +246 -0
- data/lib/rokka_client_codegen/models/stack_definition.rb +217 -0
- data/lib/rokka_client_codegen/models/stack_expression.rb +207 -0
- data/lib/rokka_client_codegen/models/stack_expression_overrides.rb +188 -0
- data/lib/rokka_client_codegen/models/stack_operation.rb +203 -0
- data/lib/rokka_client_codegen/models/stack_operation_description.rb +231 -0
- data/lib/rokka_client_codegen/models/stack_options.rb +193 -0
- data/lib/rokka_client_codegen/models/user.rb +216 -0
- data/lib/rokka_client_codegen/models/user_definition.rb +204 -0
- data/lib/rokka_client_codegen/version.rb +15 -0
- data/patches/README.patch +59 -0
- data/patches/sourceimage_hash_long_hash.patch +62 -0
- data/rokka_client_codegen.gemspec +45 -0
- data/spec/api/admin_api_spec.rb +125 -0
- data/spec/api/sourceimages_api_spec.rb +274 -0
- data/spec/api/stacks_api_spec.rb +110 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/list_source_images_response_spec.rb +60 -0
- data/spec/models/list_stacks_response_spec.rb +42 -0
- data/spec/models/membership_spec.rb +60 -0
- data/spec/models/organization_definition_spec.rb +54 -0
- data/spec/models/organization_options_spec.rb +54 -0
- data/spec/models/organization_spec.rb +78 -0
- data/spec/models/role_spec.rb +42 -0
- data/spec/models/source_image_spec.rb +138 -0
- data/spec/models/stack_definition_spec.rb +54 -0
- data/spec/models/stack_expression_overrides_spec.rb +42 -0
- data/spec/models/stack_expression_spec.rb +48 -0
- data/spec/models/stack_operation_description_spec.rb +60 -0
- data/spec/models/stack_operation_spec.rb +48 -0
- data/spec/models/stack_options_spec.rb +42 -0
- data/spec/models/stack_spec.rb +78 -0
- data/spec/models/user_definition_spec.rb +48 -0
- data/spec/models/user_spec.rb +60 -0
- data/spec/spec_helper.rb +111 -0
- metadata +330 -0
@@ -0,0 +1,1225 @@
|
|
1
|
+
=begin
|
2
|
+
#rokka.io
|
3
|
+
|
4
|
+
#digital image processing done right. [Documentation](https://rokka.io/documentation). [Changelog](https://api.rokka.io/changelog.md).
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require "uri"
|
14
|
+
|
15
|
+
module RokkaClientCodegen
|
16
|
+
class SourceimagesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
# Copy a single source image to another org.
|
24
|
+
# The metadata is copied as well. After copying, changes to either image metadata are not reflected in the other image metadata. This is a proxy method for COPY on /sourceimages/{organization}/{hash}. It allows to copy images with a POST request, to work around restrictive firewalls and allows to produce a swagger specification for this operation.
|
25
|
+
# @param destination The destination organization
|
26
|
+
# @param organization
|
27
|
+
# @param hash
|
28
|
+
# @param [Hash] opts the optional parameters
|
29
|
+
# @option opts [String] :overwrite If set to 'F', existing images won't be overwritten.
|
30
|
+
# @return [nil]
|
31
|
+
def copy_source_image(destination, organization, hash, opts = {})
|
32
|
+
copy_source_image_with_http_info(destination, organization, hash, opts)
|
33
|
+
return nil
|
34
|
+
end
|
35
|
+
|
36
|
+
# Copy a single source image to another org.
|
37
|
+
# The metadata is copied as well. After copying, changes to either image metadata are not reflected in the other image metadata. This is a proxy method for COPY on /sourceimages/{organization}/{hash}. It allows to copy images with a POST request, to work around restrictive firewalls and allows to produce a swagger specification for this operation.
|
38
|
+
# @param destination The destination organization
|
39
|
+
# @param organization
|
40
|
+
# @param hash
|
41
|
+
# @param [Hash] opts the optional parameters
|
42
|
+
# @option opts [String] :overwrite If set to 'F', existing images won't be overwritten.
|
43
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
44
|
+
def copy_source_image_with_http_info(destination, organization, hash, opts = {})
|
45
|
+
if @api_client.config.debugging
|
46
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.copy_source_image ..."
|
47
|
+
end
|
48
|
+
# verify the required parameter 'destination' is set
|
49
|
+
if @api_client.config.client_side_validation && destination.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter 'destination' when calling SourceimagesApi.copy_source_image"
|
51
|
+
end
|
52
|
+
# verify the required parameter 'organization' is set
|
53
|
+
if @api_client.config.client_side_validation && organization.nil?
|
54
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.copy_source_image"
|
55
|
+
end
|
56
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
57
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.copy_source_image, must conform to the pattern /[0-9a-z\\-]+/."
|
58
|
+
end
|
59
|
+
|
60
|
+
# verify the required parameter 'hash' is set
|
61
|
+
if @api_client.config.client_side_validation && hash.nil?
|
62
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.copy_source_image"
|
63
|
+
end
|
64
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
65
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.copy_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
66
|
+
end
|
67
|
+
|
68
|
+
if @api_client.config.client_side_validation && opts[:'overwrite'] && !['', ' F'].include?(opts[:'overwrite'])
|
69
|
+
fail ArgumentError, 'invalid value for "overwrite", must be one of , F'
|
70
|
+
end
|
71
|
+
# resource path
|
72
|
+
local_var_path = "/sourceimages/{organization}/{hash}/copy".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)
|
73
|
+
|
74
|
+
# query parameters
|
75
|
+
query_params = {}
|
76
|
+
|
77
|
+
# header parameters
|
78
|
+
header_params = {}
|
79
|
+
header_params[:'Destination'] = destination
|
80
|
+
header_params[:'Overwrite'] = opts[:'overwrite'] if !opts[:'overwrite'].nil?
|
81
|
+
|
82
|
+
# form parameters
|
83
|
+
form_params = {}
|
84
|
+
|
85
|
+
# http body (model)
|
86
|
+
post_body = nil
|
87
|
+
auth_names = ['ApiKeyAuth']
|
88
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
89
|
+
:header_params => header_params,
|
90
|
+
:query_params => query_params,
|
91
|
+
:form_params => form_params,
|
92
|
+
:body => post_body,
|
93
|
+
:auth_names => auth_names)
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#copy_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
96
|
+
end
|
97
|
+
return data, status_code, headers
|
98
|
+
end
|
99
|
+
|
100
|
+
# Upload new source images.
|
101
|
+
# The request is form data for the uploaded files and arrays of metadata. Files and metadata are matched based on their order in the request. Note that this call allows to upload multiple images, but the swagger UI does not support this.
|
102
|
+
# @param filedata The binary images
|
103
|
+
# @param organization
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @option opts [String] :meta_dynamic JSON metadata about the image, e.g. subject area. See https://rokka.io/documentation/references/dynamic-metadata.html
|
106
|
+
# @option opts [String] :meta_user User specific JSON metadata that can be used when searching source images. See https://rokka.io/documentation/references/user-metadata.html
|
107
|
+
# @return [ListSourceImagesResponse]
|
108
|
+
def create_source_image(filedata, organization, opts = {})
|
109
|
+
data, _status_code, _headers = create_source_image_with_http_info(filedata, organization, opts)
|
110
|
+
return data
|
111
|
+
end
|
112
|
+
|
113
|
+
# Upload new source images.
|
114
|
+
# The request is form data for the uploaded files and arrays of metadata. Files and metadata are matched based on their order in the request. Note that this call allows to upload multiple images, but the swagger UI does not support this.
|
115
|
+
# @param filedata The binary images
|
116
|
+
# @param organization
|
117
|
+
# @param [Hash] opts the optional parameters
|
118
|
+
# @option opts [String] :meta_dynamic JSON metadata about the image, e.g. subject area. See https://rokka.io/documentation/references/dynamic-metadata.html
|
119
|
+
# @option opts [String] :meta_user User specific JSON metadata that can be used when searching source images. See https://rokka.io/documentation/references/user-metadata.html
|
120
|
+
# @return [Array<(ListSourceImagesResponse, Fixnum, Hash)>] ListSourceImagesResponse data, response status code and response headers
|
121
|
+
def create_source_image_with_http_info(filedata, organization, opts = {})
|
122
|
+
if @api_client.config.debugging
|
123
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.create_source_image ..."
|
124
|
+
end
|
125
|
+
# verify the required parameter 'filedata' is set
|
126
|
+
if @api_client.config.client_side_validation && filedata.nil?
|
127
|
+
fail ArgumentError, "Missing the required parameter 'filedata' when calling SourceimagesApi.create_source_image"
|
128
|
+
end
|
129
|
+
# verify the required parameter 'organization' is set
|
130
|
+
if @api_client.config.client_side_validation && organization.nil?
|
131
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.create_source_image"
|
132
|
+
end
|
133
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
134
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.create_source_image, must conform to the pattern /[0-9a-z\\-]+/."
|
135
|
+
end
|
136
|
+
|
137
|
+
# resource path
|
138
|
+
local_var_path = "/sourceimages/{organization}".sub('{' + 'organization' + '}', organization.to_s)
|
139
|
+
|
140
|
+
# query parameters
|
141
|
+
query_params = {}
|
142
|
+
|
143
|
+
# header parameters
|
144
|
+
header_params = {}
|
145
|
+
# HTTP header 'Content-Type'
|
146
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
147
|
+
|
148
|
+
# form parameters
|
149
|
+
form_params = {}
|
150
|
+
form_params["filedata"] = filedata
|
151
|
+
form_params["meta_dynamic[]"] = opts[:'meta_dynamic'] if !opts[:'meta_dynamic'].nil?
|
152
|
+
form_params["meta_user[]"] = opts[:'meta_user'] if !opts[:'meta_user'].nil?
|
153
|
+
|
154
|
+
# http body (model)
|
155
|
+
post_body = nil
|
156
|
+
auth_names = ['ApiKeyAuth']
|
157
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
158
|
+
:header_params => header_params,
|
159
|
+
:query_params => query_params,
|
160
|
+
:form_params => form_params,
|
161
|
+
:body => post_body,
|
162
|
+
:auth_names => auth_names,
|
163
|
+
:return_type => 'ListSourceImagesResponse')
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#create_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
166
|
+
end
|
167
|
+
return data, status_code, headers
|
168
|
+
end
|
169
|
+
|
170
|
+
# Adds or updates a specific dynamic meta data for an image.
|
171
|
+
# This changes the hash of the image. The response provides the new location of the image in the Location header.
|
172
|
+
# @param meta_dynamic_definition Dynamic Meta Data definition
|
173
|
+
# @param organization
|
174
|
+
# @param hash
|
175
|
+
# @param meta_name
|
176
|
+
# @param [Hash] opts the optional parameters
|
177
|
+
# @option opts [BOOLEAN] :delete_previous If the image with the original hash should be deleted (default to false)
|
178
|
+
# @return [SourceImage]
|
179
|
+
def create_source_image_meta_dynamic_with_name(meta_dynamic_definition, organization, hash, meta_name, opts = {})
|
180
|
+
data, _status_code, _headers = create_source_image_meta_dynamic_with_name_with_http_info(meta_dynamic_definition, organization, hash, meta_name, opts)
|
181
|
+
return data
|
182
|
+
end
|
183
|
+
|
184
|
+
# Adds or updates a specific dynamic meta data for an image.
|
185
|
+
# This changes the hash of the image. The response provides the new location of the image in the Location header.
|
186
|
+
# @param meta_dynamic_definition Dynamic Meta Data definition
|
187
|
+
# @param organization
|
188
|
+
# @param hash
|
189
|
+
# @param meta_name
|
190
|
+
# @param [Hash] opts the optional parameters
|
191
|
+
# @option opts [BOOLEAN] :delete_previous If the image with the original hash should be deleted
|
192
|
+
# @return [Array<(SourceImage, Fixnum, Hash)>] SourceImage data, response status code and response headers
|
193
|
+
def create_source_image_meta_dynamic_with_name_with_http_info(meta_dynamic_definition, organization, hash, meta_name, opts = {})
|
194
|
+
if @api_client.config.debugging
|
195
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.create_source_image_meta_dynamic_with_name ..."
|
196
|
+
end
|
197
|
+
# verify the required parameter 'meta_dynamic_definition' is set
|
198
|
+
if @api_client.config.client_side_validation && meta_dynamic_definition.nil?
|
199
|
+
fail ArgumentError, "Missing the required parameter 'meta_dynamic_definition' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name"
|
200
|
+
end
|
201
|
+
# verify the required parameter 'organization' is set
|
202
|
+
if @api_client.config.client_side_validation && organization.nil?
|
203
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name"
|
204
|
+
end
|
205
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
206
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name, must conform to the pattern /[0-9a-z\\-]+/."
|
207
|
+
end
|
208
|
+
|
209
|
+
# verify the required parameter 'hash' is set
|
210
|
+
if @api_client.config.client_side_validation && hash.nil?
|
211
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name"
|
212
|
+
end
|
213
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
214
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
215
|
+
end
|
216
|
+
|
217
|
+
# verify the required parameter 'meta_name' is set
|
218
|
+
if @api_client.config.client_side_validation && meta_name.nil?
|
219
|
+
fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name"
|
220
|
+
end
|
221
|
+
if @api_client.config.client_side_validation && meta_name !~ Regexp.new(/[a-zA-Z_]+/)
|
222
|
+
fail ArgumentError, "invalid value for 'meta_name' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name, must conform to the pattern /[a-zA-Z_]+/."
|
223
|
+
end
|
224
|
+
|
225
|
+
# resource path
|
226
|
+
local_var_path = "/sourceimages/{organization}/{hash}/meta/dynamic/{metaName}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s).sub('{' + 'metaName' + '}', meta_name.to_s)
|
227
|
+
|
228
|
+
# query parameters
|
229
|
+
query_params = {}
|
230
|
+
query_params[:'deletePrevious'] = opts[:'delete_previous'] if !opts[:'delete_previous'].nil?
|
231
|
+
|
232
|
+
# header parameters
|
233
|
+
header_params = {}
|
234
|
+
|
235
|
+
# form parameters
|
236
|
+
form_params = {}
|
237
|
+
|
238
|
+
# http body (model)
|
239
|
+
post_body = @api_client.object_to_http_body(meta_dynamic_definition)
|
240
|
+
auth_names = ['ApiKeyAuth']
|
241
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
242
|
+
:header_params => header_params,
|
243
|
+
:query_params => query_params,
|
244
|
+
:form_params => form_params,
|
245
|
+
:body => post_body,
|
246
|
+
:auth_names => auth_names,
|
247
|
+
:return_type => 'SourceImage')
|
248
|
+
if @api_client.config.debugging
|
249
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#create_source_image_meta_dynamic_with_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
250
|
+
end
|
251
|
+
return data, status_code, headers
|
252
|
+
end
|
253
|
+
|
254
|
+
# Replace the image meta data with new information.
|
255
|
+
# All existing meta data for the image is removed and then the new meta data is added. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
|
256
|
+
# @param user_meta_data User Meta Data as a json hashmap
|
257
|
+
# @param organization
|
258
|
+
# @param hash
|
259
|
+
# @param [Hash] opts the optional parameters
|
260
|
+
# @return [nil]
|
261
|
+
def create_source_image_meta_user(user_meta_data, organization, hash, opts = {})
|
262
|
+
create_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts)
|
263
|
+
return nil
|
264
|
+
end
|
265
|
+
|
266
|
+
# Replace the image meta data with new information.
|
267
|
+
# All existing meta data for the image is removed and then the new meta data is added. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
|
268
|
+
# @param user_meta_data User Meta Data as a json hashmap
|
269
|
+
# @param organization
|
270
|
+
# @param hash
|
271
|
+
# @param [Hash] opts the optional parameters
|
272
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
273
|
+
def create_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts = {})
|
274
|
+
if @api_client.config.debugging
|
275
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.create_source_image_meta_user ..."
|
276
|
+
end
|
277
|
+
# verify the required parameter 'user_meta_data' is set
|
278
|
+
if @api_client.config.client_side_validation && user_meta_data.nil?
|
279
|
+
fail ArgumentError, "Missing the required parameter 'user_meta_data' when calling SourceimagesApi.create_source_image_meta_user"
|
280
|
+
end
|
281
|
+
# verify the required parameter 'organization' is set
|
282
|
+
if @api_client.config.client_side_validation && organization.nil?
|
283
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.create_source_image_meta_user"
|
284
|
+
end
|
285
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
286
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.create_source_image_meta_user, must conform to the pattern /[0-9a-z\\-]+/."
|
287
|
+
end
|
288
|
+
|
289
|
+
# verify the required parameter 'hash' is set
|
290
|
+
if @api_client.config.client_side_validation && hash.nil?
|
291
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.create_source_image_meta_user"
|
292
|
+
end
|
293
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
294
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.create_source_image_meta_user, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
295
|
+
end
|
296
|
+
|
297
|
+
# resource path
|
298
|
+
local_var_path = "/sourceimages/{organization}/{hash}/meta/user".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)
|
299
|
+
|
300
|
+
# query parameters
|
301
|
+
query_params = {}
|
302
|
+
|
303
|
+
# header parameters
|
304
|
+
header_params = {}
|
305
|
+
|
306
|
+
# form parameters
|
307
|
+
form_params = {}
|
308
|
+
|
309
|
+
# http body (model)
|
310
|
+
post_body = @api_client.object_to_http_body(user_meta_data)
|
311
|
+
auth_names = ['ApiKeyAuth']
|
312
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
313
|
+
:header_params => header_params,
|
314
|
+
:query_params => query_params,
|
315
|
+
:form_params => form_params,
|
316
|
+
:body => post_body,
|
317
|
+
:auth_names => auth_names)
|
318
|
+
if @api_client.config.debugging
|
319
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#create_source_image_meta_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
320
|
+
end
|
321
|
+
return data, status_code, headers
|
322
|
+
end
|
323
|
+
|
324
|
+
# Adds or updates one user meta data field for an image.
|
325
|
+
# User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
|
326
|
+
# @param user_meta_data_single_field User Meta Data for a single field in json format
|
327
|
+
# @param organization
|
328
|
+
# @param hash
|
329
|
+
# @param meta_name
|
330
|
+
# @param [Hash] opts the optional parameters
|
331
|
+
# @return [nil]
|
332
|
+
def create_source_image_meta_user_wth_name(user_meta_data_single_field, organization, hash, meta_name, opts = {})
|
333
|
+
create_source_image_meta_user_wth_name_with_http_info(user_meta_data_single_field, organization, hash, meta_name, opts)
|
334
|
+
return nil
|
335
|
+
end
|
336
|
+
|
337
|
+
# Adds or updates one user meta data field for an image.
|
338
|
+
# User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
|
339
|
+
# @param user_meta_data_single_field User Meta Data for a single field in json format
|
340
|
+
# @param organization
|
341
|
+
# @param hash
|
342
|
+
# @param meta_name
|
343
|
+
# @param [Hash] opts the optional parameters
|
344
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
345
|
+
def create_source_image_meta_user_wth_name_with_http_info(user_meta_data_single_field, organization, hash, meta_name, opts = {})
|
346
|
+
if @api_client.config.debugging
|
347
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.create_source_image_meta_user_wth_name ..."
|
348
|
+
end
|
349
|
+
# verify the required parameter 'user_meta_data_single_field' is set
|
350
|
+
if @api_client.config.client_side_validation && user_meta_data_single_field.nil?
|
351
|
+
fail ArgumentError, "Missing the required parameter 'user_meta_data_single_field' when calling SourceimagesApi.create_source_image_meta_user_wth_name"
|
352
|
+
end
|
353
|
+
# verify the required parameter 'organization' is set
|
354
|
+
if @api_client.config.client_side_validation && organization.nil?
|
355
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.create_source_image_meta_user_wth_name"
|
356
|
+
end
|
357
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
358
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.create_source_image_meta_user_wth_name, must conform to the pattern /[0-9a-z\\-]+/."
|
359
|
+
end
|
360
|
+
|
361
|
+
# verify the required parameter 'hash' is set
|
362
|
+
if @api_client.config.client_side_validation && hash.nil?
|
363
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.create_source_image_meta_user_wth_name"
|
364
|
+
end
|
365
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
366
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.create_source_image_meta_user_wth_name, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
367
|
+
end
|
368
|
+
|
369
|
+
# verify the required parameter 'meta_name' is set
|
370
|
+
if @api_client.config.client_side_validation && meta_name.nil?
|
371
|
+
fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.create_source_image_meta_user_wth_name"
|
372
|
+
end
|
373
|
+
if @api_client.config.client_side_validation && meta_name !~ Regexp.new(/[a-zA-Z0-9_-]+/)
|
374
|
+
fail ArgumentError, "invalid value for 'meta_name' when calling SourceimagesApi.create_source_image_meta_user_wth_name, must conform to the pattern /[a-zA-Z0-9_-]+/."
|
375
|
+
end
|
376
|
+
|
377
|
+
# resource path
|
378
|
+
local_var_path = "/sourceimages/{organization}/{hash}/meta/user/{metaName}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s).sub('{' + 'metaName' + '}', meta_name.to_s)
|
379
|
+
|
380
|
+
# query parameters
|
381
|
+
query_params = {}
|
382
|
+
|
383
|
+
# header parameters
|
384
|
+
header_params = {}
|
385
|
+
|
386
|
+
# form parameters
|
387
|
+
form_params = {}
|
388
|
+
|
389
|
+
# http body (model)
|
390
|
+
post_body = @api_client.object_to_http_body(user_meta_data_single_field)
|
391
|
+
auth_names = ['ApiKeyAuth']
|
392
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
393
|
+
:header_params => header_params,
|
394
|
+
:query_params => query_params,
|
395
|
+
:form_params => form_params,
|
396
|
+
:body => post_body,
|
397
|
+
:auth_names => auth_names)
|
398
|
+
if @api_client.config.debugging
|
399
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#create_source_image_meta_user_wth_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
400
|
+
end
|
401
|
+
return data, status_code, headers
|
402
|
+
end
|
403
|
+
|
404
|
+
# Delete a single source image.
|
405
|
+
#
|
406
|
+
# @param organization
|
407
|
+
# @param hash
|
408
|
+
# @param [Hash] opts the optional parameters
|
409
|
+
# @return [nil]
|
410
|
+
def delete_source_image(organization, hash, opts = {})
|
411
|
+
delete_source_image_with_http_info(organization, hash, opts)
|
412
|
+
return nil
|
413
|
+
end
|
414
|
+
|
415
|
+
# Delete a single source image.
|
416
|
+
#
|
417
|
+
# @param organization
|
418
|
+
# @param hash
|
419
|
+
# @param [Hash] opts the optional parameters
|
420
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
421
|
+
def delete_source_image_with_http_info(organization, hash, opts = {})
|
422
|
+
if @api_client.config.debugging
|
423
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.delete_source_image ..."
|
424
|
+
end
|
425
|
+
# verify the required parameter 'organization' is set
|
426
|
+
if @api_client.config.client_side_validation && organization.nil?
|
427
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.delete_source_image"
|
428
|
+
end
|
429
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
430
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.delete_source_image, must conform to the pattern /[0-9a-z\\-]+/."
|
431
|
+
end
|
432
|
+
|
433
|
+
# verify the required parameter 'hash' is set
|
434
|
+
if @api_client.config.client_side_validation && hash.nil?
|
435
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.delete_source_image"
|
436
|
+
end
|
437
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
438
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.delete_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
439
|
+
end
|
440
|
+
|
441
|
+
# resource path
|
442
|
+
local_var_path = "/sourceimages/{organization}/{hash}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)
|
443
|
+
|
444
|
+
# query parameters
|
445
|
+
query_params = {}
|
446
|
+
|
447
|
+
# header parameters
|
448
|
+
header_params = {}
|
449
|
+
|
450
|
+
# form parameters
|
451
|
+
form_params = {}
|
452
|
+
|
453
|
+
# http body (model)
|
454
|
+
post_body = nil
|
455
|
+
auth_names = ['ApiKeyAuth']
|
456
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
457
|
+
:header_params => header_params,
|
458
|
+
:query_params => query_params,
|
459
|
+
:form_params => form_params,
|
460
|
+
:body => post_body,
|
461
|
+
:auth_names => auth_names)
|
462
|
+
if @api_client.config.debugging
|
463
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#delete_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
464
|
+
end
|
465
|
+
return data, status_code, headers
|
466
|
+
end
|
467
|
+
|
468
|
+
# Deletes a specific dynamic meta data.
|
469
|
+
# This changes the hash of the image. The response provides the new location of the image in the Location header.
|
470
|
+
# @param organization
|
471
|
+
# @param hash
|
472
|
+
# @param meta_name
|
473
|
+
# @param [Hash] opts the optional parameters
|
474
|
+
# @option opts [BOOLEAN] :delete_previous If the image with the original hash should be deleted (default to false)
|
475
|
+
# @return [SourceImage]
|
476
|
+
def delete_source_image_meta_dynamic_with_name(organization, hash, meta_name, opts = {})
|
477
|
+
data, _status_code, _headers = delete_source_image_meta_dynamic_with_name_with_http_info(organization, hash, meta_name, opts)
|
478
|
+
return data
|
479
|
+
end
|
480
|
+
|
481
|
+
# Deletes a specific dynamic meta data.
|
482
|
+
# This changes the hash of the image. The response provides the new location of the image in the Location header.
|
483
|
+
# @param organization
|
484
|
+
# @param hash
|
485
|
+
# @param meta_name
|
486
|
+
# @param [Hash] opts the optional parameters
|
487
|
+
# @option opts [BOOLEAN] :delete_previous If the image with the original hash should be deleted
|
488
|
+
# @return [Array<(SourceImage, Fixnum, Hash)>] SourceImage data, response status code and response headers
|
489
|
+
def delete_source_image_meta_dynamic_with_name_with_http_info(organization, hash, meta_name, opts = {})
|
490
|
+
if @api_client.config.debugging
|
491
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.delete_source_image_meta_dynamic_with_name ..."
|
492
|
+
end
|
493
|
+
# verify the required parameter 'organization' is set
|
494
|
+
if @api_client.config.client_side_validation && organization.nil?
|
495
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name"
|
496
|
+
end
|
497
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
498
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name, must conform to the pattern /[0-9a-z\\-]+/."
|
499
|
+
end
|
500
|
+
|
501
|
+
# verify the required parameter 'hash' is set
|
502
|
+
if @api_client.config.client_side_validation && hash.nil?
|
503
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name"
|
504
|
+
end
|
505
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
506
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
507
|
+
end
|
508
|
+
|
509
|
+
# verify the required parameter 'meta_name' is set
|
510
|
+
if @api_client.config.client_side_validation && meta_name.nil?
|
511
|
+
fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name"
|
512
|
+
end
|
513
|
+
if @api_client.config.client_side_validation && meta_name !~ Regexp.new(/[a-zA-Z_]+/)
|
514
|
+
fail ArgumentError, "invalid value for 'meta_name' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name, must conform to the pattern /[a-zA-Z_]+/."
|
515
|
+
end
|
516
|
+
|
517
|
+
# resource path
|
518
|
+
local_var_path = "/sourceimages/{organization}/{hash}/meta/dynamic/{metaName}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s).sub('{' + 'metaName' + '}', meta_name.to_s)
|
519
|
+
|
520
|
+
# query parameters
|
521
|
+
query_params = {}
|
522
|
+
query_params[:'deletePrevious'] = opts[:'delete_previous'] if !opts[:'delete_previous'].nil?
|
523
|
+
|
524
|
+
# header parameters
|
525
|
+
header_params = {}
|
526
|
+
|
527
|
+
# form parameters
|
528
|
+
form_params = {}
|
529
|
+
|
530
|
+
# http body (model)
|
531
|
+
post_body = nil
|
532
|
+
auth_names = ['ApiKeyAuth']
|
533
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
534
|
+
:header_params => header_params,
|
535
|
+
:query_params => query_params,
|
536
|
+
:form_params => form_params,
|
537
|
+
:body => post_body,
|
538
|
+
:auth_names => auth_names,
|
539
|
+
:return_type => 'SourceImage')
|
540
|
+
if @api_client.config.debugging
|
541
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#delete_source_image_meta_dynamic_with_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
542
|
+
end
|
543
|
+
return data, status_code, headers
|
544
|
+
end
|
545
|
+
|
546
|
+
# Deletes all user meta data.
|
547
|
+
# User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
|
548
|
+
# @param organization
|
549
|
+
# @param hash
|
550
|
+
# @param [Hash] opts the optional parameters
|
551
|
+
# @return [nil]
|
552
|
+
def delete_source_image_meta_user(organization, hash, opts = {})
|
553
|
+
delete_source_image_meta_user_with_http_info(organization, hash, opts)
|
554
|
+
return nil
|
555
|
+
end
|
556
|
+
|
557
|
+
# Deletes all user meta data.
|
558
|
+
# User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
|
559
|
+
# @param organization
|
560
|
+
# @param hash
|
561
|
+
# @param [Hash] opts the optional parameters
|
562
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
563
|
+
def delete_source_image_meta_user_with_http_info(organization, hash, opts = {})
|
564
|
+
if @api_client.config.debugging
|
565
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.delete_source_image_meta_user ..."
|
566
|
+
end
|
567
|
+
# verify the required parameter 'organization' is set
|
568
|
+
if @api_client.config.client_side_validation && organization.nil?
|
569
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.delete_source_image_meta_user"
|
570
|
+
end
|
571
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
572
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.delete_source_image_meta_user, must conform to the pattern /[0-9a-z\\-]+/."
|
573
|
+
end
|
574
|
+
|
575
|
+
# verify the required parameter 'hash' is set
|
576
|
+
if @api_client.config.client_side_validation && hash.nil?
|
577
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.delete_source_image_meta_user"
|
578
|
+
end
|
579
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
580
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.delete_source_image_meta_user, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
581
|
+
end
|
582
|
+
|
583
|
+
# resource path
|
584
|
+
local_var_path = "/sourceimages/{organization}/{hash}/meta/user".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)
|
585
|
+
|
586
|
+
# query parameters
|
587
|
+
query_params = {}
|
588
|
+
|
589
|
+
# header parameters
|
590
|
+
header_params = {}
|
591
|
+
|
592
|
+
# form parameters
|
593
|
+
form_params = {}
|
594
|
+
|
595
|
+
# http body (model)
|
596
|
+
post_body = nil
|
597
|
+
auth_names = ['ApiKeyAuth']
|
598
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
599
|
+
:header_params => header_params,
|
600
|
+
:query_params => query_params,
|
601
|
+
:form_params => form_params,
|
602
|
+
:body => post_body,
|
603
|
+
:auth_names => auth_names)
|
604
|
+
if @api_client.config.debugging
|
605
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#delete_source_image_meta_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
606
|
+
end
|
607
|
+
return data, status_code, headers
|
608
|
+
end
|
609
|
+
|
610
|
+
# Deletes user meta data for a specified field.
|
611
|
+
# User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
|
612
|
+
# @param organization
|
613
|
+
# @param hash
|
614
|
+
# @param meta_name
|
615
|
+
# @param [Hash] opts the optional parameters
|
616
|
+
# @return [nil]
|
617
|
+
def delete_source_image_meta_user_with_name(organization, hash, meta_name, opts = {})
|
618
|
+
delete_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts)
|
619
|
+
return nil
|
620
|
+
end
|
621
|
+
|
622
|
+
# Deletes user meta data for a specified field.
|
623
|
+
# User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
|
624
|
+
# @param organization
|
625
|
+
# @param hash
|
626
|
+
# @param meta_name
|
627
|
+
# @param [Hash] opts the optional parameters
|
628
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
629
|
+
def delete_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts = {})
|
630
|
+
if @api_client.config.debugging
|
631
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.delete_source_image_meta_user_with_name ..."
|
632
|
+
end
|
633
|
+
# verify the required parameter 'organization' is set
|
634
|
+
if @api_client.config.client_side_validation && organization.nil?
|
635
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.delete_source_image_meta_user_with_name"
|
636
|
+
end
|
637
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
638
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.delete_source_image_meta_user_with_name, must conform to the pattern /[0-9a-z\\-]+/."
|
639
|
+
end
|
640
|
+
|
641
|
+
# verify the required parameter 'hash' is set
|
642
|
+
if @api_client.config.client_side_validation && hash.nil?
|
643
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.delete_source_image_meta_user_with_name"
|
644
|
+
end
|
645
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
646
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.delete_source_image_meta_user_with_name, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
647
|
+
end
|
648
|
+
|
649
|
+
# verify the required parameter 'meta_name' is set
|
650
|
+
if @api_client.config.client_side_validation && meta_name.nil?
|
651
|
+
fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.delete_source_image_meta_user_with_name"
|
652
|
+
end
|
653
|
+
if @api_client.config.client_side_validation && meta_name !~ Regexp.new(/[a-zA-Z0-9_-]+/)
|
654
|
+
fail ArgumentError, "invalid value for 'meta_name' when calling SourceimagesApi.delete_source_image_meta_user_with_name, must conform to the pattern /[a-zA-Z0-9_-]+/."
|
655
|
+
end
|
656
|
+
|
657
|
+
# resource path
|
658
|
+
local_var_path = "/sourceimages/{organization}/{hash}/meta/user/{metaName}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s).sub('{' + 'metaName' + '}', meta_name.to_s)
|
659
|
+
|
660
|
+
# query parameters
|
661
|
+
query_params = {}
|
662
|
+
|
663
|
+
# header parameters
|
664
|
+
header_params = {}
|
665
|
+
|
666
|
+
# form parameters
|
667
|
+
form_params = {}
|
668
|
+
|
669
|
+
# http body (model)
|
670
|
+
post_body = nil
|
671
|
+
auth_names = ['ApiKeyAuth']
|
672
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
673
|
+
:header_params => header_params,
|
674
|
+
:query_params => query_params,
|
675
|
+
:form_params => form_params,
|
676
|
+
:body => post_body,
|
677
|
+
:auth_names => auth_names)
|
678
|
+
if @api_client.config.debugging
|
679
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#delete_source_image_meta_user_with_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
680
|
+
end
|
681
|
+
return data, status_code, headers
|
682
|
+
end
|
683
|
+
|
684
|
+
# Download original source image binary.
|
685
|
+
#
|
686
|
+
# @param organization
|
687
|
+
# @param hash
|
688
|
+
# @param [Hash] opts the optional parameters
|
689
|
+
# @return [File]
|
690
|
+
def download_source_image(organization, hash, opts = {})
|
691
|
+
data, _status_code, _headers = download_source_image_with_http_info(organization, hash, opts)
|
692
|
+
return data
|
693
|
+
end
|
694
|
+
|
695
|
+
# Download original source image binary.
|
696
|
+
#
|
697
|
+
# @param organization
|
698
|
+
# @param hash
|
699
|
+
# @param [Hash] opts the optional parameters
|
700
|
+
# @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
|
701
|
+
def download_source_image_with_http_info(organization, hash, opts = {})
|
702
|
+
if @api_client.config.debugging
|
703
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.download_source_image ..."
|
704
|
+
end
|
705
|
+
# verify the required parameter 'organization' is set
|
706
|
+
if @api_client.config.client_side_validation && organization.nil?
|
707
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.download_source_image"
|
708
|
+
end
|
709
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
710
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.download_source_image, must conform to the pattern /[0-9a-z\\-]+/."
|
711
|
+
end
|
712
|
+
|
713
|
+
# verify the required parameter 'hash' is set
|
714
|
+
if @api_client.config.client_side_validation && hash.nil?
|
715
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.download_source_image"
|
716
|
+
end
|
717
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
718
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.download_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
719
|
+
end
|
720
|
+
|
721
|
+
# resource path
|
722
|
+
local_var_path = "/sourceimages/{organization}/{hash}/download".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)
|
723
|
+
|
724
|
+
# query parameters
|
725
|
+
query_params = {}
|
726
|
+
|
727
|
+
# header parameters
|
728
|
+
header_params = {}
|
729
|
+
|
730
|
+
# form parameters
|
731
|
+
form_params = {}
|
732
|
+
|
733
|
+
# http body (model)
|
734
|
+
post_body = nil
|
735
|
+
auth_names = ['ApiKeyAuth']
|
736
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
737
|
+
:header_params => header_params,
|
738
|
+
:query_params => query_params,
|
739
|
+
:form_params => form_params,
|
740
|
+
:body => post_body,
|
741
|
+
:auth_names => auth_names,
|
742
|
+
:return_type => 'File')
|
743
|
+
if @api_client.config.debugging
|
744
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#download_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
745
|
+
end
|
746
|
+
return data, status_code, headers
|
747
|
+
end
|
748
|
+
|
749
|
+
# Get information about a source image.
|
750
|
+
#
|
751
|
+
# @param organization
|
752
|
+
# @param hash
|
753
|
+
# @param [Hash] opts the optional parameters
|
754
|
+
# @return [SourceImage]
|
755
|
+
def get_source_image(organization, hash, opts = {})
|
756
|
+
data, _status_code, _headers = get_source_image_with_http_info(organization, hash, opts)
|
757
|
+
return data
|
758
|
+
end
|
759
|
+
|
760
|
+
# Get information about a source image.
|
761
|
+
#
|
762
|
+
# @param organization
|
763
|
+
# @param hash
|
764
|
+
# @param [Hash] opts the optional parameters
|
765
|
+
# @return [Array<(SourceImage, Fixnum, Hash)>] SourceImage data, response status code and response headers
|
766
|
+
def get_source_image_with_http_info(organization, hash, opts = {})
|
767
|
+
if @api_client.config.debugging
|
768
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.get_source_image ..."
|
769
|
+
end
|
770
|
+
# verify the required parameter 'organization' is set
|
771
|
+
if @api_client.config.client_side_validation && organization.nil?
|
772
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.get_source_image"
|
773
|
+
end
|
774
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
775
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.get_source_image, must conform to the pattern /[0-9a-z\\-]+/."
|
776
|
+
end
|
777
|
+
|
778
|
+
# verify the required parameter 'hash' is set
|
779
|
+
if @api_client.config.client_side_validation && hash.nil?
|
780
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.get_source_image"
|
781
|
+
end
|
782
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
783
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.get_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
784
|
+
end
|
785
|
+
|
786
|
+
# resource path
|
787
|
+
local_var_path = "/sourceimages/{organization}/{hash}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)
|
788
|
+
|
789
|
+
# query parameters
|
790
|
+
query_params = {}
|
791
|
+
|
792
|
+
# header parameters
|
793
|
+
header_params = {}
|
794
|
+
|
795
|
+
# form parameters
|
796
|
+
form_params = {}
|
797
|
+
|
798
|
+
# http body (model)
|
799
|
+
post_body = nil
|
800
|
+
auth_names = ['ApiKeyAuth']
|
801
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
802
|
+
:header_params => header_params,
|
803
|
+
:query_params => query_params,
|
804
|
+
:form_params => form_params,
|
805
|
+
:body => post_body,
|
806
|
+
:auth_names => auth_names,
|
807
|
+
:return_type => 'SourceImage')
|
808
|
+
if @api_client.config.debugging
|
809
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#get_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
810
|
+
end
|
811
|
+
return data, status_code, headers
|
812
|
+
end
|
813
|
+
|
814
|
+
# Get all user meta data.
|
815
|
+
#
|
816
|
+
# @param organization
|
817
|
+
# @param hash
|
818
|
+
# @param [Hash] opts the optional parameters
|
819
|
+
# @return [Object]
|
820
|
+
def get_source_image_meta_user(organization, hash, opts = {})
|
821
|
+
data, _status_code, _headers = get_source_image_meta_user_with_http_info(organization, hash, opts)
|
822
|
+
return data
|
823
|
+
end
|
824
|
+
|
825
|
+
# Get all user meta data.
|
826
|
+
#
|
827
|
+
# @param organization
|
828
|
+
# @param hash
|
829
|
+
# @param [Hash] opts the optional parameters
|
830
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
831
|
+
def get_source_image_meta_user_with_http_info(organization, hash, opts = {})
|
832
|
+
if @api_client.config.debugging
|
833
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.get_source_image_meta_user ..."
|
834
|
+
end
|
835
|
+
# verify the required parameter 'organization' is set
|
836
|
+
if @api_client.config.client_side_validation && organization.nil?
|
837
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.get_source_image_meta_user"
|
838
|
+
end
|
839
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
840
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.get_source_image_meta_user, must conform to the pattern /[0-9a-z\\-]+/."
|
841
|
+
end
|
842
|
+
|
843
|
+
# verify the required parameter 'hash' is set
|
844
|
+
if @api_client.config.client_side_validation && hash.nil?
|
845
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.get_source_image_meta_user"
|
846
|
+
end
|
847
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
848
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.get_source_image_meta_user, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
849
|
+
end
|
850
|
+
|
851
|
+
# resource path
|
852
|
+
local_var_path = "/sourceimages/{organization}/{hash}/meta/user".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)
|
853
|
+
|
854
|
+
# query parameters
|
855
|
+
query_params = {}
|
856
|
+
|
857
|
+
# header parameters
|
858
|
+
header_params = {}
|
859
|
+
|
860
|
+
# form parameters
|
861
|
+
form_params = {}
|
862
|
+
|
863
|
+
# http body (model)
|
864
|
+
post_body = nil
|
865
|
+
auth_names = ['ApiKeyAuth']
|
866
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
867
|
+
:header_params => header_params,
|
868
|
+
:query_params => query_params,
|
869
|
+
:form_params => form_params,
|
870
|
+
:body => post_body,
|
871
|
+
:auth_names => auth_names,
|
872
|
+
:return_type => 'Object')
|
873
|
+
if @api_client.config.debugging
|
874
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#get_source_image_meta_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
875
|
+
end
|
876
|
+
return data, status_code, headers
|
877
|
+
end
|
878
|
+
|
879
|
+
# Get user meta for a specific field.
|
880
|
+
#
|
881
|
+
# @param organization
|
882
|
+
# @param hash
|
883
|
+
# @param meta_name
|
884
|
+
# @param [Hash] opts the optional parameters
|
885
|
+
# @return [String]
|
886
|
+
def get_source_image_meta_user_with_name(organization, hash, meta_name, opts = {})
|
887
|
+
data, _status_code, _headers = get_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts)
|
888
|
+
return data
|
889
|
+
end
|
890
|
+
|
891
|
+
# Get user meta for a specific field.
|
892
|
+
#
|
893
|
+
# @param organization
|
894
|
+
# @param hash
|
895
|
+
# @param meta_name
|
896
|
+
# @param [Hash] opts the optional parameters
|
897
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
898
|
+
def get_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts = {})
|
899
|
+
if @api_client.config.debugging
|
900
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.get_source_image_meta_user_with_name ..."
|
901
|
+
end
|
902
|
+
# verify the required parameter 'organization' is set
|
903
|
+
if @api_client.config.client_side_validation && organization.nil?
|
904
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.get_source_image_meta_user_with_name"
|
905
|
+
end
|
906
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
907
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.get_source_image_meta_user_with_name, must conform to the pattern /[0-9a-z\\-]+/."
|
908
|
+
end
|
909
|
+
|
910
|
+
# verify the required parameter 'hash' is set
|
911
|
+
if @api_client.config.client_side_validation && hash.nil?
|
912
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.get_source_image_meta_user_with_name"
|
913
|
+
end
|
914
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
915
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.get_source_image_meta_user_with_name, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
916
|
+
end
|
917
|
+
|
918
|
+
# verify the required parameter 'meta_name' is set
|
919
|
+
if @api_client.config.client_side_validation && meta_name.nil?
|
920
|
+
fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.get_source_image_meta_user_with_name"
|
921
|
+
end
|
922
|
+
if @api_client.config.client_side_validation && meta_name !~ Regexp.new(/[a-zA-Z0-9_-]+/)
|
923
|
+
fail ArgumentError, "invalid value for 'meta_name' when calling SourceimagesApi.get_source_image_meta_user_with_name, must conform to the pattern /[a-zA-Z0-9_-]+/."
|
924
|
+
end
|
925
|
+
|
926
|
+
# resource path
|
927
|
+
local_var_path = "/sourceimages/{organization}/{hash}/meta/user/{metaName}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s).sub('{' + 'metaName' + '}', meta_name.to_s)
|
928
|
+
|
929
|
+
# query parameters
|
930
|
+
query_params = {}
|
931
|
+
|
932
|
+
# header parameters
|
933
|
+
header_params = {}
|
934
|
+
|
935
|
+
# form parameters
|
936
|
+
form_params = {}
|
937
|
+
|
938
|
+
# http body (model)
|
939
|
+
post_body = nil
|
940
|
+
auth_names = ['ApiKeyAuth']
|
941
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
942
|
+
:header_params => header_params,
|
943
|
+
:query_params => query_params,
|
944
|
+
:form_params => form_params,
|
945
|
+
:body => post_body,
|
946
|
+
:auth_names => auth_names,
|
947
|
+
:return_type => 'String')
|
948
|
+
if @api_client.config.debugging
|
949
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#get_source_image_meta_user_with_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
950
|
+
end
|
951
|
+
return data, status_code, headers
|
952
|
+
end
|
953
|
+
|
954
|
+
# Get all images of an organization, with paging.
|
955
|
+
# You can also filter and sort by their metadata. See the API reference for more in depth documentation about this.
|
956
|
+
# @param organization
|
957
|
+
# @param [Hash] opts the optional parameters
|
958
|
+
# @option opts [String] :offset When paging results, where to start or a cursor (default to 0)
|
959
|
+
# @option opts [Integer] :limit How many images should be returned (default to 100)
|
960
|
+
# @option opts [String] :sort The field to be used for sorting (default to created desc)
|
961
|
+
# @option opts [BOOLEAN] :deleted Search for deleted images (default to false)
|
962
|
+
# @return [ListSourceImagesResponse]
|
963
|
+
def list_source_images(organization, opts = {})
|
964
|
+
data, _status_code, _headers = list_source_images_with_http_info(organization, opts)
|
965
|
+
return data
|
966
|
+
end
|
967
|
+
|
968
|
+
# Get all images of an organization, with paging.
|
969
|
+
# You can also filter and sort by their metadata. See the API reference for more in depth documentation about this.
|
970
|
+
# @param organization
|
971
|
+
# @param [Hash] opts the optional parameters
|
972
|
+
# @option opts [String] :offset When paging results, where to start or a cursor
|
973
|
+
# @option opts [Integer] :limit How many images should be returned
|
974
|
+
# @option opts [String] :sort The field to be used for sorting
|
975
|
+
# @option opts [BOOLEAN] :deleted Search for deleted images
|
976
|
+
# @return [Array<(ListSourceImagesResponse, Fixnum, Hash)>] ListSourceImagesResponse data, response status code and response headers
|
977
|
+
def list_source_images_with_http_info(organization, opts = {})
|
978
|
+
if @api_client.config.debugging
|
979
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.list_source_images ..."
|
980
|
+
end
|
981
|
+
# verify the required parameter 'organization' is set
|
982
|
+
if @api_client.config.client_side_validation && organization.nil?
|
983
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.list_source_images"
|
984
|
+
end
|
985
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
986
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.list_source_images, must conform to the pattern /[0-9a-z\\-]+/."
|
987
|
+
end
|
988
|
+
|
989
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 2000
|
990
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SourceimagesApi.list_source_images, must be smaller than or equal to 2000.'
|
991
|
+
end
|
992
|
+
|
993
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
|
994
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SourceimagesApi.list_source_images, must be greater than or equal to 0.'
|
995
|
+
end
|
996
|
+
|
997
|
+
# resource path
|
998
|
+
local_var_path = "/sourceimages/{organization}".sub('{' + 'organization' + '}', organization.to_s)
|
999
|
+
|
1000
|
+
# query parameters
|
1001
|
+
query_params = {}
|
1002
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
1003
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1004
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
1005
|
+
query_params[:'deleted'] = opts[:'deleted'] if !opts[:'deleted'].nil?
|
1006
|
+
|
1007
|
+
# header parameters
|
1008
|
+
header_params = {}
|
1009
|
+
|
1010
|
+
# form parameters
|
1011
|
+
form_params = {}
|
1012
|
+
|
1013
|
+
# http body (model)
|
1014
|
+
post_body = nil
|
1015
|
+
auth_names = ['ApiKeyAuth']
|
1016
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1017
|
+
:header_params => header_params,
|
1018
|
+
:query_params => query_params,
|
1019
|
+
:form_params => form_params,
|
1020
|
+
:body => post_body,
|
1021
|
+
:auth_names => auth_names,
|
1022
|
+
:return_type => 'ListSourceImagesResponse')
|
1023
|
+
if @api_client.config.debugging
|
1024
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#list_source_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1025
|
+
end
|
1026
|
+
return data, status_code, headers
|
1027
|
+
end
|
1028
|
+
|
1029
|
+
# Get all images in this organization that match a binaryhash.
|
1030
|
+
# The binary hash is the sha1 of the image binary. This may yield several results if the same image has been uploaded with varying dynamic metadata.
|
1031
|
+
# @param organization
|
1032
|
+
# @param binary_hash
|
1033
|
+
# @param [Hash] opts the optional parameters
|
1034
|
+
# @return [ListSourceImagesResponse]
|
1035
|
+
def list_source_images_by_binary_hash(organization, binary_hash, opts = {})
|
1036
|
+
data, _status_code, _headers = list_source_images_by_binary_hash_with_http_info(organization, binary_hash, opts)
|
1037
|
+
return data
|
1038
|
+
end
|
1039
|
+
|
1040
|
+
# Get all images in this organization that match a binaryhash.
|
1041
|
+
# The binary hash is the sha1 of the image binary. This may yield several results if the same image has been uploaded with varying dynamic metadata.
|
1042
|
+
# @param organization
|
1043
|
+
# @param binary_hash
|
1044
|
+
# @param [Hash] opts the optional parameters
|
1045
|
+
# @return [Array<(ListSourceImagesResponse, Fixnum, Hash)>] ListSourceImagesResponse data, response status code and response headers
|
1046
|
+
def list_source_images_by_binary_hash_with_http_info(organization, binary_hash, opts = {})
|
1047
|
+
if @api_client.config.debugging
|
1048
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.list_source_images_by_binary_hash ..."
|
1049
|
+
end
|
1050
|
+
# verify the required parameter 'organization' is set
|
1051
|
+
if @api_client.config.client_side_validation && organization.nil?
|
1052
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.list_source_images_by_binary_hash"
|
1053
|
+
end
|
1054
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
1055
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.list_source_images_by_binary_hash, must conform to the pattern /[0-9a-z\\-]+/."
|
1056
|
+
end
|
1057
|
+
|
1058
|
+
# verify the required parameter 'binary_hash' is set
|
1059
|
+
if @api_client.config.client_side_validation && binary_hash.nil?
|
1060
|
+
fail ArgumentError, "Missing the required parameter 'binary_hash' when calling SourceimagesApi.list_source_images_by_binary_hash"
|
1061
|
+
end
|
1062
|
+
# resource path
|
1063
|
+
local_var_path = "/sourceimages/{organization}/binaryhash/{binaryHash}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'binaryHash' + '}', binary_hash.to_s)
|
1064
|
+
|
1065
|
+
# query parameters
|
1066
|
+
query_params = {}
|
1067
|
+
|
1068
|
+
# header parameters
|
1069
|
+
header_params = {}
|
1070
|
+
|
1071
|
+
# form parameters
|
1072
|
+
form_params = {}
|
1073
|
+
|
1074
|
+
# http body (model)
|
1075
|
+
post_body = nil
|
1076
|
+
auth_names = ['ApiKeyAuth']
|
1077
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1078
|
+
:header_params => header_params,
|
1079
|
+
:query_params => query_params,
|
1080
|
+
:form_params => form_params,
|
1081
|
+
:body => post_body,
|
1082
|
+
:auth_names => auth_names,
|
1083
|
+
:return_type => 'ListSourceImagesResponse')
|
1084
|
+
if @api_client.config.debugging
|
1085
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#list_source_images_by_binary_hash\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1086
|
+
end
|
1087
|
+
return data, status_code, headers
|
1088
|
+
end
|
1089
|
+
|
1090
|
+
# Update the specified meta data fields for an image.
|
1091
|
+
# This only overwrites the fields specified in the request, but leaves existing meta data with different names unchanged. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
|
1092
|
+
# @param user_meta_data User Meta Data as a json hashmap
|
1093
|
+
# @param organization
|
1094
|
+
# @param hash
|
1095
|
+
# @param [Hash] opts the optional parameters
|
1096
|
+
# @return [nil]
|
1097
|
+
def patch_source_image_meta_user(user_meta_data, organization, hash, opts = {})
|
1098
|
+
patch_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts)
|
1099
|
+
return nil
|
1100
|
+
end
|
1101
|
+
|
1102
|
+
# Update the specified meta data fields for an image.
|
1103
|
+
# This only overwrites the fields specified in the request, but leaves existing meta data with different names unchanged. User metadata is used for searching images that have been stored in rokka. It will never lead to differences in the output image and thus changing it never leads to a new hash.
|
1104
|
+
# @param user_meta_data User Meta Data as a json hashmap
|
1105
|
+
# @param organization
|
1106
|
+
# @param hash
|
1107
|
+
# @param [Hash] opts the optional parameters
|
1108
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
1109
|
+
def patch_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts = {})
|
1110
|
+
if @api_client.config.debugging
|
1111
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.patch_source_image_meta_user ..."
|
1112
|
+
end
|
1113
|
+
# verify the required parameter 'user_meta_data' is set
|
1114
|
+
if @api_client.config.client_side_validation && user_meta_data.nil?
|
1115
|
+
fail ArgumentError, "Missing the required parameter 'user_meta_data' when calling SourceimagesApi.patch_source_image_meta_user"
|
1116
|
+
end
|
1117
|
+
# verify the required parameter 'organization' is set
|
1118
|
+
if @api_client.config.client_side_validation && organization.nil?
|
1119
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.patch_source_image_meta_user"
|
1120
|
+
end
|
1121
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
1122
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.patch_source_image_meta_user, must conform to the pattern /[0-9a-z\\-]+/."
|
1123
|
+
end
|
1124
|
+
|
1125
|
+
# verify the required parameter 'hash' is set
|
1126
|
+
if @api_client.config.client_side_validation && hash.nil?
|
1127
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.patch_source_image_meta_user"
|
1128
|
+
end
|
1129
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
1130
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.patch_source_image_meta_user, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
1131
|
+
end
|
1132
|
+
|
1133
|
+
# resource path
|
1134
|
+
local_var_path = "/sourceimages/{organization}/{hash}/meta/user".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)
|
1135
|
+
|
1136
|
+
# query parameters
|
1137
|
+
query_params = {}
|
1138
|
+
|
1139
|
+
# header parameters
|
1140
|
+
header_params = {}
|
1141
|
+
|
1142
|
+
# form parameters
|
1143
|
+
form_params = {}
|
1144
|
+
|
1145
|
+
# http body (model)
|
1146
|
+
post_body = @api_client.object_to_http_body(user_meta_data)
|
1147
|
+
auth_names = ['ApiKeyAuth']
|
1148
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
1149
|
+
:header_params => header_params,
|
1150
|
+
:query_params => query_params,
|
1151
|
+
:form_params => form_params,
|
1152
|
+
:body => post_body,
|
1153
|
+
:auth_names => auth_names)
|
1154
|
+
if @api_client.config.debugging
|
1155
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#patch_source_image_meta_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1156
|
+
end
|
1157
|
+
return data, status_code, headers
|
1158
|
+
end
|
1159
|
+
|
1160
|
+
# Restore source image including previously set metadata.
|
1161
|
+
# If the image has been deleted but not yet purged from the system, it is restored. If an image with this hash already exists and is not deleted, information about that image is returned.
|
1162
|
+
# @param organization
|
1163
|
+
# @param hash
|
1164
|
+
# @param [Hash] opts the optional parameters
|
1165
|
+
# @return [SourceImage]
|
1166
|
+
def restore_source_image(organization, hash, opts = {})
|
1167
|
+
data, _status_code, _headers = restore_source_image_with_http_info(organization, hash, opts)
|
1168
|
+
return data
|
1169
|
+
end
|
1170
|
+
|
1171
|
+
# Restore source image including previously set metadata.
|
1172
|
+
# If the image has been deleted but not yet purged from the system, it is restored. If an image with this hash already exists and is not deleted, information about that image is returned.
|
1173
|
+
# @param organization
|
1174
|
+
# @param hash
|
1175
|
+
# @param [Hash] opts the optional parameters
|
1176
|
+
# @return [Array<(SourceImage, Fixnum, Hash)>] SourceImage data, response status code and response headers
|
1177
|
+
def restore_source_image_with_http_info(organization, hash, opts = {})
|
1178
|
+
if @api_client.config.debugging
|
1179
|
+
@api_client.config.logger.debug "Calling API: SourceimagesApi.restore_source_image ..."
|
1180
|
+
end
|
1181
|
+
# verify the required parameter 'organization' is set
|
1182
|
+
if @api_client.config.client_side_validation && organization.nil?
|
1183
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.restore_source_image"
|
1184
|
+
end
|
1185
|
+
if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
|
1186
|
+
fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.restore_source_image, must conform to the pattern /[0-9a-z\\-]+/."
|
1187
|
+
end
|
1188
|
+
|
1189
|
+
# verify the required parameter 'hash' is set
|
1190
|
+
if @api_client.config.client_side_validation && hash.nil?
|
1191
|
+
fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.restore_source_image"
|
1192
|
+
end
|
1193
|
+
if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
|
1194
|
+
fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.restore_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/."
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
# resource path
|
1198
|
+
local_var_path = "/sourceimages/{organization}/{hash}/restore".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)
|
1199
|
+
|
1200
|
+
# query parameters
|
1201
|
+
query_params = {}
|
1202
|
+
|
1203
|
+
# header parameters
|
1204
|
+
header_params = {}
|
1205
|
+
|
1206
|
+
# form parameters
|
1207
|
+
form_params = {}
|
1208
|
+
|
1209
|
+
# http body (model)
|
1210
|
+
post_body = nil
|
1211
|
+
auth_names = ['ApiKeyAuth']
|
1212
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1213
|
+
:header_params => header_params,
|
1214
|
+
:query_params => query_params,
|
1215
|
+
:form_params => form_params,
|
1216
|
+
:body => post_body,
|
1217
|
+
:auth_names => auth_names,
|
1218
|
+
:return_type => 'SourceImage')
|
1219
|
+
if @api_client.config.debugging
|
1220
|
+
@api_client.config.logger.debug "API called: SourceimagesApi#restore_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1221
|
+
end
|
1222
|
+
return data, status_code, headers
|
1223
|
+
end
|
1224
|
+
end
|
1225
|
+
end
|