pulp_rpm_client 3.0.0b71572533171 → 3.0.0rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +63 -22
- data/docs/ContentAdvisoriesApi.md +15 -7
- data/docs/ContentDistributionTreesApi.md +2 -2
- data/docs/ContentModulemdDefaultsApi.md +6 -6
- data/docs/{ContentModulemdApi.md → ContentModulemdsApi.md} +14 -14
- data/docs/ContentPackagecategoriesApi.md +189 -0
- data/docs/ContentPackageenvironmentsApi.md +189 -0
- data/docs/ContentPackagegroupsApi.md +189 -0
- data/docs/ContentPackagelangpacksApi.md +189 -0
- data/docs/ContentPackagesApi.md +4 -4
- data/docs/ContentRepoMetadataFilesApi.md +4 -4
- data/docs/ContentSummary.md +21 -0
- data/docs/DistributionsRpmApi.md +10 -10
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse20010.md +23 -0
- data/docs/InlineResponse20011.md +23 -0
- data/docs/InlineResponse20012.md +23 -0
- data/docs/InlineResponse20013.md +23 -0
- data/docs/InlineResponse20014.md +23 -0
- data/docs/InlineResponse2002.md +1 -1
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/InlineResponse2005.md +1 -1
- data/docs/InlineResponse2006.md +1 -1
- data/docs/InlineResponse2007.md +1 -1
- data/docs/InlineResponse2008.md +1 -1
- data/docs/InlineResponse2009.md +23 -0
- data/docs/PublicationsRpmApi.md +6 -6
- data/docs/RemotesRpmApi.md +12 -68
- data/docs/RepositoriesRpmApi.md +465 -0
- data/docs/RepositoriesRpmVersionsApi.md +214 -0
- data/docs/RepositoryAddRemoveContent.md +21 -0
- data/docs/RepositorySyncURL.md +2 -2
- data/docs/RepositoryVersion.md +25 -0
- data/docs/{DistributionTree.md → RpmDistributionTree.md} +2 -2
- data/docs/{Modulemd.md → RpmModulemd.md} +2 -8
- data/docs/{ModulemdDefaults.md → RpmModulemdDefaults.md} +2 -8
- data/docs/{Package.md → RpmPackage.md} +2 -8
- data/docs/RpmPackageCategory.md +33 -0
- data/docs/RpmPackageEnvironment.md +37 -0
- data/docs/RpmPackageGroup.md +39 -0
- data/docs/RpmPackageLangpacks.md +19 -0
- data/docs/{RepoMetadataFile.md → RpmRepoMetadataFile.md} +2 -8
- data/docs/{RpmDistribution.md → RpmRpmDistribution.md} +2 -2
- data/docs/{RpmPublication.md → RpmRpmPublication.md} +2 -2
- data/docs/{RpmRemote.md → RpmRpmRemote.md} +10 -14
- data/docs/RpmRpmRepository.md +27 -0
- data/docs/RpmUpdateCollection.md +21 -0
- data/docs/{UpdateRecord.md → RpmUpdateRecord.md} +24 -20
- data/lib/pulp_rpm_client/api/content_advisories_api.rb +28 -14
- data/lib/pulp_rpm_client/api/content_distribution_trees_api.rb +4 -4
- data/lib/pulp_rpm_client/api/content_modulemd_defaults_api.rb +8 -8
- data/lib/pulp_rpm_client/api/{content_modulemd_api.rb → content_modulemds_api.rb} +30 -30
- data/lib/pulp_rpm_client/api/content_packagecategories_api.rb +227 -0
- data/lib/pulp_rpm_client/api/content_packageenvironments_api.rb +227 -0
- data/lib/pulp_rpm_client/api/content_packagegroups_api.rb +227 -0
- data/lib/pulp_rpm_client/api/content_packagelangpacks_api.rb +227 -0
- data/lib/pulp_rpm_client/api/content_packages_api.rb +7 -7
- data/lib/pulp_rpm_client/api/content_repo_metadata_files_api.rb +7 -7
- data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +13 -13
- data/lib/pulp_rpm_client/api/publications_rpm_api.rb +9 -9
- data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +16 -86
- data/lib/pulp_rpm_client/api/repositories_rpm_api.rb +568 -0
- data/lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb +268 -0
- data/lib/pulp_rpm_client/api_client.rb +1 -1
- data/lib/pulp_rpm_client/api_error.rb +1 -1
- data/lib/pulp_rpm_client/configuration.rb +1 -1
- data/lib/pulp_rpm_client/models/addon.rb +12 -2
- data/lib/pulp_rpm_client/models/artifact.rb +18 -2
- data/lib/pulp_rpm_client/models/async_operation_response.rb +12 -2
- data/lib/pulp_rpm_client/models/checksum.rb +12 -2
- data/lib/pulp_rpm_client/models/content_summary.rb +246 -0
- data/lib/pulp_rpm_client/models/image.rb +12 -2
- data/lib/pulp_rpm_client/models/inline_response200.rb +15 -3
- data/lib/pulp_rpm_client/models/inline_response2001.rb +15 -3
- data/lib/pulp_rpm_client/models/inline_response20010.rb +247 -0
- data/lib/pulp_rpm_client/models/inline_response20011.rb +247 -0
- data/lib/pulp_rpm_client/models/inline_response20012.rb +247 -0
- data/lib/pulp_rpm_client/models/inline_response20013.rb +247 -0
- data/lib/pulp_rpm_client/models/inline_response20014.rb +247 -0
- data/lib/pulp_rpm_client/models/inline_response2002.rb +15 -3
- data/lib/pulp_rpm_client/models/inline_response2003.rb +15 -3
- data/lib/pulp_rpm_client/models/inline_response2004.rb +15 -3
- data/lib/pulp_rpm_client/models/inline_response2005.rb +15 -3
- data/lib/pulp_rpm_client/models/inline_response2006.rb +15 -3
- data/lib/pulp_rpm_client/models/inline_response2007.rb +15 -3
- data/lib/pulp_rpm_client/models/inline_response2008.rb +15 -3
- data/lib/pulp_rpm_client/models/inline_response2009.rb +247 -0
- data/lib/pulp_rpm_client/models/repository_add_remove_content.rb +231 -0
- data/lib/pulp_rpm_client/models/repository_sync_url.rb +22 -12
- data/lib/pulp_rpm_client/models/repository_version.rb +244 -0
- data/lib/pulp_rpm_client/models/{distribution_tree.rb → rpm_distribution_tree.rb} +15 -5
- data/lib/pulp_rpm_client/models/{modulemd.rb → rpm_modulemd.rb} +16 -60
- data/lib/pulp_rpm_client/models/{modulemd_defaults.rb → rpm_modulemd_defaults.rb} +16 -60
- data/lib/pulp_rpm_client/models/{package.rb → rpm_package.rb} +16 -60
- data/lib/pulp_rpm_client/models/rpm_package_category.rb +405 -0
- data/lib/pulp_rpm_client/models/rpm_package_environment.rb +432 -0
- data/lib/pulp_rpm_client/models/rpm_package_group.rb +435 -0
- data/lib/pulp_rpm_client/models/rpm_package_langpacks.rb +246 -0
- data/lib/pulp_rpm_client/models/{repo_metadata_file.rb → rpm_repo_metadata_file.rb} +16 -60
- data/lib/pulp_rpm_client/models/{rpm_distribution.rb → rpm_rpm_distribution.rb} +17 -23
- data/lib/pulp_rpm_client/models/{rpm_publication.rb → rpm_rpm_publication.rb} +16 -5
- data/lib/pulp_rpm_client/models/{rpm_remote.rb → rpm_rpm_remote.rb} +69 -105
- data/lib/pulp_rpm_client/models/rpm_rpm_repository.rb +294 -0
- data/lib/pulp_rpm_client/models/rpm_update_collection.rb +240 -0
- data/lib/pulp_rpm_client/models/{update_record.rb → rpm_update_record.rb} +49 -239
- data/lib/pulp_rpm_client/models/variant.rb +12 -2
- data/lib/pulp_rpm_client/version.rb +2 -2
- data/lib/pulp_rpm_client.rb +32 -12
- data/pulp_rpm_client.gemspec +1 -1
- data/spec/api/content_advisories_api_spec.rb +6 -3
- data/spec/api/content_distribution_trees_api_spec.rb +2 -2
- data/spec/api/content_modulemd_defaults_api_spec.rb +3 -3
- data/spec/api/{content_modulemd_api_spec.rb → content_modulemds_api_spec.rb} +9 -9
- data/spec/api/content_packagecategories_api_spec.rb +79 -0
- data/spec/api/content_packageenvironments_api_spec.rb +79 -0
- data/spec/api/content_packagegroups_api_spec.rb +79 -0
- data/spec/api/content_packagelangpacks_api_spec.rb +79 -0
- data/spec/api/content_packages_api_spec.rb +3 -3
- data/spec/api/content_repo_metadata_files_api_spec.rb +3 -3
- data/spec/api/distributions_rpm_api_spec.rb +3 -3
- data/spec/api/publications_rpm_api_spec.rb +3 -3
- data/spec/api/remotes_rpm_api_spec.rb +4 -17
- data/spec/api/repositories_rpm_api_spec.rb +141 -0
- data/spec/api/repositories_rpm_versions_api_spec.rb +91 -0
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/addon_spec.rb +1 -1
- data/spec/models/artifact_spec.rb +1 -1
- data/spec/models/async_operation_response_spec.rb +1 -1
- data/spec/models/checksum_spec.rb +1 -1
- data/spec/models/content_summary_spec.rb +53 -0
- data/spec/models/image_spec.rb +1 -1
- data/spec/models/inline_response20010_spec.rb +59 -0
- data/spec/models/inline_response20011_spec.rb +59 -0
- data/spec/models/inline_response20012_spec.rb +59 -0
- data/spec/models/inline_response20013_spec.rb +59 -0
- data/spec/models/inline_response20014_spec.rb +59 -0
- data/spec/models/inline_response2001_spec.rb +1 -1
- data/spec/models/inline_response2002_spec.rb +1 -1
- data/spec/models/inline_response2003_spec.rb +1 -1
- data/spec/models/inline_response2004_spec.rb +1 -1
- data/spec/models/inline_response2005_spec.rb +1 -1
- data/spec/models/inline_response2006_spec.rb +1 -1
- data/spec/models/inline_response2007_spec.rb +1 -1
- data/spec/models/inline_response2008_spec.rb +1 -1
- data/spec/models/inline_response2009_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +1 -1
- data/spec/models/repository_add_remove_content_spec.rb +53 -0
- data/spec/models/repository_sync_url_spec.rb +2 -2
- data/spec/models/repository_version_spec.rb +65 -0
- data/spec/models/{distribution_tree_spec.rb → rpm_distribution_tree_spec.rb} +7 -7
- data/spec/models/{modulemd_defaults_spec.rb → rpm_modulemd_defaults_spec.rb} +7 -25
- data/spec/models/{modulemd_spec.rb → rpm_modulemd_spec.rb} +7 -25
- data/spec/models/{repo_metadata_file_spec.rb → rpm_package_category_spec.rb} +16 -16
- data/spec/models/rpm_package_environment_spec.rb +101 -0
- data/spec/models/rpm_package_group_spec.rb +107 -0
- data/spec/models/rpm_package_langpacks_spec.rb +47 -0
- data/spec/models/{package_spec.rb → rpm_package_spec.rb} +7 -25
- data/spec/models/rpm_repo_metadata_file_spec.rb +71 -0
- data/spec/models/{rpm_distribution_spec.rb → rpm_rpm_distribution_spec.rb} +7 -7
- data/spec/models/{rpm_publication_spec.rb → rpm_rpm_publication_spec.rb} +7 -7
- data/spec/models/{rpm_remote_spec.rb → rpm_rpm_remote_spec.rb} +11 -23
- data/spec/models/rpm_rpm_repository_spec.rb +71 -0
- data/spec/models/rpm_update_collection_spec.rb +53 -0
- data/spec/models/{update_record_spec.rb → rpm_update_record_spec.rb} +19 -7
- data/spec/models/variant_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +126 -46
- data/docs/RpmCopyApi.md +0 -70
- data/lib/pulp_rpm_client/api/rpm_copy_api.rb +0 -96
- data/spec/api/rpm_copy_api_spec.rb +0 -50
@@ -0,0 +1,268 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.2-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpRpmClient
|
16
|
+
class RepositoriesRpmVersionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete a repository version
|
23
|
+
# Trigger an asynchronous task to delete a repositroy version.
|
24
|
+
# @param rpm_repository_version_href [String] URI of Repository Version. e.g.: /pulp/api/v3/repositories/rpm/rpm/1/versions/1/
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [AsyncOperationResponse]
|
27
|
+
def delete(rpm_repository_version_href, opts = {})
|
28
|
+
data, _status_code, _headers = delete_with_http_info(rpm_repository_version_href, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Delete a repository version
|
33
|
+
# Trigger an asynchronous task to delete a repositroy version.
|
34
|
+
# @param rpm_repository_version_href [String] URI of Repository Version. e.g.: /pulp/api/v3/repositories/rpm/rpm/1/versions/1/
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
37
|
+
def delete_with_http_info(rpm_repository_version_href, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesRpmVersionsApi.delete ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'rpm_repository_version_href' is set
|
42
|
+
if @api_client.config.client_side_validation && rpm_repository_version_href.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'rpm_repository_version_href' when calling RepositoriesRpmVersionsApi.delete"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '{rpm_repository_version_href}'.sub('{' + 'rpm_repository_version_href' + '}', CGI.escape(rpm_repository_version_href.to_s).gsub('%2F', '/'))
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:auth_names] || ['Basic']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: RepositoriesRpmVersionsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# List repository versions
|
85
|
+
# RpmRepositoryVersion represents a single rpm repository version.
|
86
|
+
# @param rpm_rpm_repository_href [String] URI of Rpm Repository. e.g.: /pulp/api/v3/repositories/rpm/rpm/1/
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
89
|
+
# @option opts [Float] :number
|
90
|
+
# @option opts [Float] :number__lt Filter results where number is less than value
|
91
|
+
# @option opts [Float] :number__lte Filter results where number is less than or equal to value
|
92
|
+
# @option opts [Float] :number__gt Filter results where number is greater than value
|
93
|
+
# @option opts [Float] :number__gte Filter results where number is greater than or equal to value
|
94
|
+
# @option opts [Float] :number__range Filter results where number is between two comma separated values
|
95
|
+
# @option opts [String] :pulp_created__lt Filter results where pulp_created is less than value
|
96
|
+
# @option opts [String] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
97
|
+
# @option opts [String] :pulp_created__gt Filter results where pulp_created is greater than value
|
98
|
+
# @option opts [String] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
99
|
+
# @option opts [String] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
100
|
+
# @option opts [String] :content Content Unit referenced by HREF
|
101
|
+
# @option opts [String] :pulp_created ISO 8601 formatted dates are supported
|
102
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
103
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
104
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
105
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
106
|
+
# @return [InlineResponse20014]
|
107
|
+
def list(rpm_rpm_repository_href, opts = {})
|
108
|
+
data, _status_code, _headers = list_with_http_info(rpm_rpm_repository_href, opts)
|
109
|
+
data
|
110
|
+
end
|
111
|
+
|
112
|
+
# List repository versions
|
113
|
+
# RpmRepositoryVersion represents a single rpm repository version.
|
114
|
+
# @param rpm_rpm_repository_href [String] URI of Rpm Repository. e.g.: /pulp/api/v3/repositories/rpm/rpm/1/
|
115
|
+
# @param [Hash] opts the optional parameters
|
116
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
117
|
+
# @option opts [Float] :number
|
118
|
+
# @option opts [Float] :number__lt Filter results where number is less than value
|
119
|
+
# @option opts [Float] :number__lte Filter results where number is less than or equal to value
|
120
|
+
# @option opts [Float] :number__gt Filter results where number is greater than value
|
121
|
+
# @option opts [Float] :number__gte Filter results where number is greater than or equal to value
|
122
|
+
# @option opts [Float] :number__range Filter results where number is between two comma separated values
|
123
|
+
# @option opts [String] :pulp_created__lt Filter results where pulp_created is less than value
|
124
|
+
# @option opts [String] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
125
|
+
# @option opts [String] :pulp_created__gt Filter results where pulp_created is greater than value
|
126
|
+
# @option opts [String] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
127
|
+
# @option opts [String] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
128
|
+
# @option opts [String] :content Content Unit referenced by HREF
|
129
|
+
# @option opts [String] :pulp_created ISO 8601 formatted dates are supported
|
130
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
131
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
132
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
133
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
134
|
+
# @return [Array<(InlineResponse20014, Integer, Hash)>] InlineResponse20014 data, response status code and response headers
|
135
|
+
def list_with_http_info(rpm_rpm_repository_href, opts = {})
|
136
|
+
if @api_client.config.debugging
|
137
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesRpmVersionsApi.list ...'
|
138
|
+
end
|
139
|
+
# verify the required parameter 'rpm_rpm_repository_href' is set
|
140
|
+
if @api_client.config.client_side_validation && rpm_rpm_repository_href.nil?
|
141
|
+
fail ArgumentError, "Missing the required parameter 'rpm_rpm_repository_href' when calling RepositoriesRpmVersionsApi.list"
|
142
|
+
end
|
143
|
+
# resource path
|
144
|
+
local_var_path = '{rpm_repository_href}versions/'.sub('{' + 'rpm_rpm_repository_href' + '}', CGI.escape(rpm_rpm_repository_href.to_s).gsub('%2F', '/'))
|
145
|
+
|
146
|
+
# query parameters
|
147
|
+
query_params = opts[:query_params] || {}
|
148
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
149
|
+
query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
|
150
|
+
query_params[:'number__lt'] = opts[:'number__lt'] if !opts[:'number__lt'].nil?
|
151
|
+
query_params[:'number__lte'] = opts[:'number__lte'] if !opts[:'number__lte'].nil?
|
152
|
+
query_params[:'number__gt'] = opts[:'number__gt'] if !opts[:'number__gt'].nil?
|
153
|
+
query_params[:'number__gte'] = opts[:'number__gte'] if !opts[:'number__gte'].nil?
|
154
|
+
query_params[:'number__range'] = opts[:'number__range'] if !opts[:'number__range'].nil?
|
155
|
+
query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
|
156
|
+
query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
|
157
|
+
query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
|
158
|
+
query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
|
159
|
+
query_params[:'pulp_created__range'] = opts[:'pulp_created__range'] if !opts[:'pulp_created__range'].nil?
|
160
|
+
query_params[:'content'] = opts[:'content'] if !opts[:'content'].nil?
|
161
|
+
query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
|
162
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
163
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
164
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
165
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
166
|
+
|
167
|
+
# header parameters
|
168
|
+
header_params = opts[:header_params] || {}
|
169
|
+
# HTTP header 'Accept' (if needed)
|
170
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
171
|
+
|
172
|
+
# form parameters
|
173
|
+
form_params = opts[:form_params] || {}
|
174
|
+
|
175
|
+
# http body (model)
|
176
|
+
post_body = opts[:body]
|
177
|
+
|
178
|
+
# return_type
|
179
|
+
return_type = opts[:return_type] || 'InlineResponse20014'
|
180
|
+
|
181
|
+
# auth_names
|
182
|
+
auth_names = opts[:auth_names] || ['Basic']
|
183
|
+
|
184
|
+
new_options = opts.merge(
|
185
|
+
:header_params => header_params,
|
186
|
+
:query_params => query_params,
|
187
|
+
:form_params => form_params,
|
188
|
+
:body => post_body,
|
189
|
+
:auth_names => auth_names,
|
190
|
+
:return_type => return_type
|
191
|
+
)
|
192
|
+
|
193
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
194
|
+
if @api_client.config.debugging
|
195
|
+
@api_client.config.logger.debug "API called: RepositoriesRpmVersionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
196
|
+
end
|
197
|
+
return data, status_code, headers
|
198
|
+
end
|
199
|
+
|
200
|
+
# Inspect a repository version
|
201
|
+
# RpmRepositoryVersion represents a single rpm repository version.
|
202
|
+
# @param rpm_repository_version_href [String] URI of Repository Version. e.g.: /pulp/api/v3/repositories/rpm/rpm/1/versions/1/
|
203
|
+
# @param [Hash] opts the optional parameters
|
204
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
205
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
206
|
+
# @return [RepositoryVersion]
|
207
|
+
def read(rpm_repository_version_href, opts = {})
|
208
|
+
data, _status_code, _headers = read_with_http_info(rpm_repository_version_href, opts)
|
209
|
+
data
|
210
|
+
end
|
211
|
+
|
212
|
+
# Inspect a repository version
|
213
|
+
# RpmRepositoryVersion represents a single rpm repository version.
|
214
|
+
# @param rpm_repository_version_href [String] URI of Repository Version. e.g.: /pulp/api/v3/repositories/rpm/rpm/1/versions/1/
|
215
|
+
# @param [Hash] opts the optional parameters
|
216
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
217
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
218
|
+
# @return [Array<(RepositoryVersion, Integer, Hash)>] RepositoryVersion data, response status code and response headers
|
219
|
+
def read_with_http_info(rpm_repository_version_href, opts = {})
|
220
|
+
if @api_client.config.debugging
|
221
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesRpmVersionsApi.read ...'
|
222
|
+
end
|
223
|
+
# verify the required parameter 'rpm_repository_version_href' is set
|
224
|
+
if @api_client.config.client_side_validation && rpm_repository_version_href.nil?
|
225
|
+
fail ArgumentError, "Missing the required parameter 'rpm_repository_version_href' when calling RepositoriesRpmVersionsApi.read"
|
226
|
+
end
|
227
|
+
# resource path
|
228
|
+
local_var_path = '{rpm_repository_version_href}'.sub('{' + 'rpm_repository_version_href' + '}', CGI.escape(rpm_repository_version_href.to_s).gsub('%2F', '/'))
|
229
|
+
|
230
|
+
# query parameters
|
231
|
+
query_params = opts[:query_params] || {}
|
232
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
233
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
234
|
+
|
235
|
+
# header parameters
|
236
|
+
header_params = opts[:header_params] || {}
|
237
|
+
# HTTP header 'Accept' (if needed)
|
238
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
239
|
+
|
240
|
+
# form parameters
|
241
|
+
form_params = opts[:form_params] || {}
|
242
|
+
|
243
|
+
# http body (model)
|
244
|
+
post_body = opts[:body]
|
245
|
+
|
246
|
+
# return_type
|
247
|
+
return_type = opts[:return_type] || 'RepositoryVersion'
|
248
|
+
|
249
|
+
# auth_names
|
250
|
+
auth_names = opts[:auth_names] || ['Basic']
|
251
|
+
|
252
|
+
new_options = opts.merge(
|
253
|
+
:header_params => header_params,
|
254
|
+
:query_params => query_params,
|
255
|
+
:form_params => form_params,
|
256
|
+
:body => post_body,
|
257
|
+
:auth_names => auth_names,
|
258
|
+
:return_type => return_type
|
259
|
+
)
|
260
|
+
|
261
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug "API called: RepositoriesRpmVersionsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
264
|
+
end
|
265
|
+
return data, status_code, headers
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.
|
9
|
+
OpenAPI Generator version: 4.2.2-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -51,6 +51,12 @@ module PulpRpmClient
|
|
51
51
|
}
|
52
52
|
end
|
53
53
|
|
54
|
+
# List of attributes with nullable: true
|
55
|
+
def self.openapi_nullable
|
56
|
+
Set.new([
|
57
|
+
])
|
58
|
+
end
|
59
|
+
|
54
60
|
# Initializes the object
|
55
61
|
# @param [Hash] attributes Model attributes in the form of hash
|
56
62
|
def initialize(attributes = {})
|
@@ -330,7 +336,11 @@ module PulpRpmClient
|
|
330
336
|
hash = {}
|
331
337
|
self.class.attribute_map.each_pair do |attr, param|
|
332
338
|
value = self.send(attr)
|
333
|
-
|
339
|
+
if value.nil?
|
340
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
341
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
342
|
+
end
|
343
|
+
|
334
344
|
hash[param] = _to_hash(value)
|
335
345
|
end
|
336
346
|
hash
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.
|
9
|
+
OpenAPI Generator version: 4.2.2-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -75,6 +75,18 @@ module PulpRpmClient
|
|
75
75
|
}
|
76
76
|
end
|
77
77
|
|
78
|
+
# List of attributes with nullable: true
|
79
|
+
def self.openapi_nullable
|
80
|
+
Set.new([
|
81
|
+
:'md5',
|
82
|
+
:'sha1',
|
83
|
+
:'sha224',
|
84
|
+
:'sha256',
|
85
|
+
:'sha384',
|
86
|
+
:'sha512'
|
87
|
+
])
|
88
|
+
end
|
89
|
+
|
78
90
|
# Initializes the object
|
79
91
|
# @param [Hash] attributes Model attributes in the form of hash
|
80
92
|
def initialize(attributes = {})
|
@@ -349,7 +361,11 @@ module PulpRpmClient
|
|
349
361
|
hash = {}
|
350
362
|
self.class.attribute_map.each_pair do |attr, param|
|
351
363
|
value = self.send(attr)
|
352
|
-
|
364
|
+
if value.nil?
|
365
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
366
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
367
|
+
end
|
368
|
+
|
353
369
|
hash[param] = _to_hash(value)
|
354
370
|
end
|
355
371
|
hash
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.
|
9
|
+
OpenAPI Generator version: 4.2.2-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -31,6 +31,12 @@ module PulpRpmClient
|
|
31
31
|
}
|
32
32
|
end
|
33
33
|
|
34
|
+
# List of attributes with nullable: true
|
35
|
+
def self.openapi_nullable
|
36
|
+
Set.new([
|
37
|
+
])
|
38
|
+
end
|
39
|
+
|
34
40
|
# Initializes the object
|
35
41
|
# @param [Hash] attributes Model attributes in the form of hash
|
36
42
|
def initialize(attributes = {})
|
@@ -175,7 +181,11 @@ module PulpRpmClient
|
|
175
181
|
hash = {}
|
176
182
|
self.class.attribute_map.each_pair do |attr, param|
|
177
183
|
value = self.send(attr)
|
178
|
-
|
184
|
+
if value.nil?
|
185
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
186
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
187
|
+
end
|
188
|
+
|
179
189
|
hash[param] = _to_hash(value)
|
180
190
|
end
|
181
191
|
hash
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.
|
9
|
+
OpenAPI Generator version: 4.2.2-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -36,6 +36,12 @@ module PulpRpmClient
|
|
36
36
|
}
|
37
37
|
end
|
38
38
|
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
39
45
|
# Initializes the object
|
40
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
41
47
|
def initialize(attributes = {})
|
@@ -228,7 +234,11 @@ module PulpRpmClient
|
|
228
234
|
hash = {}
|
229
235
|
self.class.attribute_map.each_pair do |attr, param|
|
230
236
|
value = self.send(attr)
|
231
|
-
|
237
|
+
if value.nil?
|
238
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
239
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
240
|
+
end
|
241
|
+
|
232
242
|
hash[param] = _to_hash(value)
|
233
243
|
end
|
234
244
|
hash
|
@@ -0,0 +1,246 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.2-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module PulpRpmClient
|
16
|
+
# Various count summaries of the content in the version and the HREF to view them.
|
17
|
+
class ContentSummary
|
18
|
+
attr_accessor :added
|
19
|
+
|
20
|
+
attr_accessor :removed
|
21
|
+
|
22
|
+
attr_accessor :present
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'added' => :'added',
|
28
|
+
:'removed' => :'removed',
|
29
|
+
:'present' => :'present'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'added' => :'Hash<String, Hash<String, String>>',
|
37
|
+
:'removed' => :'Hash<String, Hash<String, String>>',
|
38
|
+
:'present' => :'Hash<String, Hash<String, String>>'
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# List of attributes with nullable: true
|
43
|
+
def self.openapi_nullable
|
44
|
+
Set.new([
|
45
|
+
])
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
50
|
+
def initialize(attributes = {})
|
51
|
+
if (!attributes.is_a?(Hash))
|
52
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::ContentSummary` initialize method"
|
53
|
+
end
|
54
|
+
|
55
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
57
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
58
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::ContentSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
59
|
+
end
|
60
|
+
h[k.to_sym] = v
|
61
|
+
}
|
62
|
+
|
63
|
+
if attributes.key?(:'added')
|
64
|
+
if (value = attributes[:'added']).is_a?(Hash)
|
65
|
+
self.added = value
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.key?(:'removed')
|
70
|
+
if (value = attributes[:'removed']).is_a?(Hash)
|
71
|
+
self.removed = value
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.key?(:'present')
|
76
|
+
if (value = attributes[:'present']).is_a?(Hash)
|
77
|
+
self.present = value
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
83
|
+
# @return Array for valid properties with the reasons
|
84
|
+
def list_invalid_properties
|
85
|
+
invalid_properties = Array.new
|
86
|
+
if @added.nil?
|
87
|
+
invalid_properties.push('invalid value for "added", added cannot be nil.')
|
88
|
+
end
|
89
|
+
|
90
|
+
if @removed.nil?
|
91
|
+
invalid_properties.push('invalid value for "removed", removed cannot be nil.')
|
92
|
+
end
|
93
|
+
|
94
|
+
if @present.nil?
|
95
|
+
invalid_properties.push('invalid value for "present", present cannot be nil.')
|
96
|
+
end
|
97
|
+
|
98
|
+
invalid_properties
|
99
|
+
end
|
100
|
+
|
101
|
+
# Check to see if the all the properties in the model are valid
|
102
|
+
# @return true if the model is valid
|
103
|
+
def valid?
|
104
|
+
return false if @added.nil?
|
105
|
+
return false if @removed.nil?
|
106
|
+
return false if @present.nil?
|
107
|
+
true
|
108
|
+
end
|
109
|
+
|
110
|
+
# Checks equality by comparing each attribute.
|
111
|
+
# @param [Object] Object to be compared
|
112
|
+
def ==(o)
|
113
|
+
return true if self.equal?(o)
|
114
|
+
self.class == o.class &&
|
115
|
+
added == o.added &&
|
116
|
+
removed == o.removed &&
|
117
|
+
present == o.present
|
118
|
+
end
|
119
|
+
|
120
|
+
# @see the `==` method
|
121
|
+
# @param [Object] Object to be compared
|
122
|
+
def eql?(o)
|
123
|
+
self == o
|
124
|
+
end
|
125
|
+
|
126
|
+
# Calculates hash code according to all attributes.
|
127
|
+
# @return [Integer] Hash code
|
128
|
+
def hash
|
129
|
+
[added, removed, present].hash
|
130
|
+
end
|
131
|
+
|
132
|
+
# Builds the object from hash
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
+
# @return [Object] Returns the model itself
|
135
|
+
def self.build_from_hash(attributes)
|
136
|
+
new.build_from_hash(attributes)
|
137
|
+
end
|
138
|
+
|
139
|
+
# Builds the object from hash
|
140
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
141
|
+
# @return [Object] Returns the model itself
|
142
|
+
def build_from_hash(attributes)
|
143
|
+
return nil unless attributes.is_a?(Hash)
|
144
|
+
self.class.openapi_types.each_pair do |key, type|
|
145
|
+
if type =~ /\AArray<(.*)>/i
|
146
|
+
# check to ensure the input is an array given that the attribute
|
147
|
+
# is documented as an array but the input is not
|
148
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
149
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
150
|
+
end
|
151
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
152
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
153
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
154
|
+
end
|
155
|
+
|
156
|
+
self
|
157
|
+
end
|
158
|
+
|
159
|
+
# Deserializes the data based on type
|
160
|
+
# @param string type Data type
|
161
|
+
# @param string value Value to be deserialized
|
162
|
+
# @return [Object] Deserialized data
|
163
|
+
def _deserialize(type, value)
|
164
|
+
case type.to_sym
|
165
|
+
when :DateTime
|
166
|
+
DateTime.parse(value)
|
167
|
+
when :Date
|
168
|
+
Date.parse(value)
|
169
|
+
when :String
|
170
|
+
value.to_s
|
171
|
+
when :Integer
|
172
|
+
value.to_i
|
173
|
+
when :Float
|
174
|
+
value.to_f
|
175
|
+
when :Boolean
|
176
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
177
|
+
true
|
178
|
+
else
|
179
|
+
false
|
180
|
+
end
|
181
|
+
when :Object
|
182
|
+
# generic object (usually a Hash), return directly
|
183
|
+
value
|
184
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
185
|
+
inner_type = Regexp.last_match[:inner_type]
|
186
|
+
value.map { |v| _deserialize(inner_type, v) }
|
187
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
188
|
+
k_type = Regexp.last_match[:k_type]
|
189
|
+
v_type = Regexp.last_match[:v_type]
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each do |k, v|
|
192
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
else # model
|
196
|
+
PulpRpmClient.const_get(type).build_from_hash(value)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
# Returns the string representation of the object
|
201
|
+
# @return [String] String presentation of the object
|
202
|
+
def to_s
|
203
|
+
to_hash.to_s
|
204
|
+
end
|
205
|
+
|
206
|
+
# to_body is an alias to to_hash (backward compatibility)
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
208
|
+
def to_body
|
209
|
+
to_hash
|
210
|
+
end
|
211
|
+
|
212
|
+
# Returns the object in the form of hash
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
214
|
+
def to_hash
|
215
|
+
hash = {}
|
216
|
+
self.class.attribute_map.each_pair do |attr, param|
|
217
|
+
value = self.send(attr)
|
218
|
+
if value.nil?
|
219
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
220
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
221
|
+
end
|
222
|
+
|
223
|
+
hash[param] = _to_hash(value)
|
224
|
+
end
|
225
|
+
hash
|
226
|
+
end
|
227
|
+
|
228
|
+
# Outputs non-array value in the form of hash
|
229
|
+
# For object, use to_hash. Otherwise, just return the value
|
230
|
+
# @param [Object] value Any valid value
|
231
|
+
# @return [Hash] Returns the value in the form of hash
|
232
|
+
def _to_hash(value)
|
233
|
+
if value.is_a?(Array)
|
234
|
+
value.compact.map { |v| _to_hash(v) }
|
235
|
+
elsif value.is_a?(Hash)
|
236
|
+
{}.tap do |hash|
|
237
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
238
|
+
end
|
239
|
+
elsif value.respond_to? :to_hash
|
240
|
+
value.to_hash
|
241
|
+
else
|
242
|
+
value
|
243
|
+
end
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|