pulpcore_client 3.14.19 → 3.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -5
  3. data/docs/AccessPoliciesApi.md +1 -1
  4. data/docs/ArtifactsApi.md +1 -1
  5. data/docs/ContentApi.md +1 -1
  6. data/docs/ContentguardsApi.md +1 -1
  7. data/docs/ContentguardsRbacApi.md +473 -0
  8. data/docs/ExportersFilesystemApi.md +362 -0
  9. data/docs/ExportersFilesystemExportsApi.md +243 -0
  10. data/docs/ExportersPulpApi.md +1 -1
  11. data/docs/ExportersPulpExportsApi.md +1 -1
  12. data/docs/FilesystemExport.md +21 -0
  13. data/docs/FilesystemExportResponse.md +25 -0
  14. data/docs/FilesystemExporter.md +21 -0
  15. data/docs/FilesystemExporterResponse.md +25 -0
  16. data/docs/GroupsApi.md +1 -1
  17. data/docs/GroupsModelPermissionsApi.md +1 -1
  18. data/docs/GroupsObjectPermissionsApi.md +1 -1
  19. data/docs/GroupsUsersApi.md +1 -1
  20. data/docs/ImportersPulpApi.md +1 -1
  21. data/docs/ImportersPulpImportCheckApi.md +1 -1
  22. data/docs/ImportersPulpImportsApi.md +1 -1
  23. data/docs/MethodEnum.md +16 -0
  24. data/docs/OrphansApi.md +1 -1
  25. data/docs/OrphansCleanup.md +3 -1
  26. data/docs/OrphansCleanupApi.md +1 -1
  27. data/docs/PaginatedFilesystemExportResponseList.md +23 -0
  28. data/docs/PaginatedFilesystemExporterResponseList.md +23 -0
  29. data/docs/PaginatedRBACContentGuardResponseList.md +23 -0
  30. data/docs/PatchedFilesystemExporter.md +21 -0
  31. data/docs/PatchedRBACContentGuard.md +19 -0
  32. data/docs/PublicationsApi.md +1 -1
  33. data/docs/RBACContentGuard.md +19 -0
  34. data/docs/RBACContentGuardPermission.md +19 -0
  35. data/docs/RBACContentGuardResponse.md +27 -0
  36. data/docs/ReclaimSpace.md +19 -0
  37. data/docs/RepairApi.md +1 -1
  38. data/docs/RepositoriesApi.md +1 -1
  39. data/docs/RepositoriesReclaimSpaceApi.md +61 -0
  40. data/docs/RepositoryResponse.md +3 -3
  41. data/docs/RepositoryVersionsApi.md +1 -1
  42. data/docs/SigningServicesApi.md +1 -1
  43. data/docs/StatusApi.md +1 -1
  44. data/docs/TaskGroupsApi.md +1 -1
  45. data/docs/TasksApi.md +1 -1
  46. data/docs/UploadsApi.md +1 -1
  47. data/docs/UsersApi.md +1 -1
  48. data/docs/WorkersApi.md +1 -1
  49. data/git_push.sh +58 -0
  50. data/lib/pulpcore_client/api/contentguards_rbac_api.rb +580 -0
  51. data/lib/pulpcore_client/api/exporters_filesystem_api.rb +442 -0
  52. data/lib/pulpcore_client/api/exporters_filesystem_exports_api.rb +297 -0
  53. data/lib/pulpcore_client/api/repositories_reclaim_space_api.rb +84 -0
  54. data/lib/pulpcore_client/api_client.rb +5 -2
  55. data/lib/pulpcore_client/configuration.rb +2 -3
  56. data/lib/pulpcore_client/models/filesystem_export.rb +229 -0
  57. data/lib/pulpcore_client/models/filesystem_export_response.rb +250 -0
  58. data/lib/pulpcore_client/models/filesystem_exporter.rb +238 -0
  59. data/lib/pulpcore_client/models/filesystem_exporter_response.rb +257 -0
  60. data/lib/pulpcore_client/models/method_enum.rb +37 -0
  61. data/lib/pulpcore_client/models/orphans_cleanup.rb +17 -4
  62. data/lib/pulpcore_client/models/paginated_filesystem_export_response_list.rb +237 -0
  63. data/lib/pulpcore_client/models/paginated_filesystem_exporter_response_list.rb +237 -0
  64. data/lib/pulpcore_client/models/paginated_rbac_content_guard_response_list.rb +237 -0
  65. data/lib/pulpcore_client/models/patched_filesystem_exporter.rb +228 -0
  66. data/lib/pulpcore_client/models/patched_rbac_content_guard.rb +219 -0
  67. data/lib/pulpcore_client/models/rbac_content_guard.rb +224 -0
  68. data/lib/pulpcore_client/models/rbac_content_guard_permission.rb +219 -0
  69. data/lib/pulpcore_client/models/rbac_content_guard_response.rb +261 -0
  70. data/lib/pulpcore_client/models/reclaim_space.rb +227 -0
  71. data/lib/pulpcore_client/models/repository_response.rb +17 -16
  72. data/lib/pulpcore_client/version.rb +1 -1
  73. data/lib/pulpcore_client.rb +18 -0
  74. data/pulpcore_client.gemspec +3 -3
  75. data/spec/api/contentguards_rbac_api_spec.rb +146 -0
  76. data/spec/api/exporters_filesystem_api_spec.rb +120 -0
  77. data/spec/api/exporters_filesystem_exports_api_spec.rb +91 -0
  78. data/spec/api/repositories_reclaim_space_api_spec.rb +46 -0
  79. data/spec/configuration_spec.rb +3 -3
  80. data/spec/models/filesystem_export_response_spec.rb +65 -0
  81. data/spec/models/filesystem_export_spec.rb +53 -0
  82. data/spec/models/filesystem_exporter_response_spec.rb +65 -0
  83. data/spec/models/filesystem_exporter_spec.rb +53 -0
  84. data/spec/models/method_enum_spec.rb +35 -0
  85. data/spec/models/orphans_cleanup_spec.rb +6 -0
  86. data/spec/models/paginated_filesystem_export_response_list_spec.rb +59 -0
  87. data/spec/models/paginated_filesystem_exporter_response_list_spec.rb +59 -0
  88. data/spec/models/paginated_rbac_content_guard_response_list_spec.rb +59 -0
  89. data/spec/models/patched_filesystem_exporter_spec.rb +53 -0
  90. data/spec/models/patched_rbac_content_guard_spec.rb +47 -0
  91. data/spec/models/rbac_content_guard_permission_spec.rb +47 -0
  92. data/spec/models/rbac_content_guard_response_spec.rb +71 -0
  93. data/spec/models/rbac_content_guard_spec.rb +47 -0
  94. data/spec/models/reclaim_space_spec.rb +47 -0
  95. data/spec/models/repository_response_spec.rb +1 -1
  96. metadata +158 -91
@@ -0,0 +1,250 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpcoreClient
16
+ # Serializer for FilesystemExports.
17
+ class FilesystemExportResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # Timestamp of creation.
21
+ attr_accessor :pulp_created
22
+
23
+ # A URI of the task that ran the Export.
24
+ attr_accessor :task
25
+
26
+ # Resources that were exported.
27
+ attr_accessor :exported_resources
28
+
29
+ # Any additional parameters that were used to create the export.
30
+ attr_accessor :params
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'pulp_href' => :'pulp_href',
36
+ :'pulp_created' => :'pulp_created',
37
+ :'task' => :'task',
38
+ :'exported_resources' => :'exported_resources',
39
+ :'params' => :'params'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'pulp_href' => :'String',
47
+ :'pulp_created' => :'DateTime',
48
+ :'task' => :'String',
49
+ :'exported_resources' => :'Array<String>',
50
+ :'params' => :'Object'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ :'task',
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::FilesystemExportResponse` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::FilesystemExportResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'pulp_href')
77
+ self.pulp_href = attributes[:'pulp_href']
78
+ end
79
+
80
+ if attributes.key?(:'pulp_created')
81
+ self.pulp_created = attributes[:'pulp_created']
82
+ end
83
+
84
+ if attributes.key?(:'task')
85
+ self.task = attributes[:'task']
86
+ end
87
+
88
+ if attributes.key?(:'exported_resources')
89
+ if (value = attributes[:'exported_resources']).is_a?(Array)
90
+ self.exported_resources = value
91
+ end
92
+ end
93
+
94
+ if attributes.key?(:'params')
95
+ self.params = attributes[:'params']
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ invalid_properties = Array.new
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ pulp_href == o.pulp_href &&
118
+ pulp_created == o.pulp_created &&
119
+ task == o.task &&
120
+ exported_resources == o.exported_resources &&
121
+ params == o.params
122
+ end
123
+
124
+ # @see the `==` method
125
+ # @param [Object] Object to be compared
126
+ def eql?(o)
127
+ self == o
128
+ end
129
+
130
+ # Calculates hash code according to all attributes.
131
+ # @return [Integer] Hash code
132
+ def hash
133
+ [pulp_href, pulp_created, task, exported_resources, params].hash
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def self.build_from_hash(attributes)
140
+ new.build_from_hash(attributes)
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def build_from_hash(attributes)
147
+ return nil unless attributes.is_a?(Hash)
148
+ self.class.openapi_types.each_pair do |key, type|
149
+ if type =~ /\AArray<(.*)>/i
150
+ # check to ensure the input is an array given that the attribute
151
+ # is documented as an array but the input is not
152
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
153
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
154
+ end
155
+ elsif !attributes[self.class.attribute_map[key]].nil?
156
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
157
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
158
+ end
159
+
160
+ self
161
+ end
162
+
163
+ # Deserializes the data based on type
164
+ # @param string type Data type
165
+ # @param string value Value to be deserialized
166
+ # @return [Object] Deserialized data
167
+ def _deserialize(type, value)
168
+ case type.to_sym
169
+ when :DateTime
170
+ DateTime.parse(value)
171
+ when :Date
172
+ Date.parse(value)
173
+ when :String
174
+ value.to_s
175
+ when :Integer
176
+ value.to_i
177
+ when :Float
178
+ value.to_f
179
+ when :Boolean
180
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
+ true
182
+ else
183
+ false
184
+ end
185
+ when :Object
186
+ # generic object (usually a Hash), return directly
187
+ value
188
+ when /\AArray<(?<inner_type>.+)>\z/
189
+ inner_type = Regexp.last_match[:inner_type]
190
+ value.map { |v| _deserialize(inner_type, v) }
191
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
+ k_type = Regexp.last_match[:k_type]
193
+ v_type = Regexp.last_match[:v_type]
194
+ {}.tap do |hash|
195
+ value.each do |k, v|
196
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ end
198
+ end
199
+ else # model
200
+ PulpcoreClient.const_get(type).build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+ end
250
+ end
@@ -0,0 +1,238 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpcoreClient
16
+ # Serializer for FilesystemExporters.
17
+ class FilesystemExporter
18
+ # Unique name of the file system exporter.
19
+ attr_accessor :name
20
+
21
+ # File system location to export to.
22
+ attr_accessor :path
23
+
24
+ # Method of exporting
25
+ attr_accessor :method
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'name' => :'name',
31
+ :'path' => :'path',
32
+ :'method' => :'method'
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'name' => :'String',
40
+ :'path' => :'String',
41
+ :'method' => :'MethodEnum'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::FilesystemExporter` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::FilesystemExporter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'name')
67
+ self.name = attributes[:'name']
68
+ end
69
+
70
+ if attributes.key?(:'path')
71
+ self.path = attributes[:'path']
72
+ end
73
+
74
+ if attributes.key?(:'method')
75
+ self.method = attributes[:'method']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ if @name.nil?
84
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
85
+ end
86
+
87
+ if @path.nil?
88
+ invalid_properties.push('invalid value for "path", path cannot be nil.')
89
+ end
90
+
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ return false if @name.nil?
98
+ return false if @path.nil?
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ name == o.name &&
108
+ path == o.path &&
109
+ method == o.method
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [name, path, method].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ new.build_from_hash(attributes)
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def build_from_hash(attributes)
135
+ return nil unless attributes.is_a?(Hash)
136
+ self.class.openapi_types.each_pair do |key, type|
137
+ if type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
141
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
142
+ end
143
+ elsif !attributes[self.class.attribute_map[key]].nil?
144
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
145
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
146
+ end
147
+
148
+ self
149
+ end
150
+
151
+ # Deserializes the data based on type
152
+ # @param string type Data type
153
+ # @param string value Value to be deserialized
154
+ # @return [Object] Deserialized data
155
+ def _deserialize(type, value)
156
+ case type.to_sym
157
+ when :DateTime
158
+ DateTime.parse(value)
159
+ when :Date
160
+ Date.parse(value)
161
+ when :String
162
+ value.to_s
163
+ when :Integer
164
+ value.to_i
165
+ when :Float
166
+ value.to_f
167
+ when :Boolean
168
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
169
+ true
170
+ else
171
+ false
172
+ end
173
+ when :Object
174
+ # generic object (usually a Hash), return directly
175
+ value
176
+ when /\AArray<(?<inner_type>.+)>\z/
177
+ inner_type = Regexp.last_match[:inner_type]
178
+ value.map { |v| _deserialize(inner_type, v) }
179
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
180
+ k_type = Regexp.last_match[:k_type]
181
+ v_type = Regexp.last_match[:v_type]
182
+ {}.tap do |hash|
183
+ value.each do |k, v|
184
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
185
+ end
186
+ end
187
+ else # model
188
+ PulpcoreClient.const_get(type).build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+ end
238
+ end