pulp_ansible_client 0.16.4 → 0.17.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 +89 -21
- data/docs/AnsibleAnsibleNamespaceMetadata.md +29 -0
- data/docs/AnsibleAnsibleNamespaceMetadataResponse.md +35 -0
- data/docs/AnsibleAnsibleRepository.md +4 -2
- data/docs/AnsibleAnsibleRepositoryResponse.md +6 -2
- data/docs/AnsibleCollectionRemoteResponse.md +3 -1
- data/docs/AnsibleCollectionRemoteResponseHiddenFields.md +2 -2
- data/docs/AnsibleCollectionVersion.md +4 -4
- data/docs/AnsibleCollectionVersionMark.md +19 -0
- data/docs/AnsibleCollectionVersionMarkResponse.md +23 -0
- data/docs/AnsibleCollectionVersionResponse.md +2 -2
- data/docs/AnsibleCollectionsApi.md +229 -1
- data/docs/AnsibleCopyApi.md +1 -1
- data/docs/AnsibleGitRemote.md +28 -28
- data/docs/AnsibleGitRemoteResponse.md +26 -26
- data/docs/AnsibleRepositoryMark.md +19 -0
- data/docs/AnsibleRoleResponse.md +2 -2
- data/docs/ApiCollectionsApi.md +1 -1
- data/docs/ApiRolesApi.md +1 -1
- data/docs/CollectionImportApi.md +1 -1
- data/docs/CollectionNamespaceResponse.md +3 -1
- data/docs/CollectionSummaryResponse.md +35 -0
- data/docs/CollectionVersionCopyMove.md +21 -0
- data/docs/CollectionVersionListResponse.md +3 -1
- data/docs/CollectionVersionResponse.md +2 -0
- data/docs/CollectionVersionSearchList.md +27 -0
- data/docs/CollectionVersionSearchListResponse.md +29 -0
- data/docs/ContentCollectionDeprecationsApi.md +1 -1
- data/docs/ContentCollectionMarksApi.md +198 -0
- data/docs/ContentCollectionSignaturesApi.md +1 -1
- data/docs/ContentCollectionVersionsApi.md +5 -5
- data/docs/ContentNamespacesApi.md +220 -0
- data/docs/ContentRolesApi.md +1 -1
- data/docs/DistributionsAnsibleApi.md +233 -1
- data/docs/GalaxyDetailApi.md +1 -1
- data/docs/MyPermissionsResponse.md +17 -0
- data/docs/NamespaceLink.md +19 -0
- data/docs/NamespaceLinkResponse.md +19 -0
- data/docs/NestedRole.md +21 -0
- data/docs/NestedRoleResponse.md +21 -0
- data/docs/ObjectRolesResponse.md +17 -0
- data/docs/PaginatedCollectionVersionSearchListResponseList.md +21 -0
- data/docs/PaginatedansibleAnsibleNamespaceMetadataResponseList.md +23 -0
- data/docs/PaginatedansibleCollectionVersionMarkResponseList.md +23 -0
- data/docs/PatchedansibleAnsibleNamespaceMetadata.md +29 -0
- data/docs/PatchedansibleAnsibleRepository.md +4 -2
- data/docs/PatchedansibleGitRemote.md +28 -28
- data/docs/ProgressReportResponse.md +27 -0
- data/docs/PulpAnsibleApiApi.md +1 -1
- data/docs/PulpAnsibleApiV2CollectionsVersionsApi.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 +158 -0
- data/docs/PulpAnsibleApiV3PluginAnsibleClientConfigurationApi.md +7 -7
- 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 +363 -0
- data/docs/PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsApi.md +168 -0
- 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 +154 -0
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationApi.md +7 -7
- 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 +353 -0
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsApi.md +164 -0
- data/docs/PulpAnsibleTagsApi.md +1 -1
- data/docs/RemotesCollectionApi.md +237 -1
- data/docs/RemotesGitApi.md +229 -1
- data/docs/RemotesRoleApi.md +229 -1
- data/docs/RepositoriesAnsibleApi.md +465 -1
- data/docs/RepositoriesAnsibleVersionsApi.md +1 -1
- data/docs/Repository.md +25 -0
- data/docs/RepositoryAddRemoveContent.md +2 -2
- data/docs/RepositoryResponse.md +33 -0
- data/docs/Task.md +19 -0
- data/docs/TaskResponse.md +45 -0
- data/docs/UnpaginatedCollectionVersionResponse.md +2 -0
- data/docs/VersionsApi.md +11 -11
- data/lib/pulp_ansible_client/api/ansible_collections_api.rb +268 -0
- data/lib/pulp_ansible_client/api/content_collection_marks_api.rb +247 -0
- data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +6 -6
- data/lib/pulp_ansible_client/api/content_namespaces_api.rb +276 -0
- data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +274 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_namespaces_api.rb +209 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_client_configuration_api.rb +8 -8
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_namespaces_api.rb +531 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_search_collection_versions_api.rb +229 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_namespaces_api.rb +197 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_client_configuration_api.rb +7 -7
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_namespaces_api.rb +501 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions_api.rb +217 -0
- data/lib/pulp_ansible_client/api/remotes_collection_api.rb +281 -1
- data/lib/pulp_ansible_client/api/remotes_git_api.rb +268 -0
- data/lib/pulp_ansible_client/api/remotes_role_api.rb +268 -0
- data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +564 -0
- data/lib/pulp_ansible_client/api/versions_api.rb +12 -12
- data/lib/pulp_ansible_client/configuration.rb +3 -3
- data/lib/pulp_ansible_client/models/ansible_ansible_namespace_metadata.rb +359 -0
- data/lib/pulp_ansible_client/models/ansible_ansible_namespace_metadata_response.rb +402 -0
- data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +15 -6
- data/lib/pulp_ansible_client/models/ansible_ansible_repository_response.rb +24 -6
- data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +20 -20
- data/lib/pulp_ansible_client/models/ansible_collection_remote_response.rb +33 -24
- data/lib/pulp_ansible_client/models/ansible_collection_remote_response_hidden_fields.rb +0 -10
- data/lib/pulp_ansible_client/models/ansible_collection_version.rb +18 -18
- data/lib/pulp_ansible_client/models/ansible_collection_version_mark.rb +258 -0
- data/lib/pulp_ansible_client/models/ansible_collection_version_mark_response.rb +268 -0
- data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +11 -11
- data/lib/pulp_ansible_client/models/ansible_git_remote.rb +219 -219
- data/lib/pulp_ansible_client/models/ansible_git_remote_response.rb +147 -147
- data/lib/pulp_ansible_client/models/ansible_repository_mark.rb +260 -0
- 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 +11 -11
- data/lib/pulp_ansible_client/models/collection_namespace_response.rb +13 -4
- data/lib/pulp_ansible_client/models/collection_summary_response.rb +359 -0
- data/lib/pulp_ansible_client/models/collection_version_copy_move.rb +242 -0
- data/lib/pulp_ansible_client/models/collection_version_list_response.rb +16 -5
- data/lib/pulp_ansible_client/models/collection_version_response.rb +12 -1
- data/lib/pulp_ansible_client/models/collection_version_search_list.rb +279 -0
- data/lib/pulp_ansible_client/models/collection_version_search_list_response.rb +287 -0
- data/lib/pulp_ansible_client/models/my_permissions_response.rb +213 -0
- data/lib/pulp_ansible_client/models/namespace_link.rb +282 -0
- data/lib/pulp_ansible_client/models/namespace_link_response.rb +264 -0
- data/lib/pulp_ansible_client/models/nested_role.rb +253 -0
- data/lib/pulp_ansible_client/models/nested_role_response.rb +234 -0
- data/lib/pulp_ansible_client/models/object_roles_response.rb +213 -0
- data/lib/pulp_ansible_client/models/paginated_collection_version_search_list_response_list.rb +226 -0
- data/lib/pulp_ansible_client/models/paginatedansible_ansible_namespace_metadata_response_list.rb +237 -0
- data/lib/pulp_ansible_client/models/paginatedansible_collection_version_mark_response_list.rb +237 -0
- data/lib/pulp_ansible_client/models/patchedansible_ansible_namespace_metadata.rb +350 -0
- data/lib/pulp_ansible_client/models/patchedansible_ansible_repository.rb +15 -6
- data/lib/pulp_ansible_client/models/patchedansible_collection_remote.rb +20 -20
- data/lib/pulp_ansible_client/models/patchedansible_git_remote.rb +211 -211
- data/lib/pulp_ansible_client/models/patchedansible_role_remote.rb +20 -20
- data/lib/pulp_ansible_client/models/progress_report_response.rb +259 -0
- data/lib/pulp_ansible_client/models/repository.rb +306 -0
- data/lib/pulp_ansible_client/models/repository_add_remove_content.rb +2 -2
- data/lib/pulp_ansible_client/models/repository_response.rb +309 -0
- data/lib/pulp_ansible_client/models/task.rb +266 -0
- data/lib/pulp_ansible_client/models/task_response.rb +366 -0
- data/lib/pulp_ansible_client/models/unpaginated_collection_version_response.rb +12 -1
- data/lib/pulp_ansible_client/version.rb +1 -1
- data/lib/pulp_ansible_client.rb +32 -0
- data/spec/api/ansible_collections_api_spec.rb +50 -0
- data/spec/api/content_collection_marks_api_spec.rb +83 -0
- data/spec/api/content_collection_versions_api_spec.rb +2 -2
- data/spec/api/content_namespaces_api_spec.rb +93 -0
- data/spec/api/distributions_ansible_api_spec.rb +52 -0
- data/spec/api/pulp_ansible_api_v3_namespaces_api_spec.rb +77 -0
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_client_configuration_api_spec.rb +3 -3
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_namespaces_api_spec.rb +131 -0
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_search_collection_versions_api_spec.rb +83 -0
- data/spec/api/pulp_ansible_default_api_v3_namespaces_api_spec.rb +75 -0
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_client_configuration_api_spec.rb +3 -3
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_namespaces_api_spec.rb +126 -0
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_search_collection_versions_api_spec.rb +81 -0
- data/spec/api/remotes_collection_api_spec.rb +54 -0
- data/spec/api/remotes_git_api_spec.rb +50 -0
- data/spec/api/remotes_role_api_spec.rb +50 -0
- data/spec/api/repositories_ansible_api_spec.rb +106 -0
- data/spec/api/versions_api_spec.rb +4 -4
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/ansible_ansible_namespace_metadata_response_spec.rb +95 -0
- data/spec/models/ansible_ansible_namespace_metadata_spec.rb +77 -0
- data/spec/models/ansible_ansible_repository_response_spec.rb +12 -0
- data/spec/models/ansible_ansible_repository_spec.rb +6 -0
- data/spec/models/ansible_collection_remote_response_spec.rb +6 -0
- data/spec/models/ansible_collection_version_mark_response_spec.rb +59 -0
- data/spec/models/ansible_collection_version_mark_spec.rb +47 -0
- data/spec/models/ansible_collection_version_response_spec.rb +2 -2
- data/spec/models/ansible_collection_version_spec.rb +3 -3
- data/spec/models/ansible_git_remote_response_spec.rb +19 -19
- data/spec/models/ansible_git_remote_spec.rb +17 -17
- data/spec/models/ansible_repository_mark_spec.rb +47 -0
- data/spec/models/ansible_role_response_spec.rb +2 -2
- data/spec/models/collection_namespace_response_spec.rb +6 -0
- data/spec/models/collection_summary_response_spec.rb +95 -0
- data/spec/models/collection_version_copy_move_spec.rb +53 -0
- data/spec/models/collection_version_list_response_spec.rb +6 -0
- data/spec/models/collection_version_response_spec.rb +6 -0
- data/spec/models/collection_version_search_list_response_spec.rb +77 -0
- data/spec/models/collection_version_search_list_spec.rb +71 -0
- data/spec/models/my_permissions_response_spec.rb +41 -0
- data/spec/models/namespace_link_response_spec.rb +47 -0
- data/spec/models/namespace_link_spec.rb +47 -0
- data/spec/models/nested_role_response_spec.rb +53 -0
- data/spec/models/nested_role_spec.rb +53 -0
- data/spec/models/object_roles_response_spec.rb +41 -0
- data/spec/models/paginated_collection_version_search_list_response_list_spec.rb +53 -0
- data/spec/models/paginatedansible_ansible_namespace_metadata_response_list_spec.rb +59 -0
- data/spec/models/paginatedansible_collection_version_mark_response_list_spec.rb +59 -0
- data/spec/models/patchedansible_ansible_namespace_metadata_spec.rb +77 -0
- data/spec/models/patchedansible_ansible_repository_spec.rb +6 -0
- data/spec/models/patchedansible_git_remote_spec.rb +17 -17
- data/spec/models/progress_report_response_spec.rb +71 -0
- data/spec/models/repository_response_spec.rb +89 -0
- data/spec/models/repository_spec.rb +65 -0
- data/spec/models/task_response_spec.rb +125 -0
- data/spec/models/task_spec.rb +47 -0
- data/spec/models/unpaginated_collection_version_response_spec.rb +6 -0
- metadata +241 -113
@@ -0,0 +1,309 @@
|
|
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
|
+
# Base serializer for use with :class:`pulpcore.app.models.Model` This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
|
17
|
+
class RepositoryResponse
|
18
|
+
attr_accessor :pulp_href
|
19
|
+
|
20
|
+
# Timestamp of creation.
|
21
|
+
attr_accessor :pulp_created
|
22
|
+
|
23
|
+
attr_accessor :versions_href
|
24
|
+
|
25
|
+
attr_accessor :pulp_labels
|
26
|
+
|
27
|
+
attr_accessor :latest_version_href
|
28
|
+
|
29
|
+
# A unique name for this repository.
|
30
|
+
attr_accessor :name
|
31
|
+
|
32
|
+
# An optional description.
|
33
|
+
attr_accessor :description
|
34
|
+
|
35
|
+
# Retain X versions of the repository. Default is null which retains all versions.
|
36
|
+
attr_accessor :retain_repo_versions
|
37
|
+
|
38
|
+
# An optional remote to use by default when syncing.
|
39
|
+
attr_accessor :remote
|
40
|
+
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
42
|
+
def self.attribute_map
|
43
|
+
{
|
44
|
+
:'pulp_href' => :'pulp_href',
|
45
|
+
:'pulp_created' => :'pulp_created',
|
46
|
+
:'versions_href' => :'versions_href',
|
47
|
+
:'pulp_labels' => :'pulp_labels',
|
48
|
+
:'latest_version_href' => :'latest_version_href',
|
49
|
+
:'name' => :'name',
|
50
|
+
:'description' => :'description',
|
51
|
+
:'retain_repo_versions' => :'retain_repo_versions',
|
52
|
+
:'remote' => :'remote'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute type mapping.
|
57
|
+
def self.openapi_types
|
58
|
+
{
|
59
|
+
:'pulp_href' => :'String',
|
60
|
+
:'pulp_created' => :'DateTime',
|
61
|
+
:'versions_href' => :'String',
|
62
|
+
:'pulp_labels' => :'Hash<String, String>',
|
63
|
+
:'latest_version_href' => :'String',
|
64
|
+
:'name' => :'String',
|
65
|
+
:'description' => :'String',
|
66
|
+
:'retain_repo_versions' => :'Integer',
|
67
|
+
:'remote' => :'String'
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
# List of attributes with nullable: true
|
72
|
+
def self.openapi_nullable
|
73
|
+
Set.new([
|
74
|
+
:'description',
|
75
|
+
:'retain_repo_versions',
|
76
|
+
:'remote'
|
77
|
+
])
|
78
|
+
end
|
79
|
+
|
80
|
+
# Initializes the object
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
def initialize(attributes = {})
|
83
|
+
if (!attributes.is_a?(Hash))
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::RepositoryResponse` initialize method"
|
85
|
+
end
|
86
|
+
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
88
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
89
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
90
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::RepositoryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
91
|
+
end
|
92
|
+
h[k.to_sym] = v
|
93
|
+
}
|
94
|
+
|
95
|
+
if attributes.key?(:'pulp_href')
|
96
|
+
self.pulp_href = attributes[:'pulp_href']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'pulp_created')
|
100
|
+
self.pulp_created = attributes[:'pulp_created']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'versions_href')
|
104
|
+
self.versions_href = attributes[:'versions_href']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'pulp_labels')
|
108
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
109
|
+
self.pulp_labels = value
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'latest_version_href')
|
114
|
+
self.latest_version_href = attributes[:'latest_version_href']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'name')
|
118
|
+
self.name = attributes[:'name']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'description')
|
122
|
+
self.description = attributes[:'description']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'retain_repo_versions')
|
126
|
+
self.retain_repo_versions = attributes[:'retain_repo_versions']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'remote')
|
130
|
+
self.remote = attributes[:'remote']
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
135
|
+
# @return Array for valid properties with the reasons
|
136
|
+
def list_invalid_properties
|
137
|
+
invalid_properties = Array.new
|
138
|
+
if @name.nil?
|
139
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
140
|
+
end
|
141
|
+
|
142
|
+
if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
143
|
+
invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
|
144
|
+
end
|
145
|
+
|
146
|
+
invalid_properties
|
147
|
+
end
|
148
|
+
|
149
|
+
# Check to see if the all the properties in the model are valid
|
150
|
+
# @return true if the model is valid
|
151
|
+
def valid?
|
152
|
+
return false if @name.nil?
|
153
|
+
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
154
|
+
true
|
155
|
+
end
|
156
|
+
|
157
|
+
# Custom attribute writer method with validation
|
158
|
+
# @param [Object] retain_repo_versions Value to be assigned
|
159
|
+
def retain_repo_versions=(retain_repo_versions)
|
160
|
+
if !retain_repo_versions.nil? && retain_repo_versions < 1
|
161
|
+
fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
|
162
|
+
end
|
163
|
+
|
164
|
+
@retain_repo_versions = retain_repo_versions
|
165
|
+
end
|
166
|
+
|
167
|
+
# Checks equality by comparing each attribute.
|
168
|
+
# @param [Object] Object to be compared
|
169
|
+
def ==(o)
|
170
|
+
return true if self.equal?(o)
|
171
|
+
self.class == o.class &&
|
172
|
+
pulp_href == o.pulp_href &&
|
173
|
+
pulp_created == o.pulp_created &&
|
174
|
+
versions_href == o.versions_href &&
|
175
|
+
pulp_labels == o.pulp_labels &&
|
176
|
+
latest_version_href == o.latest_version_href &&
|
177
|
+
name == o.name &&
|
178
|
+
description == o.description &&
|
179
|
+
retain_repo_versions == o.retain_repo_versions &&
|
180
|
+
remote == o.remote
|
181
|
+
end
|
182
|
+
|
183
|
+
# @see the `==` method
|
184
|
+
# @param [Object] Object to be compared
|
185
|
+
def eql?(o)
|
186
|
+
self == o
|
187
|
+
end
|
188
|
+
|
189
|
+
# Calculates hash code according to all attributes.
|
190
|
+
# @return [Integer] Hash code
|
191
|
+
def hash
|
192
|
+
[pulp_href, pulp_created, versions_href, pulp_labels, latest_version_href, name, description, retain_repo_versions, remote].hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Builds the object from hash
|
196
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
197
|
+
# @return [Object] Returns the model itself
|
198
|
+
def self.build_from_hash(attributes)
|
199
|
+
new.build_from_hash(attributes)
|
200
|
+
end
|
201
|
+
|
202
|
+
# Builds the object from hash
|
203
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
204
|
+
# @return [Object] Returns the model itself
|
205
|
+
def build_from_hash(attributes)
|
206
|
+
return nil unless attributes.is_a?(Hash)
|
207
|
+
self.class.openapi_types.each_pair do |key, type|
|
208
|
+
if type =~ /\AArray<(.*)>/i
|
209
|
+
# check to ensure the input is an array given that the attribute
|
210
|
+
# is documented as an array but the input is not
|
211
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
212
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
213
|
+
end
|
214
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
215
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
216
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
217
|
+
end
|
218
|
+
|
219
|
+
self
|
220
|
+
end
|
221
|
+
|
222
|
+
# Deserializes the data based on type
|
223
|
+
# @param string type Data type
|
224
|
+
# @param string value Value to be deserialized
|
225
|
+
# @return [Object] Deserialized data
|
226
|
+
def _deserialize(type, value)
|
227
|
+
case type.to_sym
|
228
|
+
when :DateTime
|
229
|
+
DateTime.parse(value)
|
230
|
+
when :Date
|
231
|
+
Date.parse(value)
|
232
|
+
when :String
|
233
|
+
value.to_s
|
234
|
+
when :Integer
|
235
|
+
value.to_i
|
236
|
+
when :Float
|
237
|
+
value.to_f
|
238
|
+
when :Boolean
|
239
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
240
|
+
true
|
241
|
+
else
|
242
|
+
false
|
243
|
+
end
|
244
|
+
when :Object
|
245
|
+
# generic object (usually a Hash), return directly
|
246
|
+
value
|
247
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
248
|
+
inner_type = Regexp.last_match[:inner_type]
|
249
|
+
value.map { |v| _deserialize(inner_type, v) }
|
250
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
251
|
+
k_type = Regexp.last_match[:k_type]
|
252
|
+
v_type = Regexp.last_match[:v_type]
|
253
|
+
{}.tap do |hash|
|
254
|
+
value.each do |k, v|
|
255
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
256
|
+
end
|
257
|
+
end
|
258
|
+
else # model
|
259
|
+
PulpAnsibleClient.const_get(type).build_from_hash(value)
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
# Returns the string representation of the object
|
264
|
+
# @return [String] String presentation of the object
|
265
|
+
def to_s
|
266
|
+
to_hash.to_s
|
267
|
+
end
|
268
|
+
|
269
|
+
# to_body is an alias to to_hash (backward compatibility)
|
270
|
+
# @return [Hash] Returns the object in the form of hash
|
271
|
+
def to_body
|
272
|
+
to_hash
|
273
|
+
end
|
274
|
+
|
275
|
+
# Returns the object in the form of hash
|
276
|
+
# @return [Hash] Returns the object in the form of hash
|
277
|
+
def to_hash
|
278
|
+
hash = {}
|
279
|
+
self.class.attribute_map.each_pair do |attr, param|
|
280
|
+
value = self.send(attr)
|
281
|
+
if value.nil?
|
282
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
283
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
284
|
+
end
|
285
|
+
|
286
|
+
hash[param] = _to_hash(value)
|
287
|
+
end
|
288
|
+
hash
|
289
|
+
end
|
290
|
+
|
291
|
+
# Outputs non-array value in the form of hash
|
292
|
+
# For object, use to_hash. Otherwise, just return the value
|
293
|
+
# @param [Object] value Any valid value
|
294
|
+
# @return [Hash] Returns the value in the form of hash
|
295
|
+
def _to_hash(value)
|
296
|
+
if value.is_a?(Array)
|
297
|
+
value.compact.map { |v| _to_hash(v) }
|
298
|
+
elsif value.is_a?(Hash)
|
299
|
+
{}.tap do |hash|
|
300
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
301
|
+
end
|
302
|
+
elsif value.respond_to? :to_hash
|
303
|
+
value.to_hash
|
304
|
+
else
|
305
|
+
value
|
306
|
+
end
|
307
|
+
end
|
308
|
+
end
|
309
|
+
end
|
@@ -0,0 +1,266 @@
|
|
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
|
+
# Base serializer for use with :class:`pulpcore.app.models.Model` This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
|
17
|
+
class Task
|
18
|
+
# The name of task.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# The logging correlation id associated with this task
|
22
|
+
attr_accessor :logging_cid
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'name' => :'name',
|
28
|
+
:'logging_cid' => :'logging_cid'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'name' => :'String',
|
36
|
+
:'logging_cid' => :'String'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# List of attributes with nullable: true
|
41
|
+
def self.openapi_nullable
|
42
|
+
Set.new([
|
43
|
+
])
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::Task` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::Task`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
|
+
end
|
58
|
+
h[k.to_sym] = v
|
59
|
+
}
|
60
|
+
|
61
|
+
if attributes.key?(:'name')
|
62
|
+
self.name = attributes[:'name']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.key?(:'logging_cid')
|
66
|
+
self.logging_cid = attributes[:'logging_cid']
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
71
|
+
# @return Array for valid properties with the reasons
|
72
|
+
def list_invalid_properties
|
73
|
+
invalid_properties = Array.new
|
74
|
+
if @name.nil?
|
75
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
76
|
+
end
|
77
|
+
|
78
|
+
if @name.to_s.length < 1
|
79
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
80
|
+
end
|
81
|
+
|
82
|
+
if @logging_cid.nil?
|
83
|
+
invalid_properties.push('invalid value for "logging_cid", logging_cid cannot be nil.')
|
84
|
+
end
|
85
|
+
|
86
|
+
if @logging_cid.to_s.length < 1
|
87
|
+
invalid_properties.push('invalid value for "logging_cid", the character length must be great than or equal to 1.')
|
88
|
+
end
|
89
|
+
|
90
|
+
invalid_properties
|
91
|
+
end
|
92
|
+
|
93
|
+
# Check to see if the all the properties in the model are valid
|
94
|
+
# @return true if the model is valid
|
95
|
+
def valid?
|
96
|
+
return false if @name.nil?
|
97
|
+
return false if @name.to_s.length < 1
|
98
|
+
return false if @logging_cid.nil?
|
99
|
+
return false if @logging_cid.to_s.length < 1
|
100
|
+
true
|
101
|
+
end
|
102
|
+
|
103
|
+
# Custom attribute writer method with validation
|
104
|
+
# @param [Object] name Value to be assigned
|
105
|
+
def name=(name)
|
106
|
+
if name.nil?
|
107
|
+
fail ArgumentError, 'name cannot be nil'
|
108
|
+
end
|
109
|
+
|
110
|
+
if name.to_s.length < 1
|
111
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
112
|
+
end
|
113
|
+
|
114
|
+
@name = name
|
115
|
+
end
|
116
|
+
|
117
|
+
# Custom attribute writer method with validation
|
118
|
+
# @param [Object] logging_cid Value to be assigned
|
119
|
+
def logging_cid=(logging_cid)
|
120
|
+
if logging_cid.nil?
|
121
|
+
fail ArgumentError, 'logging_cid cannot be nil'
|
122
|
+
end
|
123
|
+
|
124
|
+
if logging_cid.to_s.length < 1
|
125
|
+
fail ArgumentError, 'invalid value for "logging_cid", the character length must be great than or equal to 1.'
|
126
|
+
end
|
127
|
+
|
128
|
+
@logging_cid = logging_cid
|
129
|
+
end
|
130
|
+
|
131
|
+
# Checks equality by comparing each attribute.
|
132
|
+
# @param [Object] Object to be compared
|
133
|
+
def ==(o)
|
134
|
+
return true if self.equal?(o)
|
135
|
+
self.class == o.class &&
|
136
|
+
name == o.name &&
|
137
|
+
logging_cid == o.logging_cid
|
138
|
+
end
|
139
|
+
|
140
|
+
# @see the `==` method
|
141
|
+
# @param [Object] Object to be compared
|
142
|
+
def eql?(o)
|
143
|
+
self == o
|
144
|
+
end
|
145
|
+
|
146
|
+
# Calculates hash code according to all attributes.
|
147
|
+
# @return [Integer] Hash code
|
148
|
+
def hash
|
149
|
+
[name, logging_cid].hash
|
150
|
+
end
|
151
|
+
|
152
|
+
# Builds the object from hash
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
+
# @return [Object] Returns the model itself
|
155
|
+
def self.build_from_hash(attributes)
|
156
|
+
new.build_from_hash(attributes)
|
157
|
+
end
|
158
|
+
|
159
|
+
# Builds the object from hash
|
160
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
161
|
+
# @return [Object] Returns the model itself
|
162
|
+
def build_from_hash(attributes)
|
163
|
+
return nil unless attributes.is_a?(Hash)
|
164
|
+
self.class.openapi_types.each_pair do |key, type|
|
165
|
+
if type =~ /\AArray<(.*)>/i
|
166
|
+
# check to ensure the input is an array given that the attribute
|
167
|
+
# is documented as an array but the input is not
|
168
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
169
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
170
|
+
end
|
171
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
172
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
173
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
174
|
+
end
|
175
|
+
|
176
|
+
self
|
177
|
+
end
|
178
|
+
|
179
|
+
# Deserializes the data based on type
|
180
|
+
# @param string type Data type
|
181
|
+
# @param string value Value to be deserialized
|
182
|
+
# @return [Object] Deserialized data
|
183
|
+
def _deserialize(type, value)
|
184
|
+
case type.to_sym
|
185
|
+
when :DateTime
|
186
|
+
DateTime.parse(value)
|
187
|
+
when :Date
|
188
|
+
Date.parse(value)
|
189
|
+
when :String
|
190
|
+
value.to_s
|
191
|
+
when :Integer
|
192
|
+
value.to_i
|
193
|
+
when :Float
|
194
|
+
value.to_f
|
195
|
+
when :Boolean
|
196
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
197
|
+
true
|
198
|
+
else
|
199
|
+
false
|
200
|
+
end
|
201
|
+
when :Object
|
202
|
+
# generic object (usually a Hash), return directly
|
203
|
+
value
|
204
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
205
|
+
inner_type = Regexp.last_match[:inner_type]
|
206
|
+
value.map { |v| _deserialize(inner_type, v) }
|
207
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
208
|
+
k_type = Regexp.last_match[:k_type]
|
209
|
+
v_type = Regexp.last_match[:v_type]
|
210
|
+
{}.tap do |hash|
|
211
|
+
value.each do |k, v|
|
212
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
else # model
|
216
|
+
PulpAnsibleClient.const_get(type).build_from_hash(value)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the string representation of the object
|
221
|
+
# @return [String] String presentation of the object
|
222
|
+
def to_s
|
223
|
+
to_hash.to_s
|
224
|
+
end
|
225
|
+
|
226
|
+
# to_body is an alias to to_hash (backward compatibility)
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
228
|
+
def to_body
|
229
|
+
to_hash
|
230
|
+
end
|
231
|
+
|
232
|
+
# Returns the object in the form of hash
|
233
|
+
# @return [Hash] Returns the object in the form of hash
|
234
|
+
def to_hash
|
235
|
+
hash = {}
|
236
|
+
self.class.attribute_map.each_pair do |attr, param|
|
237
|
+
value = self.send(attr)
|
238
|
+
if value.nil?
|
239
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
240
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
241
|
+
end
|
242
|
+
|
243
|
+
hash[param] = _to_hash(value)
|
244
|
+
end
|
245
|
+
hash
|
246
|
+
end
|
247
|
+
|
248
|
+
# Outputs non-array value in the form of hash
|
249
|
+
# For object, use to_hash. Otherwise, just return the value
|
250
|
+
# @param [Object] value Any valid value
|
251
|
+
# @return [Hash] Returns the value in the form of hash
|
252
|
+
def _to_hash(value)
|
253
|
+
if value.is_a?(Array)
|
254
|
+
value.compact.map { |v| _to_hash(v) }
|
255
|
+
elsif value.is_a?(Hash)
|
256
|
+
{}.tap do |hash|
|
257
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
258
|
+
end
|
259
|
+
elsif value.respond_to? :to_hash
|
260
|
+
value.to_hash
|
261
|
+
else
|
262
|
+
value
|
263
|
+
end
|
264
|
+
end
|
265
|
+
end
|
266
|
+
end
|