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.
- checksums.yaml +4 -4
- data/README.md +43 -23
- data/docs/{AnsibleDistribution.md → AnsibleAnsibleDistribution.md} +6 -6
- data/docs/AnsibleAnsibleRemote.md +39 -0
- data/docs/AnsibleAnsibleRepository.md +27 -0
- data/docs/AnsibleCollection.md +19 -0
- data/docs/AnsibleCollectionRemote.md +41 -0
- data/docs/AnsibleCollectionVersion.md +67 -0
- data/docs/AnsibleCollectionsApi.md +80 -18
- data/docs/AnsibleRole.md +27 -0
- data/docs/AnsibleTag.md +17 -0
- data/docs/Collection.md +31 -0
- data/docs/CollectionImportDetail.md +2 -2
- data/docs/CollectionMetadata.md +9 -9
- data/docs/{TagNested.md → CollectionNamespace.md} +3 -3
- data/docs/CollectionRef.md +21 -0
- data/docs/CollectionVersion.md +19 -59
- data/docs/ContentCollectionVersionsApi.md +25 -27
- data/docs/ContentRolesApi.md +17 -25
- data/docs/ContentSummary.md +21 -0
- data/docs/DistributionsAnsibleApi.md +16 -12
- data/docs/GalaxyCollection.md +2 -2
- data/docs/GalaxyCollectionVersion.md +4 -4
- data/docs/GalaxyRole.md +1 -1
- data/docs/GalaxyRoleVersion.md +1 -1
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse20010.md +23 -0
- data/docs/InlineResponse20011.md +23 -0
- data/docs/InlineResponse20012.md +23 -0
- data/docs/InlineResponse20013.md +23 -0
- data/docs/InlineResponse2002.md +1 -1
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/InlineResponse2005.md +1 -1
- data/docs/InlineResponse2006.md +1 -1
- data/docs/InlineResponse2007.md +1 -1
- data/docs/InlineResponse2008.md +1 -1
- data/docs/InlineResponse2009.md +1 -1
- data/docs/PulpAnsibleApiApi.md +3 -1
- data/docs/PulpAnsibleGalaxyApiCollectionsApi.md +16 -9
- data/docs/PulpAnsibleGalaxyApiRolesApi.md +5 -3
- data/docs/PulpAnsibleGalaxyApiV1VersionsApi.md +5 -3
- data/docs/PulpAnsibleGalaxyApiV2VersionsApi.md +5 -3
- data/docs/PulpAnsibleGalaxyApiV3CollectionsApi.md +28 -10
- data/docs/PulpAnsibleTagsApi.md +5 -3
- data/docs/RemotesAnsibleApi.md +30 -81
- data/docs/RemotesCollectionApi.md +30 -81
- data/docs/RepositoriesAnsibleApi.md +409 -0
- data/docs/RepositoriesAnsibleVersionsApi.md +214 -0
- data/docs/RepositorySyncURL.md +2 -2
- data/docs/RepositoryVersion.md +25 -0
- data/docs/Tag.md +1 -1
- data/lib/pulp_ansible_client/api/ansible_collections_api.rb +103 -35
- data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +40 -57
- data/lib/pulp_ansible_client/api/content_roles_api.rb +28 -58
- data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +19 -13
- data/lib/pulp_ansible_client/api/pulp_ansible_api_api.rb +4 -1
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_collections_api.rb +20 -9
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_roles_api.rb +7 -4
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v1_versions_api.rb +7 -4
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v2_versions_api.rb +7 -4
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_api.rb +59 -12
- data/lib/pulp_ansible_client/api/pulp_ansible_tags_api.rb +7 -4
- data/lib/pulp_ansible_client/api/remotes_ansible_api.rb +40 -102
- data/lib/pulp_ansible_client/api/remotes_collection_api.rb +40 -102
- data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +498 -0
- data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +268 -0
- data/lib/pulp_ansible_client/api_client.rb +1 -1
- data/lib/pulp_ansible_client/api_error.rb +1 -1
- data/lib/pulp_ansible_client/configuration.rb +1 -1
- data/lib/pulp_ansible_client/models/{ansible_distribution.rb → ansible_ansible_distribution.rb} +31 -36
- data/lib/pulp_ansible_client/models/{ansible_remote.rb → ansible_ansible_remote.rb} +87 -147
- data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +294 -0
- data/lib/pulp_ansible_client/models/ansible_collection.rb +265 -0
- data/lib/pulp_ansible_client/models/{collection_remote.rb → ansible_collection_remote.rb} +88 -147
- data/lib/pulp_ansible_client/models/ansible_collection_version.rb +816 -0
- data/lib/pulp_ansible_client/models/{role.rb → ansible_role.rb} +31 -60
- data/lib/pulp_ansible_client/models/{tag_nested.rb → ansible_tag.rb} +15 -5
- data/lib/pulp_ansible_client/models/async_operation_response.rb +12 -2
- data/lib/pulp_ansible_client/models/collection.rb +314 -0
- data/lib/pulp_ansible_client/models/collection_import_detail.rb +14 -4
- data/lib/pulp_ansible_client/models/collection_metadata.rb +14 -4
- data/lib/pulp_ansible_client/models/collection_namespace.rb +230 -0
- data/lib/pulp_ansible_client/models/collection_ref.rb +272 -0
- data/lib/pulp_ansible_client/models/collection_version.rb +109 -536
- data/lib/pulp_ansible_client/models/content_summary.rb +246 -0
- data/lib/pulp_ansible_client/models/galaxy_collection.rb +12 -2
- data/lib/pulp_ansible_client/models/galaxy_collection_version.rb +12 -2
- data/lib/pulp_ansible_client/models/galaxy_role.rb +12 -2
- data/lib/pulp_ansible_client/models/galaxy_role_version.rb +12 -2
- data/lib/pulp_ansible_client/models/inline_response200.rb +15 -3
- data/lib/pulp_ansible_client/models/inline_response2001.rb +15 -3
- data/lib/pulp_ansible_client/models/inline_response20010.rb +247 -0
- data/lib/pulp_ansible_client/models/inline_response20011.rb +247 -0
- data/lib/pulp_ansible_client/models/inline_response20012.rb +247 -0
- data/lib/pulp_ansible_client/models/inline_response20013.rb +247 -0
- data/lib/pulp_ansible_client/models/inline_response2002.rb +15 -3
- data/lib/pulp_ansible_client/models/inline_response2003.rb +15 -3
- data/lib/pulp_ansible_client/models/inline_response2004.rb +15 -3
- data/lib/pulp_ansible_client/models/inline_response2005.rb +15 -3
- data/lib/pulp_ansible_client/models/inline_response2006.rb +15 -3
- data/lib/pulp_ansible_client/models/inline_response2007.rb +15 -3
- data/lib/pulp_ansible_client/models/inline_response2008.rb +15 -3
- data/lib/pulp_ansible_client/models/inline_response2009.rb +15 -3
- data/lib/pulp_ansible_client/models/repository_sync_url.rb +22 -12
- data/lib/pulp_ansible_client/models/repository_version.rb +244 -0
- data/lib/pulp_ansible_client/models/tag.rb +12 -2
- data/lib/pulp_ansible_client/version.rb +2 -2
- data/lib/pulp_ansible_client.rb +20 -6
- data/pulp_ansible_client.gemspec +1 -1
- data/spec/api/ansible_collections_api_spec.rb +25 -10
- data/spec/api/content_collection_versions_api_spec.rb +12 -12
- data/spec/api/content_roles_api_spec.rb +8 -11
- data/spec/api/distributions_ansible_api_spec.rb +5 -3
- data/spec/api/pulp_ansible_api_api_spec.rb +2 -1
- data/spec/api/pulp_ansible_galaxy_api_collections_api_spec.rb +6 -3
- data/spec/api/pulp_ansible_galaxy_api_roles_api_spec.rb +3 -2
- data/spec/api/pulp_ansible_galaxy_api_v1_versions_api_spec.rb +3 -2
- data/spec/api/pulp_ansible_galaxy_api_v2_versions_api_spec.rb +3 -2
- data/spec/api/pulp_ansible_galaxy_api_v3_collections_api_spec.rb +12 -4
- data/spec/api/pulp_ansible_tags_api_spec.rb +3 -2
- data/spec/api/remotes_ansible_api_spec.rb +12 -22
- data/spec/api/remotes_collection_api_spec.rb +12 -22
- data/spec/api/repositories_ansible_api_spec.rb +128 -0
- data/spec/api/repositories_ansible_versions_api_spec.rb +91 -0
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/{ansible_distribution_spec.rb → ansible_ansible_distribution_spec.rb} +9 -9
- data/spec/models/{collection_remote_spec.rb → ansible_ansible_remote_spec.rb} +14 -38
- data/spec/models/ansible_ansible_repository_spec.rb +71 -0
- data/spec/models/{ansible_remote_spec.rb → ansible_collection_remote_spec.rb} +20 -32
- data/spec/models/ansible_collection_spec.rb +47 -0
- data/spec/models/ansible_collection_version_spec.rb +191 -0
- data/spec/models/ansible_role_spec.rb +71 -0
- data/spec/models/{tag_nested_spec.rb → ansible_tag_spec.rb} +7 -7
- data/spec/models/async_operation_response_spec.rb +1 -1
- data/spec/models/collection_import_detail_spec.rb +1 -1
- data/spec/models/collection_metadata_spec.rb +1 -1
- data/spec/models/collection_namespace_spec.rb +41 -0
- data/spec/models/collection_ref_spec.rb +53 -0
- data/spec/models/{role_spec.rb → collection_spec.rb} +15 -21
- data/spec/models/collection_version_spec.rb +14 -130
- data/spec/models/content_summary_spec.rb +53 -0
- data/spec/models/galaxy_collection_spec.rb +1 -1
- data/spec/models/galaxy_collection_version_spec.rb +1 -1
- data/spec/models/galaxy_role_spec.rb +1 -1
- data/spec/models/galaxy_role_version_spec.rb +1 -1
- data/spec/models/inline_response20010_spec.rb +59 -0
- data/spec/models/inline_response20011_spec.rb +59 -0
- data/spec/models/inline_response20012_spec.rb +59 -0
- data/spec/models/inline_response20013_spec.rb +59 -0
- data/spec/models/inline_response2001_spec.rb +1 -1
- data/spec/models/inline_response2002_spec.rb +1 -1
- data/spec/models/inline_response2003_spec.rb +1 -1
- data/spec/models/inline_response2004_spec.rb +1 -1
- data/spec/models/inline_response2005_spec.rb +1 -1
- data/spec/models/inline_response2006_spec.rb +1 -1
- data/spec/models/inline_response2007_spec.rb +1 -1
- data/spec/models/inline_response2008_spec.rb +1 -1
- data/spec/models/inline_response2009_spec.rb +1 -1
- data/spec/models/inline_response200_spec.rb +1 -1
- data/spec/models/repository_sync_url_spec.rb +2 -2
- data/spec/models/repository_version_spec.rb +65 -0
- data/spec/models/tag_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +78 -22
- data/docs/AnsibleRemote.md +0 -45
- data/docs/CollectionRemote.md +0 -47
- data/docs/Role.md +0 -33
@@ -6,26 +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.
|
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
|
17
|
-
|
18
|
-
attr_accessor :file
|
16
|
+
class AnsibleRole
|
17
|
+
attr_accessor :pulp_href
|
19
18
|
|
20
19
|
# Timestamp of creation.
|
21
|
-
attr_accessor :
|
22
|
-
|
23
|
-
# A URI of a repository the new content unit should be associated with.
|
24
|
-
attr_accessor :repository
|
25
|
-
|
26
|
-
attr_accessor :_href
|
27
|
-
|
28
|
-
attr_accessor :_type
|
20
|
+
attr_accessor :pulp_created
|
29
21
|
|
30
22
|
# Artifact file representing the physical content
|
31
23
|
attr_accessor :artifact
|
@@ -39,11 +31,8 @@ module PulpAnsibleClient
|
|
39
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
32
|
def self.attribute_map
|
41
33
|
{
|
42
|
-
:'
|
43
|
-
:'
|
44
|
-
:'repository' => :'repository',
|
45
|
-
:'_href' => :'_href',
|
46
|
-
:'_type' => :'_type',
|
34
|
+
:'pulp_href' => :'pulp_href',
|
35
|
+
:'pulp_created' => :'pulp_created',
|
47
36
|
:'artifact' => :'artifact',
|
48
37
|
:'version' => :'version',
|
49
38
|
:'name' => :'name',
|
@@ -54,11 +43,8 @@ module PulpAnsibleClient
|
|
54
43
|
# Attribute type mapping.
|
55
44
|
def self.openapi_types
|
56
45
|
{
|
57
|
-
:'
|
58
|
-
:'
|
59
|
-
:'repository' => :'String',
|
60
|
-
:'_href' => :'String',
|
61
|
-
:'_type' => :'String',
|
46
|
+
:'pulp_href' => :'String',
|
47
|
+
:'pulp_created' => :'DateTime',
|
62
48
|
:'artifact' => :'String',
|
63
49
|
:'version' => :'String',
|
64
50
|
:'name' => :'String',
|
@@ -66,39 +52,33 @@ module PulpAnsibleClient
|
|
66
52
|
}
|
67
53
|
end
|
68
54
|
|
55
|
+
# List of attributes with nullable: true
|
56
|
+
def self.openapi_nullable
|
57
|
+
Set.new([
|
58
|
+
])
|
59
|
+
end
|
60
|
+
|
69
61
|
# Initializes the object
|
70
62
|
# @param [Hash] attributes Model attributes in the form of hash
|
71
63
|
def initialize(attributes = {})
|
72
64
|
if (!attributes.is_a?(Hash))
|
73
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleRole` initialize method"
|
74
66
|
end
|
75
67
|
|
76
68
|
# check to see if the attribute exists and convert string to symbol for hash key
|
77
69
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
78
70
|
if (!self.class.attribute_map.key?(k.to_sym))
|
79
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::AnsibleRole`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
80
72
|
end
|
81
73
|
h[k.to_sym] = v
|
82
74
|
}
|
83
75
|
|
84
|
-
if attributes.key?(:'
|
85
|
-
self.
|
86
|
-
end
|
87
|
-
|
88
|
-
if attributes.key?(:'_created')
|
89
|
-
self._created = attributes[:'_created']
|
90
|
-
end
|
91
|
-
|
92
|
-
if attributes.key?(:'repository')
|
93
|
-
self.repository = attributes[:'repository']
|
76
|
+
if attributes.key?(:'pulp_href')
|
77
|
+
self.pulp_href = attributes[:'pulp_href']
|
94
78
|
end
|
95
79
|
|
96
|
-
if attributes.key?(:'
|
97
|
-
self.
|
98
|
-
end
|
99
|
-
|
100
|
-
if attributes.key?(:'_type')
|
101
|
-
self._type = attributes[:'_type']
|
80
|
+
if attributes.key?(:'pulp_created')
|
81
|
+
self.pulp_created = attributes[:'pulp_created']
|
102
82
|
end
|
103
83
|
|
104
84
|
if attributes.key?(:'artifact')
|
@@ -122,8 +102,8 @@ module PulpAnsibleClient
|
|
122
102
|
# @return Array for valid properties with the reasons
|
123
103
|
def list_invalid_properties
|
124
104
|
invalid_properties = Array.new
|
125
|
-
if
|
126
|
-
invalid_properties.push('invalid value for "
|
105
|
+
if @artifact.nil?
|
106
|
+
invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
|
127
107
|
end
|
128
108
|
|
129
109
|
if @version.nil?
|
@@ -156,7 +136,7 @@ module PulpAnsibleClient
|
|
156
136
|
# Check to see if the all the properties in the model are valid
|
157
137
|
# @return true if the model is valid
|
158
138
|
def valid?
|
159
|
-
return false if
|
139
|
+
return false if @artifact.nil?
|
160
140
|
return false if @version.nil?
|
161
141
|
return false if @version.to_s.length < 1
|
162
142
|
return false if @name.nil?
|
@@ -166,16 +146,6 @@ module PulpAnsibleClient
|
|
166
146
|
true
|
167
147
|
end
|
168
148
|
|
169
|
-
# Custom attribute writer method with validation
|
170
|
-
# @param [Object] _type Value to be assigned
|
171
|
-
def _type=(_type)
|
172
|
-
if !_type.nil? && _type.to_s.length < 1
|
173
|
-
fail ArgumentError, 'invalid value for "_type", the character length must be great than or equal to 1.'
|
174
|
-
end
|
175
|
-
|
176
|
-
@_type = _type
|
177
|
-
end
|
178
|
-
|
179
149
|
# Custom attribute writer method with validation
|
180
150
|
# @param [Object] version Value to be assigned
|
181
151
|
def version=(version)
|
@@ -223,11 +193,8 @@ module PulpAnsibleClient
|
|
223
193
|
def ==(o)
|
224
194
|
return true if self.equal?(o)
|
225
195
|
self.class == o.class &&
|
226
|
-
|
227
|
-
|
228
|
-
repository == o.repository &&
|
229
|
-
_href == o._href &&
|
230
|
-
_type == o._type &&
|
196
|
+
pulp_href == o.pulp_href &&
|
197
|
+
pulp_created == o.pulp_created &&
|
231
198
|
artifact == o.artifact &&
|
232
199
|
version == o.version &&
|
233
200
|
name == o.name &&
|
@@ -243,7 +210,7 @@ module PulpAnsibleClient
|
|
243
210
|
# Calculates hash code according to all attributes.
|
244
211
|
# @return [Integer] Hash code
|
245
212
|
def hash
|
246
|
-
[
|
213
|
+
[pulp_href, pulp_created, artifact, version, name, namespace].hash
|
247
214
|
end
|
248
215
|
|
249
216
|
# Builds the object from hash
|
@@ -332,7 +299,11 @@ module PulpAnsibleClient
|
|
332
299
|
hash = {}
|
333
300
|
self.class.attribute_map.each_pair do |attr, param|
|
334
301
|
value = self.send(attr)
|
335
|
-
|
302
|
+
if value.nil?
|
303
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
304
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
305
|
+
end
|
306
|
+
|
336
307
|
hash[param] = _to_hash(value)
|
337
308
|
end
|
338
309
|
hash
|
@@ -6,14 +6,14 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.
|
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
|
16
|
+
class AnsibleTag
|
17
17
|
# The name of the Tag.
|
18
18
|
attr_accessor :name
|
19
19
|
|
@@ -31,17 +31,23 @@ module PulpAnsibleClient
|
|
31
31
|
}
|
32
32
|
end
|
33
33
|
|
34
|
+
# List of attributes with nullable: true
|
35
|
+
def self.openapi_nullable
|
36
|
+
Set.new([
|
37
|
+
])
|
38
|
+
end
|
39
|
+
|
34
40
|
# Initializes the object
|
35
41
|
# @param [Hash] attributes Model attributes in the form of hash
|
36
42
|
def initialize(attributes = {})
|
37
43
|
if (!attributes.is_a?(Hash))
|
38
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::
|
44
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleTag` initialize method"
|
39
45
|
end
|
40
46
|
|
41
47
|
# check to see if the attribute exists and convert string to symbol for hash key
|
42
48
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
43
49
|
if (!self.class.attribute_map.key?(k.to_sym))
|
44
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::
|
50
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::AnsibleTag`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
45
51
|
end
|
46
52
|
h[k.to_sym] = v
|
47
53
|
}
|
@@ -185,7 +191,11 @@ module PulpAnsibleClient
|
|
185
191
|
hash = {}
|
186
192
|
self.class.attribute_map.each_pair do |attr, param|
|
187
193
|
value = self.send(attr)
|
188
|
-
|
194
|
+
if value.nil?
|
195
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
196
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
197
|
+
end
|
198
|
+
|
189
199
|
hash[param] = _to_hash(value)
|
190
200
|
end
|
191
201
|
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.
|
9
|
+
OpenAPI Generator version: 4.2.2-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -31,6 +31,12 @@ module PulpAnsibleClient
|
|
31
31
|
}
|
32
32
|
end
|
33
33
|
|
34
|
+
# List of attributes with nullable: true
|
35
|
+
def self.openapi_nullable
|
36
|
+
Set.new([
|
37
|
+
])
|
38
|
+
end
|
39
|
+
|
34
40
|
# Initializes the object
|
35
41
|
# @param [Hash] attributes Model attributes in the form of hash
|
36
42
|
def initialize(attributes = {})
|
@@ -175,7 +181,11 @@ module PulpAnsibleClient
|
|
175
181
|
hash = {}
|
176
182
|
self.class.attribute_map.each_pair do |attr, param|
|
177
183
|
value = self.send(attr)
|
178
|
-
|
184
|
+
if value.nil?
|
185
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
186
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
187
|
+
end
|
188
|
+
|
179
189
|
hash[param] = _to_hash(value)
|
180
190
|
end
|
181
191
|
hash
|
@@ -0,0 +1,314 @@
|
|
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 Collection
|
17
|
+
attr_accessor :href
|
18
|
+
|
19
|
+
attr_accessor :created_at
|
20
|
+
|
21
|
+
attr_accessor :updated_at
|
22
|
+
|
23
|
+
attr_accessor :namespace
|
24
|
+
|
25
|
+
attr_accessor :name
|
26
|
+
|
27
|
+
attr_accessor :deprecated
|
28
|
+
|
29
|
+
attr_accessor :versions_url
|
30
|
+
|
31
|
+
attr_accessor :highest_version
|
32
|
+
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
34
|
+
def self.attribute_map
|
35
|
+
{
|
36
|
+
:'href' => :'href',
|
37
|
+
:'created_at' => :'created_at',
|
38
|
+
:'updated_at' => :'updated_at',
|
39
|
+
:'namespace' => :'namespace',
|
40
|
+
:'name' => :'name',
|
41
|
+
:'deprecated' => :'deprecated',
|
42
|
+
:'versions_url' => :'versions_url',
|
43
|
+
:'highest_version' => :'highest_version'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
def self.openapi_types
|
49
|
+
{
|
50
|
+
:'href' => :'String',
|
51
|
+
:'created_at' => :'DateTime',
|
52
|
+
:'updated_at' => :'DateTime',
|
53
|
+
:'namespace' => :'String',
|
54
|
+
:'name' => :'String',
|
55
|
+
:'deprecated' => :'Boolean',
|
56
|
+
:'versions_url' => :'String',
|
57
|
+
:'highest_version' => :'String'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# List of attributes with nullable: true
|
62
|
+
def self.openapi_nullable
|
63
|
+
Set.new([
|
64
|
+
])
|
65
|
+
end
|
66
|
+
|
67
|
+
# Initializes the object
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
69
|
+
def initialize(attributes = {})
|
70
|
+
if (!attributes.is_a?(Hash))
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::Collection` initialize method"
|
72
|
+
end
|
73
|
+
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
76
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::Collection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
78
|
+
end
|
79
|
+
h[k.to_sym] = v
|
80
|
+
}
|
81
|
+
|
82
|
+
if attributes.key?(:'href')
|
83
|
+
self.href = attributes[:'href']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'created_at')
|
87
|
+
self.created_at = attributes[:'created_at']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'updated_at')
|
91
|
+
self.updated_at = attributes[:'updated_at']
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'namespace')
|
95
|
+
self.namespace = attributes[:'namespace']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'name')
|
99
|
+
self.name = attributes[:'name']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'deprecated')
|
103
|
+
self.deprecated = attributes[:'deprecated']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'versions_url')
|
107
|
+
self.versions_url = attributes[:'versions_url']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'highest_version')
|
111
|
+
self.highest_version = attributes[:'highest_version']
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
116
|
+
# @return Array for valid properties with the reasons
|
117
|
+
def list_invalid_properties
|
118
|
+
invalid_properties = Array.new
|
119
|
+
if @created_at.nil?
|
120
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
121
|
+
end
|
122
|
+
|
123
|
+
if @updated_at.nil?
|
124
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
125
|
+
end
|
126
|
+
|
127
|
+
if !@namespace.nil? && @namespace.to_s.length < 1
|
128
|
+
invalid_properties.push('invalid value for "namespace", the character length must be great than or equal to 1.')
|
129
|
+
end
|
130
|
+
|
131
|
+
if !@name.nil? && @name.to_s.length < 1
|
132
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
133
|
+
end
|
134
|
+
|
135
|
+
if @deprecated.nil?
|
136
|
+
invalid_properties.push('invalid value for "deprecated", deprecated cannot be nil.')
|
137
|
+
end
|
138
|
+
|
139
|
+
invalid_properties
|
140
|
+
end
|
141
|
+
|
142
|
+
# Check to see if the all the properties in the model are valid
|
143
|
+
# @return true if the model is valid
|
144
|
+
def valid?
|
145
|
+
return false if @created_at.nil?
|
146
|
+
return false if @updated_at.nil?
|
147
|
+
return false if !@namespace.nil? && @namespace.to_s.length < 1
|
148
|
+
return false if !@name.nil? && @name.to_s.length < 1
|
149
|
+
return false if @deprecated.nil?
|
150
|
+
true
|
151
|
+
end
|
152
|
+
|
153
|
+
# Custom attribute writer method with validation
|
154
|
+
# @param [Object] namespace Value to be assigned
|
155
|
+
def namespace=(namespace)
|
156
|
+
if !namespace.nil? && namespace.to_s.length < 1
|
157
|
+
fail ArgumentError, 'invalid value for "namespace", the character length must be great than or equal to 1.'
|
158
|
+
end
|
159
|
+
|
160
|
+
@namespace = namespace
|
161
|
+
end
|
162
|
+
|
163
|
+
# Custom attribute writer method with validation
|
164
|
+
# @param [Object] name Value to be assigned
|
165
|
+
def name=(name)
|
166
|
+
if !name.nil? && name.to_s.length < 1
|
167
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
168
|
+
end
|
169
|
+
|
170
|
+
@name = name
|
171
|
+
end
|
172
|
+
|
173
|
+
# Checks equality by comparing each attribute.
|
174
|
+
# @param [Object] Object to be compared
|
175
|
+
def ==(o)
|
176
|
+
return true if self.equal?(o)
|
177
|
+
self.class == o.class &&
|
178
|
+
href == o.href &&
|
179
|
+
created_at == o.created_at &&
|
180
|
+
updated_at == o.updated_at &&
|
181
|
+
namespace == o.namespace &&
|
182
|
+
name == o.name &&
|
183
|
+
deprecated == o.deprecated &&
|
184
|
+
versions_url == o.versions_url &&
|
185
|
+
highest_version == o.highest_version
|
186
|
+
end
|
187
|
+
|
188
|
+
# @see the `==` method
|
189
|
+
# @param [Object] Object to be compared
|
190
|
+
def eql?(o)
|
191
|
+
self == o
|
192
|
+
end
|
193
|
+
|
194
|
+
# Calculates hash code according to all attributes.
|
195
|
+
# @return [Integer] Hash code
|
196
|
+
def hash
|
197
|
+
[href, created_at, updated_at, namespace, name, deprecated, versions_url, highest_version].hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Builds the object from hash
|
201
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
202
|
+
# @return [Object] Returns the model itself
|
203
|
+
def self.build_from_hash(attributes)
|
204
|
+
new.build_from_hash(attributes)
|
205
|
+
end
|
206
|
+
|
207
|
+
# Builds the object from hash
|
208
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
209
|
+
# @return [Object] Returns the model itself
|
210
|
+
def build_from_hash(attributes)
|
211
|
+
return nil unless attributes.is_a?(Hash)
|
212
|
+
self.class.openapi_types.each_pair do |key, type|
|
213
|
+
if type =~ /\AArray<(.*)>/i
|
214
|
+
# check to ensure the input is an array given that the attribute
|
215
|
+
# is documented as an array but the input is not
|
216
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
217
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
218
|
+
end
|
219
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
220
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
221
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
222
|
+
end
|
223
|
+
|
224
|
+
self
|
225
|
+
end
|
226
|
+
|
227
|
+
# Deserializes the data based on type
|
228
|
+
# @param string type Data type
|
229
|
+
# @param string value Value to be deserialized
|
230
|
+
# @return [Object] Deserialized data
|
231
|
+
def _deserialize(type, value)
|
232
|
+
case type.to_sym
|
233
|
+
when :DateTime
|
234
|
+
DateTime.parse(value)
|
235
|
+
when :Date
|
236
|
+
Date.parse(value)
|
237
|
+
when :String
|
238
|
+
value.to_s
|
239
|
+
when :Integer
|
240
|
+
value.to_i
|
241
|
+
when :Float
|
242
|
+
value.to_f
|
243
|
+
when :Boolean
|
244
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
245
|
+
true
|
246
|
+
else
|
247
|
+
false
|
248
|
+
end
|
249
|
+
when :Object
|
250
|
+
# generic object (usually a Hash), return directly
|
251
|
+
value
|
252
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
253
|
+
inner_type = Regexp.last_match[:inner_type]
|
254
|
+
value.map { |v| _deserialize(inner_type, v) }
|
255
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
256
|
+
k_type = Regexp.last_match[:k_type]
|
257
|
+
v_type = Regexp.last_match[:v_type]
|
258
|
+
{}.tap do |hash|
|
259
|
+
value.each do |k, v|
|
260
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
261
|
+
end
|
262
|
+
end
|
263
|
+
else # model
|
264
|
+
PulpAnsibleClient.const_get(type).build_from_hash(value)
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
# Returns the string representation of the object
|
269
|
+
# @return [String] String presentation of the object
|
270
|
+
def to_s
|
271
|
+
to_hash.to_s
|
272
|
+
end
|
273
|
+
|
274
|
+
# to_body is an alias to to_hash (backward compatibility)
|
275
|
+
# @return [Hash] Returns the object in the form of hash
|
276
|
+
def to_body
|
277
|
+
to_hash
|
278
|
+
end
|
279
|
+
|
280
|
+
# Returns the object in the form of hash
|
281
|
+
# @return [Hash] Returns the object in the form of hash
|
282
|
+
def to_hash
|
283
|
+
hash = {}
|
284
|
+
self.class.attribute_map.each_pair do |attr, param|
|
285
|
+
value = self.send(attr)
|
286
|
+
if value.nil?
|
287
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
288
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
289
|
+
end
|
290
|
+
|
291
|
+
hash[param] = _to_hash(value)
|
292
|
+
end
|
293
|
+
hash
|
294
|
+
end
|
295
|
+
|
296
|
+
# Outputs non-array value in the form of hash
|
297
|
+
# For object, use to_hash. Otherwise, just return the value
|
298
|
+
# @param [Object] value Any valid value
|
299
|
+
# @return [Hash] Returns the value in the form of hash
|
300
|
+
def _to_hash(value)
|
301
|
+
if value.is_a?(Array)
|
302
|
+
value.compact.map { |v| _to_hash(v) }
|
303
|
+
elsif value.is_a?(Hash)
|
304
|
+
{}.tap do |hash|
|
305
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
306
|
+
end
|
307
|
+
elsif value.respond_to? :to_hash
|
308
|
+
value.to_hash
|
309
|
+
else
|
310
|
+
value
|
311
|
+
end
|
312
|
+
end
|
313
|
+
end
|
314
|
+
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.
|
9
|
+
OpenAPI Generator version: 4.2.2-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -53,11 +53,17 @@ module PulpAnsibleClient
|
|
53
53
|
:'updated_at' => :'DateTime',
|
54
54
|
:'started_at' => :'DateTime',
|
55
55
|
:'finished_at' => :'DateTime',
|
56
|
-
:'error' => :'
|
57
|
-
:'messages' => :'
|
56
|
+
:'error' => :'Object',
|
57
|
+
:'messages' => :'Object'
|
58
58
|
}
|
59
59
|
end
|
60
60
|
|
61
|
+
# List of attributes with nullable: true
|
62
|
+
def self.openapi_nullable
|
63
|
+
Set.new([
|
64
|
+
])
|
65
|
+
end
|
66
|
+
|
61
67
|
# Initializes the object
|
62
68
|
# @param [Hash] attributes Model attributes in the form of hash
|
63
69
|
def initialize(attributes = {})
|
@@ -291,7 +297,11 @@ module PulpAnsibleClient
|
|
291
297
|
hash = {}
|
292
298
|
self.class.attribute_map.each_pair do |attr, param|
|
293
299
|
value = self.send(attr)
|
294
|
-
|
300
|
+
if value.nil?
|
301
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
302
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
303
|
+
end
|
304
|
+
|
295
305
|
hash[param] = _to_hash(value)
|
296
306
|
end
|
297
307
|
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.
|
9
|
+
OpenAPI Generator version: 4.2.2-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -54,8 +54,8 @@ module PulpAnsibleClient
|
|
54
54
|
def self.openapi_types
|
55
55
|
{
|
56
56
|
:'authors' => :'Array<String>',
|
57
|
-
:'contents' => :'
|
58
|
-
:'dependencies' => :'
|
57
|
+
:'contents' => :'Object',
|
58
|
+
:'dependencies' => :'Object',
|
59
59
|
:'description' => :'String',
|
60
60
|
:'documentation' => :'String',
|
61
61
|
:'homepage' => :'String',
|
@@ -66,6 +66,12 @@ module PulpAnsibleClient
|
|
66
66
|
}
|
67
67
|
end
|
68
68
|
|
69
|
+
# List of attributes with nullable: true
|
70
|
+
def self.openapi_nullable
|
71
|
+
Set.new([
|
72
|
+
])
|
73
|
+
end
|
74
|
+
|
69
75
|
# Initializes the object
|
70
76
|
# @param [Hash] attributes Model attributes in the form of hash
|
71
77
|
def initialize(attributes = {})
|
@@ -336,7 +342,11 @@ module PulpAnsibleClient
|
|
336
342
|
hash = {}
|
337
343
|
self.class.attribute_map.each_pair do |attr, param|
|
338
344
|
value = self.send(attr)
|
339
|
-
|
345
|
+
if value.nil?
|
346
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
347
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
348
|
+
end
|
349
|
+
|
340
350
|
hash[param] = _to_hash(value)
|
341
351
|
end
|
342
352
|
hash
|