pulp_container_client 2.14.3 → 2.14.5

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 (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -6
  3. data/docs/ContainerContainerDistribution.md +6 -6
  4. data/docs/ContainerContainerDistributionResponse.md +10 -10
  5. data/docs/ContainerContainerPushRepository.md +6 -6
  6. data/docs/ContainerContainerPushRepositoryResponse.md +10 -10
  7. data/docs/ContainerContainerRemote.md +1 -1
  8. data/docs/ContainerContainerRemoteResponse.md +3 -1
  9. data/docs/ContainerContainerRemoteResponseHiddenFields.md +19 -0
  10. data/docs/ContainerContainerRepository.md +2 -2
  11. data/docs/ContainerContainerRepositoryResponse.md +2 -2
  12. data/docs/ContentBlobsApi.md +8 -8
  13. data/docs/ContentManifestsApi.md +8 -8
  14. data/docs/ContentSignaturesApi.md +8 -8
  15. data/docs/ContentTagsApi.md +8 -8
  16. data/docs/DistributionsContainerApi.md +24 -20
  17. data/docs/PatchedcontainerContainerDistribution.md +6 -6
  18. data/docs/PatchedcontainerContainerPushRepository.md +6 -6
  19. data/docs/PatchedcontainerContainerRemote.md +1 -1
  20. data/docs/PatchedcontainerContainerRepository.md +2 -2
  21. data/docs/PulpContainerNamespacesApi.md +16 -16
  22. data/docs/RemotesContainerApi.md +20 -20
  23. data/docs/RepositoriesContainerApi.md +35 -19
  24. data/docs/RepositoriesContainerPushApi.md +35 -19
  25. data/docs/RepositoriesContainerPushVersionsApi.md +12 -12
  26. data/docs/RepositoriesContainerVersionsApi.md +12 -12
  27. data/lib/pulp_container_client/api/content_blobs_api.rb +13 -13
  28. data/lib/pulp_container_client/api/content_manifests_api.rb +13 -13
  29. data/lib/pulp_container_client/api/content_signatures_api.rb +13 -13
  30. data/lib/pulp_container_client/api/content_tags_api.rb +13 -13
  31. data/lib/pulp_container_client/api/distributions_container_api.rb +35 -29
  32. data/lib/pulp_container_client/api/pulp_container_namespaces_api.rb +25 -25
  33. data/lib/pulp_container_client/api/remotes_container_api.rb +29 -29
  34. data/lib/pulp_container_client/api/repositories_container_api.rb +51 -27
  35. data/lib/pulp_container_client/api/repositories_container_push_api.rb +51 -27
  36. data/lib/pulp_container_client/api/repositories_container_push_versions_api.rb +17 -17
  37. data/lib/pulp_container_client/api/repositories_container_versions_api.rb +17 -17
  38. data/lib/pulp_container_client/models/container_container_distribution.rb +50 -48
  39. data/lib/pulp_container_client/models/container_container_distribution_response.rb +47 -45
  40. data/lib/pulp_container_client/models/container_container_push_repository.rb +42 -40
  41. data/lib/pulp_container_client/models/container_container_push_repository_response.rb +51 -49
  42. data/lib/pulp_container_client/models/container_container_remote.rb +4 -2
  43. data/lib/pulp_container_client/models/container_container_remote_response.rb +17 -3
  44. data/lib/pulp_container_client/models/container_container_remote_response_hidden_fields.rb +215 -0
  45. data/lib/pulp_container_client/models/container_container_repository.rb +5 -3
  46. data/lib/pulp_container_client/models/container_container_repository_response.rb +5 -3
  47. data/lib/pulp_container_client/models/nested_role.rb +19 -0
  48. data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +41 -39
  49. data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +42 -40
  50. data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +4 -2
  51. data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +5 -3
  52. data/lib/pulp_container_client/version.rb +1 -1
  53. data/lib/pulp_container_client.rb +1 -0
  54. data/spec/api/content_blobs_api_spec.rb +4 -4
  55. data/spec/api/content_manifests_api_spec.rb +4 -4
  56. data/spec/api/content_signatures_api_spec.rb +4 -4
  57. data/spec/api/content_tags_api_spec.rb +4 -4
  58. data/spec/api/distributions_container_api_spec.rb +12 -10
  59. data/spec/api/pulp_container_namespaces_api_spec.rb +8 -8
  60. data/spec/api/remotes_container_api_spec.rb +10 -10
  61. data/spec/api/repositories_container_api_spec.rb +17 -9
  62. data/spec/api/repositories_container_push_api_spec.rb +17 -9
  63. data/spec/api/repositories_container_push_versions_api_spec.rb +6 -6
  64. data/spec/api/repositories_container_versions_api_spec.rb +6 -6
  65. data/spec/models/container_container_distribution_response_spec.rb +7 -7
  66. data/spec/models/container_container_distribution_spec.rb +4 -4
  67. data/spec/models/container_container_push_repository_response_spec.rb +8 -8
  68. data/spec/models/container_container_push_repository_spec.rb +4 -4
  69. data/spec/models/container_container_remote_response_hidden_fields_spec.rb +47 -0
  70. data/spec/models/container_container_remote_response_spec.rb +6 -0
  71. data/spec/models/patchedcontainer_container_distribution_spec.rb +4 -4
  72. data/spec/models/patchedcontainer_container_push_repository_spec.rb +4 -4
  73. metadata +52 -48
@@ -0,0 +1,215 @@
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 PulpContainerClient
16
+ class ContainerContainerRemoteResponseHiddenFields
17
+ attr_accessor :name
18
+
19
+ attr_accessor :is_set
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'name' => :'name',
25
+ :'is_set' => :'is_set'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'name' => :'String',
33
+ :'is_set' => :'Boolean'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerContainerRemoteResponseHiddenFields` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerContainerRemoteResponseHiddenFields`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'name')
59
+ self.name = attributes[:'name']
60
+ end
61
+
62
+ if attributes.key?(:'is_set')
63
+ self.is_set = attributes[:'is_set']
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ invalid_properties
72
+ end
73
+
74
+ # Check to see if the all the properties in the model are valid
75
+ # @return true if the model is valid
76
+ def valid?
77
+ true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param [Object] Object to be compared
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ name == o.name &&
86
+ is_set == o.is_set
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Integer] Hash code
97
+ def hash
98
+ [name, is_set].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def self.build_from_hash(attributes)
105
+ new.build_from_hash(attributes)
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ self.class.openapi_types.each_pair do |key, type|
114
+ if type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :DateTime
135
+ DateTime.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :Boolean
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ PulpContainerClient.const_get(type).build_from_hash(value)
166
+ end
167
+ end
168
+
169
+ # Returns the string representation of the object
170
+ # @return [String] String presentation of the object
171
+ def to_s
172
+ to_hash.to_s
173
+ end
174
+
175
+ # to_body is an alias to to_hash (backward compatibility)
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_body
178
+ to_hash
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ self.class.attribute_map.each_pair do |attr, param|
186
+ value = self.send(attr)
187
+ if value.nil?
188
+ is_nullable = self.class.openapi_nullable.include?(attr)
189
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
+ end
191
+
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ # Outputs non-array value in the form of hash
198
+ # For object, use to_hash. Otherwise, just return the value
199
+ # @param [Object] value Any valid value
200
+ # @return [Hash] Returns the value in the form of hash
201
+ def _to_hash(value)
202
+ if value.is_a?(Array)
203
+ value.compact.map { |v| _to_hash(v) }
204
+ elsif value.is_a?(Hash)
205
+ {}.tap do |hash|
206
+ value.each { |k, v| hash[k] = _to_hash(v) }
207
+ end
208
+ elsif value.respond_to? :to_hash
209
+ value.to_hash
210
+ else
211
+ value
212
+ end
213
+ end
214
+ end
215
+ end
@@ -23,7 +23,7 @@ module PulpContainerClient
23
23
  # An optional description.
24
24
  attr_accessor :description
25
25
 
26
- # Retain X versions of the repository. Default is null which retains all versions. This is provided as a tech preview in Pulp 3 and may change in the future.
26
+ # Retain X versions of the repository. Default is null which retains all versions.
27
27
  attr_accessor :retain_repo_versions
28
28
 
29
29
  # An optional remote to use by default when syncing.
@@ -47,7 +47,7 @@ module PulpContainerClient
47
47
  # Attribute type mapping.
48
48
  def self.openapi_types
49
49
  {
50
- :'pulp_labels' => :'Object',
50
+ :'pulp_labels' => :'Hash<String, String>',
51
51
  :'name' => :'String',
52
52
  :'description' => :'String',
53
53
  :'retain_repo_versions' => :'Integer',
@@ -82,7 +82,9 @@ module PulpContainerClient
82
82
  }
83
83
 
84
84
  if attributes.key?(:'pulp_labels')
85
- self.pulp_labels = attributes[:'pulp_labels']
85
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
86
+ self.pulp_labels = value
87
+ end
86
88
  end
87
89
 
88
90
  if attributes.key?(:'name')
@@ -32,7 +32,7 @@ module PulpContainerClient
32
32
  # An optional description.
33
33
  attr_accessor :description
34
34
 
35
- # Retain X versions of the repository. Default is null which retains all versions. This is provided as a tech preview in Pulp 3 and may change in the future.
35
+ # Retain X versions of the repository. Default is null which retains all versions.
36
36
  attr_accessor :retain_repo_versions
37
37
 
38
38
  # An optional remote to use by default when syncing.
@@ -63,7 +63,7 @@ module PulpContainerClient
63
63
  :'pulp_href' => :'String',
64
64
  :'pulp_created' => :'DateTime',
65
65
  :'versions_href' => :'String',
66
- :'pulp_labels' => :'Object',
66
+ :'pulp_labels' => :'Hash<String, String>',
67
67
  :'latest_version_href' => :'String',
68
68
  :'name' => :'String',
69
69
  :'description' => :'String',
@@ -111,7 +111,9 @@ module PulpContainerClient
111
111
  end
112
112
 
113
113
  if attributes.key?(:'pulp_labels')
114
- self.pulp_labels = attributes[:'pulp_labels']
114
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
115
+ self.pulp_labels = value
116
+ end
115
117
  end
116
118
 
117
119
  if attributes.key?(:'latest_version_href')
@@ -85,6 +85,10 @@ module PulpContainerClient
85
85
  invalid_properties.push('invalid value for "role", role cannot be nil.')
86
86
  end
87
87
 
88
+ if @role.to_s.length < 1
89
+ invalid_properties.push('invalid value for "role", the character length must be great than or equal to 1.')
90
+ end
91
+
88
92
  invalid_properties
89
93
  end
90
94
 
@@ -92,9 +96,24 @@ module PulpContainerClient
92
96
  # @return true if the model is valid
93
97
  def valid?
94
98
  return false if @role.nil?
99
+ return false if @role.to_s.length < 1
95
100
  true
96
101
  end
97
102
 
103
+ # Custom attribute writer method with validation
104
+ # @param [Object] role Value to be assigned
105
+ def role=(role)
106
+ if role.nil?
107
+ fail ArgumentError, 'role cannot be nil'
108
+ end
109
+
110
+ if role.to_s.length < 1
111
+ fail ArgumentError, 'invalid value for "role", the character length must be great than or equal to 1.'
112
+ end
113
+
114
+ @role = role
115
+ end
116
+
98
117
  # Checks equality by comparing each attribute.
99
118
  # @param [Object] Object to be compared
100
119
  def ==(o)
@@ -15,19 +15,19 @@ require 'date'
15
15
  module PulpContainerClient
16
16
  # A serializer for ContainerDistribution.
17
17
  class PatchedcontainerContainerDistribution
18
- # The latest RepositoryVersion for this Repository will be served.
19
- attr_accessor :repository
18
+ # The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
19
+ attr_accessor :base_path
20
20
 
21
21
  # An optional content-guard. If none is specified, a default one will be used.
22
22
  attr_accessor :content_guard
23
23
 
24
+ attr_accessor :pulp_labels
25
+
24
26
  # A unique name. Ex, `rawhide` and `stable`.
25
27
  attr_accessor :name
26
28
 
27
- attr_accessor :pulp_labels
28
-
29
- # The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
30
- attr_accessor :base_path
29
+ # The latest RepositoryVersion for this Repository will be served.
30
+ attr_accessor :repository
31
31
 
32
32
  # RepositoryVersion to be served
33
33
  attr_accessor :repository_version
@@ -41,11 +41,11 @@ module PulpContainerClient
41
41
  # Attribute mapping from ruby-style variable name to JSON key.
42
42
  def self.attribute_map
43
43
  {
44
- :'repository' => :'repository',
44
+ :'base_path' => :'base_path',
45
45
  :'content_guard' => :'content_guard',
46
- :'name' => :'name',
47
46
  :'pulp_labels' => :'pulp_labels',
48
- :'base_path' => :'base_path',
47
+ :'name' => :'name',
48
+ :'repository' => :'repository',
49
49
  :'repository_version' => :'repository_version',
50
50
  :'private' => :'private',
51
51
  :'description' => :'description'
@@ -55,11 +55,11 @@ module PulpContainerClient
55
55
  # Attribute type mapping.
56
56
  def self.openapi_types
57
57
  {
58
- :'repository' => :'String',
58
+ :'base_path' => :'String',
59
59
  :'content_guard' => :'String',
60
+ :'pulp_labels' => :'Hash<String, String>',
60
61
  :'name' => :'String',
61
- :'pulp_labels' => :'Object',
62
- :'base_path' => :'String',
62
+ :'repository' => :'String',
63
63
  :'repository_version' => :'String',
64
64
  :'private' => :'Boolean',
65
65
  :'description' => :'String'
@@ -90,24 +90,26 @@ module PulpContainerClient
90
90
  h[k.to_sym] = v
91
91
  }
92
92
 
93
- if attributes.key?(:'repository')
94
- self.repository = attributes[:'repository']
93
+ if attributes.key?(:'base_path')
94
+ self.base_path = attributes[:'base_path']
95
95
  end
96
96
 
97
97
  if attributes.key?(:'content_guard')
98
98
  self.content_guard = attributes[:'content_guard']
99
99
  end
100
100
 
101
- if attributes.key?(:'name')
102
- self.name = attributes[:'name']
101
+ if attributes.key?(:'pulp_labels')
102
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
103
+ self.pulp_labels = value
104
+ end
103
105
  end
104
106
 
105
- if attributes.key?(:'pulp_labels')
106
- self.pulp_labels = attributes[:'pulp_labels']
107
+ if attributes.key?(:'name')
108
+ self.name = attributes[:'name']
107
109
  end
108
110
 
109
- if attributes.key?(:'base_path')
110
- self.base_path = attributes[:'base_path']
111
+ if attributes.key?(:'repository')
112
+ self.repository = attributes[:'repository']
111
113
  end
112
114
 
113
115
  if attributes.key?(:'repository_version')
@@ -127,14 +129,14 @@ module PulpContainerClient
127
129
  # @return Array for valid properties with the reasons
128
130
  def list_invalid_properties
129
131
  invalid_properties = Array.new
130
- if !@name.nil? && @name.to_s.length < 1
131
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
132
- end
133
-
134
132
  if !@base_path.nil? && @base_path.to_s.length < 1
135
133
  invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
136
134
  end
137
135
 
136
+ if !@name.nil? && @name.to_s.length < 1
137
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
138
+ end
139
+
138
140
  if !@description.nil? && @description.to_s.length < 1
139
141
  invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
140
142
  end
@@ -145,22 +147,12 @@ module PulpContainerClient
145
147
  # Check to see if the all the properties in the model are valid
146
148
  # @return true if the model is valid
147
149
  def valid?
148
- return false if !@name.nil? && @name.to_s.length < 1
149
150
  return false if !@base_path.nil? && @base_path.to_s.length < 1
151
+ return false if !@name.nil? && @name.to_s.length < 1
150
152
  return false if !@description.nil? && @description.to_s.length < 1
151
153
  true
152
154
  end
153
155
 
154
- # Custom attribute writer method with validation
155
- # @param [Object] name Value to be assigned
156
- def name=(name)
157
- if !name.nil? && name.to_s.length < 1
158
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
159
- end
160
-
161
- @name = name
162
- end
163
-
164
156
  # Custom attribute writer method with validation
165
157
  # @param [Object] base_path Value to be assigned
166
158
  def base_path=(base_path)
@@ -171,6 +163,16 @@ module PulpContainerClient
171
163
  @base_path = base_path
172
164
  end
173
165
 
166
+ # Custom attribute writer method with validation
167
+ # @param [Object] name Value to be assigned
168
+ def name=(name)
169
+ if !name.nil? && name.to_s.length < 1
170
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
171
+ end
172
+
173
+ @name = name
174
+ end
175
+
174
176
  # Custom attribute writer method with validation
175
177
  # @param [Object] description Value to be assigned
176
178
  def description=(description)
@@ -186,11 +188,11 @@ module PulpContainerClient
186
188
  def ==(o)
187
189
  return true if self.equal?(o)
188
190
  self.class == o.class &&
189
- repository == o.repository &&
191
+ base_path == o.base_path &&
190
192
  content_guard == o.content_guard &&
191
- name == o.name &&
192
193
  pulp_labels == o.pulp_labels &&
193
- base_path == o.base_path &&
194
+ name == o.name &&
195
+ repository == o.repository &&
194
196
  repository_version == o.repository_version &&
195
197
  private == o.private &&
196
198
  description == o.description
@@ -205,7 +207,7 @@ module PulpContainerClient
205
207
  # Calculates hash code according to all attributes.
206
208
  # @return [Integer] Hash code
207
209
  def hash
208
- [repository, content_guard, name, pulp_labels, base_path, repository_version, private, description].hash
210
+ [base_path, content_guard, pulp_labels, name, repository, repository_version, private, description].hash
209
211
  end
210
212
 
211
213
  # Builds the object from hash
@@ -15,16 +15,16 @@ require 'date'
15
15
  module PulpContainerClient
16
16
  # Serializer for Container Push Repositories.
17
17
  class PatchedcontainerContainerPushRepository
18
- # Retain X versions of the repository. Default is null which retains all versions. This is provided as a tech preview in Pulp 3 and may change in the future.
19
- attr_accessor :retain_repo_versions
20
-
21
- # A reference to an associated signing service.
22
- attr_accessor :manifest_signing_service
18
+ attr_accessor :pulp_labels
23
19
 
24
20
  # A unique name for this repository.
25
21
  attr_accessor :name
26
22
 
27
- attr_accessor :pulp_labels
23
+ # A reference to an associated signing service.
24
+ attr_accessor :manifest_signing_service
25
+
26
+ # Retain X versions of the repository. Default is null which retains all versions.
27
+ attr_accessor :retain_repo_versions
28
28
 
29
29
  # An optional description.
30
30
  attr_accessor :description
@@ -32,10 +32,10 @@ module PulpContainerClient
32
32
  # Attribute mapping from ruby-style variable name to JSON key.
33
33
  def self.attribute_map
34
34
  {
35
- :'retain_repo_versions' => :'retain_repo_versions',
36
- :'manifest_signing_service' => :'manifest_signing_service',
37
- :'name' => :'name',
38
35
  :'pulp_labels' => :'pulp_labels',
36
+ :'name' => :'name',
37
+ :'manifest_signing_service' => :'manifest_signing_service',
38
+ :'retain_repo_versions' => :'retain_repo_versions',
39
39
  :'description' => :'description'
40
40
  }
41
41
  end
@@ -43,10 +43,10 @@ module PulpContainerClient
43
43
  # Attribute type mapping.
44
44
  def self.openapi_types
45
45
  {
46
- :'retain_repo_versions' => :'Integer',
47
- :'manifest_signing_service' => :'String',
46
+ :'pulp_labels' => :'Hash<String, String>',
48
47
  :'name' => :'String',
49
- :'pulp_labels' => :'Object',
48
+ :'manifest_signing_service' => :'String',
49
+ :'retain_repo_versions' => :'Integer',
50
50
  :'description' => :'String'
51
51
  }
52
52
  end
@@ -54,8 +54,8 @@ module PulpContainerClient
54
54
  # List of attributes with nullable: true
55
55
  def self.openapi_nullable
56
56
  Set.new([
57
- :'retain_repo_versions',
58
57
  :'manifest_signing_service',
58
+ :'retain_repo_versions',
59
59
  :'description'
60
60
  ])
61
61
  end
@@ -75,20 +75,22 @@ module PulpContainerClient
75
75
  h[k.to_sym] = v
76
76
  }
77
77
 
78
- if attributes.key?(:'retain_repo_versions')
79
- self.retain_repo_versions = attributes[:'retain_repo_versions']
80
- end
81
-
82
- if attributes.key?(:'manifest_signing_service')
83
- self.manifest_signing_service = attributes[:'manifest_signing_service']
78
+ if attributes.key?(:'pulp_labels')
79
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
80
+ self.pulp_labels = value
81
+ end
84
82
  end
85
83
 
86
84
  if attributes.key?(:'name')
87
85
  self.name = attributes[:'name']
88
86
  end
89
87
 
90
- if attributes.key?(:'pulp_labels')
91
- self.pulp_labels = attributes[:'pulp_labels']
88
+ if attributes.key?(:'manifest_signing_service')
89
+ self.manifest_signing_service = attributes[:'manifest_signing_service']
90
+ end
91
+
92
+ if attributes.key?(:'retain_repo_versions')
93
+ self.retain_repo_versions = attributes[:'retain_repo_versions']
92
94
  end
93
95
 
94
96
  if attributes.key?(:'description')
@@ -100,14 +102,14 @@ module PulpContainerClient
100
102
  # @return Array for valid properties with the reasons
101
103
  def list_invalid_properties
102
104
  invalid_properties = Array.new
103
- if !@retain_repo_versions.nil? && @retain_repo_versions < 1
104
- invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
105
- end
106
-
107
105
  if !@name.nil? && @name.to_s.length < 1
108
106
  invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
109
107
  end
110
108
 
109
+ if !@retain_repo_versions.nil? && @retain_repo_versions < 1
110
+ invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
111
+ end
112
+
111
113
  if !@description.nil? && @description.to_s.length < 1
112
114
  invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
113
115
  end
@@ -118,22 +120,12 @@ module PulpContainerClient
118
120
  # Check to see if the all the properties in the model are valid
119
121
  # @return true if the model is valid
120
122
  def valid?
121
- return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
122
123
  return false if !@name.nil? && @name.to_s.length < 1
124
+ return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
123
125
  return false if !@description.nil? && @description.to_s.length < 1
124
126
  true
125
127
  end
126
128
 
127
- # Custom attribute writer method with validation
128
- # @param [Object] retain_repo_versions Value to be assigned
129
- def retain_repo_versions=(retain_repo_versions)
130
- if !retain_repo_versions.nil? && retain_repo_versions < 1
131
- fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
132
- end
133
-
134
- @retain_repo_versions = retain_repo_versions
135
- end
136
-
137
129
  # Custom attribute writer method with validation
138
130
  # @param [Object] name Value to be assigned
139
131
  def name=(name)
@@ -144,6 +136,16 @@ module PulpContainerClient
144
136
  @name = name
145
137
  end
146
138
 
139
+ # Custom attribute writer method with validation
140
+ # @param [Object] retain_repo_versions Value to be assigned
141
+ def retain_repo_versions=(retain_repo_versions)
142
+ if !retain_repo_versions.nil? && retain_repo_versions < 1
143
+ fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
144
+ end
145
+
146
+ @retain_repo_versions = retain_repo_versions
147
+ end
148
+
147
149
  # Custom attribute writer method with validation
148
150
  # @param [Object] description Value to be assigned
149
151
  def description=(description)
@@ -159,10 +161,10 @@ module PulpContainerClient
159
161
  def ==(o)
160
162
  return true if self.equal?(o)
161
163
  self.class == o.class &&
162
- retain_repo_versions == o.retain_repo_versions &&
163
- manifest_signing_service == o.manifest_signing_service &&
164
- name == o.name &&
165
164
  pulp_labels == o.pulp_labels &&
165
+ name == o.name &&
166
+ manifest_signing_service == o.manifest_signing_service &&
167
+ retain_repo_versions == o.retain_repo_versions &&
166
168
  description == o.description
167
169
  end
168
170
 
@@ -175,7 +177,7 @@ module PulpContainerClient
175
177
  # Calculates hash code according to all attributes.
176
178
  # @return [Integer] Hash code
177
179
  def hash
178
- [retain_repo_versions, manifest_signing_service, name, pulp_labels, description].hash
180
+ [pulp_labels, name, manifest_signing_service, retain_repo_versions, description].hash
179
181
  end
180
182
 
181
183
  # Builds the object from hash
@@ -134,7 +134,7 @@ module PulpContainerClient
134
134
  :'proxy_password' => :'String',
135
135
  :'username' => :'String',
136
136
  :'password' => :'String',
137
- :'pulp_labels' => :'Object',
137
+ :'pulp_labels' => :'Hash<String, String>',
138
138
  :'download_concurrency' => :'Integer',
139
139
  :'max_retries' => :'Integer',
140
140
  :'policy' => :'PolicyEnum',
@@ -234,7 +234,9 @@ module PulpContainerClient
234
234
  end
235
235
 
236
236
  if attributes.key?(:'pulp_labels')
237
- self.pulp_labels = attributes[:'pulp_labels']
237
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
238
+ self.pulp_labels = value
239
+ end
238
240
  end
239
241
 
240
242
  if attributes.key?(:'download_concurrency')