pulpcore_client 3.16.24 → 3.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +70 -22
  3. data/docs/AccessPoliciesApi.md +53 -0
  4. data/docs/AccessPolicy.md +3 -1
  5. data/docs/AccessPolicyResponse.md +3 -1
  6. data/docs/ContentguardsRbacApi.md +138 -22
  7. data/docs/GroupRole.md +19 -0
  8. data/docs/GroupRoleResponse.md +23 -0
  9. data/docs/GroupsApi.md +248 -20
  10. data/docs/GroupsModelPermissionsApi.md +20 -20
  11. data/docs/GroupsObjectPermissionsApi.md +20 -20
  12. data/docs/GroupsRolesApi.md +255 -0
  13. data/docs/GroupsUsersApi.md +15 -15
  14. data/docs/MyPermissionsResponse.md +17 -0
  15. data/docs/NestedRole.md +21 -0
  16. data/docs/NestedRoleResponse.md +21 -0
  17. data/docs/ObjectRolesResponse.md +17 -0
  18. data/docs/PaginatedGroupRoleResponseList.md +23 -0
  19. data/docs/PaginatedRoleResponseList.md +23 -0
  20. data/docs/PaginatedUserRoleResponseList.md +23 -0
  21. data/docs/PatchedAccessPolicy.md +3 -1
  22. data/docs/PatchedRole.md +21 -0
  23. data/docs/PatchedUser.md +29 -0
  24. data/docs/PermissionResponse.md +1 -1
  25. data/docs/Purge.md +19 -0
  26. data/docs/Role.md +21 -0
  27. data/docs/RoleResponse.md +27 -0
  28. data/docs/RolesApi.md +363 -0
  29. data/docs/StatesEnum.md +16 -0
  30. data/docs/TasksApi.md +282 -0
  31. data/docs/User.md +29 -0
  32. data/docs/UserGroup.md +17 -0
  33. data/docs/UserResponse.md +3 -3
  34. data/docs/UserRole.md +19 -0
  35. data/docs/UserRoleResponse.md +23 -0
  36. data/docs/UsersApi.md +219 -0
  37. data/docs/UsersRolesApi.md +255 -0
  38. data/docs/WorkerResponse.md +3 -3
  39. data/git_push.sh +58 -0
  40. data/lib/pulpcore_client/api/access_policies_api.rb +60 -0
  41. data/lib/pulpcore_client/api/artifacts_api.rb +24 -0
  42. data/lib/pulpcore_client/api/contentguards_rbac_api.rb +168 -40
  43. data/lib/pulpcore_client/api/groups_api.rb +304 -36
  44. data/lib/pulpcore_client/api/groups_model_permissions_api.rb +36 -36
  45. data/lib/pulpcore_client/api/groups_object_permissions_api.rb +36 -36
  46. data/lib/pulpcore_client/api/groups_roles_api.rb +315 -0
  47. data/lib/pulpcore_client/api/groups_users_api.rb +27 -27
  48. data/lib/pulpcore_client/api/roles_api.rb +443 -0
  49. data/lib/pulpcore_client/api/tasks_api.rb +332 -0
  50. data/lib/pulpcore_client/api/uploads_api.rb +4 -0
  51. data/lib/pulpcore_client/api/users_api.rb +264 -0
  52. data/lib/pulpcore_client/api/users_roles_api.rb +315 -0
  53. data/lib/pulpcore_client/api_client.rb +5 -2
  54. data/lib/pulpcore_client/configuration.rb +0 -1
  55. data/lib/pulpcore_client/models/access_policy.rb +19 -2
  56. data/lib/pulpcore_client/models/access_policy_response.rb +19 -2
  57. data/lib/pulpcore_client/models/artifact.rb +90 -0
  58. data/lib/pulpcore_client/models/filesystem_exporter.rb +38 -0
  59. data/lib/pulpcore_client/models/group.rb +9 -0
  60. data/lib/pulpcore_client/models/group_role.rb +238 -0
  61. data/lib/pulpcore_client/models/group_role_response.rb +242 -0
  62. data/lib/pulpcore_client/models/group_user.rb +9 -0
  63. data/lib/pulpcore_client/models/{rbac_content_guard_permission.rb → my_permissions_response.rb} +16 -22
  64. data/lib/pulpcore_client/models/nested_role.rb +234 -0
  65. data/lib/pulpcore_client/models/nested_role_response.rb +234 -0
  66. data/lib/pulpcore_client/models/object_roles_response.rb +213 -0
  67. data/lib/pulpcore_client/models/paginated_group_role_response_list.rb +237 -0
  68. data/lib/pulpcore_client/models/paginated_role_response_list.rb +237 -0
  69. data/lib/pulpcore_client/models/paginated_user_role_response_list.rb +237 -0
  70. data/lib/pulpcore_client/models/patched_access_policy.rb +14 -2
  71. data/lib/pulpcore_client/models/patched_filesystem_exporter.rb +30 -0
  72. data/lib/pulpcore_client/models/patched_group.rb +9 -0
  73. data/lib/pulpcore_client/models/patched_pulp_exporter.rb +30 -0
  74. data/lib/pulpcore_client/models/patched_pulp_importer.rb +15 -0
  75. data/lib/pulpcore_client/models/patched_rbac_content_guard.rb +30 -0
  76. data/lib/pulpcore_client/models/patched_role.rb +261 -0
  77. data/lib/pulpcore_client/models/patched_task_cancel.rb +15 -0
  78. data/lib/pulpcore_client/models/patched_user.rb +342 -0
  79. data/lib/pulpcore_client/models/permission_response.rb +1 -1
  80. data/lib/pulpcore_client/models/pulp_export.rb +15 -0
  81. data/lib/pulpcore_client/models/pulp_exporter.rb +38 -0
  82. data/lib/pulpcore_client/models/pulp_import.rb +30 -0
  83. data/lib/pulpcore_client/models/pulp_import_check.rb +45 -0
  84. data/lib/pulpcore_client/models/pulp_importer.rb +19 -0
  85. data/lib/pulpcore_client/models/purge.rb +219 -0
  86. data/lib/pulpcore_client/models/rbac_content_guard.rb +34 -0
  87. data/lib/pulpcore_client/models/role.rb +275 -0
  88. data/lib/pulpcore_client/models/role_response.rb +270 -0
  89. data/lib/pulpcore_client/models/states_enum.rb +38 -0
  90. data/lib/pulpcore_client/models/upload_chunk.rb +15 -0
  91. data/lib/pulpcore_client/models/upload_commit.rb +19 -0
  92. data/lib/pulpcore_client/models/user.rb +351 -0
  93. data/lib/pulpcore_client/models/user_group.rb +241 -0
  94. data/lib/pulpcore_client/models/user_response.rb +6 -29
  95. data/lib/pulpcore_client/models/user_role.rb +238 -0
  96. data/lib/pulpcore_client/models/user_role_response.rb +242 -0
  97. data/lib/pulpcore_client/models/worker_response.rb +10 -10
  98. data/lib/pulpcore_client/version.rb +1 -1
  99. data/lib/pulpcore_client.rb +22 -1
  100. data/pulpcore_client.gemspec +3 -3
  101. data/spec/api/access_policies_api_spec.rb +11 -0
  102. data/spec/api/contentguards_rbac_api_spec.rb +36 -12
  103. data/spec/api/groups_api_spec.rb +54 -4
  104. data/spec/api/groups_model_permissions_api_spec.rb +4 -4
  105. data/spec/api/groups_object_permissions_api_spec.rb +4 -4
  106. data/spec/api/groups_roles_api_spec.rb +97 -0
  107. data/spec/api/groups_users_api_spec.rb +3 -3
  108. data/spec/api/roles_api_spec.rb +121 -0
  109. data/spec/api/tasks_api_spec.rb +62 -0
  110. data/spec/api/users_api_spec.rb +50 -0
  111. data/spec/api/users_roles_api_spec.rb +97 -0
  112. data/spec/models/access_policy_response_spec.rb +6 -0
  113. data/spec/models/access_policy_spec.rb +6 -0
  114. data/spec/models/group_role_response_spec.rb +59 -0
  115. data/spec/models/{rbac_content_guard_permission_spec.rb → group_role_spec.rb} +8 -8
  116. data/spec/models/my_permissions_response_spec.rb +41 -0
  117. data/spec/models/nested_role_response_spec.rb +53 -0
  118. data/spec/models/nested_role_spec.rb +53 -0
  119. data/spec/models/object_roles_response_spec.rb +41 -0
  120. data/spec/models/paginated_group_role_response_list_spec.rb +59 -0
  121. data/spec/models/paginated_role_response_list_spec.rb +59 -0
  122. data/spec/models/paginated_user_role_response_list_spec.rb +59 -0
  123. data/spec/models/patched_access_policy_spec.rb +6 -0
  124. data/spec/models/patched_role_spec.rb +53 -0
  125. data/spec/models/patched_user_spec.rb +77 -0
  126. data/spec/models/purge_spec.rb +47 -0
  127. data/spec/models/role_response_spec.rb +71 -0
  128. data/spec/models/role_spec.rb +53 -0
  129. data/spec/models/states_enum_spec.rb +35 -0
  130. data/spec/models/user_group_spec.rb +41 -0
  131. data/spec/models/user_role_response_spec.rb +59 -0
  132. data/spec/models/user_role_spec.rb +47 -0
  133. data/spec/models/user_spec.rb +77 -0
  134. data/spec/models/worker_response_spec.rb +2 -2
  135. metadata +190 -111
  136. data/docs/RBACContentGuardPermission.md +0 -19
@@ -0,0 +1,270 @@
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 Role.
17
+ class RoleResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # Timestamp of creation.
21
+ attr_accessor :pulp_created
22
+
23
+ # The name of this role.
24
+ attr_accessor :name
25
+
26
+ # An optional description.
27
+ attr_accessor :description
28
+
29
+ # List of permissions defining the role.
30
+ attr_accessor :permissions
31
+
32
+ # True if the role is system managed.
33
+ attr_accessor :locked
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'pulp_href' => :'pulp_href',
39
+ :'pulp_created' => :'pulp_created',
40
+ :'name' => :'name',
41
+ :'description' => :'description',
42
+ :'permissions' => :'permissions',
43
+ :'locked' => :'locked'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'pulp_href' => :'String',
51
+ :'pulp_created' => :'DateTime',
52
+ :'name' => :'String',
53
+ :'description' => :'String',
54
+ :'permissions' => :'Array<String>',
55
+ :'locked' => :'Boolean'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ :'description',
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::RoleResponse` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::RoleResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'pulp_href')
82
+ self.pulp_href = attributes[:'pulp_href']
83
+ end
84
+
85
+ if attributes.key?(:'pulp_created')
86
+ self.pulp_created = attributes[:'pulp_created']
87
+ end
88
+
89
+ if attributes.key?(:'name')
90
+ self.name = attributes[:'name']
91
+ end
92
+
93
+ if attributes.key?(:'description')
94
+ self.description = attributes[:'description']
95
+ end
96
+
97
+ if attributes.key?(:'permissions')
98
+ if (value = attributes[:'permissions']).is_a?(Array)
99
+ self.permissions = value
100
+ end
101
+ end
102
+
103
+ if attributes.key?(:'locked')
104
+ self.locked = attributes[:'locked']
105
+ end
106
+ end
107
+
108
+ # Show invalid properties with the reasons. Usually used together with valid?
109
+ # @return Array for valid properties with the reasons
110
+ def list_invalid_properties
111
+ invalid_properties = Array.new
112
+ if @name.nil?
113
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
114
+ end
115
+
116
+ if @permissions.nil?
117
+ invalid_properties.push('invalid value for "permissions", permissions cannot be nil.')
118
+ end
119
+
120
+ invalid_properties
121
+ end
122
+
123
+ # Check to see if the all the properties in the model are valid
124
+ # @return true if the model is valid
125
+ def valid?
126
+ return false if @name.nil?
127
+ return false if @permissions.nil?
128
+ true
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ pulp_href == o.pulp_href &&
137
+ pulp_created == o.pulp_created &&
138
+ name == o.name &&
139
+ description == o.description &&
140
+ permissions == o.permissions &&
141
+ locked == o.locked
142
+ end
143
+
144
+ # @see the `==` method
145
+ # @param [Object] Object to be compared
146
+ def eql?(o)
147
+ self == o
148
+ end
149
+
150
+ # Calculates hash code according to all attributes.
151
+ # @return [Integer] Hash code
152
+ def hash
153
+ [pulp_href, pulp_created, name, description, permissions, locked].hash
154
+ end
155
+
156
+ # Builds the object from hash
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ # @return [Object] Returns the model itself
159
+ def self.build_from_hash(attributes)
160
+ new.build_from_hash(attributes)
161
+ end
162
+
163
+ # Builds the object from hash
164
+ # @param [Hash] attributes Model attributes in the form of hash
165
+ # @return [Object] Returns the model itself
166
+ def build_from_hash(attributes)
167
+ return nil unless attributes.is_a?(Hash)
168
+ self.class.openapi_types.each_pair do |key, type|
169
+ if type =~ /\AArray<(.*)>/i
170
+ # check to ensure the input is an array given that the attribute
171
+ # is documented as an array but the input is not
172
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
173
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
174
+ end
175
+ elsif !attributes[self.class.attribute_map[key]].nil?
176
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
177
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
178
+ end
179
+
180
+ self
181
+ end
182
+
183
+ # Deserializes the data based on type
184
+ # @param string type Data type
185
+ # @param string value Value to be deserialized
186
+ # @return [Object] Deserialized data
187
+ def _deserialize(type, value)
188
+ case type.to_sym
189
+ when :DateTime
190
+ DateTime.parse(value)
191
+ when :Date
192
+ Date.parse(value)
193
+ when :String
194
+ value.to_s
195
+ when :Integer
196
+ value.to_i
197
+ when :Float
198
+ value.to_f
199
+ when :Boolean
200
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
201
+ true
202
+ else
203
+ false
204
+ end
205
+ when :Object
206
+ # generic object (usually a Hash), return directly
207
+ value
208
+ when /\AArray<(?<inner_type>.+)>\z/
209
+ inner_type = Regexp.last_match[:inner_type]
210
+ value.map { |v| _deserialize(inner_type, v) }
211
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
212
+ k_type = Regexp.last_match[:k_type]
213
+ v_type = Regexp.last_match[:v_type]
214
+ {}.tap do |hash|
215
+ value.each do |k, v|
216
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
217
+ end
218
+ end
219
+ else # model
220
+ PulpcoreClient.const_get(type).build_from_hash(value)
221
+ end
222
+ end
223
+
224
+ # Returns the string representation of the object
225
+ # @return [String] String presentation of the object
226
+ def to_s
227
+ to_hash.to_s
228
+ end
229
+
230
+ # to_body is an alias to to_hash (backward compatibility)
231
+ # @return [Hash] Returns the object in the form of hash
232
+ def to_body
233
+ to_hash
234
+ end
235
+
236
+ # Returns the object in the form of hash
237
+ # @return [Hash] Returns the object in the form of hash
238
+ def to_hash
239
+ hash = {}
240
+ self.class.attribute_map.each_pair do |attr, param|
241
+ value = self.send(attr)
242
+ if value.nil?
243
+ is_nullable = self.class.openapi_nullable.include?(attr)
244
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
245
+ end
246
+
247
+ hash[param] = _to_hash(value)
248
+ end
249
+ hash
250
+ end
251
+
252
+ # Outputs non-array value in the form of hash
253
+ # For object, use to_hash. Otherwise, just return the value
254
+ # @param [Object] value Any valid value
255
+ # @return [Hash] Returns the value in the form of hash
256
+ def _to_hash(value)
257
+ if value.is_a?(Array)
258
+ value.compact.map { |v| _to_hash(v) }
259
+ elsif value.is_a?(Hash)
260
+ {}.tap do |hash|
261
+ value.each { |k, v| hash[k] = _to_hash(v) }
262
+ end
263
+ elsif value.respond_to? :to_hash
264
+ value.to_hash
265
+ else
266
+ value
267
+ end
268
+ end
269
+ end
270
+ end
@@ -0,0 +1,38 @@
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
+ class StatesEnum
17
+ SKIPPED = "skipped".freeze
18
+ COMPLETED = "completed".freeze
19
+ FAILED = "failed".freeze
20
+ CANCELED = "canceled".freeze
21
+
22
+ # Builds the enum from string
23
+ # @param [String] The enum value in the form of the string
24
+ # @return [String] The enum value
25
+ def self.build_from_hash(value)
26
+ new.build_from_hash(value)
27
+ end
28
+
29
+ # Builds the enum from string
30
+ # @param [String] The enum value in the form of the string
31
+ # @return [String] The enum value
32
+ def build_from_hash(value)
33
+ constantValues = StatesEnum.constants.select { |c| StatesEnum::const_get(c) == value }
34
+ raise "Invalid ENUM value #{value} for class #StatesEnum" if constantValues.empty?
35
+ value
36
+ end
37
+ end
38
+ end
@@ -76,6 +76,10 @@ module PulpcoreClient
76
76
  invalid_properties.push('invalid value for "file", file cannot be nil.')
77
77
  end
78
78
 
79
+ if !@sha256.nil? && @sha256.to_s.length < 1
80
+ invalid_properties.push('invalid value for "sha256", the character length must be great than or equal to 1.')
81
+ end
82
+
79
83
  invalid_properties
80
84
  end
81
85
 
@@ -83,9 +87,20 @@ module PulpcoreClient
83
87
  # @return true if the model is valid
84
88
  def valid?
85
89
  return false if @file.nil?
90
+ return false if !@sha256.nil? && @sha256.to_s.length < 1
86
91
  true
87
92
  end
88
93
 
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] sha256 Value to be assigned
96
+ def sha256=(sha256)
97
+ if !sha256.nil? && sha256.to_s.length < 1
98
+ fail ArgumentError, 'invalid value for "sha256", the character length must be great than or equal to 1.'
99
+ end
100
+
101
+ @sha256 = sha256
102
+ end
103
+
89
104
  # Checks equality by comparing each attribute.
90
105
  # @param [Object] Object to be compared
91
106
  def ==(o)
@@ -66,6 +66,10 @@ module PulpcoreClient
66
66
  invalid_properties.push('invalid value for "sha256", sha256 cannot be nil.')
67
67
  end
68
68
 
69
+ if @sha256.to_s.length < 1
70
+ invalid_properties.push('invalid value for "sha256", the character length must be great than or equal to 1.')
71
+ end
72
+
69
73
  invalid_properties
70
74
  end
71
75
 
@@ -73,9 +77,24 @@ module PulpcoreClient
73
77
  # @return true if the model is valid
74
78
  def valid?
75
79
  return false if @sha256.nil?
80
+ return false if @sha256.to_s.length < 1
76
81
  true
77
82
  end
78
83
 
84
+ # Custom attribute writer method with validation
85
+ # @param [Object] sha256 Value to be assigned
86
+ def sha256=(sha256)
87
+ if sha256.nil?
88
+ fail ArgumentError, 'sha256 cannot be nil'
89
+ end
90
+
91
+ if sha256.to_s.length < 1
92
+ fail ArgumentError, 'invalid value for "sha256", the character length must be great than or equal to 1.'
93
+ end
94
+
95
+ @sha256 = sha256
96
+ end
97
+
79
98
  # Checks equality by comparing each attribute.
80
99
  # @param [Object] Object to be compared
81
100
  def ==(o)