class RokkaClientCodegen::SourceimagesApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

copy_source_image(destination, organization, hash, opts = {}) click to toggle source

Copy a single source image to another org. 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. @param destination The destination organization @param organization @param hash @param [Hash] opts the optional parameters @option opts [String] :overwrite If set to 'F', existing images won't be overwritten. @return [nil]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 31
def copy_source_image(destination, organization, hash, opts = {})
  copy_source_image_with_http_info(destination, organization, hash, opts)
  return nil
end
copy_source_image_with_http_info(destination, organization, hash, opts = {}) click to toggle source

Copy a single source image to another org. 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. @param destination The destination organization @param organization @param hash @param [Hash] opts the optional parameters @option opts [String] :overwrite If set to &#39;F&#39;, existing images won&#39;t be overwritten. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 44
def copy_source_image_with_http_info(destination, organization, hash, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.copy_source_image ..."
  end
  # verify the required parameter 'destination' is set
  if @api_client.config.client_side_validation && destination.nil?
    fail ArgumentError, "Missing the required parameter 'destination' when calling SourceimagesApi.copy_source_image"
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.copy_source_image"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.copy_source_image, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.copy_source_image"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.copy_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/."
  end

  if @api_client.config.client_side_validation && opts[:'overwrite'] && !['', ' F'].include?(opts[:'overwrite'])
    fail ArgumentError, 'invalid value for "overwrite", must be one of ,  F'
  end
  # resource path
  local_var_path = "/sourceimages/{organization}/{hash}/copy".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  header_params[:'Destination'] = destination
  header_params[:'Overwrite'] = opts[:'overwrite'] if !opts[:'overwrite'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#copy_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_source_image(filedata, organization, opts = {}) click to toggle source

Upload new source images. 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. @param filedata The binary images @param organization @param [Hash] opts the optional parameters @option opts [String] :meta_dynamic JSON metadata about the image, e.g. subject area. See rokka.io/documentation/references/dynamic-metadata.html @option opts [String] :meta_user User specific JSON metadata that can be used when searching source images. See rokka.io/documentation/references/user-metadata.html @return [ListSourceImagesResponse]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 108
def create_source_image(filedata, organization, opts = {})
  data, _status_code, _headers = create_source_image_with_http_info(filedata, organization, opts)
  return data
end
create_source_image_meta_dynamic_with_name(meta_dynamic_definition, organization, hash, meta_name, opts = {}) click to toggle source

Adds or updates a specific dynamic meta data for an image. This changes the hash of the image. The response provides the new location of the image in the Location header. @param meta_dynamic_definition Dynamic Meta Data definition @param organization @param hash @param meta_name @param [Hash] opts the optional parameters @option opts [BOOLEAN] :delete_previous If the image with the original hash should be deleted (default to false) @return [SourceImage]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 179
def create_source_image_meta_dynamic_with_name(meta_dynamic_definition, organization, hash, meta_name, opts = {})
  data, _status_code, _headers = create_source_image_meta_dynamic_with_name_with_http_info(meta_dynamic_definition, organization, hash, meta_name, opts)
  return data
end
create_source_image_meta_dynamic_with_name_with_http_info(meta_dynamic_definition, organization, hash, meta_name, opts = {}) click to toggle source

Adds or updates a specific dynamic meta data for an image. This changes the hash of the image. The response provides the new location of the image in the Location header. @param meta_dynamic_definition Dynamic Meta Data definition @param organization @param hash @param meta_name @param [Hash] opts the optional parameters @option opts [BOOLEAN] :delete_previous If the image with the original hash should be deleted @return [Array<(SourceImage, Fixnum, Hash)>] SourceImage data, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 193
def create_source_image_meta_dynamic_with_name_with_http_info(meta_dynamic_definition, organization, hash, meta_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.create_source_image_meta_dynamic_with_name ..."
  end
  # verify the required parameter 'meta_dynamic_definition' is set
  if @api_client.config.client_side_validation && meta_dynamic_definition.nil?
    fail ArgumentError, "Missing the required parameter 'meta_dynamic_definition' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name"
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    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}/."
  end

  # verify the required parameter 'meta_name' is set
  if @api_client.config.client_side_validation && meta_name.nil?
    fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.create_source_image_meta_dynamic_with_name"
  end
  if @api_client.config.client_side_validation && meta_name !~ Regexp.new(/[a-zA-Z_]+/)
    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_]+/."
  end

  # resource path
  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)

  # query parameters
  query_params = {}
  query_params[:'deletePrevious'] = opts[:'delete_previous'] if !opts[:'delete_previous'].nil?

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(meta_dynamic_definition)
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SourceImage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#create_source_image_meta_dynamic_with_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_source_image_meta_user(user_meta_data, organization, hash, opts = {}) click to toggle source

Replace the image meta data with new information. 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. @param user_meta_data User Meta Data as a json hashmap @param organization @param hash @param [Hash] opts the optional parameters @return [nil]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 261
def create_source_image_meta_user(user_meta_data, organization, hash, opts = {})
  create_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts)
  return nil
end
create_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts = {}) click to toggle source

Replace the image meta data with new information. 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. @param user_meta_data User Meta Data as a json hashmap @param organization @param hash @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 273
def create_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.create_source_image_meta_user ..."
  end
  # verify the required parameter 'user_meta_data' is set
  if @api_client.config.client_side_validation && user_meta_data.nil?
    fail ArgumentError, "Missing the required parameter 'user_meta_data' when calling SourceimagesApi.create_source_image_meta_user"
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.create_source_image_meta_user"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.create_source_image_meta_user, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.create_source_image_meta_user"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    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}/."
  end

  # resource path
  local_var_path = "/sourceimages/{organization}/{hash}/meta/user".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(user_meta_data)
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#create_source_image_meta_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_source_image_meta_user_wth_name(user_meta_data_single_field, organization, hash, meta_name, opts = {}) click to toggle source

Adds or updates one user meta data field for an image. 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. @param user_meta_data_single_field User Meta Data for a single field in json format @param organization @param hash @param meta_name @param [Hash] opts the optional parameters @return [nil]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 332
def create_source_image_meta_user_wth_name(user_meta_data_single_field, organization, hash, meta_name, opts = {})
  create_source_image_meta_user_wth_name_with_http_info(user_meta_data_single_field, organization, hash, meta_name, opts)
  return nil
end
create_source_image_meta_user_wth_name_with_http_info(user_meta_data_single_field, organization, hash, meta_name, opts = {}) click to toggle source

Adds or updates one user meta data field for an image. 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. @param user_meta_data_single_field User Meta Data for a single field in json format @param organization @param hash @param meta_name @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 345
def create_source_image_meta_user_wth_name_with_http_info(user_meta_data_single_field, organization, hash, meta_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.create_source_image_meta_user_wth_name ..."
  end
  # verify the required parameter 'user_meta_data_single_field' is set
  if @api_client.config.client_side_validation && user_meta_data_single_field.nil?
    fail ArgumentError, "Missing the required parameter 'user_meta_data_single_field' when calling SourceimagesApi.create_source_image_meta_user_wth_name"
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.create_source_image_meta_user_wth_name"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.create_source_image_meta_user_wth_name, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.create_source_image_meta_user_wth_name"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    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}/."
  end

  # verify the required parameter 'meta_name' is set
  if @api_client.config.client_side_validation && meta_name.nil?
    fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.create_source_image_meta_user_wth_name"
  end
  if @api_client.config.client_side_validation && meta_name !~ Regexp.new(/[a-zA-Z0-9_-]+/)
    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_-]+/."
  end

  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(user_meta_data_single_field)
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#create_source_image_meta_user_wth_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_source_image_with_http_info(filedata, organization, opts = {}) click to toggle source

Upload new source images. 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. @param filedata The binary images @param organization @param [Hash] opts the optional parameters @option opts [String] :meta_dynamic JSON metadata about the image, e.g. subject area. See rokka.io/documentation/references/dynamic-metadata.html @option opts [String] :meta_user User specific JSON metadata that can be used when searching source images. See rokka.io/documentation/references/user-metadata.html @return [Array<(ListSourceImagesResponse, Fixnum, Hash)>] ListSourceImagesResponse data, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 121
def create_source_image_with_http_info(filedata, organization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.create_source_image ..."
  end
  # verify the required parameter 'filedata' is set
  if @api_client.config.client_side_validation && filedata.nil?
    fail ArgumentError, "Missing the required parameter 'filedata' when calling SourceimagesApi.create_source_image"
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.create_source_image"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.create_source_image, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # resource path
  local_var_path = "/sourceimages/{organization}".sub('{' + 'organization' + '}', organization.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params["filedata"] = filedata
  form_params["meta_dynamic[]"] = opts[:'meta_dynamic'] if !opts[:'meta_dynamic'].nil?
  form_params["meta_user[]"] = opts[:'meta_user'] if !opts[:'meta_user'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ListSourceImagesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#create_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_source_image(organization, hash, opts = {}) click to toggle source

Delete a single source image.

@param organization @param hash @param [Hash] opts the optional parameters @return [nil]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 410
def delete_source_image(organization, hash, opts = {})
  delete_source_image_with_http_info(organization, hash, opts)
  return nil
end
delete_source_image_meta_dynamic_with_name(organization, hash, meta_name, opts = {}) click to toggle source

Deletes a specific dynamic meta data. This changes the hash of the image. The response provides the new location of the image in the Location header. @param organization @param hash @param meta_name @param [Hash] opts the optional parameters @option opts [BOOLEAN] :delete_previous If the image with the original hash should be deleted (default to false) @return [SourceImage]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 476
def delete_source_image_meta_dynamic_with_name(organization, hash, meta_name, opts = {})
  data, _status_code, _headers = delete_source_image_meta_dynamic_with_name_with_http_info(organization, hash, meta_name, opts)
  return data
end
delete_source_image_meta_dynamic_with_name_with_http_info(organization, hash, meta_name, opts = {}) click to toggle source

Deletes a specific dynamic meta data. This changes the hash of the image. The response provides the new location of the image in the Location header. @param organization @param hash @param meta_name @param [Hash] opts the optional parameters @option opts [BOOLEAN] :delete_previous If the image with the original hash should be deleted @return [Array<(SourceImage, Fixnum, Hash)>] SourceImage data, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 489
def delete_source_image_meta_dynamic_with_name_with_http_info(organization, hash, meta_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.delete_source_image_meta_dynamic_with_name ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    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}/."
  end

  # verify the required parameter 'meta_name' is set
  if @api_client.config.client_side_validation && meta_name.nil?
    fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.delete_source_image_meta_dynamic_with_name"
  end
  if @api_client.config.client_side_validation && meta_name !~ Regexp.new(/[a-zA-Z_]+/)
    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_]+/."
  end

  # resource path
  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)

  # query parameters
  query_params = {}
  query_params[:'deletePrevious'] = opts[:'delete_previous'] if !opts[:'delete_previous'].nil?

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SourceImage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#delete_source_image_meta_dynamic_with_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_source_image_meta_user(organization, hash, opts = {}) click to toggle source

Deletes all user meta data. 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. @param organization @param hash @param [Hash] opts the optional parameters @return [nil]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 552
def delete_source_image_meta_user(organization, hash, opts = {})
  delete_source_image_meta_user_with_http_info(organization, hash, opts)
  return nil
end
delete_source_image_meta_user_with_http_info(organization, hash, opts = {}) click to toggle source

Deletes all user meta data. 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. @param organization @param hash @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 563
def delete_source_image_meta_user_with_http_info(organization, hash, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.delete_source_image_meta_user ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.delete_source_image_meta_user"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.delete_source_image_meta_user, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.delete_source_image_meta_user"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    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}/."
  end

  # resource path
  local_var_path = "/sourceimages/{organization}/{hash}/meta/user".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#delete_source_image_meta_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_source_image_meta_user_with_name(organization, hash, meta_name, opts = {}) click to toggle source

Deletes user meta data for a specified field. 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. @param organization @param hash @param meta_name @param [Hash] opts the optional parameters @return [nil]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 617
def delete_source_image_meta_user_with_name(organization, hash, meta_name, opts = {})
  delete_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts)
  return nil
end
delete_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts = {}) click to toggle source

Deletes user meta data for a specified field. 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. @param organization @param hash @param meta_name @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 629
def delete_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.delete_source_image_meta_user_with_name ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.delete_source_image_meta_user_with_name"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.delete_source_image_meta_user_with_name, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.delete_source_image_meta_user_with_name"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    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}/."
  end

  # verify the required parameter 'meta_name' is set
  if @api_client.config.client_side_validation && meta_name.nil?
    fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.delete_source_image_meta_user_with_name"
  end
  if @api_client.config.client_side_validation && meta_name !~ Regexp.new(/[a-zA-Z0-9_-]+/)
    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_-]+/."
  end

  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#delete_source_image_meta_user_with_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_source_image_with_http_info(organization, hash, opts = {}) click to toggle source

Delete a single source image.

@param organization @param hash @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 421
def delete_source_image_with_http_info(organization, hash, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.delete_source_image ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.delete_source_image"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.delete_source_image, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.delete_source_image"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.delete_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/."
  end

  # resource path
  local_var_path = "/sourceimages/{organization}/{hash}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#delete_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
download_source_image(organization, hash, opts = {}) click to toggle source

Download original source image binary.

@param organization @param hash @param [Hash] opts the optional parameters @return [File]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 690
def download_source_image(organization, hash, opts = {})
  data, _status_code, _headers = download_source_image_with_http_info(organization, hash, opts)
  return data
end
download_source_image_with_http_info(organization, hash, opts = {}) click to toggle source

Download original source image binary.

@param organization @param hash @param [Hash] opts the optional parameters @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 701
def download_source_image_with_http_info(organization, hash, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.download_source_image ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.download_source_image"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.download_source_image, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.download_source_image"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.download_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/."
  end

  # resource path
  local_var_path = "/sourceimages/{organization}/{hash}/download".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#download_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_source_image(organization, hash, opts = {}) click to toggle source

Get information about a source image.

@param organization @param hash @param [Hash] opts the optional parameters @return [SourceImage]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 755
def get_source_image(organization, hash, opts = {})
  data, _status_code, _headers = get_source_image_with_http_info(organization, hash, opts)
  return data
end
get_source_image_meta_user(organization, hash, opts = {}) click to toggle source

Get all user meta data.

@param organization @param hash @param [Hash] opts the optional parameters @return [Object]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 820
def get_source_image_meta_user(organization, hash, opts = {})
  data, _status_code, _headers = get_source_image_meta_user_with_http_info(organization, hash, opts)
  return data
end
get_source_image_meta_user_with_http_info(organization, hash, opts = {}) click to toggle source

Get all user meta data.

@param organization @param hash @param [Hash] opts the optional parameters @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 831
def get_source_image_meta_user_with_http_info(organization, hash, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.get_source_image_meta_user ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.get_source_image_meta_user"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.get_source_image_meta_user, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.get_source_image_meta_user"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    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}/."
  end

  # resource path
  local_var_path = "/sourceimages/{organization}/{hash}/meta/user".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#get_source_image_meta_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_source_image_meta_user_with_name(organization, hash, meta_name, opts = {}) click to toggle source

Get user meta for a specific field.

@param organization @param hash @param meta_name @param [Hash] opts the optional parameters @return [String]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 886
def get_source_image_meta_user_with_name(organization, hash, meta_name, opts = {})
  data, _status_code, _headers = get_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts)
  return data
end
get_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts = {}) click to toggle source

Get user meta for a specific field.

@param organization @param hash @param meta_name @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 898
def get_source_image_meta_user_with_name_with_http_info(organization, hash, meta_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.get_source_image_meta_user_with_name ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.get_source_image_meta_user_with_name"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.get_source_image_meta_user_with_name, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.get_source_image_meta_user_with_name"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    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}/."
  end

  # verify the required parameter 'meta_name' is set
  if @api_client.config.client_side_validation && meta_name.nil?
    fail ArgumentError, "Missing the required parameter 'meta_name' when calling SourceimagesApi.get_source_image_meta_user_with_name"
  end
  if @api_client.config.client_side_validation && meta_name !~ Regexp.new(/[a-zA-Z0-9_-]+/)
    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_-]+/."
  end

  # resource path
  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)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#get_source_image_meta_user_with_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_source_image_with_http_info(organization, hash, opts = {}) click to toggle source

Get information about a source image.

@param organization @param hash @param [Hash] opts the optional parameters @return [Array<(SourceImage, Fixnum, Hash)>] SourceImage data, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 766
def get_source_image_with_http_info(organization, hash, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.get_source_image ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.get_source_image"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.get_source_image, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.get_source_image"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.get_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/."
  end

  # resource path
  local_var_path = "/sourceimages/{organization}/{hash}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SourceImage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#get_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_source_images(organization, opts = {}) click to toggle source

Get all images of an organization, with paging. You can also filter and sort by their metadata. See the API reference for more in depth documentation about this. @param organization @param [Hash] opts the optional parameters @option opts [String] :offset When paging results, where to start or a cursor (default to 0) @option opts [Integer] :limit How many images should be returned (default to 100) @option opts [String] :sort The field to be used for sorting (default to created desc) @option opts [BOOLEAN] :deleted Search for deleted images (default to false) @return [ListSourceImagesResponse]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 963
def list_source_images(organization, opts = {})
  data, _status_code, _headers = list_source_images_with_http_info(organization, opts)
  return data
end
list_source_images_by_binary_hash(organization, binary_hash, opts = {}) click to toggle source

Get all images in this organization that match a binaryhash. 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. @param organization @param binary_hash @param [Hash] opts the optional parameters @return [ListSourceImagesResponse]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 1035
def list_source_images_by_binary_hash(organization, binary_hash, opts = {})
  data, _status_code, _headers = list_source_images_by_binary_hash_with_http_info(organization, binary_hash, opts)
  return data
end
list_source_images_by_binary_hash_with_http_info(organization, binary_hash, opts = {}) click to toggle source

Get all images in this organization that match a binaryhash. 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. @param organization @param binary_hash @param [Hash] opts the optional parameters @return [Array<(ListSourceImagesResponse, Fixnum, Hash)>] ListSourceImagesResponse data, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 1046
def list_source_images_by_binary_hash_with_http_info(organization, binary_hash, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.list_source_images_by_binary_hash ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.list_source_images_by_binary_hash"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.list_source_images_by_binary_hash, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'binary_hash' is set
  if @api_client.config.client_side_validation && binary_hash.nil?
    fail ArgumentError, "Missing the required parameter 'binary_hash' when calling SourceimagesApi.list_source_images_by_binary_hash"
  end
  # resource path
  local_var_path = "/sourceimages/{organization}/binaryhash/{binaryHash}".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'binaryHash' + '}', binary_hash.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ListSourceImagesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#list_source_images_by_binary_hash\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_source_images_with_http_info(organization, opts = {}) click to toggle source

Get all images of an organization, with paging. You can also filter and sort by their metadata. See the API reference for more in depth documentation about this. @param organization @param [Hash] opts the optional parameters @option opts [String] :offset When paging results, where to start or a cursor @option opts [Integer] :limit How many images should be returned @option opts [String] :sort The field to be used for sorting @option opts [BOOLEAN] :deleted Search for deleted images @return [Array<(ListSourceImagesResponse, Fixnum, Hash)>] ListSourceImagesResponse data, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 977
def list_source_images_with_http_info(organization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.list_source_images ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.list_source_images"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.list_source_images, must conform to the pattern /[0-9a-z\\-]+/."
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 2000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SourceimagesApi.list_source_images, must be smaller than or equal to 2000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SourceimagesApi.list_source_images, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = "/sourceimages/{organization}".sub('{' + 'organization' + '}', organization.to_s)

  # query parameters
  query_params = {}
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'deleted'] = opts[:'deleted'] if !opts[:'deleted'].nil?

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ListSourceImagesResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#list_source_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_source_image_meta_user(user_meta_data, organization, hash, opts = {}) click to toggle source

Update the specified meta data fields for an image. 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. @param user_meta_data User Meta Data as a json hashmap @param organization @param hash @param [Hash] opts the optional parameters @return [nil]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 1097
def patch_source_image_meta_user(user_meta_data, organization, hash, opts = {})
  patch_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts)
  return nil
end
patch_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts = {}) click to toggle source

Update the specified meta data fields for an image. 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. @param user_meta_data User Meta Data as a json hashmap @param organization @param hash @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 1109
def patch_source_image_meta_user_with_http_info(user_meta_data, organization, hash, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.patch_source_image_meta_user ..."
  end
  # verify the required parameter 'user_meta_data' is set
  if @api_client.config.client_side_validation && user_meta_data.nil?
    fail ArgumentError, "Missing the required parameter 'user_meta_data' when calling SourceimagesApi.patch_source_image_meta_user"
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.patch_source_image_meta_user"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.patch_source_image_meta_user, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.patch_source_image_meta_user"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    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}/."
  end

  # resource path
  local_var_path = "/sourceimages/{organization}/{hash}/meta/user".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(user_meta_data)
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#patch_source_image_meta_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
restore_source_image(organization, hash, opts = {}) click to toggle source

Restore source image including previously set metadata. 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. @param organization @param hash @param [Hash] opts the optional parameters @return [SourceImage]

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 1166
def restore_source_image(organization, hash, opts = {})
  data, _status_code, _headers = restore_source_image_with_http_info(organization, hash, opts)
  return data
end
restore_source_image_with_http_info(organization, hash, opts = {}) click to toggle source

Restore source image including previously set metadata. 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. @param organization @param hash @param [Hash] opts the optional parameters @return [Array<(SourceImage, Fixnum, Hash)>] SourceImage data, response status code and response headers

# File lib/rokka_client_codegen/api/sourceimages_api.rb, line 1177
def restore_source_image_with_http_info(organization, hash, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SourceimagesApi.restore_source_image ..."
  end
  # verify the required parameter 'organization' is set
  if @api_client.config.client_side_validation && organization.nil?
    fail ArgumentError, "Missing the required parameter 'organization' when calling SourceimagesApi.restore_source_image"
  end
  if @api_client.config.client_side_validation && organization !~ Regexp.new(/[0-9a-z\\-]+/)
    fail ArgumentError, "invalid value for 'organization' when calling SourceimagesApi.restore_source_image, must conform to the pattern /[0-9a-z\\-]+/."
  end

  # verify the required parameter 'hash' is set
  if @api_client.config.client_side_validation && hash.nil?
    fail ArgumentError, "Missing the required parameter 'hash' when calling SourceimagesApi.restore_source_image"
  end
  if @api_client.config.client_side_validation && hash !~ Regexp.new(/[0-9a-fA-F]{6,40}/)
    fail ArgumentError, "invalid value for 'hash' when calling SourceimagesApi.restore_source_image, must conform to the pattern /[0-9a-fA-F]{6,40}/."
  end

  # resource path
  local_var_path = "/sourceimages/{organization}/{hash}/restore".sub('{' + 'organization' + '}', organization.to_s).sub('{' + 'hash' + '}', hash.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SourceImage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SourceimagesApi#restore_source_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end