pulpcore_client 3.5.0 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +88 -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,218 @@
|
|
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 PulpImporters.
|
17
|
+
class PatchedPulpImporter
|
18
|
+
# Unique name of the Importer.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# Mapping of repo names in an export file to the repo names in Pulp. For example, if the export has a repo named 'foo' and the repo to import content into was 'bar', the mapping would be \"{'foo': 'bar'}\".
|
22
|
+
attr_accessor :repo_mapping
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'name' => :'name',
|
28
|
+
:'repo_mapping' => :'repo_mapping'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'name' => :'String',
|
36
|
+
:'repo_mapping' => :'Object'
|
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 `PulpcoreClient::PatchedPulpImporter` 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 `PulpcoreClient::PatchedPulpImporter`. 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?(:'repo_mapping')
|
66
|
+
self.repo_mapping = attributes[:'repo_mapping']
|
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
|
+
invalid_properties
|
75
|
+
end
|
76
|
+
|
77
|
+
# Check to see if the all the properties in the model are valid
|
78
|
+
# @return true if the model is valid
|
79
|
+
def valid?
|
80
|
+
true
|
81
|
+
end
|
82
|
+
|
83
|
+
# Checks equality by comparing each attribute.
|
84
|
+
# @param [Object] Object to be compared
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
name == o.name &&
|
89
|
+
repo_mapping == o.repo_mapping
|
90
|
+
end
|
91
|
+
|
92
|
+
# @see the `==` method
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def eql?(o)
|
95
|
+
self == o
|
96
|
+
end
|
97
|
+
|
98
|
+
# Calculates hash code according to all attributes.
|
99
|
+
# @return [Integer] Hash code
|
100
|
+
def hash
|
101
|
+
[name, repo_mapping].hash
|
102
|
+
end
|
103
|
+
|
104
|
+
# Builds the object from hash
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
# @return [Object] Returns the model itself
|
107
|
+
def self.build_from_hash(attributes)
|
108
|
+
new.build_from_hash(attributes)
|
109
|
+
end
|
110
|
+
|
111
|
+
# Builds the object from hash
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
# @return [Object] Returns the model itself
|
114
|
+
def build_from_hash(attributes)
|
115
|
+
return nil unless attributes.is_a?(Hash)
|
116
|
+
self.class.openapi_types.each_pair do |key, type|
|
117
|
+
if type =~ /\AArray<(.*)>/i
|
118
|
+
# check to ensure the input is an array given that the attribute
|
119
|
+
# is documented as an array but the input is not
|
120
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
121
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
122
|
+
end
|
123
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
124
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
125
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
126
|
+
end
|
127
|
+
|
128
|
+
self
|
129
|
+
end
|
130
|
+
|
131
|
+
# Deserializes the data based on type
|
132
|
+
# @param string type Data type
|
133
|
+
# @param string value Value to be deserialized
|
134
|
+
# @return [Object] Deserialized data
|
135
|
+
def _deserialize(type, value)
|
136
|
+
case type.to_sym
|
137
|
+
when :DateTime
|
138
|
+
DateTime.parse(value)
|
139
|
+
when :Date
|
140
|
+
Date.parse(value)
|
141
|
+
when :String
|
142
|
+
value.to_s
|
143
|
+
when :Integer
|
144
|
+
value.to_i
|
145
|
+
when :Float
|
146
|
+
value.to_f
|
147
|
+
when :Boolean
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
149
|
+
true
|
150
|
+
else
|
151
|
+
false
|
152
|
+
end
|
153
|
+
when :Object
|
154
|
+
# generic object (usually a Hash), return directly
|
155
|
+
value
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
162
|
+
{}.tap do |hash|
|
163
|
+
value.each do |k, v|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
else # model
|
168
|
+
PulpcoreClient.const_get(type).build_from_hash(value)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the string representation of the object
|
173
|
+
# @return [String] String presentation of the object
|
174
|
+
def to_s
|
175
|
+
to_hash.to_s
|
176
|
+
end
|
177
|
+
|
178
|
+
# to_body is an alias to to_hash (backward compatibility)
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_body
|
181
|
+
to_hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the object in the form of hash
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_hash
|
187
|
+
hash = {}
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
189
|
+
value = self.send(attr)
|
190
|
+
if value.nil?
|
191
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
192
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
193
|
+
end
|
194
|
+
|
195
|
+
hash[param] = _to_hash(value)
|
196
|
+
end
|
197
|
+
hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Outputs non-array value in the form of hash
|
201
|
+
# For object, use to_hash. Otherwise, just return the value
|
202
|
+
# @param [Object] value Any valid value
|
203
|
+
# @return [Hash] Returns the value in the form of hash
|
204
|
+
def _to_hash(value)
|
205
|
+
if value.is_a?(Array)
|
206
|
+
value.compact.map { |v| _to_hash(v) }
|
207
|
+
elsif value.is_a?(Hash)
|
208
|
+
{}.tap do |hash|
|
209
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
210
|
+
end
|
211
|
+
elsif value.respond_to? :to_hash
|
212
|
+
value.to_hash
|
213
|
+
else
|
214
|
+
value
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
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,7 +13,8 @@ OpenAPI Generator version: 4.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module PulpcoreClient
|
16
|
-
class
|
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 PatchedTaskCancel
|
17
18
|
# The desired state of the task. Only 'canceled' is accepted.
|
18
19
|
attr_accessor :state
|
19
20
|
|
@@ -41,13 +42,13 @@ module PulpcoreClient
|
|
41
42
|
# @param [Hash] attributes Model attributes in the form of hash
|
42
43
|
def initialize(attributes = {})
|
43
44
|
if (!attributes.is_a?(Hash))
|
44
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::
|
45
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::PatchedTaskCancel` initialize method"
|
45
46
|
end
|
46
47
|
|
47
48
|
# check to see if the attribute exists and convert string to symbol for hash key
|
48
49
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
49
50
|
if (!self.class.attribute_map.key?(k.to_sym))
|
50
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::
|
51
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::PatchedTaskCancel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
51
52
|
end
|
52
53
|
h[k.to_sym] = v
|
53
54
|
}
|
@@ -61,39 +62,15 @@ module PulpcoreClient
|
|
61
62
|
# @return Array for valid properties with the reasons
|
62
63
|
def list_invalid_properties
|
63
64
|
invalid_properties = Array.new
|
64
|
-
if @state.nil?
|
65
|
-
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
66
|
-
end
|
67
|
-
|
68
|
-
if @state.to_s.length < 1
|
69
|
-
invalid_properties.push('invalid value for "state", the character length must be great than or equal to 1.')
|
70
|
-
end
|
71
|
-
|
72
65
|
invalid_properties
|
73
66
|
end
|
74
67
|
|
75
68
|
# Check to see if the all the properties in the model are valid
|
76
69
|
# @return true if the model is valid
|
77
70
|
def valid?
|
78
|
-
return false if @state.nil?
|
79
|
-
return false if @state.to_s.length < 1
|
80
71
|
true
|
81
72
|
end
|
82
73
|
|
83
|
-
# Custom attribute writer method with validation
|
84
|
-
# @param [Object] state Value to be assigned
|
85
|
-
def state=(state)
|
86
|
-
if state.nil?
|
87
|
-
fail ArgumentError, 'state cannot be nil'
|
88
|
-
end
|
89
|
-
|
90
|
-
if state.to_s.length < 1
|
91
|
-
fail ArgumentError, 'invalid value for "state", the character length must be great than or equal to 1.'
|
92
|
-
end
|
93
|
-
|
94
|
-
@state = state
|
95
|
-
end
|
96
|
-
|
97
74
|
# Checks equality by comparing each attribute.
|
98
75
|
# @param [Object] Object to be compared
|
99
76
|
def ==(o)
|
@@ -0,0 +1,235 @@
|
|
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 User/Group object permission.
|
17
|
+
class PermissionResponse
|
18
|
+
attr_accessor :pulp_href
|
19
|
+
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
attr_accessor :permission
|
23
|
+
|
24
|
+
# Content object.
|
25
|
+
attr_accessor :obj
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'pulp_href' => :'pulp_href',
|
31
|
+
:'id' => :'id',
|
32
|
+
:'permission' => :'permission',
|
33
|
+
:'obj' => :'obj'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'pulp_href' => :'Object',
|
41
|
+
:'id' => :'Object',
|
42
|
+
:'permission' => :'String',
|
43
|
+
:'obj' => :'String'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
])
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::PermissionResponse` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::PermissionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'pulp_href')
|
69
|
+
self.pulp_href = attributes[:'pulp_href']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'id')
|
73
|
+
self.id = attributes[:'id']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'permission')
|
77
|
+
self.permission = attributes[:'permission']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'obj')
|
81
|
+
self.obj = attributes[:'obj']
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
86
|
+
# @return Array for valid properties with the reasons
|
87
|
+
def list_invalid_properties
|
88
|
+
invalid_properties = Array.new
|
89
|
+
invalid_properties
|
90
|
+
end
|
91
|
+
|
92
|
+
# Check to see if the all the properties in the model are valid
|
93
|
+
# @return true if the model is valid
|
94
|
+
def valid?
|
95
|
+
true
|
96
|
+
end
|
97
|
+
|
98
|
+
# Checks equality by comparing each attribute.
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def ==(o)
|
101
|
+
return true if self.equal?(o)
|
102
|
+
self.class == o.class &&
|
103
|
+
pulp_href == o.pulp_href &&
|
104
|
+
id == o.id &&
|
105
|
+
permission == o.permission &&
|
106
|
+
obj == o.obj
|
107
|
+
end
|
108
|
+
|
109
|
+
# @see the `==` method
|
110
|
+
# @param [Object] Object to be compared
|
111
|
+
def eql?(o)
|
112
|
+
self == o
|
113
|
+
end
|
114
|
+
|
115
|
+
# Calculates hash code according to all attributes.
|
116
|
+
# @return [Integer] Hash code
|
117
|
+
def hash
|
118
|
+
[pulp_href, id, permission, obj].hash
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def self.build_from_hash(attributes)
|
125
|
+
new.build_from_hash(attributes)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Builds the object from hash
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
130
|
+
# @return [Object] Returns the model itself
|
131
|
+
def build_from_hash(attributes)
|
132
|
+
return nil unless attributes.is_a?(Hash)
|
133
|
+
self.class.openapi_types.each_pair do |key, type|
|
134
|
+
if type =~ /\AArray<(.*)>/i
|
135
|
+
# check to ensure the input is an array given that the attribute
|
136
|
+
# is documented as an array but the input is not
|
137
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
138
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
139
|
+
end
|
140
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
141
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
142
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
143
|
+
end
|
144
|
+
|
145
|
+
self
|
146
|
+
end
|
147
|
+
|
148
|
+
# Deserializes the data based on type
|
149
|
+
# @param string type Data type
|
150
|
+
# @param string value Value to be deserialized
|
151
|
+
# @return [Object] Deserialized data
|
152
|
+
def _deserialize(type, value)
|
153
|
+
case type.to_sym
|
154
|
+
when :DateTime
|
155
|
+
DateTime.parse(value)
|
156
|
+
when :Date
|
157
|
+
Date.parse(value)
|
158
|
+
when :String
|
159
|
+
value.to_s
|
160
|
+
when :Integer
|
161
|
+
value.to_i
|
162
|
+
when :Float
|
163
|
+
value.to_f
|
164
|
+
when :Boolean
|
165
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
166
|
+
true
|
167
|
+
else
|
168
|
+
false
|
169
|
+
end
|
170
|
+
when :Object
|
171
|
+
# generic object (usually a Hash), return directly
|
172
|
+
value
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
176
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each do |k, v|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
else # model
|
185
|
+
PulpcoreClient.const_get(type).build_from_hash(value)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the string representation of the object
|
190
|
+
# @return [String] String presentation of the object
|
191
|
+
def to_s
|
192
|
+
to_hash.to_s
|
193
|
+
end
|
194
|
+
|
195
|
+
# to_body is an alias to to_hash (backward compatibility)
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_body
|
198
|
+
to_hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Returns the object in the form of hash
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
203
|
+
def to_hash
|
204
|
+
hash = {}
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
206
|
+
value = self.send(attr)
|
207
|
+
if value.nil?
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
210
|
+
end
|
211
|
+
|
212
|
+
hash[param] = _to_hash(value)
|
213
|
+
end
|
214
|
+
hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Outputs non-array value in the form of hash
|
218
|
+
# For object, use to_hash. Otherwise, just return the value
|
219
|
+
# @param [Object] value Any valid value
|
220
|
+
# @return [Hash] Returns the value in the form of hash
|
221
|
+
def _to_hash(value)
|
222
|
+
if value.is_a?(Array)
|
223
|
+
value.compact.map { |v| _to_hash(v) }
|
224
|
+
elsif value.is_a?(Hash)
|
225
|
+
{}.tap do |hash|
|
226
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
227
|
+
end
|
228
|
+
elsif value.respond_to? :to_hash
|
229
|
+
value.to_hash
|
230
|
+
else
|
231
|
+
value
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
235
|
+
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,7 +13,8 @@ OpenAPI Generator version: 4.2.3
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module PulpcoreClient
|
16
|
-
class
|
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 ProgressReportResponse
|
17
18
|
# The message shown to the user for the progress report.
|
18
19
|
attr_accessor :message
|
19
20
|
|
@@ -67,13 +68,13 @@ module PulpcoreClient
|
|
67
68
|
# @param [Hash] attributes Model attributes in the form of hash
|
68
69
|
def initialize(attributes = {})
|
69
70
|
if (!attributes.is_a?(Hash))
|
70
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::ProgressReportResponse` initialize method"
|
71
72
|
end
|
72
73
|
|
73
74
|
# check to see if the attribute exists and convert string to symbol for hash key
|
74
75
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
76
|
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::ProgressReportResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
78
|
end
|
78
79
|
h[k.to_sym] = v
|
79
80
|
}
|
@@ -107,75 +108,15 @@ module PulpcoreClient
|
|
107
108
|
# @return Array for valid properties with the reasons
|
108
109
|
def list_invalid_properties
|
109
110
|
invalid_properties = Array.new
|
110
|
-
if !@message.nil? && @message.to_s.length < 1
|
111
|
-
invalid_properties.push('invalid value for "message", the character length must be great than or equal to 1.')
|
112
|
-
end
|
113
|
-
|
114
|
-
if !@code.nil? && @code.to_s.length < 1
|
115
|
-
invalid_properties.push('invalid value for "code", the character length must be great than or equal to 1.')
|
116
|
-
end
|
117
|
-
|
118
|
-
if !@state.nil? && @state.to_s.length < 1
|
119
|
-
invalid_properties.push('invalid value for "state", the character length must be great than or equal to 1.')
|
120
|
-
end
|
121
|
-
|
122
|
-
if !@suffix.nil? && @suffix.to_s.length < 1
|
123
|
-
invalid_properties.push('invalid value for "suffix", the character length must be great than or equal to 1.')
|
124
|
-
end
|
125
|
-
|
126
111
|
invalid_properties
|
127
112
|
end
|
128
113
|
|
129
114
|
# Check to see if the all the properties in the model are valid
|
130
115
|
# @return true if the model is valid
|
131
116
|
def valid?
|
132
|
-
return false if !@message.nil? && @message.to_s.length < 1
|
133
|
-
return false if !@code.nil? && @code.to_s.length < 1
|
134
|
-
return false if !@state.nil? && @state.to_s.length < 1
|
135
|
-
return false if !@suffix.nil? && @suffix.to_s.length < 1
|
136
117
|
true
|
137
118
|
end
|
138
119
|
|
139
|
-
# Custom attribute writer method with validation
|
140
|
-
# @param [Object] message Value to be assigned
|
141
|
-
def message=(message)
|
142
|
-
if !message.nil? && message.to_s.length < 1
|
143
|
-
fail ArgumentError, 'invalid value for "message", the character length must be great than or equal to 1.'
|
144
|
-
end
|
145
|
-
|
146
|
-
@message = message
|
147
|
-
end
|
148
|
-
|
149
|
-
# Custom attribute writer method with validation
|
150
|
-
# @param [Object] code Value to be assigned
|
151
|
-
def code=(code)
|
152
|
-
if !code.nil? && code.to_s.length < 1
|
153
|
-
fail ArgumentError, 'invalid value for "code", the character length must be great than or equal to 1.'
|
154
|
-
end
|
155
|
-
|
156
|
-
@code = code
|
157
|
-
end
|
158
|
-
|
159
|
-
# Custom attribute writer method with validation
|
160
|
-
# @param [Object] state Value to be assigned
|
161
|
-
def state=(state)
|
162
|
-
if !state.nil? && state.to_s.length < 1
|
163
|
-
fail ArgumentError, 'invalid value for "state", the character length must be great than or equal to 1.'
|
164
|
-
end
|
165
|
-
|
166
|
-
@state = state
|
167
|
-
end
|
168
|
-
|
169
|
-
# Custom attribute writer method with validation
|
170
|
-
# @param [Object] suffix Value to be assigned
|
171
|
-
def suffix=(suffix)
|
172
|
-
if !suffix.nil? && suffix.to_s.length < 1
|
173
|
-
fail ArgumentError, 'invalid value for "suffix", the character length must be great than or equal to 1.'
|
174
|
-
end
|
175
|
-
|
176
|
-
@suffix = suffix
|
177
|
-
end
|
178
|
-
|
179
120
|
# Checks equality by comparing each attribute.
|
180
121
|
# @param [Object] Object to be compared
|
181
122
|
def ==(o)
|