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
@@ -0,0 +1,268 @@
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 'cgi'
14
+
15
+ module PulpAnsibleClient
16
+ class RepositoriesAnsibleVersionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a repository version
23
+ # Trigger an asynchronous task to delete a repositroy version.
24
+ # @param ansible_repository_version_href [String] URI of Repository Version. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/versions/1/
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AsyncOperationResponse]
27
+ def delete(ansible_repository_version_href, opts = {})
28
+ data, _status_code, _headers = delete_with_http_info(ansible_repository_version_href, opts)
29
+ data
30
+ end
31
+
32
+ # Delete a repository version
33
+ # Trigger an asynchronous task to delete a repositroy version.
34
+ # @param ansible_repository_version_href [String] URI of Repository Version. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/versions/1/
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
37
+ def delete_with_http_info(ansible_repository_version_href, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: RepositoriesAnsibleVersionsApi.delete ...'
40
+ end
41
+ # verify the required parameter 'ansible_repository_version_href' is set
42
+ if @api_client.config.client_side_validation && ansible_repository_version_href.nil?
43
+ fail ArgumentError, "Missing the required parameter 'ansible_repository_version_href' when calling RepositoriesAnsibleVersionsApi.delete"
44
+ end
45
+ # resource path
46
+ local_var_path = '{ansible_repository_version_href}'.sub('{' + 'ansible_repository_version_href' + '}', CGI.escape(ansible_repository_version_href.to_s).gsub('%2F', '/'))
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:body]
61
+
62
+ # return_type
63
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
64
+
65
+ # auth_names
66
+ auth_names = opts[:auth_names] || ['Basic']
67
+
68
+ new_options = opts.merge(
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => return_type
75
+ )
76
+
77
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
78
+ if @api_client.config.debugging
79
+ @api_client.config.logger.debug "API called: RepositoriesAnsibleVersionsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ end
81
+ return data, status_code, headers
82
+ end
83
+
84
+ # List repository versions
85
+ # RpmRepositoryVersion represents a single file repository version.
86
+ # @param ansible_ansible_repository_href [String] URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/
87
+ # @param [Hash] opts the optional parameters
88
+ # @option opts [String] :ordering Which field to use when ordering the results.
89
+ # @option opts [Float] :number
90
+ # @option opts [Float] :number__lt Filter results where number is less than value
91
+ # @option opts [Float] :number__lte Filter results where number is less than or equal to value
92
+ # @option opts [Float] :number__gt Filter results where number is greater than value
93
+ # @option opts [Float] :number__gte Filter results where number is greater than or equal to value
94
+ # @option opts [Float] :number__range Filter results where number is between two comma separated values
95
+ # @option opts [String] :pulp_created__lt Filter results where pulp_created is less than value
96
+ # @option opts [String] :pulp_created__lte Filter results where pulp_created is less than or equal to value
97
+ # @option opts [String] :pulp_created__gt Filter results where pulp_created is greater than value
98
+ # @option opts [String] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
99
+ # @option opts [String] :pulp_created__range Filter results where pulp_created is between two comma separated values
100
+ # @option opts [String] :content Content Unit referenced by HREF
101
+ # @option opts [String] :pulp_created ISO 8601 formatted dates are supported
102
+ # @option opts [Integer] :limit Number of results to return per page.
103
+ # @option opts [Integer] :offset The initial index from which to return the results.
104
+ # @option opts [String] :fields A list of fields to include in the response.
105
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
106
+ # @return [InlineResponse2008]
107
+ def list(ansible_ansible_repository_href, opts = {})
108
+ data, _status_code, _headers = list_with_http_info(ansible_ansible_repository_href, opts)
109
+ data
110
+ end
111
+
112
+ # List repository versions
113
+ # RpmRepositoryVersion represents a single file repository version.
114
+ # @param ansible_ansible_repository_href [String] URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/
115
+ # @param [Hash] opts the optional parameters
116
+ # @option opts [String] :ordering Which field to use when ordering the results.
117
+ # @option opts [Float] :number
118
+ # @option opts [Float] :number__lt Filter results where number is less than value
119
+ # @option opts [Float] :number__lte Filter results where number is less than or equal to value
120
+ # @option opts [Float] :number__gt Filter results where number is greater than value
121
+ # @option opts [Float] :number__gte Filter results where number is greater than or equal to value
122
+ # @option opts [Float] :number__range Filter results where number is between two comma separated values
123
+ # @option opts [String] :pulp_created__lt Filter results where pulp_created is less than value
124
+ # @option opts [String] :pulp_created__lte Filter results where pulp_created is less than or equal to value
125
+ # @option opts [String] :pulp_created__gt Filter results where pulp_created is greater than value
126
+ # @option opts [String] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
127
+ # @option opts [String] :pulp_created__range Filter results where pulp_created is between two comma separated values
128
+ # @option opts [String] :content Content Unit referenced by HREF
129
+ # @option opts [String] :pulp_created ISO 8601 formatted dates are supported
130
+ # @option opts [Integer] :limit Number of results to return per page.
131
+ # @option opts [Integer] :offset The initial index from which to return the results.
132
+ # @option opts [String] :fields A list of fields to include in the response.
133
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
134
+ # @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
135
+ def list_with_http_info(ansible_ansible_repository_href, opts = {})
136
+ if @api_client.config.debugging
137
+ @api_client.config.logger.debug 'Calling API: RepositoriesAnsibleVersionsApi.list ...'
138
+ end
139
+ # verify the required parameter 'ansible_ansible_repository_href' is set
140
+ if @api_client.config.client_side_validation && ansible_ansible_repository_href.nil?
141
+ fail ArgumentError, "Missing the required parameter 'ansible_ansible_repository_href' when calling RepositoriesAnsibleVersionsApi.list"
142
+ end
143
+ # resource path
144
+ local_var_path = '{ansible_repository_href}versions/'.sub('{' + 'ansible_ansible_repository_href' + '}', CGI.escape(ansible_ansible_repository_href.to_s).gsub('%2F', '/'))
145
+
146
+ # query parameters
147
+ query_params = opts[:query_params] || {}
148
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
149
+ query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
150
+ query_params[:'number__lt'] = opts[:'number__lt'] if !opts[:'number__lt'].nil?
151
+ query_params[:'number__lte'] = opts[:'number__lte'] if !opts[:'number__lte'].nil?
152
+ query_params[:'number__gt'] = opts[:'number__gt'] if !opts[:'number__gt'].nil?
153
+ query_params[:'number__gte'] = opts[:'number__gte'] if !opts[:'number__gte'].nil?
154
+ query_params[:'number__range'] = opts[:'number__range'] if !opts[:'number__range'].nil?
155
+ query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
156
+ query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
157
+ query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
158
+ query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
159
+ query_params[:'pulp_created__range'] = opts[:'pulp_created__range'] if !opts[:'pulp_created__range'].nil?
160
+ query_params[:'content'] = opts[:'content'] if !opts[:'content'].nil?
161
+ query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
162
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
163
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
164
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
165
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
166
+
167
+ # header parameters
168
+ header_params = opts[:header_params] || {}
169
+ # HTTP header 'Accept' (if needed)
170
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
171
+
172
+ # form parameters
173
+ form_params = opts[:form_params] || {}
174
+
175
+ # http body (model)
176
+ post_body = opts[:body]
177
+
178
+ # return_type
179
+ return_type = opts[:return_type] || 'InlineResponse2008'
180
+
181
+ # auth_names
182
+ auth_names = opts[:auth_names] || ['Basic']
183
+
184
+ new_options = opts.merge(
185
+ :header_params => header_params,
186
+ :query_params => query_params,
187
+ :form_params => form_params,
188
+ :body => post_body,
189
+ :auth_names => auth_names,
190
+ :return_type => return_type
191
+ )
192
+
193
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
194
+ if @api_client.config.debugging
195
+ @api_client.config.logger.debug "API called: RepositoriesAnsibleVersionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
196
+ end
197
+ return data, status_code, headers
198
+ end
199
+
200
+ # Inspect a repository version
201
+ # RpmRepositoryVersion represents a single file repository version.
202
+ # @param ansible_repository_version_href [String] URI of Repository Version. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/versions/1/
203
+ # @param [Hash] opts the optional parameters
204
+ # @option opts [String] :fields A list of fields to include in the response.
205
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
206
+ # @return [RepositoryVersion]
207
+ def read(ansible_repository_version_href, opts = {})
208
+ data, _status_code, _headers = read_with_http_info(ansible_repository_version_href, opts)
209
+ data
210
+ end
211
+
212
+ # Inspect a repository version
213
+ # RpmRepositoryVersion represents a single file repository version.
214
+ # @param ansible_repository_version_href [String] URI of Repository Version. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/versions/1/
215
+ # @param [Hash] opts the optional parameters
216
+ # @option opts [String] :fields A list of fields to include in the response.
217
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
218
+ # @return [Array<(RepositoryVersion, Integer, Hash)>] RepositoryVersion data, response status code and response headers
219
+ def read_with_http_info(ansible_repository_version_href, opts = {})
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug 'Calling API: RepositoriesAnsibleVersionsApi.read ...'
222
+ end
223
+ # verify the required parameter 'ansible_repository_version_href' is set
224
+ if @api_client.config.client_side_validation && ansible_repository_version_href.nil?
225
+ fail ArgumentError, "Missing the required parameter 'ansible_repository_version_href' when calling RepositoriesAnsibleVersionsApi.read"
226
+ end
227
+ # resource path
228
+ local_var_path = '{ansible_repository_version_href}'.sub('{' + 'ansible_repository_version_href' + '}', CGI.escape(ansible_repository_version_href.to_s).gsub('%2F', '/'))
229
+
230
+ # query parameters
231
+ query_params = opts[:query_params] || {}
232
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
233
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
234
+
235
+ # header parameters
236
+ header_params = opts[:header_params] || {}
237
+ # HTTP header 'Accept' (if needed)
238
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
239
+
240
+ # form parameters
241
+ form_params = opts[:form_params] || {}
242
+
243
+ # http body (model)
244
+ post_body = opts[:body]
245
+
246
+ # return_type
247
+ return_type = opts[:return_type] || 'RepositoryVersion'
248
+
249
+ # auth_names
250
+ auth_names = opts[:auth_names] || ['Basic']
251
+
252
+ new_options = opts.merge(
253
+ :header_params => header_params,
254
+ :query_params => query_params,
255
+ :form_params => form_params,
256
+ :body => post_body,
257
+ :auth_names => auth_names,
258
+ :return_type => return_type
259
+ )
260
+
261
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
262
+ if @api_client.config.debugging
263
+ @api_client.config.logger.debug "API called: RepositoriesAnsibleVersionsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
264
+ end
265
+ return data, status_code, headers
266
+ end
267
+ end
268
+ 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
 
@@ -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
 
@@ -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
 
@@ -6,18 +6,18 @@
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
  require 'date'
14
14
 
15
15
  module PulpAnsibleClient
16
- class AnsibleDistribution
17
- attr_accessor :_href
16
+ class AnsibleAnsibleDistribution
17
+ attr_accessor :pulp_href
18
18
 
19
19
  # Timestamp of creation.
20
- attr_accessor :_created
20
+ attr_accessor :pulp_created
21
21
 
22
22
  # The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
23
23
  attr_accessor :base_path
@@ -40,8 +40,8 @@ module PulpAnsibleClient
40
40
  # Attribute mapping from ruby-style variable name to JSON key.
41
41
  def self.attribute_map
42
42
  {
43
- :'_href' => :'_href',
44
- :'_created' => :'_created',
43
+ :'pulp_href' => :'pulp_href',
44
+ :'pulp_created' => :'pulp_created',
45
45
  :'base_path' => :'base_path',
46
46
  :'content_guard' => :'content_guard',
47
47
  :'name' => :'name',
@@ -54,8 +54,8 @@ module PulpAnsibleClient
54
54
  # Attribute type mapping.
55
55
  def self.openapi_types
56
56
  {
57
- :'_href' => :'String',
58
- :'_created' => :'DateTime',
57
+ :'pulp_href' => :'String',
58
+ :'pulp_created' => :'DateTime',
59
59
  :'base_path' => :'String',
60
60
  :'content_guard' => :'String',
61
61
  :'name' => :'String',
@@ -65,27 +65,36 @@ module PulpAnsibleClient
65
65
  }
66
66
  end
67
67
 
68
+ # List of attributes with nullable: true
69
+ def self.openapi_nullable
70
+ Set.new([
71
+ :'content_guard',
72
+ :'repository',
73
+ :'repository_version',
74
+ ])
75
+ end
76
+
68
77
  # Initializes the object
69
78
  # @param [Hash] attributes Model attributes in the form of hash
70
79
  def initialize(attributes = {})
71
80
  if (!attributes.is_a?(Hash))
72
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleDistribution` initialize method"
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleAnsibleDistribution` initialize method"
73
82
  end
74
83
 
75
84
  # check to see if the attribute exists and convert string to symbol for hash key
76
85
  attributes = attributes.each_with_object({}) { |(k, v), h|
77
86
  if (!self.class.attribute_map.key?(k.to_sym))
78
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::AnsibleDistribution`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::AnsibleAnsibleDistribution`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
88
  end
80
89
  h[k.to_sym] = v
81
90
  }
82
91
 
83
- if attributes.key?(:'_href')
84
- self._href = attributes[:'_href']
92
+ if attributes.key?(:'pulp_href')
93
+ self.pulp_href = attributes[:'pulp_href']
85
94
  end
86
95
 
87
- if attributes.key?(:'_created')
88
- self._created = attributes[:'_created']
96
+ if attributes.key?(:'pulp_created')
97
+ self.pulp_created = attributes[:'pulp_created']
89
98
  end
90
99
 
91
100
  if attributes.key?(:'base_path')
@@ -121,10 +130,6 @@ module PulpAnsibleClient
121
130
  invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
122
131
  end
123
132
 
124
- if @base_path.to_s.length > 255
125
- invalid_properties.push('invalid value for "base_path", the character length must be smaller than or equal to 255.')
126
- end
127
-
128
133
  if @base_path.to_s.length < 1
129
134
  invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
130
135
  end
@@ -133,10 +138,6 @@ module PulpAnsibleClient
133
138
  invalid_properties.push('invalid value for "name", name cannot be nil.')
134
139
  end
135
140
 
136
- if @name.to_s.length > 255
137
- invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
138
- end
139
-
140
141
  if @name.to_s.length < 1
141
142
  invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
142
143
  end
@@ -148,10 +149,8 @@ module PulpAnsibleClient
148
149
  # @return true if the model is valid
149
150
  def valid?
150
151
  return false if @base_path.nil?
151
- return false if @base_path.to_s.length > 255
152
152
  return false if @base_path.to_s.length < 1
153
153
  return false if @name.nil?
154
- return false if @name.to_s.length > 255
155
154
  return false if @name.to_s.length < 1
156
155
  true
157
156
  end
@@ -163,10 +162,6 @@ module PulpAnsibleClient
163
162
  fail ArgumentError, 'base_path cannot be nil'
164
163
  end
165
164
 
166
- if base_path.to_s.length > 255
167
- fail ArgumentError, 'invalid value for "base_path", the character length must be smaller than or equal to 255.'
168
- end
169
-
170
165
  if base_path.to_s.length < 1
171
166
  fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
172
167
  end
@@ -181,10 +176,6 @@ module PulpAnsibleClient
181
176
  fail ArgumentError, 'name cannot be nil'
182
177
  end
183
178
 
184
- if name.to_s.length > 255
185
- fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
186
- end
187
-
188
179
  if name.to_s.length < 1
189
180
  fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
190
181
  end
@@ -197,8 +188,8 @@ module PulpAnsibleClient
197
188
  def ==(o)
198
189
  return true if self.equal?(o)
199
190
  self.class == o.class &&
200
- _href == o._href &&
201
- _created == o._created &&
191
+ pulp_href == o.pulp_href &&
192
+ pulp_created == o.pulp_created &&
202
193
  base_path == o.base_path &&
203
194
  content_guard == o.content_guard &&
204
195
  name == o.name &&
@@ -216,7 +207,7 @@ module PulpAnsibleClient
216
207
  # Calculates hash code according to all attributes.
217
208
  # @return [Integer] Hash code
218
209
  def hash
219
- [_href, _created, base_path, content_guard, name, repository, repository_version, client_url].hash
210
+ [pulp_href, pulp_created, base_path, content_guard, name, repository, repository_version, client_url].hash
220
211
  end
221
212
 
222
213
  # Builds the object from hash
@@ -305,7 +296,11 @@ module PulpAnsibleClient
305
296
  hash = {}
306
297
  self.class.attribute_map.each_pair do |attr, param|
307
298
  value = self.send(attr)
308
- next if value.nil?
299
+ if value.nil?
300
+ is_nullable = self.class.openapi_nullable.include?(attr)
301
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
302
+ end
303
+
309
304
  hash[param] = _to_hash(value)
310
305
  end
311
306
  hash