pulp_ansible_client 0.2.0b15 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +88 -61
- data/docs/AnsibleAnsibleDistribution.md +2 -8
- data/docs/AnsibleAnsibleDistributionResponse.md +31 -0
- data/docs/AnsibleAnsibleRepository.md +4 -10
- data/docs/AnsibleAnsibleRepositoryResponse.md +29 -0
- data/docs/AnsibleCollectionRemote.md +4 -10
- data/docs/AnsibleCollectionRemoteResponse.md +49 -0
- data/docs/{AnsibleCollection.md → AnsibleCollectionResponse.md} +2 -2
- data/docs/AnsibleCollectionVersion.md +5 -25
- data/docs/AnsibleCollectionVersionResponse.md +67 -0
- data/docs/AnsibleCollectionsApi.md +47 -47
- data/docs/AnsibleRole.md +1 -5
- data/docs/AnsibleRoleRemote.md +37 -0
- data/docs/{AnsibleAnsibleRemote.md → AnsibleRoleRemoteResponse.md} +5 -5
- data/docs/AnsibleRoleResponse.md +27 -0
- data/docs/{AnsibleTag.md → AnsibleTagResponse.md} +2 -2
- data/docs/CertificationEnum.md +16 -0
- data/docs/Collection.md +2 -12
- data/docs/CollectionImportApi.md +70 -0
- data/docs/{CollectionImportDetail.md → CollectionImportDetailResponse.md} +2 -2
- data/docs/CollectionMetadata.md +1 -19
- data/docs/CollectionMetadataResponse.md +35 -0
- data/docs/CollectionNamespaceResponse.md +17 -0
- data/docs/CollectionOneShot.md +25 -0
- data/docs/CollectionRef.md +1 -3
- data/docs/CollectionRefResponse.md +21 -0
- data/docs/CollectionResponse.md +31 -0
- data/docs/CollectionVersion.md +3 -19
- data/docs/CollectionVersionResponse.md +37 -0
- data/docs/ContentCollectionVersionsApi.md +42 -42
- data/docs/ContentRolesApi.md +32 -32
- data/docs/ContentSummary.md +3 -3
- data/docs/ContentSummaryResponse.md +21 -0
- data/docs/DistributionsAnsibleApi.md +108 -60
- data/docs/GalaxyCollection.md +1 -5
- data/docs/GalaxyCollectionListApi.md +65 -0
- data/docs/GalaxyCollectionResponse.md +23 -0
- data/docs/{GalaxyCollectionVersion.md → GalaxyCollectionVersionResponse.md} +7 -7
- data/docs/GalaxyDetailApi.md +61 -0
- data/docs/{GalaxyRole.md → GalaxyRoleResponse.md} +3 -3
- data/docs/{GalaxyRoleVersion.md → GalaxyRoleVersionResponse.md} +3 -3
- data/docs/InlineResponse200.md +3 -3
- data/docs/InlineResponse2001.md +3 -3
- data/docs/InlineResponse20010.md +3 -3
- data/docs/InlineResponse20011.md +3 -3
- data/docs/InlineResponse20012.md +3 -3
- data/docs/InlineResponse20013.md +3 -3
- data/docs/InlineResponse20014.md +23 -0
- data/docs/InlineResponse2002.md +3 -3
- data/docs/InlineResponse2003.md +3 -3
- data/docs/InlineResponse2004.md +3 -3
- data/docs/InlineResponse2005.md +3 -3
- data/docs/InlineResponse2006.md +3 -3
- data/docs/InlineResponse2007.md +3 -3
- data/docs/InlineResponse2008.md +3 -3
- data/docs/InlineResponse2009.md +3 -3
- data/docs/PatchedansibleAnsibleDistribution.md +25 -0
- data/docs/PatchedansibleAnsibleRepository.md +21 -0
- data/docs/PatchedansibleCollectionRemote.md +43 -0
- data/docs/PatchedansibleRoleRemote.md +37 -0
- data/docs/PolicyEnum.md +16 -0
- data/docs/PulpAnsibleApiApi.md +6 -12
- data/docs/PulpAnsibleGalaxyApiCollectionsApi.md +37 -108
- data/docs/PulpAnsibleGalaxyApiV2VersionsApi.md +17 -22
- data/docs/PulpAnsibleGalaxyApiV3CollectionsApi.md +1 -69
- data/docs/PulpAnsibleGalaxyApiV3CollectionsCertifiedApi.md +63 -0
- data/docs/PulpAnsibleGalaxyApiV3VersionsApi.md +172 -0
- data/docs/PulpAnsibleTagsApi.md +4 -4
- data/docs/RemotesCollectionApi.md +127 -67
- data/docs/RemotesRoleApi.md +428 -0
- data/docs/RepositoriesAnsibleApi.md +100 -76
- data/docs/RepositoriesAnsibleVersionsApi.md +96 -64
- data/docs/RepositoryAddRemoveContent.md +2 -2
- data/docs/RepositorySyncURL.md +1 -1
- data/docs/RepositoryVersion.md +1 -9
- data/docs/RepositoryVersionResponse.md +25 -0
- data/docs/{PulpAnsibleGalaxyApiV1VersionsApi.md → RoleListApi.md} +9 -17
- data/docs/{Tag.md → TagResponse.md} +2 -2
- data/docs/{PulpAnsibleGalaxyApiRolesApi.md → V1RolesApi.md} +9 -15
- data/docs/V2CollectionsApi.md +112 -0
- data/lib/pulp_ansible_client/api/ansible_collections_api.rb +74 -90
- data/lib/pulp_ansible_client/api/collection_import_api.rb +93 -0
- data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +67 -63
- data/lib/pulp_ansible_client/api/content_roles_api.rb +48 -48
- data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +153 -90
- data/lib/pulp_ansible_client/api/galaxy_collection_list_api.rb +94 -0
- data/lib/pulp_ansible_client/api/galaxy_detail_api.rb +88 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_api.rb +9 -9
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_collections_api.rb +77 -122
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v2_versions_api.rb +38 -28
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_api.rb +3 -90
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_certified_api.rb +108 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_versions_api.rb +264 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_tags_api.rb +6 -6
- data/lib/pulp_ansible_client/api/remotes_collection_api.rb +184 -103
- data/lib/pulp_ansible_client/api/remotes_role_api.rb +532 -0
- data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +151 -124
- data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +141 -96
- data/lib/pulp_ansible_client/api/{pulp_ansible_galaxy_api_v1_versions_api.rb → role_list_api.rb} +15 -21
- data/lib/pulp_ansible_client/api/{pulp_ansible_galaxy_api_roles_api.rb → v1_roles_api.rb} +15 -15
- data/lib/pulp_ansible_client/api/v2_collections_api.rb +159 -0
- data/lib/pulp_ansible_client/api_client.rb +2 -2
- data/lib/pulp_ansible_client/api_error.rb +2 -2
- data/lib/pulp_ansible_client/configuration.rb +3 -3
- data/lib/pulp_ansible_client/models/ansible_ansible_distribution.rb +8 -74
- data/lib/pulp_ansible_client/models/ansible_ansible_distribution_response.rb +290 -0
- data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +18 -78
- data/lib/pulp_ansible_client/models/ansible_ansible_repository_response.rb +271 -0
- data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +7 -232
- data/lib/pulp_ansible_client/models/{ansible_ansible_remote.rb → ansible_collection_remote_response.rb} +66 -166
- data/lib/pulp_ansible_client/models/{ansible_collection.rb → ansible_collection_response.rb} +6 -43
- data/lib/pulp_ansible_client/models/ansible_collection_version.rb +55 -250
- data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +721 -0
- data/lib/pulp_ansible_client/models/ansible_role.rb +4 -79
- data/lib/pulp_ansible_client/models/ansible_role_remote.rb +339 -0
- data/lib/pulp_ansible_client/models/ansible_role_remote_response.rb +368 -0
- data/lib/pulp_ansible_client/models/ansible_role_response.rb +274 -0
- data/lib/pulp_ansible_client/models/{ansible_tag.rb → ansible_tag_response.rb} +6 -20
- data/lib/pulp_ansible_client/models/async_operation_response.rb +3 -2
- data/lib/pulp_ansible_client/models/certification_enum.rb +37 -0
- data/lib/pulp_ansible_client/models/collection.rb +7 -81
- data/lib/pulp_ansible_client/models/{collection_import_detail.rb → collection_import_detail_response.rb} +6 -24
- data/lib/pulp_ansible_client/models/collection_metadata.rb +4 -163
- data/lib/pulp_ansible_client/models/collection_metadata_response.rb +367 -0
- data/lib/pulp_ansible_client/models/collection_namespace.rb +3 -21
- data/lib/pulp_ansible_client/models/{tag.rb → collection_namespace_response.rb} +9 -18
- data/lib/pulp_ansible_client/models/collection_one_shot.rb +253 -0
- data/lib/pulp_ansible_client/models/collection_ref.rb +7 -53
- data/lib/pulp_ansible_client/models/collection_ref_response.rb +235 -0
- data/lib/pulp_ansible_client/models/collection_response.rb +285 -0
- data/lib/pulp_ansible_client/models/collection_version.rb +8 -143
- data/lib/pulp_ansible_client/models/collection_version_response.rb +307 -0
- data/lib/pulp_ansible_client/models/content_summary.rb +9 -15
- data/lib/pulp_ansible_client/models/content_summary_response.rb +240 -0
- data/lib/pulp_ansible_client/models/galaxy_collection.rb +7 -62
- data/lib/pulp_ansible_client/models/galaxy_collection_response.rb +244 -0
- data/lib/pulp_ansible_client/models/{galaxy_collection_version.rb → galaxy_collection_version_response.rb} +11 -29
- data/lib/pulp_ansible_client/models/{galaxy_role.rb → galaxy_role_response.rb} +7 -44
- data/lib/pulp_ansible_client/models/{galaxy_role_version.rb → galaxy_role_version_response.rb} +7 -25
- data/lib/pulp_ansible_client/models/inline_response200.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response2001.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response20010.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response20011.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response20012.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response20013.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response20014.rb +237 -0
- data/lib/pulp_ansible_client/models/inline_response2002.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response2003.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response2004.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response2005.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response2006.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response2007.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response2008.rb +3 -13
- data/lib/pulp_ansible_client/models/inline_response2009.rb +3 -13
- data/lib/pulp_ansible_client/models/patchedansible_ansible_distribution.rb +251 -0
- data/lib/pulp_ansible_client/models/patchedansible_ansible_repository.rb +229 -0
- data/lib/pulp_ansible_client/models/patchedansible_collection_remote.rb +392 -0
- data/lib/pulp_ansible_client/models/patchedansible_role_remote.rb +329 -0
- data/lib/pulp_ansible_client/models/policy_enum.rb +36 -0
- data/lib/pulp_ansible_client/models/repository_add_remove_content.rb +5 -4
- data/lib/pulp_ansible_client/models/repository_sync_url.rb +3 -8
- data/lib/pulp_ansible_client/models/repository_version.rb +7 -43
- data/lib/pulp_ansible_client/models/repository_version_response.rb +246 -0
- data/lib/pulp_ansible_client/models/tag_response.rb +207 -0
- data/lib/pulp_ansible_client/version.rb +3 -3
- data/lib/pulp_ansible_client.rb +41 -13
- data/pulp_ansible_client.gemspec +4 -4
- data/spec/api/ansible_collections_api_spec.rb +21 -21
- data/spec/api/collection_import_api_spec.rb +50 -0
- data/spec/api/content_collection_versions_api_spec.rb +18 -18
- data/spec/api/content_roles_api_spec.rb +13 -13
- data/spec/api/distributions_ansible_api_spec.rb +39 -18
- data/spec/api/galaxy_collection_list_api_spec.rb +50 -0
- data/spec/api/galaxy_detail_api_spec.rb +48 -0
- data/spec/api/pulp_ansible_api_api_spec.rb +4 -4
- data/spec/api/pulp_ansible_galaxy_api_collections_api_spec.rb +19 -29
- data/spec/api/pulp_ansible_galaxy_api_v2_versions_api_spec.rb +10 -9
- data/spec/api/pulp_ansible_galaxy_api_v3_collections_api_spec.rb +2 -17
- data/spec/api/pulp_ansible_galaxy_api_v3_collections_certified_api_spec.rb +50 -0
- data/spec/api/pulp_ansible_galaxy_api_v3_versions_api_spec.rb +90 -0
- data/spec/api/pulp_ansible_tags_api_spec.rb +3 -3
- data/spec/api/remotes_collection_api_spec.rb +49 -22
- data/spec/api/remotes_role_api_spec.rb +150 -0
- data/spec/api/repositories_ansible_api_spec.rb +31 -22
- data/spec/api/repositories_ansible_versions_api_spec.rb +40 -25
- data/spec/api/{pulp_ansible_galaxy_api_v1_versions_api_spec.rb → role_list_api_spec.rb} +9 -10
- data/spec/api/{pulp_ansible_galaxy_api_roles_api_spec.rb → v1_roles_api_spec.rb} +9 -9
- data/spec/api/v2_collections_api_spec.rb +61 -0
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/ansible_ansible_distribution_response_spec.rb +83 -0
- data/spec/models/ansible_ansible_distribution_spec.rb +2 -20
- data/spec/models/ansible_ansible_repository_response_spec.rb +77 -0
- data/spec/models/ansible_ansible_repository_spec.rb +5 -23
- data/spec/models/ansible_collection_remote_response_spec.rb +137 -0
- data/spec/models/ansible_collection_remote_spec.rb +2 -24
- data/spec/models/{ansible_collection_spec.rb → ansible_collection_response_spec.rb} +8 -8
- data/spec/models/ansible_collection_version_response_spec.rb +191 -0
- data/spec/models/ansible_collection_version_spec.rb +2 -62
- data/spec/models/{ansible_ansible_remote_spec.rb → ansible_role_remote_response_spec.rb} +8 -12
- data/spec/models/ansible_role_remote_spec.rb +101 -0
- data/spec/models/ansible_role_response_spec.rb +71 -0
- data/spec/models/ansible_role_spec.rb +2 -14
- data/spec/models/{ansible_tag_spec.rb → ansible_tag_response_spec.rb} +8 -8
- data/spec/models/async_operation_response_spec.rb +2 -2
- data/spec/models/certification_enum_spec.rb +35 -0
- data/spec/models/{collection_import_detail_spec.rb → collection_import_detail_response_spec.rb} +8 -8
- data/spec/models/collection_metadata_response_spec.rb +95 -0
- data/spec/models/collection_metadata_spec.rb +2 -56
- data/spec/models/collection_namespace_response_spec.rb +41 -0
- data/spec/models/collection_namespace_spec.rb +2 -2
- data/spec/models/collection_one_shot_spec.rb +65 -0
- data/spec/models/collection_ref_response_spec.rb +53 -0
- data/spec/models/collection_ref_spec.rb +2 -8
- data/spec/models/collection_response_spec.rb +83 -0
- data/spec/models/collection_spec.rb +2 -32
- data/spec/models/collection_version_response_spec.rb +101 -0
- data/spec/models/collection_version_spec.rb +2 -54
- data/spec/models/content_summary_response_spec.rb +53 -0
- data/spec/models/content_summary_spec.rb +2 -2
- data/spec/models/galaxy_collection_response_spec.rb +59 -0
- data/spec/models/galaxy_collection_spec.rb +2 -14
- data/spec/models/{galaxy_collection_version_spec.rb → galaxy_collection_version_response_spec.rb} +8 -8
- data/spec/models/{galaxy_role_spec.rb → galaxy_role_response_spec.rb} +8 -8
- data/spec/models/{galaxy_role_version_spec.rb → galaxy_role_version_response_spec.rb} +8 -8
- data/spec/models/inline_response20010_spec.rb +2 -2
- data/spec/models/inline_response20011_spec.rb +2 -2
- data/spec/models/inline_response20012_spec.rb +2 -2
- data/spec/models/inline_response20013_spec.rb +2 -2
- data/spec/models/inline_response20014_spec.rb +59 -0
- data/spec/models/inline_response2001_spec.rb +2 -2
- data/spec/models/inline_response2002_spec.rb +2 -2
- data/spec/models/inline_response2003_spec.rb +2 -2
- data/spec/models/inline_response2004_spec.rb +2 -2
- data/spec/models/inline_response2005_spec.rb +2 -2
- data/spec/models/inline_response2006_spec.rb +2 -2
- data/spec/models/inline_response2007_spec.rb +2 -2
- data/spec/models/inline_response2008_spec.rb +2 -2
- data/spec/models/inline_response2009_spec.rb +2 -2
- data/spec/models/inline_response200_spec.rb +2 -2
- data/spec/models/patchedansible_ansible_distribution_spec.rb +65 -0
- data/spec/models/patchedansible_ansible_repository_spec.rb +53 -0
- data/spec/models/patchedansible_collection_remote_spec.rb +119 -0
- data/spec/models/patchedansible_role_remote_spec.rb +101 -0
- data/spec/models/policy_enum_spec.rb +35 -0
- data/spec/models/repository_add_remove_content_spec.rb +2 -2
- data/spec/models/repository_sync_url_spec.rb +2 -2
- data/spec/models/repository_version_response_spec.rb +65 -0
- data/spec/models/repository_version_spec.rb +2 -26
- data/spec/models/{tag_spec.rb → tag_response_spec.rb} +8 -8
- data/spec/spec_helper.rb +2 -2
- metadata +192 -80
- data/docs/RemotesAnsibleApi.md +0 -368
- data/lib/pulp_ansible_client/api/remotes_ansible_api.rb +0 -451
- data/spec/api/remotes_ansible_api_spec.rb +0 -123
@@ -1,10 +1,10 @@
|
|
1
1
|
=begin
|
2
2
|
#Pulp 3 API
|
3
3
|
|
4
|
-
#
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
5
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
|
-
|
7
|
+
Contact: pulp-list@redhat.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.2.3
|
10
10
|
|
@@ -13,12 +13,8 @@ OpenAPI Generator version: 4.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module PulpAnsibleClient
|
16
|
+
# A serializer for Role versions.
|
16
17
|
class AnsibleRole
|
17
|
-
# Timestamp of creation.
|
18
|
-
attr_accessor :pulp_created
|
19
|
-
|
20
|
-
attr_accessor :pulp_href
|
21
|
-
|
22
18
|
# Artifact file representing the physical content
|
23
19
|
attr_accessor :artifact
|
24
20
|
|
@@ -31,8 +27,6 @@ module PulpAnsibleClient
|
|
31
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
28
|
def self.attribute_map
|
33
29
|
{
|
34
|
-
:'pulp_created' => :'pulp_created',
|
35
|
-
:'pulp_href' => :'pulp_href',
|
36
30
|
:'artifact' => :'artifact',
|
37
31
|
:'version' => :'version',
|
38
32
|
:'name' => :'name',
|
@@ -43,8 +37,6 @@ module PulpAnsibleClient
|
|
43
37
|
# Attribute type mapping.
|
44
38
|
def self.openapi_types
|
45
39
|
{
|
46
|
-
:'pulp_created' => :'DateTime',
|
47
|
-
:'pulp_href' => :'String',
|
48
40
|
:'artifact' => :'String',
|
49
41
|
:'version' => :'String',
|
50
42
|
:'name' => :'String',
|
@@ -73,14 +65,6 @@ module PulpAnsibleClient
|
|
73
65
|
h[k.to_sym] = v
|
74
66
|
}
|
75
67
|
|
76
|
-
if attributes.key?(:'pulp_created')
|
77
|
-
self.pulp_created = attributes[:'pulp_created']
|
78
|
-
end
|
79
|
-
|
80
|
-
if attributes.key?(:'pulp_href')
|
81
|
-
self.pulp_href = attributes[:'pulp_href']
|
82
|
-
end
|
83
|
-
|
84
68
|
if attributes.key?(:'artifact')
|
85
69
|
self.artifact = attributes[:'artifact']
|
86
70
|
end
|
@@ -110,26 +94,14 @@ module PulpAnsibleClient
|
|
110
94
|
invalid_properties.push('invalid value for "version", version cannot be nil.')
|
111
95
|
end
|
112
96
|
|
113
|
-
if @version.to_s.length < 1
|
114
|
-
invalid_properties.push('invalid value for "version", the character length must be great than or equal to 1.')
|
115
|
-
end
|
116
|
-
|
117
97
|
if @name.nil?
|
118
98
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
119
99
|
end
|
120
100
|
|
121
|
-
if @name.to_s.length < 1
|
122
|
-
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
123
|
-
end
|
124
|
-
|
125
101
|
if @namespace.nil?
|
126
102
|
invalid_properties.push('invalid value for "namespace", namespace cannot be nil.')
|
127
103
|
end
|
128
104
|
|
129
|
-
if @namespace.to_s.length < 1
|
130
|
-
invalid_properties.push('invalid value for "namespace", the character length must be great than or equal to 1.')
|
131
|
-
end
|
132
|
-
|
133
105
|
invalid_properties
|
134
106
|
end
|
135
107
|
|
@@ -138,63 +110,16 @@ module PulpAnsibleClient
|
|
138
110
|
def valid?
|
139
111
|
return false if @artifact.nil?
|
140
112
|
return false if @version.nil?
|
141
|
-
return false if @version.to_s.length < 1
|
142
113
|
return false if @name.nil?
|
143
|
-
return false if @name.to_s.length < 1
|
144
114
|
return false if @namespace.nil?
|
145
|
-
return false if @namespace.to_s.length < 1
|
146
115
|
true
|
147
116
|
end
|
148
117
|
|
149
|
-
# Custom attribute writer method with validation
|
150
|
-
# @param [Object] version Value to be assigned
|
151
|
-
def version=(version)
|
152
|
-
if version.nil?
|
153
|
-
fail ArgumentError, 'version cannot be nil'
|
154
|
-
end
|
155
|
-
|
156
|
-
if version.to_s.length < 1
|
157
|
-
fail ArgumentError, 'invalid value for "version", the character length must be great than or equal to 1.'
|
158
|
-
end
|
159
|
-
|
160
|
-
@version = version
|
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?
|
167
|
-
fail ArgumentError, 'name cannot be nil'
|
168
|
-
end
|
169
|
-
|
170
|
-
if name.to_s.length < 1
|
171
|
-
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
172
|
-
end
|
173
|
-
|
174
|
-
@name = name
|
175
|
-
end
|
176
|
-
|
177
|
-
# Custom attribute writer method with validation
|
178
|
-
# @param [Object] namespace Value to be assigned
|
179
|
-
def namespace=(namespace)
|
180
|
-
if namespace.nil?
|
181
|
-
fail ArgumentError, 'namespace cannot be nil'
|
182
|
-
end
|
183
|
-
|
184
|
-
if namespace.to_s.length < 1
|
185
|
-
fail ArgumentError, 'invalid value for "namespace", the character length must be great than or equal to 1.'
|
186
|
-
end
|
187
|
-
|
188
|
-
@namespace = namespace
|
189
|
-
end
|
190
|
-
|
191
118
|
# Checks equality by comparing each attribute.
|
192
119
|
# @param [Object] Object to be compared
|
193
120
|
def ==(o)
|
194
121
|
return true if self.equal?(o)
|
195
122
|
self.class == o.class &&
|
196
|
-
pulp_created == o.pulp_created &&
|
197
|
-
pulp_href == o.pulp_href &&
|
198
123
|
artifact == o.artifact &&
|
199
124
|
version == o.version &&
|
200
125
|
name == o.name &&
|
@@ -210,7 +135,7 @@ module PulpAnsibleClient
|
|
210
135
|
# Calculates hash code according to all attributes.
|
211
136
|
# @return [Integer] Hash code
|
212
137
|
def hash
|
213
|
-
[
|
138
|
+
[artifact, version, name, namespace].hash
|
214
139
|
end
|
215
140
|
|
216
141
|
# Builds the object from hash
|
@@ -0,0 +1,339 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module PulpAnsibleClient
|
16
|
+
# A serializer for Ansible Remotes.
|
17
|
+
class AnsibleRoleRemote
|
18
|
+
# A unique name for this remote.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# The URL of an external content source.
|
22
|
+
attr_accessor :url
|
23
|
+
|
24
|
+
# A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
|
25
|
+
attr_accessor :ca_cert
|
26
|
+
|
27
|
+
# A PEM encoded client certificate used for authentication.
|
28
|
+
attr_accessor :client_cert
|
29
|
+
|
30
|
+
# A PEM encoded private key used for authentication.
|
31
|
+
attr_accessor :client_key
|
32
|
+
|
33
|
+
# If True, TLS peer validation must be performed.
|
34
|
+
attr_accessor :tls_validation
|
35
|
+
|
36
|
+
# The proxy URL. Format: scheme://user:password@host:port
|
37
|
+
attr_accessor :proxy_url
|
38
|
+
|
39
|
+
# The username to be used for authentication when syncing.
|
40
|
+
attr_accessor :username
|
41
|
+
|
42
|
+
# The password to be used for authentication when syncing.
|
43
|
+
attr_accessor :password
|
44
|
+
|
45
|
+
# Total number of simultaneous connections.
|
46
|
+
attr_accessor :download_concurrency
|
47
|
+
|
48
|
+
# The policy to use when downloading content.
|
49
|
+
attr_accessor :policy
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'name' => :'name',
|
55
|
+
:'url' => :'url',
|
56
|
+
:'ca_cert' => :'ca_cert',
|
57
|
+
:'client_cert' => :'client_cert',
|
58
|
+
:'client_key' => :'client_key',
|
59
|
+
:'tls_validation' => :'tls_validation',
|
60
|
+
:'proxy_url' => :'proxy_url',
|
61
|
+
:'username' => :'username',
|
62
|
+
:'password' => :'password',
|
63
|
+
:'download_concurrency' => :'download_concurrency',
|
64
|
+
:'policy' => :'policy'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.openapi_types
|
70
|
+
{
|
71
|
+
:'name' => :'String',
|
72
|
+
:'url' => :'String',
|
73
|
+
:'ca_cert' => :'String',
|
74
|
+
:'client_cert' => :'String',
|
75
|
+
:'client_key' => :'String',
|
76
|
+
:'tls_validation' => :'Boolean',
|
77
|
+
:'proxy_url' => :'String',
|
78
|
+
:'username' => :'String',
|
79
|
+
:'password' => :'String',
|
80
|
+
:'download_concurrency' => :'Integer',
|
81
|
+
:'policy' => :'PolicyEnum'
|
82
|
+
}
|
83
|
+
end
|
84
|
+
|
85
|
+
# List of attributes with nullable: true
|
86
|
+
def self.openapi_nullable
|
87
|
+
Set.new([
|
88
|
+
:'ca_cert',
|
89
|
+
:'client_cert',
|
90
|
+
:'client_key',
|
91
|
+
:'proxy_url',
|
92
|
+
:'username',
|
93
|
+
:'password',
|
94
|
+
])
|
95
|
+
end
|
96
|
+
|
97
|
+
# Initializes the object
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
def initialize(attributes = {})
|
100
|
+
if (!attributes.is_a?(Hash))
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleRoleRemote` initialize method"
|
102
|
+
end
|
103
|
+
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
105
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
106
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
107
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::AnsibleRoleRemote`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
108
|
+
end
|
109
|
+
h[k.to_sym] = v
|
110
|
+
}
|
111
|
+
|
112
|
+
if attributes.key?(:'name')
|
113
|
+
self.name = attributes[:'name']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'url')
|
117
|
+
self.url = attributes[:'url']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'ca_cert')
|
121
|
+
self.ca_cert = attributes[:'ca_cert']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'client_cert')
|
125
|
+
self.client_cert = attributes[:'client_cert']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'client_key')
|
129
|
+
self.client_key = attributes[:'client_key']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'tls_validation')
|
133
|
+
self.tls_validation = attributes[:'tls_validation']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'proxy_url')
|
137
|
+
self.proxy_url = attributes[:'proxy_url']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'username')
|
141
|
+
self.username = attributes[:'username']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'password')
|
145
|
+
self.password = attributes[:'password']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'download_concurrency')
|
149
|
+
self.download_concurrency = attributes[:'download_concurrency']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'policy')
|
153
|
+
self.policy = attributes[:'policy']
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
158
|
+
# @return Array for valid properties with the reasons
|
159
|
+
def list_invalid_properties
|
160
|
+
invalid_properties = Array.new
|
161
|
+
if @name.nil?
|
162
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
163
|
+
end
|
164
|
+
|
165
|
+
if @url.nil?
|
166
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
167
|
+
end
|
168
|
+
|
169
|
+
if !@download_concurrency.nil? && @download_concurrency < 1
|
170
|
+
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
171
|
+
end
|
172
|
+
|
173
|
+
invalid_properties
|
174
|
+
end
|
175
|
+
|
176
|
+
# Check to see if the all the properties in the model are valid
|
177
|
+
# @return true if the model is valid
|
178
|
+
def valid?
|
179
|
+
return false if @name.nil?
|
180
|
+
return false if @url.nil?
|
181
|
+
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
182
|
+
true
|
183
|
+
end
|
184
|
+
|
185
|
+
# Custom attribute writer method with validation
|
186
|
+
# @param [Object] download_concurrency Value to be assigned
|
187
|
+
def download_concurrency=(download_concurrency)
|
188
|
+
if !download_concurrency.nil? && download_concurrency < 1
|
189
|
+
fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
|
190
|
+
end
|
191
|
+
|
192
|
+
@download_concurrency = download_concurrency
|
193
|
+
end
|
194
|
+
|
195
|
+
# Checks equality by comparing each attribute.
|
196
|
+
# @param [Object] Object to be compared
|
197
|
+
def ==(o)
|
198
|
+
return true if self.equal?(o)
|
199
|
+
self.class == o.class &&
|
200
|
+
name == o.name &&
|
201
|
+
url == o.url &&
|
202
|
+
ca_cert == o.ca_cert &&
|
203
|
+
client_cert == o.client_cert &&
|
204
|
+
client_key == o.client_key &&
|
205
|
+
tls_validation == o.tls_validation &&
|
206
|
+
proxy_url == o.proxy_url &&
|
207
|
+
username == o.username &&
|
208
|
+
password == o.password &&
|
209
|
+
download_concurrency == o.download_concurrency &&
|
210
|
+
policy == o.policy
|
211
|
+
end
|
212
|
+
|
213
|
+
# @see the `==` method
|
214
|
+
# @param [Object] Object to be compared
|
215
|
+
def eql?(o)
|
216
|
+
self == o
|
217
|
+
end
|
218
|
+
|
219
|
+
# Calculates hash code according to all attributes.
|
220
|
+
# @return [Integer] Hash code
|
221
|
+
def hash
|
222
|
+
[name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, username, password, download_concurrency, policy].hash
|
223
|
+
end
|
224
|
+
|
225
|
+
# Builds the object from hash
|
226
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
227
|
+
# @return [Object] Returns the model itself
|
228
|
+
def self.build_from_hash(attributes)
|
229
|
+
new.build_from_hash(attributes)
|
230
|
+
end
|
231
|
+
|
232
|
+
# Builds the object from hash
|
233
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
234
|
+
# @return [Object] Returns the model itself
|
235
|
+
def build_from_hash(attributes)
|
236
|
+
return nil unless attributes.is_a?(Hash)
|
237
|
+
self.class.openapi_types.each_pair do |key, type|
|
238
|
+
if type =~ /\AArray<(.*)>/i
|
239
|
+
# check to ensure the input is an array given that the attribute
|
240
|
+
# is documented as an array but the input is not
|
241
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
242
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
243
|
+
end
|
244
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
245
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
246
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
247
|
+
end
|
248
|
+
|
249
|
+
self
|
250
|
+
end
|
251
|
+
|
252
|
+
# Deserializes the data based on type
|
253
|
+
# @param string type Data type
|
254
|
+
# @param string value Value to be deserialized
|
255
|
+
# @return [Object] Deserialized data
|
256
|
+
def _deserialize(type, value)
|
257
|
+
case type.to_sym
|
258
|
+
when :DateTime
|
259
|
+
DateTime.parse(value)
|
260
|
+
when :Date
|
261
|
+
Date.parse(value)
|
262
|
+
when :String
|
263
|
+
value.to_s
|
264
|
+
when :Integer
|
265
|
+
value.to_i
|
266
|
+
when :Float
|
267
|
+
value.to_f
|
268
|
+
when :Boolean
|
269
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
270
|
+
true
|
271
|
+
else
|
272
|
+
false
|
273
|
+
end
|
274
|
+
when :Object
|
275
|
+
# generic object (usually a Hash), return directly
|
276
|
+
value
|
277
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
278
|
+
inner_type = Regexp.last_match[:inner_type]
|
279
|
+
value.map { |v| _deserialize(inner_type, v) }
|
280
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
281
|
+
k_type = Regexp.last_match[:k_type]
|
282
|
+
v_type = Regexp.last_match[:v_type]
|
283
|
+
{}.tap do |hash|
|
284
|
+
value.each do |k, v|
|
285
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
286
|
+
end
|
287
|
+
end
|
288
|
+
else # model
|
289
|
+
PulpAnsibleClient.const_get(type).build_from_hash(value)
|
290
|
+
end
|
291
|
+
end
|
292
|
+
|
293
|
+
# Returns the string representation of the object
|
294
|
+
# @return [String] String presentation of the object
|
295
|
+
def to_s
|
296
|
+
to_hash.to_s
|
297
|
+
end
|
298
|
+
|
299
|
+
# to_body is an alias to to_hash (backward compatibility)
|
300
|
+
# @return [Hash] Returns the object in the form of hash
|
301
|
+
def to_body
|
302
|
+
to_hash
|
303
|
+
end
|
304
|
+
|
305
|
+
# Returns the object in the form of hash
|
306
|
+
# @return [Hash] Returns the object in the form of hash
|
307
|
+
def to_hash
|
308
|
+
hash = {}
|
309
|
+
self.class.attribute_map.each_pair do |attr, param|
|
310
|
+
value = self.send(attr)
|
311
|
+
if value.nil?
|
312
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
313
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
314
|
+
end
|
315
|
+
|
316
|
+
hash[param] = _to_hash(value)
|
317
|
+
end
|
318
|
+
hash
|
319
|
+
end
|
320
|
+
|
321
|
+
# Outputs non-array value in the form of hash
|
322
|
+
# For object, use to_hash. Otherwise, just return the value
|
323
|
+
# @param [Object] value Any valid value
|
324
|
+
# @return [Hash] Returns the value in the form of hash
|
325
|
+
def _to_hash(value)
|
326
|
+
if value.is_a?(Array)
|
327
|
+
value.compact.map { |v| _to_hash(v) }
|
328
|
+
elsif value.is_a?(Hash)
|
329
|
+
{}.tap do |hash|
|
330
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
331
|
+
end
|
332
|
+
elsif value.respond_to? :to_hash
|
333
|
+
value.to_hash
|
334
|
+
else
|
335
|
+
value
|
336
|
+
end
|
337
|
+
end
|
338
|
+
end
|
339
|
+
end
|