pulpcore_client 3.105.2 → 3.106.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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -4
  3. data/docs/ArtifactDistributionResponse.md +16 -12
  4. data/docs/DataRepair7272.md +18 -0
  5. data/docs/DataRepair7465.md +18 -0
  6. data/docs/Datarepair7272Api.md +82 -0
  7. data/docs/Datarepair7465Api.md +82 -0
  8. data/docs/DistributionResponse.md +5 -1
  9. data/docs/OpenPGPDistributionResponse.md +2 -0
  10. data/docs/OpenPGPKeyring.md +2 -0
  11. data/docs/OpenPGPKeyringResponse.md +2 -0
  12. data/docs/PatchedOpenPGPKeyring.md +2 -0
  13. data/docs/RepositoriesApi.md +18 -2
  14. data/docs/RepositoriesOpenpgpKeyringApi.md +18 -2
  15. data/docs/RepositoryResponse.md +2 -0
  16. data/lib/pulpcore_client/api/datarepair7272_api.rb +93 -0
  17. data/lib/pulpcore_client/api/datarepair7465_api.rb +93 -0
  18. data/lib/pulpcore_client/api/repositories_api.rb +27 -3
  19. data/lib/pulpcore_client/api/repositories_openpgp_keyring_api.rb +27 -3
  20. data/lib/pulpcore_client/models/artifact_distribution_response.rb +72 -51
  21. data/lib/pulpcore_client/models/data_repair7272.rb +217 -0
  22. data/lib/pulpcore_client/models/data_repair7465.rb +217 -0
  23. data/lib/pulpcore_client/models/distribution_response.rb +27 -6
  24. data/lib/pulpcore_client/models/open_pgp_distribution.rb +1 -1
  25. data/lib/pulpcore_client/models/open_pgp_distribution_response.rb +12 -2
  26. data/lib/pulpcore_client/models/open_pgp_keyring.rb +27 -1
  27. data/lib/pulpcore_client/models/open_pgp_keyring_response.rb +27 -1
  28. data/lib/pulpcore_client/models/patched_open_pgp_distribution.rb +1 -1
  29. data/lib/pulpcore_client/models/patched_open_pgp_keyring.rb +27 -1
  30. data/lib/pulpcore_client/models/repository_response.rb +27 -1
  31. data/lib/pulpcore_client/version.rb +1 -1
  32. data/lib/pulpcore_client.rb +4 -0
  33. data/spec/api/datarepair7272_api_spec.rb +48 -0
  34. data/spec/api/datarepair7465_api_spec.rb +48 -0
  35. data/spec/api/repositories_api_spec.rb +9 -1
  36. data/spec/api/repositories_openpgp_keyring_api_spec.rb +9 -1
  37. data/spec/models/artifact_distribution_response_spec.rb +20 -8
  38. data/spec/models/data_repair7272_spec.rb +36 -0
  39. data/spec/models/data_repair7465_spec.rb +36 -0
  40. data/spec/models/distribution_response_spec.rb +12 -0
  41. data/spec/models/open_pgp_distribution_response_spec.rb +6 -0
  42. data/spec/models/open_pgp_keyring_response_spec.rb +6 -0
  43. data/spec/models/open_pgp_keyring_spec.rb +6 -0
  44. data/spec/models/patched_open_pgp_keyring_spec.rb +6 -0
  45. data/spec/models/repository_response_spec.rb +6 -0
  46. metadata +17 -1
@@ -0,0 +1,217 @@
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
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PulpcoreClient
17
+ class DataRepair7272
18
+ # If true, only report issues without fixing them. If false (default), repair the detected issues.
19
+ attr_accessor :dry_run
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'dry_run' => :'dry_run'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'dry_run' => :'Boolean'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::DataRepair7272` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::DataRepair7272`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'dry_run')
62
+ self.dry_run = attributes[:'dry_run']
63
+ else
64
+ self.dry_run = false
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
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
72
+ invalid_properties = Array.new
73
+ invalid_properties
74
+ end
75
+
76
+ # Check to see if the all the properties in the model are valid
77
+ # @return true if the model is valid
78
+ def valid?
79
+ warn '[DEPRECATED] the `valid?` method is obsolete'
80
+ true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ dry_run == o.dry_run
89
+ end
90
+
91
+ # @see the `==` method
92
+ # @param [Object] Object to be compared
93
+ def eql?(o)
94
+ self == o
95
+ end
96
+
97
+ # Calculates hash code according to all attributes.
98
+ # @return [Integer] Hash code
99
+ def hash
100
+ [dry_run].hash
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def self.build_from_hash(attributes)
107
+ return nil unless attributes.is_a?(Hash)
108
+ attributes = attributes.transform_keys(&:to_sym)
109
+ transformed_hash = {}
110
+ openapi_types.each_pair do |key, type|
111
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
112
+ transformed_hash["#{key}"] = nil
113
+ elsif type =~ /\AArray<(.*)>/i
114
+ # check to ensure the input is an array given that the attribute
115
+ # is documented as an array but the input is not
116
+ if attributes[attribute_map[key]].is_a?(Array)
117
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
118
+ end
119
+ elsif !attributes[attribute_map[key]].nil?
120
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
121
+ end
122
+ end
123
+ new(transformed_hash)
124
+ end
125
+
126
+ # Deserializes the data based on type
127
+ # @param string type Data type
128
+ # @param string value Value to be deserialized
129
+ # @return [Object] Deserialized data
130
+ def self._deserialize(type, value)
131
+ case type.to_sym
132
+ when :Time
133
+ Time.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :Boolean
143
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ # models (e.g. Pet) or oneOf
164
+ klass = PulpcoreClient.const_get(type)
165
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
+
215
+ end
216
+
217
+ end
@@ -0,0 +1,217 @@
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
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PulpcoreClient
17
+ class DataRepair7465
18
+ # If true, only report issues without fixing them. If false (default), repair the detected issues.
19
+ attr_accessor :dry_run
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'dry_run' => :'dry_run'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'dry_run' => :'Boolean'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::DataRepair7465` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::DataRepair7465`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'dry_run')
62
+ self.dry_run = attributes[:'dry_run']
63
+ else
64
+ self.dry_run = false
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
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
72
+ invalid_properties = Array.new
73
+ invalid_properties
74
+ end
75
+
76
+ # Check to see if the all the properties in the model are valid
77
+ # @return true if the model is valid
78
+ def valid?
79
+ warn '[DEPRECATED] the `valid?` method is obsolete'
80
+ true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ dry_run == o.dry_run
89
+ end
90
+
91
+ # @see the `==` method
92
+ # @param [Object] Object to be compared
93
+ def eql?(o)
94
+ self == o
95
+ end
96
+
97
+ # Calculates hash code according to all attributes.
98
+ # @return [Integer] Hash code
99
+ def hash
100
+ [dry_run].hash
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def self.build_from_hash(attributes)
107
+ return nil unless attributes.is_a?(Hash)
108
+ attributes = attributes.transform_keys(&:to_sym)
109
+ transformed_hash = {}
110
+ openapi_types.each_pair do |key, type|
111
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
112
+ transformed_hash["#{key}"] = nil
113
+ elsif type =~ /\AArray<(.*)>/i
114
+ # check to ensure the input is an array given that the attribute
115
+ # is documented as an array but the input is not
116
+ if attributes[attribute_map[key]].is_a?(Array)
117
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
118
+ end
119
+ elsif !attributes[attribute_map[key]].nil?
120
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
121
+ end
122
+ end
123
+ new(transformed_hash)
124
+ end
125
+
126
+ # Deserializes the data based on type
127
+ # @param string type Data type
128
+ # @param string value Value to be deserialized
129
+ # @return [Object] Deserialized data
130
+ def self._deserialize(type, value)
131
+ case type.to_sym
132
+ when :Time
133
+ Time.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :Boolean
143
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ # models (e.g. Pet) or oneOf
164
+ klass = PulpcoreClient.const_get(type)
165
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
+
215
+ end
216
+
217
+ end
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module PulpcoreClient
17
- # The Serializer for the Distribution model. The serializer deliberately omits the `publication` and `repository_version` field due to plugins typically requiring one or the other but not both. To include the ``publication`` field, it is recommended plugins define the field:: publication = DetailRelatedField( required=False, help_text=_(\"Publication to be served\"), view_name_pattern=r\"publications(-.*/.*)?-detail\", queryset=models.Publication.objects.exclude(complete=False), allow_null=True, ) To include the ``repository_version`` field, it is recommended plugins define the field:: repository_version = RepositoryVersionRelatedField( required=False, help_text=_(\"RepositoryVersion to be served\"), allow_null=True ) Additionally, the serializer omits the ``remote`` field, which is used for pull-through caching feature and only by plugins which use publications. Plugins implementing a pull-through caching should define the field in their derived serializer class like this:: remote = DetailRelatedField( required=False, help_text=_('Remote that can be used to fetch content when using pull-through caching.'), queryset=models.Remote.objects.all(), allow_null=True )
17
+ # The Serializer for the Distribution model. The serializer deliberately omits the `publication` field due to not all plugins using publications. To include the `publication` field, plugins should define it:: publication = DetailRelatedField( required=False, help_text=_(\"Publication to be served\"), view_name_pattern=r\"publications(-.*/.*)?-detail\", queryset=models.Publication.objects.exclude(complete=False), allow_null=True, ) The serializer also omits the `remote` field, which is used for pull-through caching and only by plugins which use publications. Plugins implementing pull-through caching should define the field in their derived serializer class like this:: remote = DetailRelatedField( required=False, help_text=_('Remote that can be used to fetch content when using pull-through caching.'), queryset=models.Remote.objects.all(), allow_null=True )
18
18
  class DistributionResponse
19
19
  attr_accessor :pulp_href
20
20
 
@@ -36,6 +36,9 @@ module PulpcoreClient
36
36
  # An optional content-guard.
37
37
  attr_accessor :content_guard
38
38
 
39
+ # The Pulp Resource Name (PRN) of the associated optional content guard.
40
+ attr_accessor :content_guard_prn
41
+
39
42
  # Timestamp since when the distributed content served by this distribution has not changed. If equals to `null`, no guarantee is provided about content changes.
40
43
  attr_accessor :no_content_change_since
41
44
 
@@ -50,6 +53,9 @@ module PulpcoreClient
50
53
  # The latest RepositoryVersion for this Repository will be served.
51
54
  attr_accessor :repository
52
55
 
56
+ # RepositoryVersion to be served
57
+ attr_accessor :repository_version
58
+
53
59
  # Attribute mapping from ruby-style variable name to JSON key.
54
60
  def self.attribute_map
55
61
  {
@@ -60,11 +66,13 @@ module PulpcoreClient
60
66
  :'base_path' => :'base_path',
61
67
  :'base_url' => :'base_url',
62
68
  :'content_guard' => :'content_guard',
69
+ :'content_guard_prn' => :'content_guard_prn',
63
70
  :'no_content_change_since' => :'no_content_change_since',
64
71
  :'hidden' => :'hidden',
65
72
  :'pulp_labels' => :'pulp_labels',
66
73
  :'name' => :'name',
67
- :'repository' => :'repository'
74
+ :'repository' => :'repository',
75
+ :'repository_version' => :'repository_version'
68
76
  }
69
77
  end
70
78
 
@@ -83,11 +91,13 @@ module PulpcoreClient
83
91
  :'base_path' => :'String',
84
92
  :'base_url' => :'String',
85
93
  :'content_guard' => :'String',
94
+ :'content_guard_prn' => :'String',
86
95
  :'no_content_change_since' => :'String',
87
96
  :'hidden' => :'Boolean',
88
97
  :'pulp_labels' => :'Hash<String, String>',
89
98
  :'name' => :'String',
90
- :'repository' => :'String'
99
+ :'repository' => :'String',
100
+ :'repository_version' => :'String'
91
101
  }
92
102
  end
93
103
 
@@ -95,7 +105,8 @@ module PulpcoreClient
95
105
  def self.openapi_nullable
96
106
  Set.new([
97
107
  :'content_guard',
98
- :'repository'
108
+ :'repository',
109
+ :'repository_version'
99
110
  ])
100
111
  end
101
112
 
@@ -144,6 +155,10 @@ module PulpcoreClient
144
155
  self.content_guard = attributes[:'content_guard']
145
156
  end
146
157
 
158
+ if attributes.key?(:'content_guard_prn')
159
+ self.content_guard_prn = attributes[:'content_guard_prn']
160
+ end
161
+
147
162
  if attributes.key?(:'no_content_change_since')
148
163
  self.no_content_change_since = attributes[:'no_content_change_since']
149
164
  end
@@ -169,6 +184,10 @@ module PulpcoreClient
169
184
  if attributes.key?(:'repository')
170
185
  self.repository = attributes[:'repository']
171
186
  end
187
+
188
+ if attributes.key?(:'repository_version')
189
+ self.repository_version = attributes[:'repository_version']
190
+ end
172
191
  end
173
192
 
174
193
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -208,11 +227,13 @@ module PulpcoreClient
208
227
  base_path == o.base_path &&
209
228
  base_url == o.base_url &&
210
229
  content_guard == o.content_guard &&
230
+ content_guard_prn == o.content_guard_prn &&
211
231
  no_content_change_since == o.no_content_change_since &&
212
232
  hidden == o.hidden &&
213
233
  pulp_labels == o.pulp_labels &&
214
234
  name == o.name &&
215
- repository == o.repository
235
+ repository == o.repository &&
236
+ repository_version == o.repository_version
216
237
  end
217
238
 
218
239
  # @see the `==` method
@@ -224,7 +245,7 @@ module PulpcoreClient
224
245
  # Calculates hash code according to all attributes.
225
246
  # @return [Integer] Hash code
226
247
  def hash
227
- [pulp_href, prn, pulp_created, pulp_last_updated, base_path, base_url, content_guard, no_content_change_since, hidden, pulp_labels, name, repository].hash
248
+ [pulp_href, prn, pulp_created, pulp_last_updated, base_path, base_url, content_guard, content_guard_prn, no_content_change_since, hidden, pulp_labels, name, repository, repository_version].hash
228
249
  end
229
250
 
230
251
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module PulpcoreClient
17
- # The Serializer for the Distribution model. The serializer deliberately omits the `publication` and `repository_version` field due to plugins typically requiring one or the other but not both. To include the ``publication`` field, it is recommended plugins define the field:: publication = DetailRelatedField( required=False, help_text=_(\"Publication to be served\"), view_name_pattern=r\"publications(-.*/.*)?-detail\", queryset=models.Publication.objects.exclude(complete=False), allow_null=True, ) To include the ``repository_version`` field, it is recommended plugins define the field:: repository_version = RepositoryVersionRelatedField( required=False, help_text=_(\"RepositoryVersion to be served\"), allow_null=True ) Additionally, the serializer omits the ``remote`` field, which is used for pull-through caching feature and only by plugins which use publications. Plugins implementing a pull-through caching should define the field in their derived serializer class like this:: remote = DetailRelatedField( required=False, help_text=_('Remote that can be used to fetch content when using pull-through caching.'), queryset=models.Remote.objects.all(), allow_null=True )
17
+ # The Serializer for the Distribution model. The serializer deliberately omits the `publication` field due to not all plugins using publications. To include the `publication` field, plugins should define it:: publication = DetailRelatedField( required=False, help_text=_(\"Publication to be served\"), view_name_pattern=r\"publications(-.*/.*)?-detail\", queryset=models.Publication.objects.exclude(complete=False), allow_null=True, ) The serializer also omits the `remote` field, which is used for pull-through caching and only by plugins which use publications. Plugins implementing pull-through caching should define the field in their derived serializer class like this:: remote = DetailRelatedField( required=False, help_text=_('Remote that can be used to fetch content when using pull-through caching.'), queryset=models.Remote.objects.all(), allow_null=True )
18
18
  class OpenPGPDistribution
19
19
  # The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
20
20
  attr_accessor :base_path
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module PulpcoreClient
17
- # The Serializer for the Distribution model. The serializer deliberately omits the `publication` and `repository_version` field due to plugins typically requiring one or the other but not both. To include the ``publication`` field, it is recommended plugins define the field:: publication = DetailRelatedField( required=False, help_text=_(\"Publication to be served\"), view_name_pattern=r\"publications(-.*/.*)?-detail\", queryset=models.Publication.objects.exclude(complete=False), allow_null=True, ) To include the ``repository_version`` field, it is recommended plugins define the field:: repository_version = RepositoryVersionRelatedField( required=False, help_text=_(\"RepositoryVersion to be served\"), allow_null=True ) Additionally, the serializer omits the ``remote`` field, which is used for pull-through caching feature and only by plugins which use publications. Plugins implementing a pull-through caching should define the field in their derived serializer class like this:: remote = DetailRelatedField( required=False, help_text=_('Remote that can be used to fetch content when using pull-through caching.'), queryset=models.Remote.objects.all(), allow_null=True )
17
+ # The Serializer for the Distribution model. The serializer deliberately omits the `publication` field due to not all plugins using publications. To include the `publication` field, plugins should define it:: publication = DetailRelatedField( required=False, help_text=_(\"Publication to be served\"), view_name_pattern=r\"publications(-.*/.*)?-detail\", queryset=models.Publication.objects.exclude(complete=False), allow_null=True, ) The serializer also omits the `remote` field, which is used for pull-through caching and only by plugins which use publications. Plugins implementing pull-through caching should define the field in their derived serializer class like this:: remote = DetailRelatedField( required=False, help_text=_('Remote that can be used to fetch content when using pull-through caching.'), queryset=models.Remote.objects.all(), allow_null=True )
18
18
  class OpenPGPDistributionResponse
19
19
  attr_accessor :pulp_href
20
20
 
@@ -36,6 +36,9 @@ module PulpcoreClient
36
36
  # An optional content-guard.
37
37
  attr_accessor :content_guard
38
38
 
39
+ # The Pulp Resource Name (PRN) of the associated optional content guard.
40
+ attr_accessor :content_guard_prn
41
+
39
42
  # Timestamp since when the distributed content served by this distribution has not changed. If equals to `null`, no guarantee is provided about content changes.
40
43
  attr_accessor :no_content_change_since
41
44
 
@@ -63,6 +66,7 @@ module PulpcoreClient
63
66
  :'base_path' => :'base_path',
64
67
  :'base_url' => :'base_url',
65
68
  :'content_guard' => :'content_guard',
69
+ :'content_guard_prn' => :'content_guard_prn',
66
70
  :'no_content_change_since' => :'no_content_change_since',
67
71
  :'hidden' => :'hidden',
68
72
  :'pulp_labels' => :'pulp_labels',
@@ -87,6 +91,7 @@ module PulpcoreClient
87
91
  :'base_path' => :'String',
88
92
  :'base_url' => :'String',
89
93
  :'content_guard' => :'String',
94
+ :'content_guard_prn' => :'String',
90
95
  :'no_content_change_since' => :'String',
91
96
  :'hidden' => :'Boolean',
92
97
  :'pulp_labels' => :'Hash<String, String>',
@@ -150,6 +155,10 @@ module PulpcoreClient
150
155
  self.content_guard = attributes[:'content_guard']
151
156
  end
152
157
 
158
+ if attributes.key?(:'content_guard_prn')
159
+ self.content_guard_prn = attributes[:'content_guard_prn']
160
+ end
161
+
153
162
  if attributes.key?(:'no_content_change_since')
154
163
  self.no_content_change_since = attributes[:'no_content_change_since']
155
164
  end
@@ -218,6 +227,7 @@ module PulpcoreClient
218
227
  base_path == o.base_path &&
219
228
  base_url == o.base_url &&
220
229
  content_guard == o.content_guard &&
230
+ content_guard_prn == o.content_guard_prn &&
221
231
  no_content_change_since == o.no_content_change_since &&
222
232
  hidden == o.hidden &&
223
233
  pulp_labels == o.pulp_labels &&
@@ -235,7 +245,7 @@ module PulpcoreClient
235
245
  # Calculates hash code according to all attributes.
236
246
  # @return [Integer] Hash code
237
247
  def hash
238
- [pulp_href, prn, pulp_created, pulp_last_updated, base_path, base_url, content_guard, no_content_change_since, hidden, pulp_labels, name, repository, repository_version].hash
248
+ [pulp_href, prn, pulp_created, pulp_last_updated, base_path, base_url, content_guard, content_guard_prn, no_content_change_since, hidden, pulp_labels, name, repository, repository_version].hash
239
249
  end
240
250
 
241
251
  # Builds the object from hash