pulpcore_client 3.5.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +88 -44
- data/docs/AccessPoliciesApi.md +244 -0
- data/docs/AccessPolicy.md +21 -0
- data/docs/AccessPolicyResponse.md +25 -0
- data/docs/Artifact.md +2 -6
- data/docs/ArtifactResponse.md +35 -0
- data/docs/ArtifactsApi.md +40 -34
- data/docs/{ContentAppStatus.md → ContentAppStatusResponse.md} +2 -2
- data/docs/{DatabaseConnection.md → DatabaseConnectionResponse.md} +2 -2
- data/docs/ExportersCoreExportsApi.md +33 -33
- data/docs/ExportersPulpApi.md +51 -51
- data/docs/Group.md +17 -0
- data/docs/{GroupProgressReport.md → GroupProgressReportResponse.md} +2 -2
- data/docs/GroupResponse.md +21 -0
- data/docs/GroupUser.md +17 -0
- data/docs/GroupUserResponse.md +19 -0
- data/docs/GroupsApi.md +351 -0
- data/docs/GroupsModelPermissionsApi.md +128 -0
- data/docs/GroupsObjectPermissionsApi.md +247 -0
- data/docs/GroupsUsersApi.md +183 -0
- data/docs/{Import.md → ImportResponse.md} +2 -2
- data/docs/ImportersCoreImportsApi.md +33 -33
- data/docs/ImportersPulpApi.md +51 -51
- data/docs/InlineResponse200.md +3 -3
- data/docs/InlineResponse2001.md +3 -3
- data/docs/InlineResponse20010.md +23 -0
- data/docs/InlineResponse20011.md +23 -0
- data/docs/InlineResponse20012.md +23 -0
- data/docs/InlineResponse20013.md +23 -0
- data/docs/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/OrphansApi.md +2 -2
- data/docs/PatchedAccessPolicy.md +21 -0
- data/docs/PatchedGroup.md +17 -0
- data/docs/PatchedPulpExporter.md +23 -0
- data/docs/PatchedPulpImporter.md +19 -0
- data/docs/{TaskCancel.md → PatchedTaskCancel.md} +3 -3
- data/docs/PermissionResponse.md +23 -0
- data/docs/{ProgressReport.md → ProgressReportResponse.md} +2 -2
- data/docs/PulpExport.md +11 -11
- data/docs/PulpExportResponse.md +27 -0
- data/docs/PulpExporter.md +1 -5
- data/docs/PulpExporterResponse.md +27 -0
- data/docs/PulpImport.md +4 -2
- data/docs/PulpImporter.md +2 -6
- data/docs/PulpImporterResponse.md +23 -0
- data/docs/{RedisConnection.md → RedisConnectionResponse.md} +2 -2
- data/docs/{SigningService.md → SigningServiceResponse.md} +2 -2
- data/docs/SigningServicesApi.md +14 -14
- data/docs/StatusApi.md +8 -22
- data/docs/StatusResponse.md +27 -0
- data/docs/{Storage.md → StorageResponse.md} +2 -2
- data/docs/{TaskGroup.md → TaskGroupResponse.md} +3 -3
- data/docs/TaskGroupsApi.md +16 -12
- data/docs/{Task.md → TaskResponse.md} +5 -7
- data/docs/TasksApi.md +144 -88
- data/docs/Upload.md +1 -7
- data/docs/UploadChunk.md +2 -6
- data/docs/UploadChunkResponse.md +19 -0
- data/docs/{UploadDetail.md → UploadDetailResponse.md} +3 -3
- data/docs/UploadResponse.md +23 -0
- data/docs/UploadsApi.md +42 -40
- data/docs/UserGroupResponse.md +19 -0
- data/docs/UserResponse.md +35 -0
- data/docs/UsersApi.md +191 -0
- data/docs/{Version.md → VersionResponse.md} +2 -2
- data/docs/{Worker.md → WorkerResponse.md} +2 -2
- data/docs/WorkersApi.md +36 -32
- data/lib/pulpcore_client/api/access_policies_api.rb +301 -0
- data/lib/pulpcore_client/api/artifacts_api.rb +47 -65
- data/lib/pulpcore_client/api/exporters_core_exports_api.rb +51 -51
- data/lib/pulpcore_client/api/exporters_pulp_api.rb +71 -71
- data/lib/pulpcore_client/api/groups_api.rb +425 -0
- data/lib/pulpcore_client/api/groups_model_permissions_api.rb +161 -0
- data/lib/pulpcore_client/api/groups_object_permissions_api.rb +295 -0
- data/lib/pulpcore_client/api/groups_users_api.rb +229 -0
- data/lib/pulpcore_client/api/importers_core_imports_api.rb +51 -51
- data/lib/pulpcore_client/api/importers_pulp_api.rb +71 -71
- data/lib/pulpcore_client/api/orphans_api.rb +3 -3
- data/lib/pulpcore_client/api/signing_services_api.rb +18 -18
- data/lib/pulpcore_client/api/status_api.rb +11 -17
- data/lib/pulpcore_client/api/task_groups_api.rb +19 -15
- data/lib/pulpcore_client/api/tasks_api.rb +203 -125
- data/lib/pulpcore_client/api/uploads_api.rb +60 -66
- data/lib/pulpcore_client/api/users_api.rb +227 -0
- data/lib/pulpcore_client/api/workers_api.rb +46 -42
- data/lib/pulpcore_client/api_client.rb +2 -2
- data/lib/pulpcore_client/api_error.rb +2 -2
- data/lib/pulpcore_client/configuration.rb +3 -3
- data/lib/pulpcore_client/models/access_policy.rb +247 -0
- data/lib/pulpcore_client/models/access_policy_response.rb +266 -0
- data/lib/pulpcore_client/models/artifact.rb +8 -111
- data/lib/pulpcore_client/models/artifact_response.rb +308 -0
- data/lib/pulpcore_client/models/async_operation_response.rb +3 -2
- data/lib/pulpcore_client/models/{content_app_status.rb → content_app_status_response.rb} +6 -21
- data/lib/pulpcore_client/models/{database_connection.rb → database_connection_response.rb} +6 -6
- data/lib/pulpcore_client/models/group.rb +232 -0
- data/lib/pulpcore_client/models/{group_progress_report.rb → group_progress_report_response.rb} +6 -50
- data/lib/pulpcore_client/models/group_response.rb +250 -0
- data/lib/pulpcore_client/models/group_user.rb +232 -0
- data/lib/pulpcore_client/models/group_user_response.rb +241 -0
- data/lib/pulpcore_client/models/{import.rb → import_response.rb} +6 -5
- data/lib/pulpcore_client/models/inline_response200.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2001.rb +3 -13
- data/lib/pulpcore_client/models/inline_response20010.rb +237 -0
- data/lib/pulpcore_client/models/inline_response20011.rb +237 -0
- data/lib/pulpcore_client/models/inline_response20012.rb +237 -0
- data/lib/pulpcore_client/models/inline_response20013.rb +237 -0
- data/lib/pulpcore_client/models/inline_response20014.rb +237 -0
- data/lib/pulpcore_client/models/inline_response2002.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2003.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2004.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2005.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2006.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2007.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2008.rb +3 -13
- data/lib/pulpcore_client/models/inline_response2009.rb +3 -13
- data/lib/pulpcore_client/models/patched_access_policy.rb +232 -0
- data/lib/pulpcore_client/models/patched_group.rb +223 -0
- data/lib/pulpcore_client/models/patched_pulp_exporter.rb +240 -0
- data/lib/pulpcore_client/models/patched_pulp_importer.rb +218 -0
- data/lib/pulpcore_client/models/{task_cancel.rb → patched_task_cancel.rb} +6 -29
- data/lib/pulpcore_client/models/permission_response.rb +235 -0
- data/lib/pulpcore_client/models/{progress_report.rb → progress_report_response.rb} +6 -65
- data/lib/pulpcore_client/models/pulp_export.rb +50 -42
- data/lib/pulpcore_client/models/pulp_export_response.rb +260 -0
- data/lib/pulpcore_client/models/pulp_exporter.rb +4 -60
- data/lib/pulpcore_client/models/pulp_exporter_response.rb +274 -0
- data/lib/pulpcore_client/models/pulp_import.rb +17 -30
- data/lib/pulpcore_client/models/pulp_importer.rb +6 -45
- data/lib/pulpcore_client/models/pulp_importer_response.rb +242 -0
- data/lib/pulpcore_client/models/{redis_connection.rb → redis_connection_response.rb} +6 -6
- data/lib/pulpcore_client/models/{signing_service.rb → signing_service_response.rb} +6 -43
- data/lib/pulpcore_client/models/{status.rb → status_response.rb} +15 -11
- data/lib/pulpcore_client/models/{storage.rb → storage_response.rb} +6 -6
- data/lib/pulpcore_client/models/{task_group.rb → task_group_response.rb} +7 -25
- data/lib/pulpcore_client/models/{task.rb → task_response.rb} +13 -59
- data/lib/pulpcore_client/models/upload.rb +7 -35
- data/lib/pulpcore_client/models/upload_chunk.rb +11 -39
- data/lib/pulpcore_client/models/upload_chunk_response.rb +215 -0
- data/lib/pulpcore_client/models/upload_commit.rb +2 -21
- data/lib/pulpcore_client/models/{upload_detail.rb → upload_detail_response.rb} +7 -6
- data/lib/pulpcore_client/models/upload_response.rb +242 -0
- data/lib/pulpcore_client/models/user_group_response.rb +241 -0
- data/lib/pulpcore_client/models/user_response.rb +378 -0
- data/lib/pulpcore_client/models/{version.rb → version_response.rb} +6 -44
- data/lib/pulpcore_client/models/{worker.rb → worker_response.rb} +6 -21
- data/lib/pulpcore_client/version.rb +3 -3
- data/lib/pulpcore_client.rb +47 -17
- data/pulpcore_client.gemspec +4 -4
- data/spec/api/access_policies_api_spec.rb +91 -0
- data/spec/api/artifacts_api_spec.rb +18 -15
- data/spec/api/exporters_core_exports_api_spec.rb +10 -10
- data/spec/api/exporters_pulp_api_spec.rb +18 -18
- data/spec/api/groups_api_spec.rb +115 -0
- data/spec/api/groups_model_permissions_api_spec.rb +64 -0
- data/spec/api/groups_object_permissions_api_spec.rb +92 -0
- data/spec/api/groups_users_api_spec.rb +77 -0
- data/spec/api/importers_core_imports_api_spec.rb +10 -10
- data/spec/api/importers_pulp_api_spec.rb +18 -18
- data/spec/api/orphans_api_spec.rb +2 -2
- data/spec/api/signing_services_api_spec.rb +7 -7
- data/spec/api/status_api_spec.rb +5 -7
- data/spec/api/task_groups_api_spec.rb +8 -6
- data/spec/api/tasks_api_spec.rb +69 -42
- data/spec/api/uploads_api_spec.rb +14 -13
- data/spec/api/users_api_spec.rb +78 -0
- data/spec/api/workers_api_spec.rb +18 -16
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/access_policy_response_spec.rb +65 -0
- data/spec/models/access_policy_spec.rb +53 -0
- data/spec/models/artifact_response_spec.rb +95 -0
- data/spec/models/artifact_spec.rb +2 -14
- data/spec/models/async_operation_response_spec.rb +2 -2
- data/spec/models/{content_app_status_spec.rb → content_app_status_response_spec.rb} +8 -8
- data/spec/models/{database_connection_spec.rb → database_connection_response_spec.rb} +8 -8
- data/spec/models/{group_progress_report_spec.rb → group_progress_report_response_spec.rb} +8 -8
- data/spec/models/group_response_spec.rb +53 -0
- data/spec/models/group_spec.rb +41 -0
- data/spec/models/group_user_response_spec.rb +47 -0
- data/spec/models/group_user_spec.rb +41 -0
- data/spec/models/{import_spec.rb → import_response_spec.rb} +8 -8
- data/spec/models/inline_response20010_spec.rb +59 -0
- data/spec/models/inline_response20011_spec.rb +59 -0
- data/spec/models/inline_response20012_spec.rb +59 -0
- data/spec/models/inline_response20013_spec.rb +59 -0
- data/spec/models/inline_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/patched_access_policy_spec.rb +53 -0
- data/spec/models/patched_group_spec.rb +41 -0
- data/spec/models/patched_pulp_exporter_spec.rb +59 -0
- data/spec/models/patched_pulp_importer_spec.rb +47 -0
- data/spec/models/{task_cancel_spec.rb → patched_task_cancel_spec.rb} +8 -8
- data/spec/models/permission_response_spec.rb +59 -0
- data/spec/models/{progress_report_spec.rb → progress_report_response_spec.rb} +8 -8
- data/spec/models/pulp_export_response_spec.rb +71 -0
- data/spec/models/pulp_export_spec.rb +8 -8
- data/spec/models/pulp_exporter_response_spec.rb +71 -0
- data/spec/models/pulp_exporter_spec.rb +2 -14
- data/spec/models/pulp_import_spec.rb +8 -2
- data/spec/models/pulp_importer_response_spec.rb +59 -0
- data/spec/models/pulp_importer_spec.rb +2 -14
- data/spec/models/{redis_connection_spec.rb → redis_connection_response_spec.rb} +8 -8
- data/spec/models/{signing_service_spec.rb → signing_service_response_spec.rb} +8 -8
- data/spec/models/{status_spec.rb → status_response_spec.rb} +8 -8
- data/spec/models/{storage_spec.rb → storage_response_spec.rb} +8 -8
- data/spec/models/{task_group_spec.rb → task_group_response_spec.rb} +8 -8
- data/spec/models/{task_spec.rb → task_response_spec.rb} +8 -14
- data/spec/models/upload_chunk_response_spec.rb +47 -0
- data/spec/models/upload_chunk_spec.rb +2 -14
- data/spec/models/upload_commit_spec.rb +2 -2
- data/spec/models/{upload_detail_spec.rb → upload_detail_response_spec.rb} +8 -8
- data/spec/models/upload_response_spec.rb +59 -0
- data/spec/models/upload_spec.rb +2 -20
- data/spec/models/user_group_response_spec.rb +47 -0
- data/spec/models/user_response_spec.rb +95 -0
- data/spec/models/{version_spec.rb → version_response_spec.rb} +8 -8
- data/spec/models/{worker_spec.rb → worker_response_spec.rb} +8 -8
- data/spec/spec_helper.rb +2 -2
- metadata +204 -84
- data/docs/Status.md +0 -27
|
@@ -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.2.3
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module PulpcoreClient
|
|
16
|
+
# Serializer for AccessPolicy.
|
|
17
|
+
class AccessPolicyResponse
|
|
18
|
+
attr_accessor :pulp_href
|
|
19
|
+
|
|
20
|
+
# Timestamp of creation.
|
|
21
|
+
attr_accessor :pulp_created
|
|
22
|
+
|
|
23
|
+
# List of callables that define the new permissions to be created for new objects.
|
|
24
|
+
attr_accessor :permissions_assignment
|
|
25
|
+
|
|
26
|
+
# List of policy statements defining the policy.
|
|
27
|
+
attr_accessor :statements
|
|
28
|
+
|
|
29
|
+
# The name of ViewSet this AccessPolicy authorizes.
|
|
30
|
+
attr_accessor :viewset_name
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'pulp_href' => :'pulp_href',
|
|
36
|
+
:'pulp_created' => :'pulp_created',
|
|
37
|
+
:'permissions_assignment' => :'permissions_assignment',
|
|
38
|
+
:'statements' => :'statements',
|
|
39
|
+
:'viewset_name' => :'viewset_name'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'pulp_href' => :'String',
|
|
47
|
+
:'pulp_created' => :'DateTime',
|
|
48
|
+
:'permissions_assignment' => :'Array<Object>',
|
|
49
|
+
:'statements' => :'Array<Object>',
|
|
50
|
+
:'viewset_name' => :'String'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# List of attributes with nullable: true
|
|
55
|
+
def self.openapi_nullable
|
|
56
|
+
Set.new([
|
|
57
|
+
])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Initializes the object
|
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
62
|
+
def initialize(attributes = {})
|
|
63
|
+
if (!attributes.is_a?(Hash))
|
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::AccessPolicyResponse` initialize method"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::AccessPolicyResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'pulp_href')
|
|
76
|
+
self.pulp_href = attributes[:'pulp_href']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'pulp_created')
|
|
80
|
+
self.pulp_created = attributes[:'pulp_created']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'permissions_assignment')
|
|
84
|
+
if (value = attributes[:'permissions_assignment']).is_a?(Array)
|
|
85
|
+
self.permissions_assignment = value
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'statements')
|
|
90
|
+
if (value = attributes[:'statements']).is_a?(Array)
|
|
91
|
+
self.statements = value
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'viewset_name')
|
|
96
|
+
self.viewset_name = attributes[:'viewset_name']
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
101
|
+
# @return Array for valid properties with the reasons
|
|
102
|
+
def list_invalid_properties
|
|
103
|
+
invalid_properties = Array.new
|
|
104
|
+
if @permissions_assignment.nil?
|
|
105
|
+
invalid_properties.push('invalid value for "permissions_assignment", permissions_assignment cannot be nil.')
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if @statements.nil?
|
|
109
|
+
invalid_properties.push('invalid value for "statements", statements cannot be nil.')
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if @viewset_name.nil?
|
|
113
|
+
invalid_properties.push('invalid value for "viewset_name", viewset_name cannot be nil.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
invalid_properties
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Check to see if the all the properties in the model are valid
|
|
120
|
+
# @return true if the model is valid
|
|
121
|
+
def valid?
|
|
122
|
+
return false if @permissions_assignment.nil?
|
|
123
|
+
return false if @statements.nil?
|
|
124
|
+
return false if @viewset_name.nil?
|
|
125
|
+
true
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
pulp_href == o.pulp_href &&
|
|
134
|
+
pulp_created == o.pulp_created &&
|
|
135
|
+
permissions_assignment == o.permissions_assignment &&
|
|
136
|
+
statements == o.statements &&
|
|
137
|
+
viewset_name == o.viewset_name
|
|
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
|
+
[pulp_href, pulp_created, permissions_assignment, statements, viewset_name].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
|
+
PulpcoreClient.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
|
|
@@ -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 PulpcoreClient
|
|
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.
|
|
16
17
|
class Artifact
|
|
17
|
-
attr_accessor :pulp_href
|
|
18
|
-
|
|
19
|
-
# Timestamp of creation.
|
|
20
|
-
attr_accessor :pulp_created
|
|
21
|
-
|
|
22
18
|
# The stored file.
|
|
23
19
|
attr_accessor :file
|
|
24
20
|
|
|
@@ -46,8 +42,6 @@ module PulpcoreClient
|
|
|
46
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
43
|
def self.attribute_map
|
|
48
44
|
{
|
|
49
|
-
:'pulp_href' => :'pulp_href',
|
|
50
|
-
:'pulp_created' => :'pulp_created',
|
|
51
45
|
:'file' => :'file',
|
|
52
46
|
:'size' => :'size',
|
|
53
47
|
:'md5' => :'md5',
|
|
@@ -62,9 +56,7 @@ module PulpcoreClient
|
|
|
62
56
|
# Attribute type mapping.
|
|
63
57
|
def self.openapi_types
|
|
64
58
|
{
|
|
65
|
-
:'
|
|
66
|
-
:'pulp_created' => :'DateTime',
|
|
67
|
-
:'file' => :'String',
|
|
59
|
+
:'file' => :'File',
|
|
68
60
|
:'size' => :'Integer',
|
|
69
61
|
:'md5' => :'String',
|
|
70
62
|
:'sha1' => :'String',
|
|
@@ -102,14 +94,6 @@ module PulpcoreClient
|
|
|
102
94
|
h[k.to_sym] = v
|
|
103
95
|
}
|
|
104
96
|
|
|
105
|
-
if attributes.key?(:'pulp_href')
|
|
106
|
-
self.pulp_href = attributes[:'pulp_href']
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
if attributes.key?(:'pulp_created')
|
|
110
|
-
self.pulp_created = attributes[:'pulp_created']
|
|
111
|
-
end
|
|
112
|
-
|
|
113
97
|
if attributes.key?(:'file')
|
|
114
98
|
self.file = attributes[:'file']
|
|
115
99
|
end
|
|
@@ -147,28 +131,8 @@ module PulpcoreClient
|
|
|
147
131
|
# @return Array for valid properties with the reasons
|
|
148
132
|
def list_invalid_properties
|
|
149
133
|
invalid_properties = Array.new
|
|
150
|
-
if
|
|
151
|
-
invalid_properties.push('invalid value for "
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
if !@sha1.nil? && @sha1.to_s.length < 1
|
|
155
|
-
invalid_properties.push('invalid value for "sha1", the character length must be great than or equal to 1.')
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
if !@sha224.nil? && @sha224.to_s.length < 1
|
|
159
|
-
invalid_properties.push('invalid value for "sha224", the character length must be great than or equal to 1.')
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
if !@sha256.nil? && @sha256.to_s.length < 1
|
|
163
|
-
invalid_properties.push('invalid value for "sha256", the character length must be great than or equal to 1.')
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
if !@sha384.nil? && @sha384.to_s.length < 1
|
|
167
|
-
invalid_properties.push('invalid value for "sha384", the character length must be great than or equal to 1.')
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
if !@sha512.nil? && @sha512.to_s.length < 1
|
|
171
|
-
invalid_properties.push('invalid value for "sha512", the character length must be great than or equal to 1.')
|
|
134
|
+
if @file.nil?
|
|
135
|
+
invalid_properties.push('invalid value for "file", file cannot be nil.')
|
|
172
136
|
end
|
|
173
137
|
|
|
174
138
|
invalid_properties
|
|
@@ -177,82 +141,15 @@ module PulpcoreClient
|
|
|
177
141
|
# Check to see if the all the properties in the model are valid
|
|
178
142
|
# @return true if the model is valid
|
|
179
143
|
def valid?
|
|
180
|
-
return false if
|
|
181
|
-
return false if !@sha1.nil? && @sha1.to_s.length < 1
|
|
182
|
-
return false if !@sha224.nil? && @sha224.to_s.length < 1
|
|
183
|
-
return false if !@sha256.nil? && @sha256.to_s.length < 1
|
|
184
|
-
return false if !@sha384.nil? && @sha384.to_s.length < 1
|
|
185
|
-
return false if !@sha512.nil? && @sha512.to_s.length < 1
|
|
144
|
+
return false if @file.nil?
|
|
186
145
|
true
|
|
187
146
|
end
|
|
188
147
|
|
|
189
|
-
# Custom attribute writer method with validation
|
|
190
|
-
# @param [Object] md5 Value to be assigned
|
|
191
|
-
def md5=(md5)
|
|
192
|
-
if !md5.nil? && md5.to_s.length < 1
|
|
193
|
-
fail ArgumentError, 'invalid value for "md5", the character length must be great than or equal to 1.'
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
@md5 = md5
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
# Custom attribute writer method with validation
|
|
200
|
-
# @param [Object] sha1 Value to be assigned
|
|
201
|
-
def sha1=(sha1)
|
|
202
|
-
if !sha1.nil? && sha1.to_s.length < 1
|
|
203
|
-
fail ArgumentError, 'invalid value for "sha1", the character length must be great than or equal to 1.'
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
@sha1 = sha1
|
|
207
|
-
end
|
|
208
|
-
|
|
209
|
-
# Custom attribute writer method with validation
|
|
210
|
-
# @param [Object] sha224 Value to be assigned
|
|
211
|
-
def sha224=(sha224)
|
|
212
|
-
if !sha224.nil? && sha224.to_s.length < 1
|
|
213
|
-
fail ArgumentError, 'invalid value for "sha224", the character length must be great than or equal to 1.'
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
@sha224 = sha224
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
# Custom attribute writer method with validation
|
|
220
|
-
# @param [Object] sha256 Value to be assigned
|
|
221
|
-
def sha256=(sha256)
|
|
222
|
-
if !sha256.nil? && sha256.to_s.length < 1
|
|
223
|
-
fail ArgumentError, 'invalid value for "sha256", the character length must be great than or equal to 1.'
|
|
224
|
-
end
|
|
225
|
-
|
|
226
|
-
@sha256 = sha256
|
|
227
|
-
end
|
|
228
|
-
|
|
229
|
-
# Custom attribute writer method with validation
|
|
230
|
-
# @param [Object] sha384 Value to be assigned
|
|
231
|
-
def sha384=(sha384)
|
|
232
|
-
if !sha384.nil? && sha384.to_s.length < 1
|
|
233
|
-
fail ArgumentError, 'invalid value for "sha384", the character length must be great than or equal to 1.'
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
@sha384 = sha384
|
|
237
|
-
end
|
|
238
|
-
|
|
239
|
-
# Custom attribute writer method with validation
|
|
240
|
-
# @param [Object] sha512 Value to be assigned
|
|
241
|
-
def sha512=(sha512)
|
|
242
|
-
if !sha512.nil? && sha512.to_s.length < 1
|
|
243
|
-
fail ArgumentError, 'invalid value for "sha512", the character length must be great than or equal to 1.'
|
|
244
|
-
end
|
|
245
|
-
|
|
246
|
-
@sha512 = sha512
|
|
247
|
-
end
|
|
248
|
-
|
|
249
148
|
# Checks equality by comparing each attribute.
|
|
250
149
|
# @param [Object] Object to be compared
|
|
251
150
|
def ==(o)
|
|
252
151
|
return true if self.equal?(o)
|
|
253
152
|
self.class == o.class &&
|
|
254
|
-
pulp_href == o.pulp_href &&
|
|
255
|
-
pulp_created == o.pulp_created &&
|
|
256
153
|
file == o.file &&
|
|
257
154
|
size == o.size &&
|
|
258
155
|
md5 == o.md5 &&
|
|
@@ -272,7 +169,7 @@ module PulpcoreClient
|
|
|
272
169
|
# Calculates hash code according to all attributes.
|
|
273
170
|
# @return [Integer] Hash code
|
|
274
171
|
def hash
|
|
275
|
-
[
|
|
172
|
+
[file, size, md5, sha1, sha224, sha256, sha384, sha512].hash
|
|
276
173
|
end
|
|
277
174
|
|
|
278
175
|
# Builds the object from hash
|