lib/cloudsmith-api/api/packages_api.rb in cloudsmith-api-0.21.4 vs lib/cloudsmith-api/api/packages_api.rb in cloudsmith-api-0.30.7

- old
+ new

@@ -18,30 +18,97 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end + # Copy a package to another repository. + # Copy a package to another repository. + # @param owner + # @param repo + # @param identifier + # @param [Hash] opts the optional parameters + # @option opts [PackagesCopy] :data + # @return [PackageCopy] + def packages_copy(owner, repo, identifier, opts = {}) + data, _status_code, _headers = packages_copy_with_http_info(owner, repo, identifier, opts) + return data + end + + # Copy a package to another repository. + # Copy a package to another repository. + # @param owner + # @param repo + # @param identifier + # @param [Hash] opts the optional parameters + # @option opts [PackagesCopy] :data + # @return [Array<(PackageCopy, Fixnum, Hash)>] PackageCopy data, response status code and response headers + def packages_copy_with_http_info(owner, repo, identifier, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PackagesApi.packages_copy ..." + end + # verify the required parameter 'owner' is set + if @api_client.config.client_side_validation && owner.nil? + fail ArgumentError, "Missing the required parameter 'owner' when calling PackagesApi.packages_copy" + end + # verify the required parameter 'repo' is set + if @api_client.config.client_side_validation && repo.nil? + fail ArgumentError, "Missing the required parameter 'repo' when calling PackagesApi.packages_copy" + end + # verify the required parameter 'identifier' is set + if @api_client.config.client_side_validation && identifier.nil? + fail ArgumentError, "Missing the required parameter 'identifier' when calling PackagesApi.packages_copy" + end + # resource path + local_var_path = "/packages/{owner}/{repo}/{identifier}/copy/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(opts[:'data']) + auth_names = ['apikey', 'basic', 'csrf_token'] + 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 => 'PackageCopy') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PackagesApi#packages_copy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a specific package in a repository. # Delete a specific package in a repository. # @param owner # @param repo - # @param slug + # @param identifier # @param [Hash] opts the optional parameters # @return [nil] - def packages_delete(owner, repo, slug, opts = {}) - packages_delete_with_http_info(owner, repo, slug, opts) + def packages_delete(owner, repo, identifier, opts = {}) + packages_delete_with_http_info(owner, repo, identifier, opts) return nil end # Delete a specific package in a repository. # Delete a specific package in a repository. # @param owner # @param repo - # @param slug + # @param identifier # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def packages_delete_with_http_info(owner, repo, slug, opts = {}) + def packages_delete_with_http_info(owner, repo, identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_delete ..." end # verify the required parameter 'owner' is set if @api_client.config.client_side_validation && owner.nil? @@ -49,16 +116,16 @@ end # verify the required parameter 'repo' is set if @api_client.config.client_side_validation && repo.nil? fail ArgumentError, "Missing the required parameter 'repo' when calling PackagesApi.packages_delete" end - # verify the required parameter 'slug' is set - if @api_client.config.client_side_validation && slug.nil? - fail ArgumentError, "Missing the required parameter 'slug' when calling PackagesApi.packages_delete" + # verify the required parameter 'identifier' is set + if @api_client.config.client_side_validation && identifier.nil? + fail ArgumentError, "Missing the required parameter 'identifier' when calling PackagesApi.packages_delete" end # resource path - local_var_path = "/packages/{owner}/{repo}/{slug}/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'slug' + '}', slug.to_s) + local_var_path = "/packages/{owner}/{repo}/{identifier}/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} # header parameters @@ -87,11 +154,12 @@ # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. - # @return [Array<RpmPackageUpload>] + # @option opts [String] :query A search term for querying names, filenames, versions, distributions, architectures, formats or statuses of packages. + # @return [Array<Package>] def packages_list(owner, repo, opts = {}) data, _status_code, _headers = packages_list_with_http_info(owner, repo, opts) return data end @@ -100,11 +168,12 @@ # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [Integer] :page A page number within the paginated result set. # @option opts [Integer] :page_size Number of results to return per page. - # @return [Array<(Array<RpmPackageUpload>, Fixnum, Hash)>] Array<RpmPackageUpload> data, response status code and response headers + # @option opts [String] :query A search term for querying names, filenames, versions, distributions, architectures, formats or statuses of packages. + # @return [Array<(Array<Package>, Fixnum, Hash)>] Array<Package> data, response status code and response headers def packages_list_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_list ..." end # verify the required parameter 'owner' is set @@ -120,10 +189,11 @@ # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? # header parameters header_params = {} # form parameters @@ -136,37 +206,104 @@ :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'Array<RpmPackageUpload>') + :return_type => 'Array<Package>') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Move a package to another repository. + # Move a package to another repository. + # @param owner + # @param repo + # @param identifier + # @param [Hash] opts the optional parameters + # @option opts [PackagesMove] :data + # @return [PackageMove] + def packages_move(owner, repo, identifier, opts = {}) + data, _status_code, _headers = packages_move_with_http_info(owner, repo, identifier, opts) + return data + end + + # Move a package to another repository. + # Move a package to another repository. + # @param owner + # @param repo + # @param identifier + # @param [Hash] opts the optional parameters + # @option opts [PackagesMove] :data + # @return [Array<(PackageMove, Fixnum, Hash)>] PackageMove data, response status code and response headers + def packages_move_with_http_info(owner, repo, identifier, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PackagesApi.packages_move ..." + end + # verify the required parameter 'owner' is set + if @api_client.config.client_side_validation && owner.nil? + fail ArgumentError, "Missing the required parameter 'owner' when calling PackagesApi.packages_move" + end + # verify the required parameter 'repo' is set + if @api_client.config.client_side_validation && repo.nil? + fail ArgumentError, "Missing the required parameter 'repo' when calling PackagesApi.packages_move" + end + # verify the required parameter 'identifier' is set + if @api_client.config.client_side_validation && identifier.nil? + fail ArgumentError, "Missing the required parameter 'identifier' when calling PackagesApi.packages_move" + end + # resource path + local_var_path = "/packages/{owner}/{repo}/{identifier}/move/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(opts[:'data']) + auth_names = ['apikey', 'basic', 'csrf_token'] + 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 => 'PackageMove') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PackagesApi#packages_move\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a specific package in a repository. # Get a specific package in a repository. # @param owner # @param repo - # @param slug + # @param identifier # @param [Hash] opts the optional parameters - # @return [RpmPackageUpload] - def packages_read(owner, repo, slug, opts = {}) - data, _status_code, _headers = packages_read_with_http_info(owner, repo, slug, opts) + # @return [Package] + def packages_read(owner, repo, identifier, opts = {}) + data, _status_code, _headers = packages_read_with_http_info(owner, repo, identifier, opts) return data end # Get a specific package in a repository. # Get a specific package in a repository. # @param owner # @param repo - # @param slug + # @param identifier # @param [Hash] opts the optional parameters - # @return [Array<(RpmPackageUpload, Fixnum, Hash)>] RpmPackageUpload data, response status code and response headers - def packages_read_with_http_info(owner, repo, slug, opts = {}) + # @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers + def packages_read_with_http_info(owner, repo, identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_read ..." end # verify the required parameter 'owner' is set if @api_client.config.client_side_validation && owner.nil? @@ -174,16 +311,16 @@ end # verify the required parameter 'repo' is set if @api_client.config.client_side_validation && repo.nil? fail ArgumentError, "Missing the required parameter 'repo' when calling PackagesApi.packages_read" end - # verify the required parameter 'slug' is set - if @api_client.config.client_side_validation && slug.nil? - fail ArgumentError, "Missing the required parameter 'slug' when calling PackagesApi.packages_read" + # verify the required parameter 'identifier' is set + if @api_client.config.client_side_validation && identifier.nil? + fail ArgumentError, "Missing the required parameter 'identifier' when calling PackagesApi.packages_read" end # resource path - local_var_path = "/packages/{owner}/{repo}/{slug}/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'slug' + '}', slug.to_s) + local_var_path = "/packages/{owner}/{repo}/{identifier}/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} # header parameters @@ -199,37 +336,100 @@ :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RpmPackageUpload') + :return_type => 'Package') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Schedule a package for resynchronisation. + # Schedule a package for resynchronisation. + # @param owner + # @param repo + # @param identifier + # @param [Hash] opts the optional parameters + # @return [Package] + def packages_resync(owner, repo, identifier, opts = {}) + data, _status_code, _headers = packages_resync_with_http_info(owner, repo, identifier, opts) + return data + end + + # Schedule a package for resynchronisation. + # Schedule a package for resynchronisation. + # @param owner + # @param repo + # @param identifier + # @param [Hash] opts the optional parameters + # @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers + def packages_resync_with_http_info(owner, repo, identifier, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PackagesApi.packages_resync ..." + end + # verify the required parameter 'owner' is set + if @api_client.config.client_side_validation && owner.nil? + fail ArgumentError, "Missing the required parameter 'owner' when calling PackagesApi.packages_resync" + end + # verify the required parameter 'repo' is set + if @api_client.config.client_side_validation && repo.nil? + fail ArgumentError, "Missing the required parameter 'repo' when calling PackagesApi.packages_resync" + end + # verify the required parameter 'identifier' is set + if @api_client.config.client_side_validation && identifier.nil? + fail ArgumentError, "Missing the required parameter 'identifier' when calling PackagesApi.packages_resync" + end + # resource path + local_var_path = "/packages/{owner}/{repo}/{identifier}/resync/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = ['apikey', 'basic', 'csrf_token'] + 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 => 'Package') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PackagesApi#packages_resync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get the synchronisation status for a package. # Get the synchronisation status for a package. # @param owner # @param repo - # @param slug + # @param identifier # @param [Hash] opts the optional parameters # @return [PackageStatus] - def packages_status(owner, repo, slug, opts = {}) - data, _status_code, _headers = packages_status_with_http_info(owner, repo, slug, opts) + def packages_status(owner, repo, identifier, opts = {}) + data, _status_code, _headers = packages_status_with_http_info(owner, repo, identifier, opts) return data end # Get the synchronisation status for a package. # Get the synchronisation status for a package. # @param owner # @param repo - # @param slug + # @param identifier # @param [Hash] opts the optional parameters # @return [Array<(PackageStatus, Fixnum, Hash)>] PackageStatus data, response status code and response headers - def packages_status_with_http_info(owner, repo, slug, opts = {}) + def packages_status_with_http_info(owner, repo, identifier, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_status ..." end # verify the required parameter 'owner' is set if @api_client.config.client_side_validation && owner.nil? @@ -237,16 +437,16 @@ end # verify the required parameter 'repo' is set if @api_client.config.client_side_validation && repo.nil? fail ArgumentError, "Missing the required parameter 'repo' when calling PackagesApi.packages_status" end - # verify the required parameter 'slug' is set - if @api_client.config.client_side_validation && slug.nil? - fail ArgumentError, "Missing the required parameter 'slug' when calling PackagesApi.packages_status" + # verify the required parameter 'identifier' is set + if @api_client.config.client_side_validation && identifier.nil? + fail ArgumentError, "Missing the required parameter 'identifier' when calling PackagesApi.packages_status" end # resource path - local_var_path = "/packages/{owner}/{repo}/{slug}/status/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'slug' + '}', slug.to_s) + local_var_path = "/packages/{owner}/{repo}/{identifier}/status/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'identifier' + '}', identifier.to_s) # query parameters query_params = {} # header parameters @@ -269,17 +469,78 @@ @api_client.config.logger.debug "API called: PackagesApi#packages_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Create a new Composer package + # Create a new Composer package + # @param owner + # @param repo + # @param [Hash] opts the optional parameters + # @option opts [PackagesUploadComposer] :data + # @return [Package] + def packages_upload_composer(owner, repo, opts = {}) + data, _status_code, _headers = packages_upload_composer_with_http_info(owner, repo, opts) + return data + end + + # Create a new Composer package + # Create a new Composer package + # @param owner + # @param repo + # @param [Hash] opts the optional parameters + # @option opts [PackagesUploadComposer] :data + # @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers + def packages_upload_composer_with_http_info(owner, repo, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_composer ..." + end + # verify the required parameter 'owner' is set + if @api_client.config.client_side_validation && owner.nil? + fail ArgumentError, "Missing the required parameter 'owner' when calling PackagesApi.packages_upload_composer" + end + # verify the required parameter 'repo' is set + if @api_client.config.client_side_validation && repo.nil? + fail ArgumentError, "Missing the required parameter 'repo' when calling PackagesApi.packages_upload_composer" + end + # resource path + local_var_path = "/packages/{owner}/{repo}/upload/composer/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(opts[:'data']) + auth_names = ['apikey', 'basic', 'csrf_token'] + 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 => 'Package') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PackagesApi#packages_upload_composer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create a new Debian package # Create a new Debian package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadDeb] :data - # @return [RpmPackageUpload] + # @return [Package] def packages_upload_deb(owner, repo, opts = {}) data, _status_code, _headers = packages_upload_deb_with_http_info(owner, repo, opts) return data end @@ -287,11 +548,11 @@ # Create a new Debian package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadDeb] :data - # @return [Array<(RpmPackageUpload, Fixnum, Hash)>] RpmPackageUpload data, response status code and response headers + # @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers def packages_upload_deb_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_deb ..." end # verify the required parameter 'owner' is set @@ -323,11 +584,11 @@ :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RpmPackageUpload') + :return_type => 'Package') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_upload_deb\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -397,11 +658,11 @@ # Create a new Python package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadPython] :data - # @return [RpmPackageUpload] + # @return [Package] def packages_upload_python(owner, repo, opts = {}) data, _status_code, _headers = packages_upload_python_with_http_info(owner, repo, opts) return data end @@ -409,11 +670,11 @@ # Create a new Python package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadPython] :data - # @return [Array<(RpmPackageUpload, Fixnum, Hash)>] RpmPackageUpload data, response status code and response headers + # @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers def packages_upload_python_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_python ..." end # verify the required parameter 'owner' is set @@ -445,11 +706,11 @@ :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RpmPackageUpload') + :return_type => 'Package') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_upload_python\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -458,11 +719,11 @@ # Create a new Raw package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadRaw] :data - # @return [RpmPackageUpload] + # @return [RawPackageUpload] def packages_upload_raw(owner, repo, opts = {}) data, _status_code, _headers = packages_upload_raw_with_http_info(owner, repo, opts) return data end @@ -470,11 +731,11 @@ # Create a new Raw package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadRaw] :data - # @return [Array<(RpmPackageUpload, Fixnum, Hash)>] RpmPackageUpload data, response status code and response headers + # @return [Array<(RawPackageUpload, Fixnum, Hash)>] RawPackageUpload data, response status code and response headers def packages_upload_raw_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_raw ..." end # verify the required parameter 'owner' is set @@ -506,11 +767,11 @@ :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RpmPackageUpload') + :return_type => 'RawPackageUpload') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_upload_raw\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -519,11 +780,11 @@ # Create a new RedHat package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadRpm] :data - # @return [RpmPackageUpload] + # @return [Package] def packages_upload_rpm(owner, repo, opts = {}) data, _status_code, _headers = packages_upload_rpm_with_http_info(owner, repo, opts) return data end @@ -531,11 +792,11 @@ # Create a new RedHat package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadRpm] :data - # @return [Array<(RpmPackageUpload, Fixnum, Hash)>] RpmPackageUpload data, response status code and response headers + # @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers def packages_upload_rpm_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_rpm ..." end # verify the required parameter 'owner' is set @@ -567,11 +828,11 @@ :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RpmPackageUpload') + :return_type => 'Package') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_upload_rpm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -580,11 +841,11 @@ # Create a new Ruby package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadRuby] :data - # @return [RpmPackageUpload] + # @return [Package] def packages_upload_ruby(owner, repo, opts = {}) data, _status_code, _headers = packages_upload_ruby_with_http_info(owner, repo, opts) return data end @@ -592,11 +853,11 @@ # Create a new Ruby package # @param owner # @param repo # @param [Hash] opts the optional parameters # @option opts [PackagesUploadRuby] :data - # @return [Array<(RpmPackageUpload, Fixnum, Hash)>] RpmPackageUpload data, response status code and response headers + # @return [Array<(Package, Fixnum, Hash)>] Package data, response status code and response headers def packages_upload_ruby_with_http_info(owner, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PackagesApi.packages_upload_ruby ..." end # verify the required parameter 'owner' is set @@ -628,11 +889,11 @@ :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'RpmPackageUpload') + :return_type => 'Package') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_upload_ruby\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -692,9 +953,69 @@ :body => post_body, :auth_names => auth_names, :return_type => 'VagrantPackageUpload') if @api_client.config.debugging @api_client.config.logger.debug "API called: PackagesApi#packages_upload_vagrant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Validate parameters for create Composer package + # Validate parameters for create Composer package + # @param owner + # @param repo + # @param [Hash] opts the optional parameters + # @option opts [PackagesValidateuploadComposer] :data + # @return [nil] + def packages_validate_upload_composer(owner, repo, opts = {}) + packages_validate_upload_composer_with_http_info(owner, repo, opts) + return nil + end + + # Validate parameters for create Composer package + # Validate parameters for create Composer package + # @param owner + # @param repo + # @param [Hash] opts the optional parameters + # @option opts [PackagesValidateuploadComposer] :data + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def packages_validate_upload_composer_with_http_info(owner, repo, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: PackagesApi.packages_validate_upload_composer ..." + end + # verify the required parameter 'owner' is set + if @api_client.config.client_side_validation && owner.nil? + fail ArgumentError, "Missing the required parameter 'owner' when calling PackagesApi.packages_validate_upload_composer" + end + # verify the required parameter 'repo' is set + if @api_client.config.client_side_validation && repo.nil? + fail ArgumentError, "Missing the required parameter 'repo' when calling PackagesApi.packages_validate_upload_composer" + end + # resource path + local_var_path = "/packages/{owner}/{repo}/validate-upload/composer/".sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(opts[:'data']) + auth_names = ['apikey', 'basic', 'csrf_token'] + 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: PackagesApi#packages_validate_upload_composer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Validate parameters for create Debian package