pulp_ansible_client 0.2.0b5 → 0.2.0b6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +43 -23
  3. data/docs/{AnsibleDistribution.md → AnsibleAnsibleDistribution.md} +6 -6
  4. data/docs/AnsibleAnsibleRemote.md +39 -0
  5. data/docs/AnsibleAnsibleRepository.md +27 -0
  6. data/docs/AnsibleCollection.md +19 -0
  7. data/docs/AnsibleCollectionRemote.md +41 -0
  8. data/docs/AnsibleCollectionVersion.md +67 -0
  9. data/docs/AnsibleCollectionsApi.md +80 -18
  10. data/docs/AnsibleRole.md +27 -0
  11. data/docs/AnsibleTag.md +17 -0
  12. data/docs/Collection.md +31 -0
  13. data/docs/CollectionImportDetail.md +2 -2
  14. data/docs/CollectionMetadata.md +9 -9
  15. data/docs/{TagNested.md → CollectionNamespace.md} +3 -3
  16. data/docs/CollectionRef.md +21 -0
  17. data/docs/CollectionVersion.md +19 -59
  18. data/docs/ContentCollectionVersionsApi.md +25 -27
  19. data/docs/ContentRolesApi.md +17 -25
  20. data/docs/ContentSummary.md +21 -0
  21. data/docs/DistributionsAnsibleApi.md +16 -12
  22. data/docs/GalaxyCollection.md +2 -2
  23. data/docs/GalaxyCollectionVersion.md +4 -4
  24. data/docs/GalaxyRole.md +1 -1
  25. data/docs/GalaxyRoleVersion.md +1 -1
  26. data/docs/InlineResponse200.md +1 -1
  27. data/docs/InlineResponse2001.md +1 -1
  28. data/docs/InlineResponse20010.md +23 -0
  29. data/docs/InlineResponse20011.md +23 -0
  30. data/docs/InlineResponse20012.md +23 -0
  31. data/docs/InlineResponse20013.md +23 -0
  32. data/docs/InlineResponse2002.md +1 -1
  33. data/docs/InlineResponse2003.md +1 -1
  34. data/docs/InlineResponse2004.md +1 -1
  35. data/docs/InlineResponse2005.md +1 -1
  36. data/docs/InlineResponse2006.md +1 -1
  37. data/docs/InlineResponse2007.md +1 -1
  38. data/docs/InlineResponse2008.md +1 -1
  39. data/docs/InlineResponse2009.md +1 -1
  40. data/docs/PulpAnsibleApiApi.md +3 -1
  41. data/docs/PulpAnsibleGalaxyApiCollectionsApi.md +16 -9
  42. data/docs/PulpAnsibleGalaxyApiRolesApi.md +5 -3
  43. data/docs/PulpAnsibleGalaxyApiV1VersionsApi.md +5 -3
  44. data/docs/PulpAnsibleGalaxyApiV2VersionsApi.md +5 -3
  45. data/docs/PulpAnsibleGalaxyApiV3CollectionsApi.md +28 -10
  46. data/docs/PulpAnsibleTagsApi.md +5 -3
  47. data/docs/RemotesAnsibleApi.md +30 -81
  48. data/docs/RemotesCollectionApi.md +30 -81
  49. data/docs/RepositoriesAnsibleApi.md +409 -0
  50. data/docs/RepositoriesAnsibleVersionsApi.md +214 -0
  51. data/docs/RepositorySyncURL.md +2 -2
  52. data/docs/RepositoryVersion.md +25 -0
  53. data/docs/Tag.md +1 -1
  54. data/lib/pulp_ansible_client/api/ansible_collections_api.rb +103 -35
  55. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +40 -57
  56. data/lib/pulp_ansible_client/api/content_roles_api.rb +28 -58
  57. data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +19 -13
  58. data/lib/pulp_ansible_client/api/pulp_ansible_api_api.rb +4 -1
  59. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_collections_api.rb +20 -9
  60. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_roles_api.rb +7 -4
  61. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v1_versions_api.rb +7 -4
  62. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v2_versions_api.rb +7 -4
  63. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_api.rb +59 -12
  64. data/lib/pulp_ansible_client/api/pulp_ansible_tags_api.rb +7 -4
  65. data/lib/pulp_ansible_client/api/remotes_ansible_api.rb +40 -102
  66. data/lib/pulp_ansible_client/api/remotes_collection_api.rb +40 -102
  67. data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +498 -0
  68. data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +268 -0
  69. data/lib/pulp_ansible_client/api_client.rb +1 -1
  70. data/lib/pulp_ansible_client/api_error.rb +1 -1
  71. data/lib/pulp_ansible_client/configuration.rb +1 -1
  72. data/lib/pulp_ansible_client/models/{ansible_distribution.rb → ansible_ansible_distribution.rb} +31 -36
  73. data/lib/pulp_ansible_client/models/{ansible_remote.rb → ansible_ansible_remote.rb} +87 -147
  74. data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +294 -0
  75. data/lib/pulp_ansible_client/models/ansible_collection.rb +265 -0
  76. data/lib/pulp_ansible_client/models/{collection_remote.rb → ansible_collection_remote.rb} +88 -147
  77. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +816 -0
  78. data/lib/pulp_ansible_client/models/{role.rb → ansible_role.rb} +31 -60
  79. data/lib/pulp_ansible_client/models/{tag_nested.rb → ansible_tag.rb} +15 -5
  80. data/lib/pulp_ansible_client/models/async_operation_response.rb +12 -2
  81. data/lib/pulp_ansible_client/models/collection.rb +314 -0
  82. data/lib/pulp_ansible_client/models/collection_import_detail.rb +14 -4
  83. data/lib/pulp_ansible_client/models/collection_metadata.rb +14 -4
  84. data/lib/pulp_ansible_client/models/collection_namespace.rb +230 -0
  85. data/lib/pulp_ansible_client/models/collection_ref.rb +272 -0
  86. data/lib/pulp_ansible_client/models/collection_version.rb +109 -536
  87. data/lib/pulp_ansible_client/models/content_summary.rb +246 -0
  88. data/lib/pulp_ansible_client/models/galaxy_collection.rb +12 -2
  89. data/lib/pulp_ansible_client/models/galaxy_collection_version.rb +12 -2
  90. data/lib/pulp_ansible_client/models/galaxy_role.rb +12 -2
  91. data/lib/pulp_ansible_client/models/galaxy_role_version.rb +12 -2
  92. data/lib/pulp_ansible_client/models/inline_response200.rb +15 -3
  93. data/lib/pulp_ansible_client/models/inline_response2001.rb +15 -3
  94. data/lib/pulp_ansible_client/models/inline_response20010.rb +247 -0
  95. data/lib/pulp_ansible_client/models/inline_response20011.rb +247 -0
  96. data/lib/pulp_ansible_client/models/inline_response20012.rb +247 -0
  97. data/lib/pulp_ansible_client/models/inline_response20013.rb +247 -0
  98. data/lib/pulp_ansible_client/models/inline_response2002.rb +15 -3
  99. data/lib/pulp_ansible_client/models/inline_response2003.rb +15 -3
  100. data/lib/pulp_ansible_client/models/inline_response2004.rb +15 -3
  101. data/lib/pulp_ansible_client/models/inline_response2005.rb +15 -3
  102. data/lib/pulp_ansible_client/models/inline_response2006.rb +15 -3
  103. data/lib/pulp_ansible_client/models/inline_response2007.rb +15 -3
  104. data/lib/pulp_ansible_client/models/inline_response2008.rb +15 -3
  105. data/lib/pulp_ansible_client/models/inline_response2009.rb +15 -3
  106. data/lib/pulp_ansible_client/models/repository_sync_url.rb +22 -12
  107. data/lib/pulp_ansible_client/models/repository_version.rb +244 -0
  108. data/lib/pulp_ansible_client/models/tag.rb +12 -2
  109. data/lib/pulp_ansible_client/version.rb +2 -2
  110. data/lib/pulp_ansible_client.rb +20 -6
  111. data/pulp_ansible_client.gemspec +1 -1
  112. data/spec/api/ansible_collections_api_spec.rb +25 -10
  113. data/spec/api/content_collection_versions_api_spec.rb +12 -12
  114. data/spec/api/content_roles_api_spec.rb +8 -11
  115. data/spec/api/distributions_ansible_api_spec.rb +5 -3
  116. data/spec/api/pulp_ansible_api_api_spec.rb +2 -1
  117. data/spec/api/pulp_ansible_galaxy_api_collections_api_spec.rb +6 -3
  118. data/spec/api/pulp_ansible_galaxy_api_roles_api_spec.rb +3 -2
  119. data/spec/api/pulp_ansible_galaxy_api_v1_versions_api_spec.rb +3 -2
  120. data/spec/api/pulp_ansible_galaxy_api_v2_versions_api_spec.rb +3 -2
  121. data/spec/api/pulp_ansible_galaxy_api_v3_collections_api_spec.rb +12 -4
  122. data/spec/api/pulp_ansible_tags_api_spec.rb +3 -2
  123. data/spec/api/remotes_ansible_api_spec.rb +12 -22
  124. data/spec/api/remotes_collection_api_spec.rb +12 -22
  125. data/spec/api/repositories_ansible_api_spec.rb +128 -0
  126. data/spec/api/repositories_ansible_versions_api_spec.rb +91 -0
  127. data/spec/api_client_spec.rb +2 -2
  128. data/spec/configuration_spec.rb +1 -1
  129. data/spec/models/{ansible_distribution_spec.rb → ansible_ansible_distribution_spec.rb} +9 -9
  130. data/spec/models/{collection_remote_spec.rb → ansible_ansible_remote_spec.rb} +14 -38
  131. data/spec/models/ansible_ansible_repository_spec.rb +71 -0
  132. data/spec/models/{ansible_remote_spec.rb → ansible_collection_remote_spec.rb} +20 -32
  133. data/spec/models/ansible_collection_spec.rb +47 -0
  134. data/spec/models/ansible_collection_version_spec.rb +191 -0
  135. data/spec/models/ansible_role_spec.rb +71 -0
  136. data/spec/models/{tag_nested_spec.rb → ansible_tag_spec.rb} +7 -7
  137. data/spec/models/async_operation_response_spec.rb +1 -1
  138. data/spec/models/collection_import_detail_spec.rb +1 -1
  139. data/spec/models/collection_metadata_spec.rb +1 -1
  140. data/spec/models/collection_namespace_spec.rb +41 -0
  141. data/spec/models/collection_ref_spec.rb +53 -0
  142. data/spec/models/{role_spec.rb → collection_spec.rb} +15 -21
  143. data/spec/models/collection_version_spec.rb +14 -130
  144. data/spec/models/content_summary_spec.rb +53 -0
  145. data/spec/models/galaxy_collection_spec.rb +1 -1
  146. data/spec/models/galaxy_collection_version_spec.rb +1 -1
  147. data/spec/models/galaxy_role_spec.rb +1 -1
  148. data/spec/models/galaxy_role_version_spec.rb +1 -1
  149. data/spec/models/inline_response20010_spec.rb +59 -0
  150. data/spec/models/inline_response20011_spec.rb +59 -0
  151. data/spec/models/inline_response20012_spec.rb +59 -0
  152. data/spec/models/inline_response20013_spec.rb +59 -0
  153. data/spec/models/inline_response2001_spec.rb +1 -1
  154. data/spec/models/inline_response2002_spec.rb +1 -1
  155. data/spec/models/inline_response2003_spec.rb +1 -1
  156. data/spec/models/inline_response2004_spec.rb +1 -1
  157. data/spec/models/inline_response2005_spec.rb +1 -1
  158. data/spec/models/inline_response2006_spec.rb +1 -1
  159. data/spec/models/inline_response2007_spec.rb +1 -1
  160. data/spec/models/inline_response2008_spec.rb +1 -1
  161. data/spec/models/inline_response2009_spec.rb +1 -1
  162. data/spec/models/inline_response200_spec.rb +1 -1
  163. data/spec/models/repository_sync_url_spec.rb +2 -2
  164. data/spec/models/repository_version_spec.rb +65 -0
  165. data/spec/models/tag_spec.rb +1 -1
  166. data/spec/spec_helper.rb +1 -1
  167. metadata +78 -22
  168. data/docs/AnsibleRemote.md +0 -45
  169. data/docs/CollectionRemote.md +0 -47
  170. data/docs/Role.md +0 -33
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -38,10 +38,18 @@ module PulpAnsibleClient
38
38
  :'count' => :'Integer',
39
39
  :'_next' => :'String',
40
40
  :'previous' => :'String',
41
- :'results' => :'Array<GalaxyRoleVersion>'
41
+ :'results' => :'Array<AnsibleAnsibleRepository>'
42
42
  }
43
43
  end
44
44
 
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ :'_next',
49
+ :'previous',
50
+ ])
51
+ end
52
+
45
53
  # Initializes the object
46
54
  # @param [Hash] attributes Model attributes in the form of hash
47
55
  def initialize(attributes = {})
@@ -208,7 +216,11 @@ module PulpAnsibleClient
208
216
  hash = {}
209
217
  self.class.attribute_map.each_pair do |attr, param|
210
218
  value = self.send(attr)
211
- next if value.nil?
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
212
224
  hash[param] = _to_hash(value)
213
225
  end
214
226
  hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -38,10 +38,18 @@ module PulpAnsibleClient
38
38
  :'count' => :'Integer',
39
39
  :'_next' => :'String',
40
40
  :'previous' => :'String',
41
- :'results' => :'Array<GalaxyCollection>'
41
+ :'results' => :'Array<RepositoryVersion>'
42
42
  }
43
43
  end
44
44
 
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ :'_next',
49
+ :'previous',
50
+ ])
51
+ end
52
+
45
53
  # Initializes the object
46
54
  # @param [Hash] attributes Model attributes in the form of hash
47
55
  def initialize(attributes = {})
@@ -208,7 +216,11 @@ module PulpAnsibleClient
208
216
  hash = {}
209
217
  self.class.attribute_map.each_pair do |attr, param|
210
218
  value = self.send(attr)
211
- next if value.nil?
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
212
224
  hash[param] = _to_hash(value)
213
225
  end
214
226
  hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -38,10 +38,18 @@ module PulpAnsibleClient
38
38
  :'count' => :'Integer',
39
39
  :'_next' => :'String',
40
40
  :'previous' => :'String',
41
- :'results' => :'Array<GalaxyCollectionVersion>'
41
+ :'results' => :'Array<GalaxyRole>'
42
42
  }
43
43
  end
44
44
 
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ :'_next',
49
+ :'previous',
50
+ ])
51
+ end
52
+
45
53
  # Initializes the object
46
54
  # @param [Hash] attributes Model attributes in the form of hash
47
55
  def initialize(attributes = {})
@@ -208,7 +216,11 @@ module PulpAnsibleClient
208
216
  hash = {}
209
217
  self.class.attribute_map.each_pair do |attr, param|
210
218
  value = self.send(attr)
211
- next if value.nil?
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
212
224
  hash[param] = _to_hash(value)
213
225
  end
214
226
  hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'date'
15
15
  module PulpAnsibleClient
16
16
  class RepositorySyncURL
17
17
  # A URI of the repository to be synchronized.
18
- attr_accessor :repository
18
+ attr_accessor :remote
19
19
 
20
20
  # If ``True``, synchronization will remove all content that is not present in the remote repository. If ``False``, sync will be additive only.
21
21
  attr_accessor :mirror
@@ -23,7 +23,7 @@ module PulpAnsibleClient
23
23
  # Attribute mapping from ruby-style variable name to JSON key.
24
24
  def self.attribute_map
25
25
  {
26
- :'repository' => :'repository',
26
+ :'remote' => :'remote',
27
27
  :'mirror' => :'mirror'
28
28
  }
29
29
  end
@@ -31,11 +31,17 @@ module PulpAnsibleClient
31
31
  # Attribute type mapping.
32
32
  def self.openapi_types
33
33
  {
34
- :'repository' => :'String',
34
+ :'remote' => :'String',
35
35
  :'mirror' => :'Boolean'
36
36
  }
37
37
  end
38
38
 
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
39
45
  # Initializes the object
40
46
  # @param [Hash] attributes Model attributes in the form of hash
41
47
  def initialize(attributes = {})
@@ -51,8 +57,8 @@ module PulpAnsibleClient
51
57
  h[k.to_sym] = v
52
58
  }
53
59
 
54
- if attributes.key?(:'repository')
55
- self.repository = attributes[:'repository']
60
+ if attributes.key?(:'remote')
61
+ self.remote = attributes[:'remote']
56
62
  end
57
63
 
58
64
  if attributes.key?(:'mirror')
@@ -66,8 +72,8 @@ module PulpAnsibleClient
66
72
  # @return Array for valid properties with the reasons
67
73
  def list_invalid_properties
68
74
  invalid_properties = Array.new
69
- if @repository.nil?
70
- invalid_properties.push('invalid value for "repository", repository cannot be nil.')
75
+ if @remote.nil?
76
+ invalid_properties.push('invalid value for "remote", remote cannot be nil.')
71
77
  end
72
78
 
73
79
  invalid_properties
@@ -76,7 +82,7 @@ module PulpAnsibleClient
76
82
  # Check to see if the all the properties in the model are valid
77
83
  # @return true if the model is valid
78
84
  def valid?
79
- return false if @repository.nil?
85
+ return false if @remote.nil?
80
86
  true
81
87
  end
82
88
 
@@ -85,7 +91,7 @@ module PulpAnsibleClient
85
91
  def ==(o)
86
92
  return true if self.equal?(o)
87
93
  self.class == o.class &&
88
- repository == o.repository &&
94
+ remote == o.remote &&
89
95
  mirror == o.mirror
90
96
  end
91
97
 
@@ -98,7 +104,7 @@ module PulpAnsibleClient
98
104
  # Calculates hash code according to all attributes.
99
105
  # @return [Integer] Hash code
100
106
  def hash
101
- [repository, mirror].hash
107
+ [remote, mirror].hash
102
108
  end
103
109
 
104
110
  # Builds the object from hash
@@ -187,7 +193,11 @@ module PulpAnsibleClient
187
193
  hash = {}
188
194
  self.class.attribute_map.each_pair do |attr, param|
189
195
  value = self.send(attr)
190
- next if value.nil?
196
+ if value.nil?
197
+ is_nullable = self.class.openapi_nullable.include?(attr)
198
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
199
+ end
200
+
191
201
  hash[param] = _to_hash(value)
192
202
  end
193
203
  hash
@@ -0,0 +1,244 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpAnsibleClient
16
+ class RepositoryVersion
17
+ attr_accessor :pulp_href
18
+
19
+ # Timestamp of creation.
20
+ attr_accessor :pulp_created
21
+
22
+ attr_accessor :number
23
+
24
+ # A repository version whose content was used as the initial set of content for this repository version
25
+ attr_accessor :base_version
26
+
27
+ attr_accessor :content_summary
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'pulp_href' => :'pulp_href',
33
+ :'pulp_created' => :'pulp_created',
34
+ :'number' => :'number',
35
+ :'base_version' => :'base_version',
36
+ :'content_summary' => :'content_summary'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'pulp_href' => :'String',
44
+ :'pulp_created' => :'DateTime',
45
+ :'number' => :'Integer',
46
+ :'base_version' => :'String',
47
+ :'content_summary' => :'ContentSummary'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::RepositoryVersion` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::RepositoryVersion`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'pulp_href')
73
+ self.pulp_href = attributes[:'pulp_href']
74
+ end
75
+
76
+ if attributes.key?(:'pulp_created')
77
+ self.pulp_created = attributes[:'pulp_created']
78
+ end
79
+
80
+ if attributes.key?(:'number')
81
+ self.number = attributes[:'number']
82
+ end
83
+
84
+ if attributes.key?(:'base_version')
85
+ self.base_version = attributes[:'base_version']
86
+ end
87
+
88
+ if attributes.key?(:'content_summary')
89
+ self.content_summary = attributes[:'content_summary']
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ invalid_properties = Array.new
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ pulp_href == o.pulp_href &&
112
+ pulp_created == o.pulp_created &&
113
+ number == o.number &&
114
+ base_version == o.base_version &&
115
+ content_summary == o.content_summary
116
+ end
117
+
118
+ # @see the `==` method
119
+ # @param [Object] Object to be compared
120
+ def eql?(o)
121
+ self == o
122
+ end
123
+
124
+ # Calculates hash code according to all attributes.
125
+ # @return [Integer] Hash code
126
+ def hash
127
+ [pulp_href, pulp_created, number, base_version, content_summary].hash
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def self.build_from_hash(attributes)
134
+ new.build_from_hash(attributes)
135
+ end
136
+
137
+ # Builds the object from hash
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ # @return [Object] Returns the model itself
140
+ def build_from_hash(attributes)
141
+ return nil unless attributes.is_a?(Hash)
142
+ self.class.openapi_types.each_pair do |key, type|
143
+ if type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
147
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
148
+ end
149
+ elsif !attributes[self.class.attribute_map[key]].nil?
150
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
151
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
152
+ end
153
+
154
+ self
155
+ end
156
+
157
+ # Deserializes the data based on type
158
+ # @param string type Data type
159
+ # @param string value Value to be deserialized
160
+ # @return [Object] Deserialized data
161
+ def _deserialize(type, value)
162
+ case type.to_sym
163
+ when :DateTime
164
+ DateTime.parse(value)
165
+ when :Date
166
+ Date.parse(value)
167
+ when :String
168
+ value.to_s
169
+ when :Integer
170
+ value.to_i
171
+ when :Float
172
+ value.to_f
173
+ when :Boolean
174
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
175
+ true
176
+ else
177
+ false
178
+ end
179
+ when :Object
180
+ # generic object (usually a Hash), return directly
181
+ value
182
+ when /\AArray<(?<inner_type>.+)>\z/
183
+ inner_type = Regexp.last_match[:inner_type]
184
+ value.map { |v| _deserialize(inner_type, v) }
185
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
186
+ k_type = Regexp.last_match[:k_type]
187
+ v_type = Regexp.last_match[:v_type]
188
+ {}.tap do |hash|
189
+ value.each do |k, v|
190
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
191
+ end
192
+ end
193
+ else # model
194
+ PulpAnsibleClient.const_get(type).build_from_hash(value)
195
+ end
196
+ end
197
+
198
+ # Returns the string representation of the object
199
+ # @return [String] String presentation of the object
200
+ def to_s
201
+ to_hash.to_s
202
+ end
203
+
204
+ # to_body is an alias to to_hash (backward compatibility)
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_body
207
+ to_hash
208
+ end
209
+
210
+ # Returns the object in the form of hash
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_hash
213
+ hash = {}
214
+ self.class.attribute_map.each_pair do |attr, param|
215
+ value = self.send(attr)
216
+ if value.nil?
217
+ is_nullable = self.class.openapi_nullable.include?(attr)
218
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
219
+ end
220
+
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+ end
244
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -30,6 +30,12 @@ module PulpAnsibleClient
30
30
  }
31
31
  end
32
32
 
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new([
36
+ ])
37
+ end
38
+
33
39
  # Initializes the object
34
40
  # @param [Hash] attributes Model attributes in the form of hash
35
41
  def initialize(attributes = {})
@@ -184,7 +190,11 @@ module PulpAnsibleClient
184
190
  hash = {}
185
191
  self.class.attribute_map.each_pair do |attr, param|
186
192
  value = self.send(attr)
187
- next if value.nil?
193
+ if value.nil?
194
+ is_nullable = self.class.openapi_nullable.include?(attr)
195
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
+ end
197
+
188
198
  hash[param] = _to_hash(value)
189
199
  end
190
200
  hash
@@ -6,10 +6,10 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
13
13
  module PulpAnsibleClient
14
- VERSION = '0.2.0b5'
14
+ VERSION = '0.2.0b6'
15
15
  end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -17,19 +17,32 @@ require 'pulp_ansible_client/version'
17
17
  require 'pulp_ansible_client/configuration'
18
18
 
19
19
  # Models
20
- require 'pulp_ansible_client/models/ansible_distribution'
21
- require 'pulp_ansible_client/models/ansible_remote'
20
+ require 'pulp_ansible_client/models/ansible_ansible_distribution'
21
+ require 'pulp_ansible_client/models/ansible_ansible_remote'
22
+ require 'pulp_ansible_client/models/ansible_ansible_repository'
23
+ require 'pulp_ansible_client/models/ansible_collection'
24
+ require 'pulp_ansible_client/models/ansible_collection_remote'
25
+ require 'pulp_ansible_client/models/ansible_collection_version'
26
+ require 'pulp_ansible_client/models/ansible_role'
27
+ require 'pulp_ansible_client/models/ansible_tag'
22
28
  require 'pulp_ansible_client/models/async_operation_response'
29
+ require 'pulp_ansible_client/models/collection'
23
30
  require 'pulp_ansible_client/models/collection_import_detail'
24
31
  require 'pulp_ansible_client/models/collection_metadata'
25
- require 'pulp_ansible_client/models/collection_remote'
32
+ require 'pulp_ansible_client/models/collection_namespace'
33
+ require 'pulp_ansible_client/models/collection_ref'
26
34
  require 'pulp_ansible_client/models/collection_version'
35
+ require 'pulp_ansible_client/models/content_summary'
27
36
  require 'pulp_ansible_client/models/galaxy_collection'
28
37
  require 'pulp_ansible_client/models/galaxy_collection_version'
29
38
  require 'pulp_ansible_client/models/galaxy_role'
30
39
  require 'pulp_ansible_client/models/galaxy_role_version'
31
40
  require 'pulp_ansible_client/models/inline_response200'
32
41
  require 'pulp_ansible_client/models/inline_response2001'
42
+ require 'pulp_ansible_client/models/inline_response20010'
43
+ require 'pulp_ansible_client/models/inline_response20011'
44
+ require 'pulp_ansible_client/models/inline_response20012'
45
+ require 'pulp_ansible_client/models/inline_response20013'
33
46
  require 'pulp_ansible_client/models/inline_response2002'
34
47
  require 'pulp_ansible_client/models/inline_response2003'
35
48
  require 'pulp_ansible_client/models/inline_response2004'
@@ -39,9 +52,8 @@ require 'pulp_ansible_client/models/inline_response2007'
39
52
  require 'pulp_ansible_client/models/inline_response2008'
40
53
  require 'pulp_ansible_client/models/inline_response2009'
41
54
  require 'pulp_ansible_client/models/repository_sync_url'
42
- require 'pulp_ansible_client/models/role'
55
+ require 'pulp_ansible_client/models/repository_version'
43
56
  require 'pulp_ansible_client/models/tag'
44
- require 'pulp_ansible_client/models/tag_nested'
45
57
 
46
58
  # APIs
47
59
  require 'pulp_ansible_client/api/ansible_collections_api'
@@ -57,6 +69,8 @@ require 'pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_api'
57
69
  require 'pulp_ansible_client/api/pulp_ansible_tags_api'
58
70
  require 'pulp_ansible_client/api/remotes_ansible_api'
59
71
  require 'pulp_ansible_client/api/remotes_collection_api'
72
+ require 'pulp_ansible_client/api/repositories_ansible_api'
73
+ require 'pulp_ansible_client/api/repositories_ansible_versions_api'
60
74
 
61
75
  module PulpAnsibleClient
62
76
  class << self
@@ -8,7 +8,7 @@
8
8
  The version of the OpenAPI document: v3
9
9
 
10
10
  Generated by: https://openapi-generator.tech
11
- OpenAPI Generator version: 4.1.3-SNAPSHOT
11
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
12
12
 
13
13
  =end
14
14
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.1.3-SNAPSHOT
9
+ OpenAPI Generator version: 4.2.2-SNAPSHOT
10
10
 
11
11
  =end
12
12
 
@@ -32,19 +32,34 @@ describe 'AnsibleCollectionsApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for create
36
- # Create a collection version
37
- # Trigger an asynchronous task to create content,optionally create new repository version.
38
- # @param relative_path Path where the artifact is located relative to distributions base_path
35
+ # unit tests for list
36
+ # List collections
37
+ # Viewset for Ansible Collections.
39
38
  # @param [Hash] opts the optional parameters
40
- # @option opts [String] :artifact Artifact file representing the physical content
41
- # @option opts [File] :file An uploaded file that should be turned into the artifact of the content unit.
42
- # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
43
- # @option opts [String] :expected_name The expected &#39;name&#39; of the Collection to be verified against the metadata during import.
39
+ # @option opts [String] :namespace
40
+ # @option opts [String] :name
41
+ # @option opts [Integer] :limit Number of results to return per page.
42
+ # @option opts [Integer] :offset The initial index from which to return the results.
43
+ # @option opts [String] :fields A list of fields to include in the response.
44
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
45
+ # @return [InlineResponse200]
46
+ describe 'list test' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ # unit tests for upload_collection
53
+ # Upload a collection
54
+ # Create an artifact and trigger an asynchronous task to create Collection content from it.
55
+ # @param file The Collection tarball.
56
+ # @param [Hash] opts the optional parameters
57
+ # @option opts [String] :sha256 An optional sha256 checksum of the uploaded file.
44
58
  # @option opts [String] :expected_namespace The expected &#39;namespace&#39; of the Collection to be verified against the metadata during import.
59
+ # @option opts [String] :expected_name The expected &#39;name&#39; of the Collection to be verified against the metadata during import.
45
60
  # @option opts [String] :expected_version The expected version of the Collection to be verified against the metadata during import.
46
61
  # @return [AsyncOperationResponse]
47
- describe 'create test' do
62
+ describe 'upload_collection test' do
48
63
  it 'should work' do
49
64
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
65
  end