pulp_ansible_client 0.21.7 → 0.22.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 +12 -19
- data/docs/{AnsibleCollection.md → AnsibleAnsibleCollectionDeprecated.md} +4 -2
- data/docs/AnsibleAnsibleCollectionDeprecatedResponse.md +25 -0
- data/docs/AnsibleCollectionVersion.md +6 -6
- data/docs/AnsibleCollectionVersionResponse.md +10 -10
- data/docs/AnsibleCollectionsApi.md +61 -1
- data/docs/AnsibleCopyApi.md +1 -1
- data/docs/AnsibleGitRemote.md +30 -30
- data/docs/AnsibleGitRemoteResponse.md +28 -28
- data/docs/AnsibleRole.md +3 -3
- data/docs/AnsibleRoleResponse.md +5 -5
- data/docs/ApiRolesApi.md +1 -1
- data/docs/CollectionImportApi.md +1 -1
- data/docs/CollectionImportDetailResponse.md +2 -2
- data/docs/CollectionMetadataResponse.md +2 -2
- data/docs/CollectionSummaryResponse.md +2 -2
- data/docs/CollectionVersionDocsResponse.md +1 -1
- data/docs/CollectionVersionResponse.md +2 -2
- data/docs/ContentCollectionDeprecationsApi.md +11 -11
- data/docs/ContentCollectionMarksApi.md +1 -1
- data/docs/ContentCollectionSignaturesApi.md +1 -1
- data/docs/ContentCollectionVersionsApi.md +7 -7
- data/docs/ContentNamespacesApi.md +1 -1
- data/docs/ContentRolesApi.md +1 -1
- data/docs/Copy.md +1 -1
- data/docs/DistributionsAnsibleApi.md +1 -1
- data/docs/{PaginatedGalaxyCollectionResponseList.md → PaginatedansibleAnsibleCollectionDeprecatedResponseList.md} +5 -5
- data/docs/PatchedansibleGitRemote.md +30 -30
- data/docs/PulpAnsibleApiApi.md +1 -1
- data/docs/PulpAnsibleApiV3Api.md +1 -1
- data/docs/PulpAnsibleApiV3ArtifactsCollectionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3CollectionVersionsAllApi.md +1 -1
- data/docs/PulpAnsibleApiV3CollectionsAllApi.md +1 -1
- data/docs/PulpAnsibleApiV3CollectionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3CollectionsVersionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3CollectionsVersionsDocsBlobApi.md +1 -1
- data/docs/PulpAnsibleApiV3NamespacesApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleClientConfigurationApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobApi.md +1 -1
- data/docs/PulpAnsibleApiV3PluginAnsibleContentNamespacesApi.md +1 -1
- data/docs/{ApiPluginAnsibleSearchCollectionVersionsApi.md → PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsApi.md} +17 -18
- data/docs/PulpAnsibleArtifactsCollectionsV3Api.md +1 -1
- data/docs/PulpAnsibleDefaultApiApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3Api.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3ArtifactsCollectionsApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3CollectionVersionsAllApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3CollectionsAllApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3CollectionsApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3NamespacesApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesApi.md +1 -1
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsApi.md +3 -4
- data/docs/PulpAnsibleTagsApi.md +1 -1
- data/docs/RemotesCollectionApi.md +1 -1
- data/docs/RemotesGitApi.md +1 -1
- data/docs/RemotesRoleApi.md +1 -1
- data/docs/RepositoriesAnsibleApi.md +1 -1
- data/docs/RepositoriesAnsibleVersionsApi.md +1 -1
- data/docs/VersionsApi.md +1 -56
- data/lib/pulp_ansible_client/api/ansible_collections_api.rb +68 -0
- data/lib/pulp_ansible_client/api/content_collection_deprecations_api.rb +20 -20
- data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +9 -9
- data/lib/pulp_ansible_client/api/{api_plugin_ansible_search_collection_versions_api.rb → pulp_ansible_api_v3_plugin_ansible_search_collection_versions_api.rb} +24 -26
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions_api.rb +0 -2
- data/lib/pulp_ansible_client/api/versions_api.rb +0 -69
- data/lib/pulp_ansible_client/configuration.rb +2 -2
- data/lib/pulp_ansible_client/models/{ansible_collection.rb → ansible_ansible_collection_deprecated.rb} +15 -5
- data/lib/pulp_ansible_client/models/{galaxy_collection_version_response.rb → ansible_ansible_collection_deprecated_response.rb} +45 -54
- data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +20 -20
- data/lib/pulp_ansible_client/models/ansible_collection_remote_response.rb +20 -20
- data/lib/pulp_ansible_client/models/ansible_collection_version.rb +25 -25
- data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +25 -25
- data/lib/pulp_ansible_client/models/ansible_git_remote.rb +230 -230
- data/lib/pulp_ansible_client/models/ansible_git_remote_response.rb +161 -161
- data/lib/pulp_ansible_client/models/ansible_role.rb +11 -11
- data/lib/pulp_ansible_client/models/ansible_role_remote.rb +20 -20
- data/lib/pulp_ansible_client/models/ansible_role_remote_response.rb +20 -20
- data/lib/pulp_ansible_client/models/ansible_role_response.rb +20 -20
- data/lib/pulp_ansible_client/models/collection_import_detail_response.rb +2 -2
- data/lib/pulp_ansible_client/models/collection_metadata_response.rb +2 -2
- data/lib/pulp_ansible_client/models/collection_summary_response.rb +2 -2
- data/lib/pulp_ansible_client/models/collection_version_docs_response.rb +1 -1
- data/lib/pulp_ansible_client/models/collection_version_response.rb +2 -2
- data/lib/pulp_ansible_client/models/copy.rb +1 -1
- data/lib/pulp_ansible_client/models/{paginated_galaxy_collection_version_response_list.rb → paginatedansible_ansible_collection_deprecated_response_list.rb} +4 -4
- data/lib/pulp_ansible_client/models/patchedansible_collection_remote.rb +20 -20
- data/lib/pulp_ansible_client/models/patchedansible_git_remote.rb +216 -216
- data/lib/pulp_ansible_client/models/patchedansible_role_remote.rb +20 -20
- data/lib/pulp_ansible_client/version.rb +1 -1
- data/lib/pulp_ansible_client.rb +4 -10
- data/spec/api/ansible_collections_api_spec.rb +14 -0
- data/spec/api/content_collection_deprecations_api_spec.rb +5 -5
- data/spec/api/content_collection_versions_api_spec.rb +3 -3
- data/spec/api/{api_plugin_ansible_search_collection_versions_api_spec.rb → pulp_ansible_api_v3_plugin_ansible_search_collection_versions_api_spec.rb} +8 -9
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions_api_spec.rb +0 -1
- data/spec/api/versions_api_spec.rb +0 -14
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/{galaxy_collection_version_response_spec.rb → ansible_ansible_collection_deprecated_response_spec.rb} +11 -17
- data/spec/models/{ansible_collection_spec.rb → ansible_ansible_collection_deprecated_spec.rb} +12 -6
- data/spec/models/ansible_collection_version_response_spec.rb +4 -4
- data/spec/models/ansible_collection_version_spec.rb +4 -4
- data/spec/models/ansible_git_remote_response_spec.rb +19 -19
- data/spec/models/ansible_git_remote_spec.rb +19 -19
- data/spec/models/ansible_role_response_spec.rb +4 -4
- data/spec/models/ansible_role_spec.rb +2 -2
- data/spec/models/{paginated_galaxy_collection_version_response_list_spec.rb → paginatedansible_ansible_collection_deprecated_response_list_spec.rb} +6 -6
- data/spec/models/patchedansible_git_remote_spec.rb +19 -19
- metadata +155 -179
- data/docs/ApiCollectionsApi.md +0 -112
- data/docs/GalaxyCollection.md +0 -23
- data/docs/GalaxyCollectionResponse.md +0 -31
- data/docs/GalaxyCollectionVersionResponse.md +0 -27
- data/docs/GalaxyDetailApi.md +0 -61
- data/docs/PaginatedGalaxyCollectionVersionResponseList.md +0 -23
- data/docs/PulpAnsibleApiV2CollectionsVersionsApi.md +0 -66
- data/lib/pulp_ansible_client/api/api_collections_api.rb +0 -159
- data/lib/pulp_ansible_client/api/galaxy_detail_api.rb +0 -88
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v2_collections_versions_api.rb +0 -104
- data/lib/pulp_ansible_client/models/galaxy_collection.rb +0 -292
- data/lib/pulp_ansible_client/models/galaxy_collection_response.rb +0 -294
- data/lib/pulp_ansible_client/models/paginated_galaxy_collection_response_list.rb +0 -247
- data/spec/api/api_collections_api_spec.rb +0 -61
- data/spec/api/galaxy_detail_api_spec.rb +0 -48
- data/spec/api/pulp_ansible_api_v2_collections_versions_api_spec.rb +0 -51
- data/spec/models/galaxy_collection_response_spec.rb +0 -83
- data/spec/models/galaxy_collection_spec.rb +0 -59
- data/spec/models/paginated_galaxy_collection_response_list_spec.rb +0 -59
@@ -1,104 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Pulp 3 API
|
3
|
-
|
4
|
-
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v3
|
7
|
-
Contact: pulp-list@redhat.com
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'cgi'
|
14
|
-
|
15
|
-
module PulpAnsibleClient
|
16
|
-
class PulpAnsibleApiV2CollectionsVersionsApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
# Return a response to the \"GET\" action.
|
23
|
-
# @param name [String]
|
24
|
-
# @param namespace [String]
|
25
|
-
# @param path [String]
|
26
|
-
# @param version [String]
|
27
|
-
# @param [Hash] opts the optional parameters
|
28
|
-
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
29
|
-
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
30
|
-
# @return [nil]
|
31
|
-
def get(name, namespace, path, version, opts = {})
|
32
|
-
get_with_http_info(name, namespace, path, version, opts)
|
33
|
-
nil
|
34
|
-
end
|
35
|
-
|
36
|
-
# Return a response to the \"GET\" action.
|
37
|
-
# @param name [String]
|
38
|
-
# @param namespace [String]
|
39
|
-
# @param path [String]
|
40
|
-
# @param version [String]
|
41
|
-
# @param [Hash] opts the optional parameters
|
42
|
-
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
43
|
-
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
44
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
45
|
-
def get_with_http_info(name, namespace, path, version, opts = {})
|
46
|
-
if @api_client.config.debugging
|
47
|
-
@api_client.config.logger.debug 'Calling API: PulpAnsibleApiV2CollectionsVersionsApi.get ...'
|
48
|
-
end
|
49
|
-
# verify the required parameter 'name' is set
|
50
|
-
if @api_client.config.client_side_validation && name.nil?
|
51
|
-
fail ArgumentError, "Missing the required parameter 'name' when calling PulpAnsibleApiV2CollectionsVersionsApi.get"
|
52
|
-
end
|
53
|
-
# verify the required parameter 'namespace' is set
|
54
|
-
if @api_client.config.client_side_validation && namespace.nil?
|
55
|
-
fail ArgumentError, "Missing the required parameter 'namespace' when calling PulpAnsibleApiV2CollectionsVersionsApi.get"
|
56
|
-
end
|
57
|
-
# verify the required parameter 'path' is set
|
58
|
-
if @api_client.config.client_side_validation && path.nil?
|
59
|
-
fail ArgumentError, "Missing the required parameter 'path' when calling PulpAnsibleApiV2CollectionsVersionsApi.get"
|
60
|
-
end
|
61
|
-
# verify the required parameter 'version' is set
|
62
|
-
if @api_client.config.client_side_validation && version.nil?
|
63
|
-
fail ArgumentError, "Missing the required parameter 'version' when calling PulpAnsibleApiV2CollectionsVersionsApi.get"
|
64
|
-
end
|
65
|
-
# resource path
|
66
|
-
local_var_path = '/pulp_ansible/galaxy/{path}/api/v2/collections/{namespace}/{name}/versions/{version}/'.sub('{' + 'name' + '}', CGI.escape(name.to_s).gsub('%2F', '/')).sub('{' + 'namespace' + '}', CGI.escape(namespace.to_s).gsub('%2F', '/')).sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/')).sub('{' + 'version' + '}', CGI.escape(version.to_s).gsub('%2F', '/'))
|
67
|
-
|
68
|
-
# query parameters
|
69
|
-
query_params = opts[:query_params] || {}
|
70
|
-
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
71
|
-
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
72
|
-
|
73
|
-
# header parameters
|
74
|
-
header_params = opts[:header_params] || {}
|
75
|
-
|
76
|
-
# form parameters
|
77
|
-
form_params = opts[:form_params] || {}
|
78
|
-
|
79
|
-
# http body (model)
|
80
|
-
post_body = opts[:body]
|
81
|
-
|
82
|
-
# return_type
|
83
|
-
return_type = opts[:return_type]
|
84
|
-
|
85
|
-
# auth_names
|
86
|
-
auth_names = opts[:auth_names] || []
|
87
|
-
|
88
|
-
new_options = opts.merge(
|
89
|
-
:header_params => header_params,
|
90
|
-
:query_params => query_params,
|
91
|
-
:form_params => form_params,
|
92
|
-
:body => post_body,
|
93
|
-
:auth_names => auth_names,
|
94
|
-
:return_type => return_type
|
95
|
-
)
|
96
|
-
|
97
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
98
|
-
if @api_client.config.debugging
|
99
|
-
@api_client.config.logger.debug "API called: PulpAnsibleApiV2CollectionsVersionsApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
100
|
-
end
|
101
|
-
return data, status_code, headers
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
@@ -1,292 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Pulp 3 API
|
3
|
-
|
4
|
-
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v3
|
7
|
-
Contact: pulp-list@redhat.com
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module PulpAnsibleClient
|
16
|
-
# A serializer for a Collection.
|
17
|
-
class GalaxyCollection
|
18
|
-
attr_accessor :id
|
19
|
-
|
20
|
-
attr_accessor :name
|
21
|
-
|
22
|
-
attr_accessor :created
|
23
|
-
|
24
|
-
attr_accessor :modified
|
25
|
-
|
26
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
-
def self.attribute_map
|
28
|
-
{
|
29
|
-
:'id' => :'id',
|
30
|
-
:'name' => :'name',
|
31
|
-
:'created' => :'created',
|
32
|
-
:'modified' => :'modified'
|
33
|
-
}
|
34
|
-
end
|
35
|
-
|
36
|
-
# Attribute type mapping.
|
37
|
-
def self.openapi_types
|
38
|
-
{
|
39
|
-
:'id' => :'String',
|
40
|
-
:'name' => :'String',
|
41
|
-
:'created' => :'DateTime',
|
42
|
-
:'modified' => :'DateTime'
|
43
|
-
}
|
44
|
-
end
|
45
|
-
|
46
|
-
# List of attributes with nullable: true
|
47
|
-
def self.openapi_nullable
|
48
|
-
Set.new([
|
49
|
-
])
|
50
|
-
end
|
51
|
-
|
52
|
-
# Initializes the object
|
53
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
-
def initialize(attributes = {})
|
55
|
-
if (!attributes.is_a?(Hash))
|
56
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::GalaxyCollection` initialize method"
|
57
|
-
end
|
58
|
-
|
59
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
60
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::GalaxyCollection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
|
-
end
|
64
|
-
h[k.to_sym] = v
|
65
|
-
}
|
66
|
-
|
67
|
-
if attributes.key?(:'id')
|
68
|
-
self.id = attributes[:'id']
|
69
|
-
end
|
70
|
-
|
71
|
-
if attributes.key?(:'name')
|
72
|
-
self.name = attributes[:'name']
|
73
|
-
end
|
74
|
-
|
75
|
-
if attributes.key?(:'created')
|
76
|
-
self.created = attributes[:'created']
|
77
|
-
end
|
78
|
-
|
79
|
-
if attributes.key?(:'modified')
|
80
|
-
self.modified = attributes[:'modified']
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
85
|
-
# @return Array for valid properties with the reasons
|
86
|
-
def list_invalid_properties
|
87
|
-
invalid_properties = Array.new
|
88
|
-
if @id.nil?
|
89
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
90
|
-
end
|
91
|
-
|
92
|
-
if @id.to_s.length < 1
|
93
|
-
invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.')
|
94
|
-
end
|
95
|
-
|
96
|
-
if @name.nil?
|
97
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
98
|
-
end
|
99
|
-
|
100
|
-
if @name.to_s.length < 1
|
101
|
-
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
102
|
-
end
|
103
|
-
|
104
|
-
if @created.nil?
|
105
|
-
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
106
|
-
end
|
107
|
-
|
108
|
-
if @modified.nil?
|
109
|
-
invalid_properties.push('invalid value for "modified", modified cannot be nil.')
|
110
|
-
end
|
111
|
-
|
112
|
-
invalid_properties
|
113
|
-
end
|
114
|
-
|
115
|
-
# Check to see if the all the properties in the model are valid
|
116
|
-
# @return true if the model is valid
|
117
|
-
def valid?
|
118
|
-
return false if @id.nil?
|
119
|
-
return false if @id.to_s.length < 1
|
120
|
-
return false if @name.nil?
|
121
|
-
return false if @name.to_s.length < 1
|
122
|
-
return false if @created.nil?
|
123
|
-
return false if @modified.nil?
|
124
|
-
true
|
125
|
-
end
|
126
|
-
|
127
|
-
# Custom attribute writer method with validation
|
128
|
-
# @param [Object] id Value to be assigned
|
129
|
-
def id=(id)
|
130
|
-
if id.nil?
|
131
|
-
fail ArgumentError, 'id cannot be nil'
|
132
|
-
end
|
133
|
-
|
134
|
-
if id.to_s.length < 1
|
135
|
-
fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.'
|
136
|
-
end
|
137
|
-
|
138
|
-
@id = id
|
139
|
-
end
|
140
|
-
|
141
|
-
# Custom attribute writer method with validation
|
142
|
-
# @param [Object] name Value to be assigned
|
143
|
-
def name=(name)
|
144
|
-
if name.nil?
|
145
|
-
fail ArgumentError, 'name cannot be nil'
|
146
|
-
end
|
147
|
-
|
148
|
-
if name.to_s.length < 1
|
149
|
-
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
150
|
-
end
|
151
|
-
|
152
|
-
@name = name
|
153
|
-
end
|
154
|
-
|
155
|
-
# Checks equality by comparing each attribute.
|
156
|
-
# @param [Object] Object to be compared
|
157
|
-
def ==(o)
|
158
|
-
return true if self.equal?(o)
|
159
|
-
self.class == o.class &&
|
160
|
-
id == o.id &&
|
161
|
-
name == o.name &&
|
162
|
-
created == o.created &&
|
163
|
-
modified == o.modified
|
164
|
-
end
|
165
|
-
|
166
|
-
# @see the `==` method
|
167
|
-
# @param [Object] Object to be compared
|
168
|
-
def eql?(o)
|
169
|
-
self == o
|
170
|
-
end
|
171
|
-
|
172
|
-
# Calculates hash code according to all attributes.
|
173
|
-
# @return [Integer] Hash code
|
174
|
-
def hash
|
175
|
-
[id, name, created, modified].hash
|
176
|
-
end
|
177
|
-
|
178
|
-
# Builds the object from hash
|
179
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
180
|
-
# @return [Object] Returns the model itself
|
181
|
-
def self.build_from_hash(attributes)
|
182
|
-
new.build_from_hash(attributes)
|
183
|
-
end
|
184
|
-
|
185
|
-
# Builds the object from hash
|
186
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
187
|
-
# @return [Object] Returns the model itself
|
188
|
-
def build_from_hash(attributes)
|
189
|
-
return nil unless attributes.is_a?(Hash)
|
190
|
-
self.class.openapi_types.each_pair do |key, type|
|
191
|
-
if type =~ /\AArray<(.*)>/i
|
192
|
-
# check to ensure the input is an array given that the attribute
|
193
|
-
# is documented as an array but the input is not
|
194
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
195
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
196
|
-
end
|
197
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
198
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
199
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
200
|
-
end
|
201
|
-
|
202
|
-
self
|
203
|
-
end
|
204
|
-
|
205
|
-
# Deserializes the data based on type
|
206
|
-
# @param string type Data type
|
207
|
-
# @param string value Value to be deserialized
|
208
|
-
# @return [Object] Deserialized data
|
209
|
-
def _deserialize(type, value)
|
210
|
-
case type.to_sym
|
211
|
-
when :DateTime
|
212
|
-
DateTime.parse(value)
|
213
|
-
when :Date
|
214
|
-
Date.parse(value)
|
215
|
-
when :String
|
216
|
-
value.to_s
|
217
|
-
when :Integer
|
218
|
-
value.to_i
|
219
|
-
when :Float
|
220
|
-
value.to_f
|
221
|
-
when :Boolean
|
222
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
223
|
-
true
|
224
|
-
else
|
225
|
-
false
|
226
|
-
end
|
227
|
-
when :Object
|
228
|
-
# generic object (usually a Hash), return directly
|
229
|
-
value
|
230
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
231
|
-
inner_type = Regexp.last_match[:inner_type]
|
232
|
-
value.map { |v| _deserialize(inner_type, v) }
|
233
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
234
|
-
k_type = Regexp.last_match[:k_type]
|
235
|
-
v_type = Regexp.last_match[:v_type]
|
236
|
-
{}.tap do |hash|
|
237
|
-
value.each do |k, v|
|
238
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
239
|
-
end
|
240
|
-
end
|
241
|
-
else # model
|
242
|
-
PulpAnsibleClient.const_get(type).build_from_hash(value)
|
243
|
-
end
|
244
|
-
end
|
245
|
-
|
246
|
-
# Returns the string representation of the object
|
247
|
-
# @return [String] String presentation of the object
|
248
|
-
def to_s
|
249
|
-
to_hash.to_s
|
250
|
-
end
|
251
|
-
|
252
|
-
# to_body is an alias to to_hash (backward compatibility)
|
253
|
-
# @return [Hash] Returns the object in the form of hash
|
254
|
-
def to_body
|
255
|
-
to_hash
|
256
|
-
end
|
257
|
-
|
258
|
-
# Returns the object in the form of hash
|
259
|
-
# @return [Hash] Returns the object in the form of hash
|
260
|
-
def to_hash
|
261
|
-
hash = {}
|
262
|
-
self.class.attribute_map.each_pair do |attr, param|
|
263
|
-
value = self.send(attr)
|
264
|
-
if value.nil?
|
265
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
266
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
267
|
-
end
|
268
|
-
|
269
|
-
hash[param] = _to_hash(value)
|
270
|
-
end
|
271
|
-
hash
|
272
|
-
end
|
273
|
-
|
274
|
-
# Outputs non-array value in the form of hash
|
275
|
-
# For object, use to_hash. Otherwise, just return the value
|
276
|
-
# @param [Object] value Any valid value
|
277
|
-
# @return [Hash] Returns the value in the form of hash
|
278
|
-
def _to_hash(value)
|
279
|
-
if value.is_a?(Array)
|
280
|
-
value.compact.map { |v| _to_hash(v) }
|
281
|
-
elsif value.is_a?(Hash)
|
282
|
-
{}.tap do |hash|
|
283
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
284
|
-
end
|
285
|
-
elsif value.respond_to? :to_hash
|
286
|
-
value.to_hash
|
287
|
-
else
|
288
|
-
value
|
289
|
-
end
|
290
|
-
end
|
291
|
-
end
|
292
|
-
end
|
@@ -1,294 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Pulp 3 API
|
3
|
-
|
4
|
-
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v3
|
7
|
-
Contact: pulp-list@redhat.com
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module PulpAnsibleClient
|
16
|
-
# A serializer for a Collection.
|
17
|
-
class GalaxyCollectionResponse
|
18
|
-
attr_accessor :id
|
19
|
-
|
20
|
-
attr_accessor :name
|
21
|
-
|
22
|
-
# Create a namespace dict.
|
23
|
-
attr_accessor :namespace
|
24
|
-
|
25
|
-
# Get href.
|
26
|
-
attr_accessor :href
|
27
|
-
|
28
|
-
# Get versions_url.
|
29
|
-
attr_accessor :versions_url
|
30
|
-
|
31
|
-
attr_accessor :created
|
32
|
-
|
33
|
-
attr_accessor :modified
|
34
|
-
|
35
|
-
# Get latest version.
|
36
|
-
attr_accessor :latest_version
|
37
|
-
|
38
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
-
def self.attribute_map
|
40
|
-
{
|
41
|
-
:'id' => :'id',
|
42
|
-
:'name' => :'name',
|
43
|
-
:'namespace' => :'namespace',
|
44
|
-
:'href' => :'href',
|
45
|
-
:'versions_url' => :'versions_url',
|
46
|
-
:'created' => :'created',
|
47
|
-
:'modified' => :'modified',
|
48
|
-
:'latest_version' => :'latest_version'
|
49
|
-
}
|
50
|
-
end
|
51
|
-
|
52
|
-
# Attribute type mapping.
|
53
|
-
def self.openapi_types
|
54
|
-
{
|
55
|
-
:'id' => :'String',
|
56
|
-
:'name' => :'String',
|
57
|
-
:'namespace' => :'Object',
|
58
|
-
:'href' => :'String',
|
59
|
-
:'versions_url' => :'String',
|
60
|
-
:'created' => :'DateTime',
|
61
|
-
:'modified' => :'DateTime',
|
62
|
-
:'latest_version' => :'Object'
|
63
|
-
}
|
64
|
-
end
|
65
|
-
|
66
|
-
# List of attributes with nullable: true
|
67
|
-
def self.openapi_nullable
|
68
|
-
Set.new([
|
69
|
-
])
|
70
|
-
end
|
71
|
-
|
72
|
-
# Initializes the object
|
73
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
74
|
-
def initialize(attributes = {})
|
75
|
-
if (!attributes.is_a?(Hash))
|
76
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::GalaxyCollectionResponse` initialize method"
|
77
|
-
end
|
78
|
-
|
79
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
80
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
81
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
82
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::GalaxyCollectionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
83
|
-
end
|
84
|
-
h[k.to_sym] = v
|
85
|
-
}
|
86
|
-
|
87
|
-
if attributes.key?(:'id')
|
88
|
-
self.id = attributes[:'id']
|
89
|
-
end
|
90
|
-
|
91
|
-
if attributes.key?(:'name')
|
92
|
-
self.name = attributes[:'name']
|
93
|
-
end
|
94
|
-
|
95
|
-
if attributes.key?(:'namespace')
|
96
|
-
self.namespace = attributes[:'namespace']
|
97
|
-
end
|
98
|
-
|
99
|
-
if attributes.key?(:'href')
|
100
|
-
self.href = attributes[:'href']
|
101
|
-
end
|
102
|
-
|
103
|
-
if attributes.key?(:'versions_url')
|
104
|
-
self.versions_url = attributes[:'versions_url']
|
105
|
-
end
|
106
|
-
|
107
|
-
if attributes.key?(:'created')
|
108
|
-
self.created = attributes[:'created']
|
109
|
-
end
|
110
|
-
|
111
|
-
if attributes.key?(:'modified')
|
112
|
-
self.modified = attributes[:'modified']
|
113
|
-
end
|
114
|
-
|
115
|
-
if attributes.key?(:'latest_version')
|
116
|
-
self.latest_version = attributes[:'latest_version']
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
121
|
-
# @return Array for valid properties with the reasons
|
122
|
-
def list_invalid_properties
|
123
|
-
invalid_properties = Array.new
|
124
|
-
if @id.nil?
|
125
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
126
|
-
end
|
127
|
-
|
128
|
-
if @name.nil?
|
129
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
130
|
-
end
|
131
|
-
|
132
|
-
if @created.nil?
|
133
|
-
invalid_properties.push('invalid value for "created", created cannot be nil.')
|
134
|
-
end
|
135
|
-
|
136
|
-
if @modified.nil?
|
137
|
-
invalid_properties.push('invalid value for "modified", modified cannot be nil.')
|
138
|
-
end
|
139
|
-
|
140
|
-
invalid_properties
|
141
|
-
end
|
142
|
-
|
143
|
-
# Check to see if the all the properties in the model are valid
|
144
|
-
# @return true if the model is valid
|
145
|
-
def valid?
|
146
|
-
return false if @id.nil?
|
147
|
-
return false if @name.nil?
|
148
|
-
return false if @created.nil?
|
149
|
-
return false if @modified.nil?
|
150
|
-
true
|
151
|
-
end
|
152
|
-
|
153
|
-
# Checks equality by comparing each attribute.
|
154
|
-
# @param [Object] Object to be compared
|
155
|
-
def ==(o)
|
156
|
-
return true if self.equal?(o)
|
157
|
-
self.class == o.class &&
|
158
|
-
id == o.id &&
|
159
|
-
name == o.name &&
|
160
|
-
namespace == o.namespace &&
|
161
|
-
href == o.href &&
|
162
|
-
versions_url == o.versions_url &&
|
163
|
-
created == o.created &&
|
164
|
-
modified == o.modified &&
|
165
|
-
latest_version == o.latest_version
|
166
|
-
end
|
167
|
-
|
168
|
-
# @see the `==` method
|
169
|
-
# @param [Object] Object to be compared
|
170
|
-
def eql?(o)
|
171
|
-
self == o
|
172
|
-
end
|
173
|
-
|
174
|
-
# Calculates hash code according to all attributes.
|
175
|
-
# @return [Integer] Hash code
|
176
|
-
def hash
|
177
|
-
[id, name, namespace, href, versions_url, created, modified, latest_version].hash
|
178
|
-
end
|
179
|
-
|
180
|
-
# Builds the object from hash
|
181
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
182
|
-
# @return [Object] Returns the model itself
|
183
|
-
def self.build_from_hash(attributes)
|
184
|
-
new.build_from_hash(attributes)
|
185
|
-
end
|
186
|
-
|
187
|
-
# Builds the object from hash
|
188
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
189
|
-
# @return [Object] Returns the model itself
|
190
|
-
def build_from_hash(attributes)
|
191
|
-
return nil unless attributes.is_a?(Hash)
|
192
|
-
self.class.openapi_types.each_pair do |key, type|
|
193
|
-
if type =~ /\AArray<(.*)>/i
|
194
|
-
# check to ensure the input is an array given that the attribute
|
195
|
-
# is documented as an array but the input is not
|
196
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
197
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
198
|
-
end
|
199
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
200
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
201
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
202
|
-
end
|
203
|
-
|
204
|
-
self
|
205
|
-
end
|
206
|
-
|
207
|
-
# Deserializes the data based on type
|
208
|
-
# @param string type Data type
|
209
|
-
# @param string value Value to be deserialized
|
210
|
-
# @return [Object] Deserialized data
|
211
|
-
def _deserialize(type, value)
|
212
|
-
case type.to_sym
|
213
|
-
when :DateTime
|
214
|
-
DateTime.parse(value)
|
215
|
-
when :Date
|
216
|
-
Date.parse(value)
|
217
|
-
when :String
|
218
|
-
value.to_s
|
219
|
-
when :Integer
|
220
|
-
value.to_i
|
221
|
-
when :Float
|
222
|
-
value.to_f
|
223
|
-
when :Boolean
|
224
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
225
|
-
true
|
226
|
-
else
|
227
|
-
false
|
228
|
-
end
|
229
|
-
when :Object
|
230
|
-
# generic object (usually a Hash), return directly
|
231
|
-
value
|
232
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
233
|
-
inner_type = Regexp.last_match[:inner_type]
|
234
|
-
value.map { |v| _deserialize(inner_type, v) }
|
235
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
236
|
-
k_type = Regexp.last_match[:k_type]
|
237
|
-
v_type = Regexp.last_match[:v_type]
|
238
|
-
{}.tap do |hash|
|
239
|
-
value.each do |k, v|
|
240
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
241
|
-
end
|
242
|
-
end
|
243
|
-
else # model
|
244
|
-
PulpAnsibleClient.const_get(type).build_from_hash(value)
|
245
|
-
end
|
246
|
-
end
|
247
|
-
|
248
|
-
# Returns the string representation of the object
|
249
|
-
# @return [String] String presentation of the object
|
250
|
-
def to_s
|
251
|
-
to_hash.to_s
|
252
|
-
end
|
253
|
-
|
254
|
-
# to_body is an alias to to_hash (backward compatibility)
|
255
|
-
# @return [Hash] Returns the object in the form of hash
|
256
|
-
def to_body
|
257
|
-
to_hash
|
258
|
-
end
|
259
|
-
|
260
|
-
# Returns the object in the form of hash
|
261
|
-
# @return [Hash] Returns the object in the form of hash
|
262
|
-
def to_hash
|
263
|
-
hash = {}
|
264
|
-
self.class.attribute_map.each_pair do |attr, param|
|
265
|
-
value = self.send(attr)
|
266
|
-
if value.nil?
|
267
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
268
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
269
|
-
end
|
270
|
-
|
271
|
-
hash[param] = _to_hash(value)
|
272
|
-
end
|
273
|
-
hash
|
274
|
-
end
|
275
|
-
|
276
|
-
# Outputs non-array value in the form of hash
|
277
|
-
# For object, use to_hash. Otherwise, just return the value
|
278
|
-
# @param [Object] value Any valid value
|
279
|
-
# @return [Hash] Returns the value in the form of hash
|
280
|
-
def _to_hash(value)
|
281
|
-
if value.is_a?(Array)
|
282
|
-
value.compact.map { |v| _to_hash(v) }
|
283
|
-
elsif value.is_a?(Hash)
|
284
|
-
{}.tap do |hash|
|
285
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
286
|
-
end
|
287
|
-
elsif value.respond_to? :to_hash
|
288
|
-
value.to_hash
|
289
|
-
else
|
290
|
-
value
|
291
|
-
end
|
292
|
-
end
|
293
|
-
end
|
294
|
-
end
|