pulp_ansible_client 0.14.2 → 0.15.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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -4
  3. data/docs/AnsibleAnsibleRepository.md +2 -2
  4. data/docs/AnsibleAnsibleRepositoryResponse.md +2 -2
  5. data/docs/AnsibleCollectionRemoteResponse.md +0 -2
  6. data/docs/AnsibleCollectionVersion.md +3 -3
  7. data/docs/AnsibleCollectionVersionResponse.md +3 -3
  8. data/docs/AnsibleGitRemote.md +26 -26
  9. data/docs/AnsibleGitRemoteResponse.md +22 -22
  10. data/docs/AnsibleRepositoryRebuild.md +21 -0
  11. data/docs/AnsibleRoleResponse.md +3 -3
  12. data/docs/ClientConfigurationResponse.md +17 -0
  13. data/docs/ContentCollectionVersionsApi.md +3 -3
  14. data/docs/PatchedansibleAnsibleRepository.md +2 -2
  15. data/docs/PatchedansibleGitRemote.md +26 -26
  16. data/docs/PulpAnsibleApiV3PluginAnsibleClientConfigurationApi.md +67 -0
  17. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationApi.md +57 -0
  18. data/docs/RepositoriesAnsibleApi.md +55 -0
  19. data/docs/RepositoriesAnsibleVersionsApi.md +55 -0
  20. data/lib/pulp_ansible_client/api/content_collection_signatures_api.rb +1 -1
  21. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +4 -4
  22. data/lib/pulp_ansible_client/api/content_roles_api.rb +1 -1
  23. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_versions_api.rb +1 -1
  24. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_client_configuration_api.rb +88 -0
  25. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_api.rb +1 -1
  26. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collections_versions_api.rb +1 -1
  27. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_client_configuration_api.rb +76 -0
  28. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_api.rb +1 -1
  29. data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +69 -1
  30. data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +69 -1
  31. data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +24 -10
  32. data/lib/pulp_ansible_client/models/ansible_ansible_repository_response.rb +9 -10
  33. data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +0 -2
  34. data/lib/pulp_ansible_client/models/ansible_collection_remote_response.rb +1 -29
  35. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +11 -11
  36. data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +11 -11
  37. data/lib/pulp_ansible_client/models/ansible_git_remote.rb +224 -224
  38. data/lib/pulp_ansible_client/models/ansible_git_remote_response.rb +130 -130
  39. data/lib/pulp_ansible_client/models/ansible_repository_rebuild.rb +273 -0
  40. data/lib/pulp_ansible_client/models/ansible_role_response.rb +11 -11
  41. data/lib/pulp_ansible_client/models/client_configuration_response.rb +208 -0
  42. data/lib/pulp_ansible_client/models/patchedansible_ansible_repository.rb +24 -10
  43. data/lib/pulp_ansible_client/models/patchedansible_collection_remote.rb +0 -2
  44. data/lib/pulp_ansible_client/models/patchedansible_git_remote.rb +213 -213
  45. data/lib/pulp_ansible_client/version.rb +1 -1
  46. data/lib/pulp_ansible_client.rb +4 -0
  47. data/spec/api/content_collection_versions_api_spec.rb +1 -1
  48. data/spec/api/pulp_ansible_api_v3_plugin_ansible_client_configuration_api_spec.rb +48 -0
  49. data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_client_configuration_api_spec.rb +45 -0
  50. data/spec/api/repositories_ansible_api_spec.rb +12 -0
  51. data/spec/api/repositories_ansible_versions_api_spec.rb +12 -0
  52. data/spec/models/ansible_ansible_repository_response_spec.rb +1 -1
  53. data/spec/models/ansible_ansible_repository_spec.rb +1 -1
  54. data/spec/models/ansible_collection_remote_response_spec.rb +0 -6
  55. data/spec/models/ansible_collection_version_response_spec.rb +3 -3
  56. data/spec/models/ansible_collection_version_spec.rb +3 -3
  57. data/spec/models/ansible_git_remote_response_spec.rb +16 -16
  58. data/spec/models/ansible_git_remote_spec.rb +20 -20
  59. data/spec/models/ansible_repository_rebuild_spec.rb +53 -0
  60. data/spec/models/ansible_role_response_spec.rb +3 -3
  61. data/spec/models/client_configuration_response_spec.rb +41 -0
  62. data/spec/models/patchedansible_ansible_repository_spec.rb +1 -1
  63. data/spec/models/patchedansible_git_remote_spec.rb +20 -20
  64. metadata +18 -2
@@ -0,0 +1,273 @@
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 PulpAnsibleClient
16
+ # Serializer for Ansible Repository Rebuild.
17
+ class AnsibleRepositoryRebuild
18
+ attr_accessor :namespace
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :version
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'namespace' => :'namespace',
28
+ :'name' => :'name',
29
+ :'version' => :'version'
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'namespace' => :'String',
37
+ :'name' => :'String',
38
+ :'version' => :'String'
39
+ }
40
+ end
41
+
42
+ # List of attributes with nullable: true
43
+ def self.openapi_nullable
44
+ Set.new([
45
+ :'namespace',
46
+ :'name',
47
+ :'version'
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleRepositoryRebuild` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::AnsibleRepositoryRebuild`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'namespace')
67
+ self.namespace = attributes[:'namespace']
68
+ end
69
+
70
+ if attributes.key?(:'name')
71
+ self.name = attributes[:'name']
72
+ end
73
+
74
+ if attributes.key?(:'version')
75
+ self.version = attributes[:'version']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ if !@namespace.nil? && @namespace.to_s.length < 1
84
+ invalid_properties.push('invalid value for "namespace", the character length must be great than or equal to 1.')
85
+ end
86
+
87
+ if !@name.nil? && @name.to_s.length < 1
88
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
89
+ end
90
+
91
+ if !@version.nil? && @version.to_s.length < 1
92
+ invalid_properties.push('invalid value for "version", the character length must be great than or equal to 1.')
93
+ end
94
+
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ return false if !@namespace.nil? && @namespace.to_s.length < 1
102
+ return false if !@name.nil? && @name.to_s.length < 1
103
+ return false if !@version.nil? && @version.to_s.length < 1
104
+ true
105
+ end
106
+
107
+ # Custom attribute writer method with validation
108
+ # @param [Object] namespace Value to be assigned
109
+ def namespace=(namespace)
110
+ if !namespace.nil? && namespace.to_s.length < 1
111
+ fail ArgumentError, 'invalid value for "namespace", the character length must be great than or equal to 1.'
112
+ end
113
+
114
+ @namespace = namespace
115
+ end
116
+
117
+ # Custom attribute writer method with validation
118
+ # @param [Object] name Value to be assigned
119
+ def name=(name)
120
+ if !name.nil? && name.to_s.length < 1
121
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
122
+ end
123
+
124
+ @name = name
125
+ end
126
+
127
+ # Custom attribute writer method with validation
128
+ # @param [Object] version Value to be assigned
129
+ def version=(version)
130
+ if !version.nil? && version.to_s.length < 1
131
+ fail ArgumentError, 'invalid value for "version", the character length must be great than or equal to 1.'
132
+ end
133
+
134
+ @version = version
135
+ end
136
+
137
+ # Checks equality by comparing each attribute.
138
+ # @param [Object] Object to be compared
139
+ def ==(o)
140
+ return true if self.equal?(o)
141
+ self.class == o.class &&
142
+ namespace == o.namespace &&
143
+ name == o.name &&
144
+ version == o.version
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [namespace, name, version].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ new.build_from_hash(attributes)
164
+ end
165
+
166
+ # Builds the object from hash
167
+ # @param [Hash] attributes Model attributes in the form of hash
168
+ # @return [Object] Returns the model itself
169
+ def build_from_hash(attributes)
170
+ return nil unless attributes.is_a?(Hash)
171
+ self.class.openapi_types.each_pair do |key, type|
172
+ if type =~ /\AArray<(.*)>/i
173
+ # check to ensure the input is an array given that the attribute
174
+ # is documented as an array but the input is not
175
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
176
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
177
+ end
178
+ elsif !attributes[self.class.attribute_map[key]].nil?
179
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
180
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
181
+ end
182
+
183
+ self
184
+ end
185
+
186
+ # Deserializes the data based on type
187
+ # @param string type Data type
188
+ # @param string value Value to be deserialized
189
+ # @return [Object] Deserialized data
190
+ def _deserialize(type, value)
191
+ case type.to_sym
192
+ when :DateTime
193
+ DateTime.parse(value)
194
+ when :Date
195
+ Date.parse(value)
196
+ when :String
197
+ value.to_s
198
+ when :Integer
199
+ value.to_i
200
+ when :Float
201
+ value.to_f
202
+ when :Boolean
203
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
204
+ true
205
+ else
206
+ false
207
+ end
208
+ when :Object
209
+ # generic object (usually a Hash), return directly
210
+ value
211
+ when /\AArray<(?<inner_type>.+)>\z/
212
+ inner_type = Regexp.last_match[:inner_type]
213
+ value.map { |v| _deserialize(inner_type, v) }
214
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
215
+ k_type = Regexp.last_match[:k_type]
216
+ v_type = Regexp.last_match[:v_type]
217
+ {}.tap do |hash|
218
+ value.each do |k, v|
219
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
220
+ end
221
+ end
222
+ else # model
223
+ PulpAnsibleClient.const_get(type).build_from_hash(value)
224
+ end
225
+ end
226
+
227
+ # Returns the string representation of the object
228
+ # @return [String] String presentation of the object
229
+ def to_s
230
+ to_hash.to_s
231
+ end
232
+
233
+ # to_body is an alias to to_hash (backward compatibility)
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_body
236
+ to_hash
237
+ end
238
+
239
+ # Returns the object in the form of hash
240
+ # @return [Hash] Returns the object in the form of hash
241
+ def to_hash
242
+ hash = {}
243
+ self.class.attribute_map.each_pair do |attr, param|
244
+ value = self.send(attr)
245
+ if value.nil?
246
+ is_nullable = self.class.openapi_nullable.include?(attr)
247
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
248
+ end
249
+
250
+ hash[param] = _to_hash(value)
251
+ end
252
+ hash
253
+ end
254
+
255
+ # Outputs non-array value in the form of hash
256
+ # For object, use to_hash. Otherwise, just return the value
257
+ # @param [Object] value Any valid value
258
+ # @return [Hash] Returns the value in the form of hash
259
+ def _to_hash(value)
260
+ if value.is_a?(Array)
261
+ value.compact.map { |v| _to_hash(v) }
262
+ elsif value.is_a?(Hash)
263
+ {}.tap do |hash|
264
+ value.each { |k, v| hash[k] = _to_hash(v) }
265
+ end
266
+ elsif value.respond_to? :to_hash
267
+ value.to_hash
268
+ else
269
+ value
270
+ end
271
+ end
272
+ end
273
+ end
@@ -15,14 +15,14 @@ require 'date'
15
15
  module PulpAnsibleClient
16
16
  # A serializer for Role versions.
17
17
  class AnsibleRoleResponse
18
+ # Timestamp of creation.
19
+ attr_accessor :pulp_created
20
+
18
21
  attr_accessor :pulp_href
19
22
 
20
23
  # Artifact file representing the physical content
21
24
  attr_accessor :artifact
22
25
 
23
- # Timestamp of creation.
24
- attr_accessor :pulp_created
25
-
26
26
  attr_accessor :version
27
27
 
28
28
  attr_accessor :name
@@ -32,9 +32,9 @@ module PulpAnsibleClient
32
32
  # Attribute mapping from ruby-style variable name to JSON key.
33
33
  def self.attribute_map
34
34
  {
35
+ :'pulp_created' => :'pulp_created',
35
36
  :'pulp_href' => :'pulp_href',
36
37
  :'artifact' => :'artifact',
37
- :'pulp_created' => :'pulp_created',
38
38
  :'version' => :'version',
39
39
  :'name' => :'name',
40
40
  :'namespace' => :'namespace'
@@ -44,9 +44,9 @@ module PulpAnsibleClient
44
44
  # Attribute type mapping.
45
45
  def self.openapi_types
46
46
  {
47
+ :'pulp_created' => :'DateTime',
47
48
  :'pulp_href' => :'String',
48
49
  :'artifact' => :'String',
49
- :'pulp_created' => :'DateTime',
50
50
  :'version' => :'String',
51
51
  :'name' => :'String',
52
52
  :'namespace' => :'String'
@@ -74,6 +74,10 @@ module PulpAnsibleClient
74
74
  h[k.to_sym] = v
75
75
  }
76
76
 
77
+ if attributes.key?(:'pulp_created')
78
+ self.pulp_created = attributes[:'pulp_created']
79
+ end
80
+
77
81
  if attributes.key?(:'pulp_href')
78
82
  self.pulp_href = attributes[:'pulp_href']
79
83
  end
@@ -82,10 +86,6 @@ module PulpAnsibleClient
82
86
  self.artifact = attributes[:'artifact']
83
87
  end
84
88
 
85
- if attributes.key?(:'pulp_created')
86
- self.pulp_created = attributes[:'pulp_created']
87
- end
88
-
89
89
  if attributes.key?(:'version')
90
90
  self.version = attributes[:'version']
91
91
  end
@@ -137,9 +137,9 @@ module PulpAnsibleClient
137
137
  def ==(o)
138
138
  return true if self.equal?(o)
139
139
  self.class == o.class &&
140
+ pulp_created == o.pulp_created &&
140
141
  pulp_href == o.pulp_href &&
141
142
  artifact == o.artifact &&
142
- pulp_created == o.pulp_created &&
143
143
  version == o.version &&
144
144
  name == o.name &&
145
145
  namespace == o.namespace
@@ -154,7 +154,7 @@ module PulpAnsibleClient
154
154
  # Calculates hash code according to all attributes.
155
155
  # @return [Integer] Hash code
156
156
  def hash
157
- [pulp_href, artifact, pulp_created, version, name, namespace].hash
157
+ [pulp_created, pulp_href, artifact, version, name, namespace].hash
158
158
  end
159
159
 
160
160
  # Builds the object from hash
@@ -0,0 +1,208 @@
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 PulpAnsibleClient
16
+ # Configuration settings for the ansible-galaxy client.
17
+ class ClientConfigurationResponse
18
+ attr_accessor :default_distribution_path
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'default_distribution_path' => :'default_distribution_path'
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.openapi_types
29
+ {
30
+ :'default_distribution_path' => :'String'
31
+ }
32
+ end
33
+
34
+ # List of attributes with nullable: true
35
+ def self.openapi_nullable
36
+ Set.new([
37
+ :'default_distribution_path'
38
+ ])
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ if (!attributes.is_a?(Hash))
45
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::ClientConfigurationResponse` initialize method"
46
+ end
47
+
48
+ # check to see if the attribute exists and convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h|
50
+ if (!self.class.attribute_map.key?(k.to_sym))
51
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::ClientConfigurationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
52
+ end
53
+ h[k.to_sym] = v
54
+ }
55
+
56
+ if attributes.key?(:'default_distribution_path')
57
+ self.default_distribution_path = attributes[:'default_distribution_path']
58
+ end
59
+ end
60
+
61
+ # Show invalid properties with the reasons. Usually used together with valid?
62
+ # @return Array for valid properties with the reasons
63
+ def list_invalid_properties
64
+ invalid_properties = Array.new
65
+ invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ true
72
+ end
73
+
74
+ # Checks equality by comparing each attribute.
75
+ # @param [Object] Object to be compared
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ default_distribution_path == o.default_distribution_path
80
+ end
81
+
82
+ # @see the `==` method
83
+ # @param [Object] Object to be compared
84
+ def eql?(o)
85
+ self == o
86
+ end
87
+
88
+ # Calculates hash code according to all attributes.
89
+ # @return [Integer] Hash code
90
+ def hash
91
+ [default_distribution_path].hash
92
+ end
93
+
94
+ # Builds the object from hash
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ # @return [Object] Returns the model itself
97
+ def self.build_from_hash(attributes)
98
+ new.build_from_hash(attributes)
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 build_from_hash(attributes)
105
+ return nil unless attributes.is_a?(Hash)
106
+ self.class.openapi_types.each_pair do |key, type|
107
+ if type =~ /\AArray<(.*)>/i
108
+ # check to ensure the input is an array given that the attribute
109
+ # is documented as an array but the input is not
110
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
111
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
112
+ end
113
+ elsif !attributes[self.class.attribute_map[key]].nil?
114
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
116
+ end
117
+
118
+ self
119
+ end
120
+
121
+ # Deserializes the data based on type
122
+ # @param string type Data type
123
+ # @param string value Value to be deserialized
124
+ # @return [Object] Deserialized data
125
+ def _deserialize(type, value)
126
+ case type.to_sym
127
+ when :DateTime
128
+ DateTime.parse(value)
129
+ when :Date
130
+ Date.parse(value)
131
+ when :String
132
+ value.to_s
133
+ when :Integer
134
+ value.to_i
135
+ when :Float
136
+ value.to_f
137
+ when :Boolean
138
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
+ true
140
+ else
141
+ false
142
+ end
143
+ when :Object
144
+ # generic object (usually a Hash), return directly
145
+ value
146
+ when /\AArray<(?<inner_type>.+)>\z/
147
+ inner_type = Regexp.last_match[:inner_type]
148
+ value.map { |v| _deserialize(inner_type, v) }
149
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
+ k_type = Regexp.last_match[:k_type]
151
+ v_type = Regexp.last_match[:v_type]
152
+ {}.tap do |hash|
153
+ value.each do |k, v|
154
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
+ end
156
+ end
157
+ else # model
158
+ PulpAnsibleClient.const_get(type).build_from_hash(value)
159
+ end
160
+ end
161
+
162
+ # Returns the string representation of the object
163
+ # @return [String] String presentation of the object
164
+ def to_s
165
+ to_hash.to_s
166
+ end
167
+
168
+ # to_body is an alias to to_hash (backward compatibility)
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_body
171
+ to_hash
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ if value.nil?
181
+ is_nullable = self.class.openapi_nullable.include?(attr)
182
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
183
+ end
184
+
185
+ hash[param] = _to_hash(value)
186
+ end
187
+ hash
188
+ end
189
+
190
+ # Outputs non-array value in the form of hash
191
+ # For object, use to_hash. Otherwise, just return the value
192
+ # @param [Object] value Any valid value
193
+ # @return [Hash] Returns the value in the form of hash
194
+ def _to_hash(value)
195
+ if value.is_a?(Array)
196
+ value.compact.map { |v| _to_hash(v) }
197
+ elsif value.is_a?(Hash)
198
+ {}.tap do |hash|
199
+ value.each { |k, v| hash[k] = _to_hash(v) }
200
+ end
201
+ elsif value.respond_to? :to_hash
202
+ value.to_hash
203
+ else
204
+ value
205
+ end
206
+ end
207
+ end
208
+ end
@@ -32,8 +32,8 @@ module PulpAnsibleClient
32
32
  # Last synced metadata time.
33
33
  attr_accessor :last_synced_metadata_time
34
34
 
35
- # Location of keyring used to verify signatures uploaded to this repository
36
- attr_accessor :keyring
35
+ # Gpg public key to verify collection signatures against
36
+ attr_accessor :gpgkey
37
37
 
38
38
  # Attribute mapping from ruby-style variable name to JSON key.
39
39
  def self.attribute_map
@@ -44,7 +44,7 @@ module PulpAnsibleClient
44
44
  :'retain_repo_versions' => :'retain_repo_versions',
45
45
  :'remote' => :'remote',
46
46
  :'last_synced_metadata_time' => :'last_synced_metadata_time',
47
- :'keyring' => :'keyring'
47
+ :'gpgkey' => :'gpgkey'
48
48
  }
49
49
  end
50
50
 
@@ -57,7 +57,7 @@ module PulpAnsibleClient
57
57
  :'retain_repo_versions' => :'Integer',
58
58
  :'remote' => :'String',
59
59
  :'last_synced_metadata_time' => :'DateTime',
60
- :'keyring' => :'String'
60
+ :'gpgkey' => :'String'
61
61
  }
62
62
  end
63
63
 
@@ -68,6 +68,7 @@ module PulpAnsibleClient
68
68
  :'retain_repo_versions',
69
69
  :'remote',
70
70
  :'last_synced_metadata_time',
71
+ :'gpgkey'
71
72
  ])
72
73
  end
73
74
 
@@ -110,10 +111,8 @@ module PulpAnsibleClient
110
111
  self.last_synced_metadata_time = attributes[:'last_synced_metadata_time']
111
112
  end
112
113
 
113
- if attributes.key?(:'keyring')
114
- self.keyring = attributes[:'keyring']
115
- else
116
- self.keyring = ''
114
+ if attributes.key?(:'gpgkey')
115
+ self.gpgkey = attributes[:'gpgkey']
117
116
  end
118
117
  end
119
118
 
@@ -133,6 +132,10 @@ module PulpAnsibleClient
133
132
  invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
134
133
  end
135
134
 
135
+ if !@gpgkey.nil? && @gpgkey.to_s.length < 1
136
+ invalid_properties.push('invalid value for "gpgkey", the character length must be great than or equal to 1.')
137
+ end
138
+
136
139
  invalid_properties
137
140
  end
138
141
 
@@ -142,6 +145,7 @@ module PulpAnsibleClient
142
145
  return false if !@name.nil? && @name.to_s.length < 1
143
146
  return false if !@description.nil? && @description.to_s.length < 1
144
147
  return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
148
+ return false if !@gpgkey.nil? && @gpgkey.to_s.length < 1
145
149
  true
146
150
  end
147
151
 
@@ -175,6 +179,16 @@ module PulpAnsibleClient
175
179
  @retain_repo_versions = retain_repo_versions
176
180
  end
177
181
 
182
+ # Custom attribute writer method with validation
183
+ # @param [Object] gpgkey Value to be assigned
184
+ def gpgkey=(gpgkey)
185
+ if !gpgkey.nil? && gpgkey.to_s.length < 1
186
+ fail ArgumentError, 'invalid value for "gpgkey", the character length must be great than or equal to 1.'
187
+ end
188
+
189
+ @gpgkey = gpgkey
190
+ end
191
+
178
192
  # Checks equality by comparing each attribute.
179
193
  # @param [Object] Object to be compared
180
194
  def ==(o)
@@ -186,7 +200,7 @@ module PulpAnsibleClient
186
200
  retain_repo_versions == o.retain_repo_versions &&
187
201
  remote == o.remote &&
188
202
  last_synced_metadata_time == o.last_synced_metadata_time &&
189
- keyring == o.keyring
203
+ gpgkey == o.gpgkey
190
204
  end
191
205
 
192
206
  # @see the `==` method
@@ -198,7 +212,7 @@ module PulpAnsibleClient
198
212
  # Calculates hash code according to all attributes.
199
213
  # @return [Integer] Hash code
200
214
  def hash
201
- [pulp_labels, name, description, retain_repo_versions, remote, last_synced_metadata_time, keyring].hash
215
+ [pulp_labels, name, description, retain_repo_versions, remote, last_synced_metadata_time, gpgkey].hash
202
216
  end
203
217
 
204
218
  # Builds the object from hash
@@ -177,8 +177,6 @@ module PulpAnsibleClient
177
177
  :'requirements_file',
178
178
  :'auth_url',
179
179
  :'token',
180
- :'sync_dependencies',
181
- :'signed_only'
182
180
  ])
183
181
  end
184
182