pulp_container_client 2.2.2 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -13
  3. data/docs/ContainerContainerDistribution.md +11 -5
  4. data/docs/ContainerContainerDistributionResponse.md +16 -10
  5. data/docs/ContainerContainerPushRepositoryResponse.md +2 -0
  6. data/docs/ContainerContainerRemote.md +4 -0
  7. data/docs/ContainerContainerRemoteResponse.md +4 -0
  8. data/docs/ContainerContainerRepository.md +3 -1
  9. data/docs/ContainerContainerRepositoryResponse.md +2 -0
  10. data/docs/{ContentguardsContentRedirectApi.md → ContentGuardsContentRedirectApi.md} +25 -19
  11. data/docs/DistributionsContainerApi.md +8 -0
  12. data/docs/PatchedcontainerContainerDistribution.md +11 -5
  13. data/docs/PatchedcontainerContainerRemote.md +4 -0
  14. data/docs/PatchedcontainerContainerRepository.md +3 -1
  15. data/docs/PulpContainerNamespacesApi.md +16 -5
  16. data/docs/RemotesContainerApi.md +8 -0
  17. data/docs/RepositoriesContainerApi.md +8 -0
  18. data/docs/RepositoriesContainerPushApi.md +73 -61
  19. data/docs/RepositoriesContainerVersionsApi.md +2 -2
  20. data/lib/pulp_container_client/api/{contentguards_content_redirect_api.rb → content_guards_content_redirect_api.rb} +31 -22
  21. data/lib/pulp_container_client/api/distributions_container_api.rb +12 -0
  22. data/lib/pulp_container_client/api/pulp_container_namespaces_api.rb +24 -7
  23. data/lib/pulp_container_client/api/remotes_container_api.rb +12 -0
  24. data/lib/pulp_container_client/api/repositories_container_api.rb +12 -0
  25. data/lib/pulp_container_client/api/repositories_container_push_api.rb +120 -94
  26. data/lib/pulp_container_client/api/repositories_container_versions_api.rb +4 -4
  27. data/lib/pulp_container_client/models/container_container_distribution.rb +51 -21
  28. data/lib/pulp_container_client/models/container_container_distribution_response.rb +77 -47
  29. data/lib/pulp_container_client/models/container_container_push_repository_response.rb +10 -1
  30. data/lib/pulp_container_client/models/container_container_remote.rb +21 -1
  31. data/lib/pulp_container_client/models/container_container_remote_response.rb +21 -1
  32. data/lib/pulp_container_client/models/container_container_repository.rb +10 -1
  33. data/lib/pulp_container_client/models/container_container_repository_response.rb +10 -1
  34. data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +46 -16
  35. data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +21 -1
  36. data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +10 -1
  37. data/lib/pulp_container_client/version.rb +1 -1
  38. data/lib/pulp_container_client.rb +1 -2
  39. data/spec/api/{contentguards_content_redirect_api_spec.rb → content_guards_content_redirect_api_spec.rb} +9 -6
  40. data/spec/api/distributions_container_api_spec.rb +4 -0
  41. data/spec/api/pulp_container_namespaces_api_spec.rb +7 -2
  42. data/spec/api/remotes_container_api_spec.rb +4 -0
  43. data/spec/api/repositories_container_api_spec.rb +4 -0
  44. data/spec/api/repositories_container_push_api_spec.rb +32 -26
  45. data/spec/api/repositories_container_versions_api_spec.rb +2 -2
  46. data/spec/models/container_container_distribution_response_spec.rb +25 -7
  47. data/spec/models/container_container_distribution_spec.rb +20 -2
  48. data/spec/models/container_container_push_repository_response_spec.rb +6 -0
  49. data/spec/models/container_container_remote_response_spec.rb +12 -0
  50. data/spec/models/container_container_remote_spec.rb +12 -0
  51. data/spec/models/container_container_repository_response_spec.rb +6 -0
  52. data/spec/models/container_container_repository_spec.rb +6 -0
  53. data/spec/models/patchedcontainer_container_distribution_spec.rb +20 -2
  54. data/spec/models/patchedcontainer_container_remote_spec.rb +12 -0
  55. data/spec/models/patchedcontainer_container_repository_spec.rb +6 -0
  56. metadata +43 -47
  57. data/docs/ContainerContainerPushRepository.md +0 -21
  58. data/lib/pulp_container_client/models/container_container_push_repository.rb +0 -234
  59. data/spec/models/container_container_push_repository_spec.rb +0 -53
@@ -1,234 +0,0 @@
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.2.3
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module PulpContainerClient
16
- # Serializer for Container Push Repositories.
17
- class ContainerContainerPushRepository
18
- # A unique name for this repository.
19
- attr_accessor :name
20
-
21
- # An optional description.
22
- attr_accessor :description
23
-
24
- attr_accessor :remote
25
-
26
- # Attribute mapping from ruby-style variable name to JSON key.
27
- def self.attribute_map
28
- {
29
- :'name' => :'name',
30
- :'description' => :'description',
31
- :'remote' => :'remote'
32
- }
33
- end
34
-
35
- # Attribute type mapping.
36
- def self.openapi_types
37
- {
38
- :'name' => :'String',
39
- :'description' => :'String',
40
- :'remote' => :'String'
41
- }
42
- end
43
-
44
- # List of attributes with nullable: true
45
- def self.openapi_nullable
46
- Set.new([
47
- :'description',
48
- :'remote'
49
- ])
50
- end
51
-
52
- # Initializes the object
53
- # @param [Hash] attributes Model attributes in the form of hash
54
- def initialize(attributes = {})
55
- if (!attributes.is_a?(Hash))
56
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerContainerPushRepository` initialize method"
57
- end
58
-
59
- # check to see if the attribute exists and convert string to symbol for hash key
60
- attributes = attributes.each_with_object({}) { |(k, v), h|
61
- if (!self.class.attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerContainerPushRepository`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
- end
64
- h[k.to_sym] = v
65
- }
66
-
67
- if attributes.key?(:'name')
68
- self.name = attributes[:'name']
69
- end
70
-
71
- if attributes.key?(:'description')
72
- self.description = attributes[:'description']
73
- end
74
-
75
- if attributes.key?(:'remote')
76
- self.remote = attributes[:'remote']
77
- end
78
- end
79
-
80
- # Show invalid properties with the reasons. Usually used together with valid?
81
- # @return Array for valid properties with the reasons
82
- def list_invalid_properties
83
- invalid_properties = Array.new
84
- if @name.nil?
85
- invalid_properties.push('invalid value for "name", name cannot be nil.')
86
- end
87
-
88
- invalid_properties
89
- end
90
-
91
- # Check to see if the all the properties in the model are valid
92
- # @return true if the model is valid
93
- def valid?
94
- return false if @name.nil?
95
- true
96
- end
97
-
98
- # Checks equality by comparing each attribute.
99
- # @param [Object] Object to be compared
100
- def ==(o)
101
- return true if self.equal?(o)
102
- self.class == o.class &&
103
- name == o.name &&
104
- description == o.description &&
105
- remote == o.remote
106
- end
107
-
108
- # @see the `==` method
109
- # @param [Object] Object to be compared
110
- def eql?(o)
111
- self == o
112
- end
113
-
114
- # Calculates hash code according to all attributes.
115
- # @return [Integer] Hash code
116
- def hash
117
- [name, description, remote].hash
118
- end
119
-
120
- # Builds the object from hash
121
- # @param [Hash] attributes Model attributes in the form of hash
122
- # @return [Object] Returns the model itself
123
- def self.build_from_hash(attributes)
124
- new.build_from_hash(attributes)
125
- end
126
-
127
- # Builds the object from hash
128
- # @param [Hash] attributes Model attributes in the form of hash
129
- # @return [Object] Returns the model itself
130
- def build_from_hash(attributes)
131
- return nil unless attributes.is_a?(Hash)
132
- self.class.openapi_types.each_pair do |key, type|
133
- if type =~ /\AArray<(.*)>/i
134
- # check to ensure the input is an array given that the attribute
135
- # is documented as an array but the input is not
136
- if attributes[self.class.attribute_map[key]].is_a?(Array)
137
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
138
- end
139
- elsif !attributes[self.class.attribute_map[key]].nil?
140
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
- end # or else data not found in attributes(hash), not an issue as the data can be optional
142
- end
143
-
144
- self
145
- end
146
-
147
- # Deserializes the data based on type
148
- # @param string type Data type
149
- # @param string value Value to be deserialized
150
- # @return [Object] Deserialized data
151
- def _deserialize(type, value)
152
- case type.to_sym
153
- when :DateTime
154
- DateTime.parse(value)
155
- when :Date
156
- Date.parse(value)
157
- when :String
158
- value.to_s
159
- when :Integer
160
- value.to_i
161
- when :Float
162
- value.to_f
163
- when :Boolean
164
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
- true
166
- else
167
- false
168
- end
169
- when :Object
170
- # generic object (usually a Hash), return directly
171
- value
172
- when /\AArray<(?<inner_type>.+)>\z/
173
- inner_type = Regexp.last_match[:inner_type]
174
- value.map { |v| _deserialize(inner_type, v) }
175
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
- k_type = Regexp.last_match[:k_type]
177
- v_type = Regexp.last_match[:v_type]
178
- {}.tap do |hash|
179
- value.each do |k, v|
180
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
- end
182
- end
183
- else # model
184
- PulpContainerClient.const_get(type).build_from_hash(value)
185
- end
186
- end
187
-
188
- # Returns the string representation of the object
189
- # @return [String] String presentation of the object
190
- def to_s
191
- to_hash.to_s
192
- end
193
-
194
- # to_body is an alias to to_hash (backward compatibility)
195
- # @return [Hash] Returns the object in the form of hash
196
- def to_body
197
- to_hash
198
- end
199
-
200
- # Returns the object in the form of hash
201
- # @return [Hash] Returns the object in the form of hash
202
- def to_hash
203
- hash = {}
204
- self.class.attribute_map.each_pair do |attr, param|
205
- value = self.send(attr)
206
- if value.nil?
207
- is_nullable = self.class.openapi_nullable.include?(attr)
208
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
- end
210
-
211
- hash[param] = _to_hash(value)
212
- end
213
- hash
214
- end
215
-
216
- # Outputs non-array value in the form of hash
217
- # For object, use to_hash. Otherwise, just return the value
218
- # @param [Object] value Any valid value
219
- # @return [Hash] Returns the value in the form of hash
220
- def _to_hash(value)
221
- if value.is_a?(Array)
222
- value.compact.map { |v| _to_hash(v) }
223
- elsif value.is_a?(Hash)
224
- {}.tap do |hash|
225
- value.each { |k, v| hash[k] = _to_hash(v) }
226
- end
227
- elsif value.respond_to? :to_hash
228
- value.to_hash
229
- else
230
- value
231
- end
232
- end
233
- end
234
- end
@@ -1,53 +0,0 @@
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.2.3
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for PulpContainerClient::ContainerContainerPushRepository
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'ContainerContainerPushRepository' do
21
- before do
22
- # run before each test
23
- @instance = PulpContainerClient::ContainerContainerPushRepository.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of ContainerContainerPushRepository' do
31
- it 'should create an instance of ContainerContainerPushRepository' do
32
- expect(@instance).to be_instance_of(PulpContainerClient::ContainerContainerPushRepository)
33
- end
34
- end
35
- describe 'test attribute "name"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "description"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- describe 'test attribute "remote"' do
48
- it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
- end
51
- end
52
-
53
- end