pulpcore_client 3.65.0 → 3.66.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +68 -4
  3. data/docs/AccessPoliciesApi.md +4 -4
  4. data/docs/ArtifactDistributionResponse.md +15 -15
  5. data/docs/ContentApi.md +4 -4
  6. data/docs/ContentOpenpgpPublickeyApi.md +212 -0
  7. data/docs/ContentOpenpgpPublicsubkeyApi.md +150 -0
  8. data/docs/ContentOpenpgpSignatureApi.md +150 -0
  9. data/docs/ContentOpenpgpUserattributeApi.md +150 -0
  10. data/docs/ContentOpenpgpUseridApi.md +166 -0
  11. data/docs/DistributionsApi.md +4 -4
  12. data/docs/DistributionsOpenpgpApi.md +478 -0
  13. data/docs/NestedOpenPGPPublicSubkey.md +19 -0
  14. data/docs/NestedOpenPGPPublicSubkeyResponse.md +21 -0
  15. data/docs/NestedOpenPGPSignature.md +27 -0
  16. data/docs/NestedOpenPGPSignatureResponse.md +29 -0
  17. data/docs/NestedOpenPGPUserAttribute.md +17 -0
  18. data/docs/NestedOpenPGPUserAttributeResponse.md +19 -0
  19. data/docs/NestedOpenPGPUserID.md +17 -0
  20. data/docs/NestedOpenPGPUserIDResponse.md +19 -0
  21. data/docs/OpenPGPDistribution.md +29 -0
  22. data/docs/OpenPGPDistributionResponse.md +41 -0
  23. data/docs/OpenPGPKeyring.md +25 -0
  24. data/docs/OpenPGPKeyringResponse.md +37 -0
  25. data/docs/OpenPGPPublicKey.md +23 -0
  26. data/docs/OpenPGPPublicKeyResponse.md +33 -0
  27. data/docs/OpenPGPPublicSubkeyResponse.md +31 -0
  28. data/docs/OpenPGPSignatureResponse.md +39 -0
  29. data/docs/OpenPGPUserAttributeResponse.md +29 -0
  30. data/docs/OpenPGPUserIDResponse.md +29 -0
  31. data/docs/PaginatedOpenPGPDistributionResponseList.md +23 -0
  32. data/docs/PaginatedOpenPGPKeyringResponseList.md +23 -0
  33. data/docs/PaginatedOpenPGPPublicKeyResponseList.md +23 -0
  34. data/docs/PaginatedOpenPGPPublicSubkeyResponseList.md +23 -0
  35. data/docs/PaginatedOpenPGPSignatureResponseList.md +23 -0
  36. data/docs/PaginatedOpenPGPUserAttributeResponseList.md +23 -0
  37. data/docs/PaginatedOpenPGPUserIDResponseList.md +23 -0
  38. data/docs/PatchedOpenPGPDistribution.md +29 -0
  39. data/docs/PatchedOpenPGPKeyring.md +25 -0
  40. data/docs/RepositoriesApi.md +4 -4
  41. data/docs/RepositoriesOpenpgpKeyringApi.md +802 -0
  42. data/docs/RepositoryAddRemoveContent.md +21 -0
  43. data/docs/SetLabel.md +19 -0
  44. data/docs/SetLabelResponse.md +19 -0
  45. data/docs/TasksApi.md +2 -2
  46. data/docs/UnsetLabel.md +17 -0
  47. data/docs/UnsetLabelResponse.md +19 -0
  48. data/lib/pulpcore_client/api/access_policies_api.rb +8 -8
  49. data/lib/pulpcore_client/api/content_api.rb +6 -6
  50. data/lib/pulpcore_client/api/content_openpgp_publickey_api.rb +266 -0
  51. data/lib/pulpcore_client/api/content_openpgp_publicsubkey_api.rb +192 -0
  52. data/lib/pulpcore_client/api/content_openpgp_signature_api.rb +192 -0
  53. data/lib/pulpcore_client/api/content_openpgp_userattribute_api.rb +192 -0
  54. data/lib/pulpcore_client/api/content_openpgp_userid_api.rb +216 -0
  55. data/lib/pulpcore_client/api/distributions_api.rb +6 -6
  56. data/lib/pulpcore_client/api/distributions_openpgp_api.rb +592 -0
  57. data/lib/pulpcore_client/api/repositories_api.rb +6 -6
  58. data/lib/pulpcore_client/api/repositories_openpgp_keyring_api.rb +992 -0
  59. data/lib/pulpcore_client/api/tasks_api.rb +3 -3
  60. data/lib/pulpcore_client/models/artifact_distribution_response.rb +69 -69
  61. data/lib/pulpcore_client/models/nested_open_pgp_public_subkey.rb +254 -0
  62. data/lib/pulpcore_client/models/nested_open_pgp_public_subkey_response.rb +256 -0
  63. data/lib/pulpcore_client/models/nested_open_pgp_signature.rb +305 -0
  64. data/lib/pulpcore_client/models/nested_open_pgp_signature_response.rb +290 -0
  65. data/lib/pulpcore_client/models/nested_open_pgp_user_attribute.rb +240 -0
  66. data/lib/pulpcore_client/models/nested_open_pgp_user_attribute_response.rb +242 -0
  67. data/lib/pulpcore_client/models/nested_open_pgp_user_id.rb +231 -0
  68. data/lib/pulpcore_client/models/nested_open_pgp_user_id_response.rb +223 -0
  69. data/lib/pulpcore_client/models/open_pgp_distribution.rb +322 -0
  70. data/lib/pulpcore_client/models/open_pgp_distribution_response.rb +343 -0
  71. data/lib/pulpcore_client/models/open_pgp_keyring.rb +306 -0
  72. data/lib/pulpcore_client/models/open_pgp_keyring_response.rb +329 -0
  73. data/lib/pulpcore_client/models/open_pgp_public_key.rb +253 -0
  74. data/lib/pulpcore_client/models/open_pgp_public_key_response.rb +303 -0
  75. data/lib/pulpcore_client/models/open_pgp_public_subkey_response.rb +304 -0
  76. data/lib/pulpcore_client/models/open_pgp_signature_response.rb +338 -0
  77. data/lib/pulpcore_client/models/open_pgp_user_attribute_response.rb +290 -0
  78. data/lib/pulpcore_client/models/open_pgp_user_id_response.rb +271 -0
  79. data/lib/pulpcore_client/models/paginated_open_pgp_distribution_response_list.rb +247 -0
  80. data/lib/pulpcore_client/models/paginated_open_pgp_keyring_response_list.rb +247 -0
  81. data/lib/pulpcore_client/models/paginated_open_pgp_public_key_response_list.rb +247 -0
  82. data/lib/pulpcore_client/models/paginated_open_pgp_public_subkey_response_list.rb +247 -0
  83. data/lib/pulpcore_client/models/paginated_open_pgp_signature_response_list.rb +247 -0
  84. data/lib/pulpcore_client/models/paginated_open_pgp_user_attribute_response_list.rb +247 -0
  85. data/lib/pulpcore_client/models/paginated_open_pgp_user_id_response_list.rb +247 -0
  86. data/lib/pulpcore_client/models/patched_open_pgp_distribution.rb +304 -0
  87. data/lib/pulpcore_client/models/patched_open_pgp_keyring.rb +297 -0
  88. data/lib/pulpcore_client/models/remote_response.rb +20 -20
  89. data/lib/pulpcore_client/models/repository_add_remove_content.rb +232 -0
  90. data/lib/pulpcore_client/models/set_label.rb +252 -0
  91. data/lib/pulpcore_client/models/set_label_response.rb +243 -0
  92. data/lib/pulpcore_client/models/unset_label.rb +242 -0
  93. data/lib/pulpcore_client/models/unset_label_response.rb +242 -0
  94. data/lib/pulpcore_client/version.rb +1 -1
  95. data/lib/pulpcore_client.rb +39 -0
  96. data/spec/api/access_policies_api_spec.rb +4 -4
  97. data/spec/api/content_api_spec.rb +2 -2
  98. data/spec/api/content_openpgp_publickey_api_spec.rb +89 -0
  99. data/spec/api/content_openpgp_publicsubkey_api_spec.rb +74 -0
  100. data/spec/api/content_openpgp_signature_api_spec.rb +74 -0
  101. data/spec/api/content_openpgp_userattribute_api_spec.rb +74 -0
  102. data/spec/api/content_openpgp_userid_api_spec.rb +82 -0
  103. data/spec/api/distributions_api_spec.rb +2 -2
  104. data/spec/api/distributions_openpgp_api_spec.rb +148 -0
  105. data/spec/api/repositories_api_spec.rb +2 -2
  106. data/spec/api/repositories_openpgp_keyring_api_spec.rb +233 -0
  107. data/spec/api/tasks_api_spec.rb +1 -1
  108. data/spec/models/artifact_distribution_response_spec.rb +10 -10
  109. data/spec/models/nested_open_pgp_public_subkey_response_spec.rb +53 -0
  110. data/spec/models/nested_open_pgp_public_subkey_spec.rb +47 -0
  111. data/spec/models/nested_open_pgp_signature_response_spec.rb +77 -0
  112. data/spec/models/nested_open_pgp_signature_spec.rb +71 -0
  113. data/spec/models/nested_open_pgp_user_attribute_response_spec.rb +47 -0
  114. data/spec/models/nested_open_pgp_user_attribute_spec.rb +41 -0
  115. data/spec/models/nested_open_pgp_user_id_response_spec.rb +47 -0
  116. data/spec/models/nested_open_pgp_user_id_spec.rb +41 -0
  117. data/spec/models/open_pgp_distribution_response_spec.rb +113 -0
  118. data/spec/models/open_pgp_distribution_spec.rb +77 -0
  119. data/spec/models/open_pgp_keyring_response_spec.rb +101 -0
  120. data/spec/models/open_pgp_keyring_spec.rb +65 -0
  121. data/spec/models/open_pgp_public_key_response_spec.rb +89 -0
  122. data/spec/models/open_pgp_public_key_spec.rb +59 -0
  123. data/spec/models/open_pgp_public_subkey_response_spec.rb +83 -0
  124. data/spec/models/open_pgp_signature_response_spec.rb +107 -0
  125. data/spec/models/open_pgp_user_attribute_response_spec.rb +77 -0
  126. data/spec/models/open_pgp_user_id_response_spec.rb +77 -0
  127. data/spec/models/paginated_open_pgp_distribution_response_list_spec.rb +59 -0
  128. data/spec/models/paginated_open_pgp_keyring_response_list_spec.rb +59 -0
  129. data/spec/models/paginated_open_pgp_public_key_response_list_spec.rb +59 -0
  130. data/spec/models/paginated_open_pgp_public_subkey_response_list_spec.rb +59 -0
  131. data/spec/models/paginated_open_pgp_signature_response_list_spec.rb +59 -0
  132. data/spec/models/paginated_open_pgp_user_attribute_response_list_spec.rb +59 -0
  133. data/spec/models/paginated_open_pgp_user_id_response_list_spec.rb +59 -0
  134. data/spec/models/patched_open_pgp_distribution_spec.rb +77 -0
  135. data/spec/models/patched_open_pgp_keyring_spec.rb +65 -0
  136. data/spec/models/repository_add_remove_content_spec.rb +53 -0
  137. data/spec/models/set_label_response_spec.rb +47 -0
  138. data/spec/models/set_label_spec.rb +47 -0
  139. data/spec/models/unset_label_response_spec.rb +47 -0
  140. data/spec/models/unset_label_spec.rb +41 -0
  141. metadata +314 -158
@@ -0,0 +1,242 @@
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 synchronously setting a label.
17
+ class UnsetLabel
18
+ attr_accessor :key
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'key' => :'key'
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.openapi_types
29
+ {
30
+ :'key' => :'String'
31
+ }
32
+ end
33
+
34
+ # List of attributes with nullable: true
35
+ def self.openapi_nullable
36
+ Set.new([
37
+ ])
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ if (!attributes.is_a?(Hash))
44
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::UnsetLabel` initialize method"
45
+ end
46
+
47
+ # check to see if the attribute exists and convert string to symbol for hash key
48
+ attributes = attributes.each_with_object({}) { |(k, v), h|
49
+ if (!self.class.attribute_map.key?(k.to_sym))
50
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::UnsetLabel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
51
+ end
52
+ h[k.to_sym] = v
53
+ }
54
+
55
+ if attributes.key?(:'key')
56
+ self.key = attributes[:'key']
57
+ end
58
+ end
59
+
60
+ # Show invalid properties with the reasons. Usually used together with valid?
61
+ # @return Array for valid properties with the reasons
62
+ def list_invalid_properties
63
+ invalid_properties = Array.new
64
+ if @key.nil?
65
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
66
+ end
67
+
68
+ if @key.to_s.length < 1
69
+ invalid_properties.push('invalid value for "key", the character length must be great than or equal to 1.')
70
+ end
71
+
72
+ pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
73
+ if @key !~ pattern
74
+ invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
75
+ end
76
+
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ return false if @key.nil?
84
+ return false if @key.to_s.length < 1
85
+ return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
86
+ true
87
+ end
88
+
89
+ # Custom attribute writer method with validation
90
+ # @param [Object] key Value to be assigned
91
+ def key=(key)
92
+ if key.nil?
93
+ fail ArgumentError, 'key cannot be nil'
94
+ end
95
+
96
+ if key.to_s.length < 1
97
+ fail ArgumentError, 'invalid value for "key", the character length must be great than or equal to 1.'
98
+ end
99
+
100
+ pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
101
+ if key !~ pattern
102
+ fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
103
+ end
104
+
105
+ @key = key
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ key == o.key
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [key].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def self.build_from_hash(attributes)
132
+ new.build_from_hash(attributes)
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ self.class.openapi_types.each_pair do |key, type|
141
+ if type =~ /\AArray<(.*)>/i
142
+ # check to ensure the input is an array given that the attribute
143
+ # is documented as an array but the input is not
144
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
145
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
146
+ end
147
+ elsif !attributes[self.class.attribute_map[key]].nil?
148
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
150
+ end
151
+
152
+ self
153
+ end
154
+
155
+ # Deserializes the data based on type
156
+ # @param string type Data type
157
+ # @param string value Value to be deserialized
158
+ # @return [Object] Deserialized data
159
+ def _deserialize(type, value)
160
+ case type.to_sym
161
+ when :DateTime
162
+ DateTime.parse(value)
163
+ when :Date
164
+ Date.parse(value)
165
+ when :String
166
+ value.to_s
167
+ when :Integer
168
+ value.to_i
169
+ when :Float
170
+ value.to_f
171
+ when :Boolean
172
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
+ true
174
+ else
175
+ false
176
+ end
177
+ when :Object
178
+ # generic object (usually a Hash), return directly
179
+ value
180
+ when /\AArray<(?<inner_type>.+)>\z/
181
+ inner_type = Regexp.last_match[:inner_type]
182
+ value.map { |v| _deserialize(inner_type, v) }
183
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
184
+ k_type = Regexp.last_match[:k_type]
185
+ v_type = Regexp.last_match[:v_type]
186
+ {}.tap do |hash|
187
+ value.each do |k, v|
188
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
189
+ end
190
+ end
191
+ else # model
192
+ PulpcoreClient.const_get(type).build_from_hash(value)
193
+ end
194
+ end
195
+
196
+ # Returns the string representation of the object
197
+ # @return [String] String presentation of the object
198
+ def to_s
199
+ to_hash.to_s
200
+ end
201
+
202
+ # to_body is an alias to to_hash (backward compatibility)
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_body
205
+ to_hash
206
+ end
207
+
208
+ # Returns the object in the form of hash
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_hash
211
+ hash = {}
212
+ self.class.attribute_map.each_pair do |attr, param|
213
+ value = self.send(attr)
214
+ if value.nil?
215
+ is_nullable = self.class.openapi_nullable.include?(attr)
216
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
217
+ end
218
+
219
+ hash[param] = _to_hash(value)
220
+ end
221
+ hash
222
+ end
223
+
224
+ # Outputs non-array value in the form of hash
225
+ # For object, use to_hash. Otherwise, just return the value
226
+ # @param [Object] value Any valid value
227
+ # @return [Hash] Returns the value in the form of hash
228
+ def _to_hash(value)
229
+ if value.is_a?(Array)
230
+ value.compact.map { |v| _to_hash(v) }
231
+ elsif value.is_a?(Hash)
232
+ {}.tap do |hash|
233
+ value.each { |k, v| hash[k] = _to_hash(v) }
234
+ end
235
+ elsif value.respond_to? :to_hash
236
+ value.to_hash
237
+ else
238
+ value
239
+ end
240
+ end
241
+ end
242
+ end
@@ -0,0 +1,242 @@
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 synchronously setting a label.
17
+ class UnsetLabelResponse
18
+ attr_accessor :key
19
+
20
+ attr_accessor :value
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'key' => :'key',
26
+ :'value' => :'value'
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.openapi_types
32
+ {
33
+ :'key' => :'String',
34
+ :'value' => :'String'
35
+ }
36
+ end
37
+
38
+ # List of attributes with nullable: true
39
+ def self.openapi_nullable
40
+ Set.new([
41
+ ])
42
+ end
43
+
44
+ # Initializes the object
45
+ # @param [Hash] attributes Model attributes in the form of hash
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::UnsetLabelResponse` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::UnsetLabelResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'key')
60
+ self.key = attributes[:'key']
61
+ end
62
+
63
+ if attributes.key?(:'value')
64
+ self.value = attributes[:'value']
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ if @key.nil?
73
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
74
+ end
75
+
76
+ pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
77
+ if @key !~ pattern
78
+ invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
79
+ end
80
+
81
+ invalid_properties
82
+ end
83
+
84
+ # Check to see if the all the properties in the model are valid
85
+ # @return true if the model is valid
86
+ def valid?
87
+ return false if @key.nil?
88
+ return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
89
+ true
90
+ end
91
+
92
+ # Custom attribute writer method with validation
93
+ # @param [Object] key Value to be assigned
94
+ def key=(key)
95
+ if key.nil?
96
+ fail ArgumentError, 'key cannot be nil'
97
+ end
98
+
99
+ pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
100
+ if key !~ pattern
101
+ fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
102
+ end
103
+
104
+ @key = key
105
+ end
106
+
107
+ # Checks equality by comparing each attribute.
108
+ # @param [Object] Object to be compared
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ key == o.key &&
113
+ value == o.value
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [key, value].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def self.build_from_hash(attributes)
132
+ new.build_from_hash(attributes)
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ self.class.openapi_types.each_pair do |key, type|
141
+ if type =~ /\AArray<(.*)>/i
142
+ # check to ensure the input is an array given that the attribute
143
+ # is documented as an array but the input is not
144
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
145
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
146
+ end
147
+ elsif !attributes[self.class.attribute_map[key]].nil?
148
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
149
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
150
+ end
151
+
152
+ self
153
+ end
154
+
155
+ # Deserializes the data based on type
156
+ # @param string type Data type
157
+ # @param string value Value to be deserialized
158
+ # @return [Object] Deserialized data
159
+ def _deserialize(type, value)
160
+ case type.to_sym
161
+ when :DateTime
162
+ DateTime.parse(value)
163
+ when :Date
164
+ Date.parse(value)
165
+ when :String
166
+ value.to_s
167
+ when :Integer
168
+ value.to_i
169
+ when :Float
170
+ value.to_f
171
+ when :Boolean
172
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
+ true
174
+ else
175
+ false
176
+ end
177
+ when :Object
178
+ # generic object (usually a Hash), return directly
179
+ value
180
+ when /\AArray<(?<inner_type>.+)>\z/
181
+ inner_type = Regexp.last_match[:inner_type]
182
+ value.map { |v| _deserialize(inner_type, v) }
183
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
184
+ k_type = Regexp.last_match[:k_type]
185
+ v_type = Regexp.last_match[:v_type]
186
+ {}.tap do |hash|
187
+ value.each do |k, v|
188
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
189
+ end
190
+ end
191
+ else # model
192
+ PulpcoreClient.const_get(type).build_from_hash(value)
193
+ end
194
+ end
195
+
196
+ # Returns the string representation of the object
197
+ # @return [String] String presentation of the object
198
+ def to_s
199
+ to_hash.to_s
200
+ end
201
+
202
+ # to_body is an alias to to_hash (backward compatibility)
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_body
205
+ to_hash
206
+ end
207
+
208
+ # Returns the object in the form of hash
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_hash
211
+ hash = {}
212
+ self.class.attribute_map.each_pair do |attr, param|
213
+ value = self.send(attr)
214
+ if value.nil?
215
+ is_nullable = self.class.openapi_nullable.include?(attr)
216
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
217
+ end
218
+
219
+ hash[param] = _to_hash(value)
220
+ end
221
+ hash
222
+ end
223
+
224
+ # Outputs non-array value in the form of hash
225
+ # For object, use to_hash. Otherwise, just return the value
226
+ # @param [Object] value Any valid value
227
+ # @return [Hash] Returns the value in the form of hash
228
+ def _to_hash(value)
229
+ if value.is_a?(Array)
230
+ value.compact.map { |v| _to_hash(v) }
231
+ elsif value.is_a?(Hash)
232
+ {}.tap do |hash|
233
+ value.each { |k, v| hash[k] = _to_hash(v) }
234
+ end
235
+ elsif value.respond_to? :to_hash
236
+ value.to_hash
237
+ else
238
+ value
239
+ end
240
+ end
241
+ end
242
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module PulpcoreClient
14
- VERSION = '3.65.0'
14
+ VERSION = '3.66.0'
15
15
  end
@@ -56,9 +56,27 @@ require 'pulpcore_client/models/method_enum'
56
56
  require 'pulpcore_client/models/minimal_task_response'
57
57
  require 'pulpcore_client/models/multiple_artifact_content_response'
58
58
  require 'pulpcore_client/models/my_permissions_response'
59
+ require 'pulpcore_client/models/nested_open_pgp_public_subkey'
60
+ require 'pulpcore_client/models/nested_open_pgp_public_subkey_response'
61
+ require 'pulpcore_client/models/nested_open_pgp_signature'
62
+ require 'pulpcore_client/models/nested_open_pgp_signature_response'
63
+ require 'pulpcore_client/models/nested_open_pgp_user_attribute'
64
+ require 'pulpcore_client/models/nested_open_pgp_user_attribute_response'
65
+ require 'pulpcore_client/models/nested_open_pgp_user_id'
66
+ require 'pulpcore_client/models/nested_open_pgp_user_id_response'
59
67
  require 'pulpcore_client/models/nested_role'
60
68
  require 'pulpcore_client/models/nested_role_response'
61
69
  require 'pulpcore_client/models/object_roles_response'
70
+ require 'pulpcore_client/models/open_pgp_distribution'
71
+ require 'pulpcore_client/models/open_pgp_distribution_response'
72
+ require 'pulpcore_client/models/open_pgp_keyring'
73
+ require 'pulpcore_client/models/open_pgp_keyring_response'
74
+ require 'pulpcore_client/models/open_pgp_public_key'
75
+ require 'pulpcore_client/models/open_pgp_public_key_response'
76
+ require 'pulpcore_client/models/open_pgp_public_subkey_response'
77
+ require 'pulpcore_client/models/open_pgp_signature_response'
78
+ require 'pulpcore_client/models/open_pgp_user_attribute_response'
79
+ require 'pulpcore_client/models/open_pgp_user_id_response'
62
80
  require 'pulpcore_client/models/orphans_cleanup'
63
81
  require 'pulpcore_client/models/paginated_access_policy_response_list'
64
82
  require 'pulpcore_client/models/paginated_artifact_distribution_response_list'
@@ -76,6 +94,13 @@ require 'pulpcore_client/models/paginated_group_user_response_list'
76
94
  require 'pulpcore_client/models/paginated_header_content_guard_response_list'
77
95
  require 'pulpcore_client/models/paginated_import_response_list'
78
96
  require 'pulpcore_client/models/paginated_multiple_artifact_content_response_list'
97
+ require 'pulpcore_client/models/paginated_open_pgp_distribution_response_list'
98
+ require 'pulpcore_client/models/paginated_open_pgp_keyring_response_list'
99
+ require 'pulpcore_client/models/paginated_open_pgp_public_key_response_list'
100
+ require 'pulpcore_client/models/paginated_open_pgp_public_subkey_response_list'
101
+ require 'pulpcore_client/models/paginated_open_pgp_signature_response_list'
102
+ require 'pulpcore_client/models/paginated_open_pgp_user_attribute_response_list'
103
+ require 'pulpcore_client/models/paginated_open_pgp_user_id_response_list'
79
104
  require 'pulpcore_client/models/paginated_publication_response_list'
80
105
  require 'pulpcore_client/models/paginated_pulp_export_response_list'
81
106
  require 'pulpcore_client/models/paginated_pulp_exporter_response_list'
@@ -101,6 +126,8 @@ require 'pulpcore_client/models/patched_domain'
101
126
  require 'pulpcore_client/models/patched_filesystem_exporter'
102
127
  require 'pulpcore_client/models/patched_group'
103
128
  require 'pulpcore_client/models/patched_header_content_guard'
129
+ require 'pulpcore_client/models/patched_open_pgp_distribution'
130
+ require 'pulpcore_client/models/patched_open_pgp_keyring'
104
131
  require 'pulpcore_client/models/patched_pulp_exporter'
105
132
  require 'pulpcore_client/models/patched_pulp_importer'
106
133
  require 'pulpcore_client/models/patched_rbac_content_guard'
@@ -129,10 +156,13 @@ require 'pulpcore_client/models/redis_connection_response'
129
156
  require 'pulpcore_client/models/remote_response'
130
157
  require 'pulpcore_client/models/remote_response_hidden_fields'
131
158
  require 'pulpcore_client/models/repair'
159
+ require 'pulpcore_client/models/repository_add_remove_content'
132
160
  require 'pulpcore_client/models/repository_response'
133
161
  require 'pulpcore_client/models/repository_version_response'
134
162
  require 'pulpcore_client/models/role'
135
163
  require 'pulpcore_client/models/role_response'
164
+ require 'pulpcore_client/models/set_label'
165
+ require 'pulpcore_client/models/set_label_response'
136
166
  require 'pulpcore_client/models/signing_service_response'
137
167
  require 'pulpcore_client/models/states_enum'
138
168
  require 'pulpcore_client/models/status_response'
@@ -142,6 +172,8 @@ require 'pulpcore_client/models/task_group_operation_response'
142
172
  require 'pulpcore_client/models/task_group_response'
143
173
  require 'pulpcore_client/models/task_response'
144
174
  require 'pulpcore_client/models/task_schedule_response'
175
+ require 'pulpcore_client/models/unset_label'
176
+ require 'pulpcore_client/models/unset_label_response'
145
177
  require 'pulpcore_client/models/upload'
146
178
  require 'pulpcore_client/models/upload_chunk'
147
179
  require 'pulpcore_client/models/upload_chunk_response'
@@ -163,6 +195,11 @@ require 'pulpcore_client/models/worker_response'
163
195
  require 'pulpcore_client/api/access_policies_api'
164
196
  require 'pulpcore_client/api/artifacts_api'
165
197
  require 'pulpcore_client/api/content_api'
198
+ require 'pulpcore_client/api/content_openpgp_publickey_api'
199
+ require 'pulpcore_client/api/content_openpgp_publicsubkey_api'
200
+ require 'pulpcore_client/api/content_openpgp_signature_api'
201
+ require 'pulpcore_client/api/content_openpgp_userattribute_api'
202
+ require 'pulpcore_client/api/content_openpgp_userid_api'
166
203
  require 'pulpcore_client/api/contentguards_api'
167
204
  require 'pulpcore_client/api/contentguards_composite_api'
168
205
  require 'pulpcore_client/api/contentguards_content_redirect_api'
@@ -170,6 +207,7 @@ require 'pulpcore_client/api/contentguards_header_api'
170
207
  require 'pulpcore_client/api/contentguards_rbac_api'
171
208
  require 'pulpcore_client/api/distributions_api'
172
209
  require 'pulpcore_client/api/distributions_artifacts_api'
210
+ require 'pulpcore_client/api/distributions_openpgp_api'
173
211
  require 'pulpcore_client/api/domains_api'
174
212
  require 'pulpcore_client/api/exporters_filesystem_api'
175
213
  require 'pulpcore_client/api/exporters_filesystem_exports_api'
@@ -188,6 +226,7 @@ require 'pulpcore_client/api/publications_api'
188
226
  require 'pulpcore_client/api/remotes_api'
189
227
  require 'pulpcore_client/api/repair_api'
190
228
  require 'pulpcore_client/api/repositories_api'
229
+ require 'pulpcore_client/api/repositories_openpgp_keyring_api'
191
230
  require 'pulpcore_client/api/repositories_reclaim_space_api'
192
231
  require 'pulpcore_client/api/repository_versions_api'
193
232
  require 'pulpcore_client/api/roles_api'
@@ -34,7 +34,7 @@ describe 'AccessPoliciesApi' do
34
34
 
35
35
  # unit tests for list
36
36
  # List access policys
37
- # ViewSet for AccessPolicy. NOTE: This API endpoint is in \&quot;tech preview\&quot; and subject to change
37
+ # ViewSet for AccessPolicy.
38
38
  # @param [Hash] opts the optional parameters
39
39
  # @option opts [Boolean] :customized Filter results where customized matches value
40
40
  # @option opts [Integer] :limit Number of results to return per page.
@@ -64,7 +64,7 @@ describe 'AccessPoliciesApi' do
64
64
 
65
65
  # unit tests for partial_update
66
66
  # Update an access policy
67
- # ViewSet for AccessPolicy. NOTE: This API endpoint is in \&quot;tech preview\&quot; and subject to change
67
+ # ViewSet for AccessPolicy.
68
68
  # @param access_policy_href
69
69
  # @param patched_access_policy
70
70
  # @param [Hash] opts the optional parameters
@@ -77,7 +77,7 @@ describe 'AccessPoliciesApi' do
77
77
 
78
78
  # unit tests for read
79
79
  # Inspect an access policy
80
- # ViewSet for AccessPolicy. NOTE: This API endpoint is in \&quot;tech preview\&quot; and subject to change
80
+ # ViewSet for AccessPolicy.
81
81
  # @param access_policy_href
82
82
  # @param [Hash] opts the optional parameters
83
83
  # @option opts [Array<String>] :fields A list of fields to include in the response.
@@ -102,7 +102,7 @@ describe 'AccessPoliciesApi' do
102
102
 
103
103
  # unit tests for update
104
104
  # Update an access policy
105
- # ViewSet for AccessPolicy. NOTE: This API endpoint is in \&quot;tech preview\&quot; and subject to change
105
+ # ViewSet for AccessPolicy.
106
106
  # @param access_policy_href
107
107
  # @param access_policy
108
108
  # @param [Hash] opts the optional parameters
@@ -43,8 +43,8 @@ describe 'ContentApi' do
43
43
  # @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
44
44
  # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
45
45
  # @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
46
- # @option opts [String] :pulp_type Pulp type * &#x60;core.publishedmetadata&#x60; - core.publishedmetadata * &#x60;file.file&#x60; - file.file
47
- # @option opts [Array<String>] :pulp_type__in Multiple values may be separated by commas. * &#x60;core.publishedmetadata&#x60; - core.publishedmetadata * &#x60;file.file&#x60; - file.file
46
+ # @option opts [String] :pulp_type Pulp type * &#x60;core.publishedmetadata&#x60; - core.publishedmetadata * &#x60;core.openpgp_publickey&#x60; - core.openpgp_publickey * &#x60;core.openpgp_publicsubkey&#x60; - core.openpgp_publicsubkey * &#x60;core.openpgp_userid&#x60; - core.openpgp_userid * &#x60;core.openpgp_userattribute&#x60; - core.openpgp_userattribute * &#x60;core.openpgp_signature&#x60; - core.openpgp_signature * &#x60;file.file&#x60; - file.file
47
+ # @option opts [Array<String>] :pulp_type__in Multiple values may be separated by commas. * &#x60;core.publishedmetadata&#x60; - core.publishedmetadata * &#x60;core.openpgp_publickey&#x60; - core.openpgp_publickey * &#x60;core.openpgp_publicsubkey&#x60; - core.openpgp_publicsubkey * &#x60;core.openpgp_userid&#x60; - core.openpgp_userid * &#x60;core.openpgp_userattribute&#x60; - core.openpgp_userattribute * &#x60;core.openpgp_signature&#x60; - core.openpgp_signature * &#x60;file.file&#x60; - file.file
48
48
  # @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
49
49
  # @option opts [String] :repository_version Repository Version referenced by HREF/PRN
50
50
  # @option opts [String] :repository_version_added Repository Version referenced by HREF/PRN