pulp_rpm_client 3.27.2 → 3.28.1
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 +32 -9
- data/docs/AcsRpmApi.md +343 -156
- data/docs/AddonResponse.md +16 -15
- data/docs/ArtifactResponse.md +30 -29
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ChecksumResponse.md +10 -9
- data/docs/CompressionTypeEnum.md +4 -5
- data/docs/ContentAdvisoriesApi.md +275 -75
- data/docs/ContentDistributionTreesApi.md +227 -46
- data/docs/ContentModulemdDefaultsApi.md +262 -64
- data/docs/ContentModulemdObsoletesApi.md +255 -57
- data/docs/ContentModulemdsApi.md +271 -73
- data/docs/ContentPackagecategoriesApi.md +227 -46
- data/docs/ContentPackageenvironmentsApi.md +227 -46
- data/docs/ContentPackagegroupsApi.md +227 -46
- data/docs/ContentPackagelangpacksApi.md +227 -46
- data/docs/ContentPackagesApi.md +298 -98
- data/docs/ContentRepoMetadataFilesApi.md +227 -46
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/Copy.md +10 -9
- data/docs/DistributionsRpmApi.md +385 -182
- data/docs/ImageResponse.md +14 -13
- data/docs/MyPermissionsResponse.md +8 -7
- data/docs/NestedRole.md +12 -11
- data/docs/NestedRoleResponse.md +12 -11
- data/docs/ObjectRolesResponse.md +8 -7
- data/docs/PackageChecksumTypeEnum.md +4 -5
- data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatedrpmDistributionTreeResponseList.md +14 -13
- data/docs/PaginatedrpmModulemdDefaultsResponseList.md +14 -13
- data/docs/PaginatedrpmModulemdObsoleteResponseList.md +14 -13
- data/docs/PaginatedrpmModulemdResponseList.md +14 -13
- data/docs/PaginatedrpmPackageCategoryResponseList.md +14 -13
- data/docs/PaginatedrpmPackageEnvironmentResponseList.md +14 -13
- data/docs/PaginatedrpmPackageGroupResponseList.md +14 -13
- data/docs/PaginatedrpmPackageLangpacksResponseList.md +14 -13
- data/docs/PaginatedrpmPackageResponseList.md +14 -13
- data/docs/PaginatedrpmRepoMetadataFileResponseList.md +14 -13
- data/docs/PaginatedrpmRpmAlternateContentSourceResponseList.md +14 -13
- data/docs/PaginatedrpmRpmDistributionResponseList.md +14 -13
- data/docs/PaginatedrpmRpmPublicationResponseList.md +14 -13
- data/docs/PaginatedrpmRpmRemoteResponseList.md +14 -13
- data/docs/PaginatedrpmRpmRepositoryResponseList.md +14 -13
- data/docs/PaginatedrpmUlnRemoteResponseList.md +14 -13
- data/docs/PaginatedrpmUpdateRecordResponseList.md +14 -13
- data/docs/PatchedrpmRpmAlternateContentSource.md +14 -13
- data/docs/PatchedrpmRpmDistribution.md +22 -21
- data/docs/PatchedrpmRpmRemote.md +50 -49
- data/docs/PatchedrpmRpmRepository.md +40 -39
- data/docs/PatchedrpmUlnRemote.md +50 -49
- data/docs/PolicyEnum.md +4 -5
- data/docs/PrunePackages.md +12 -11
- data/docs/PublicationsRpmApi.md +267 -130
- data/docs/RemotesRpmApi.md +389 -184
- data/docs/RemotesUlnApi.md +389 -184
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesRpmApi.md +444 -207
- data/docs/RepositoriesRpmVersionsApi.md +152 -82
- data/docs/RepositoryAddRemoveContent.md +12 -11
- data/docs/RepositoryVersionResponse.md +22 -21
- data/docs/RpmCompsApi.md +32 -16
- data/docs/RpmCopyApi.md +30 -14
- data/docs/RpmDistributionTreeResponse.md +46 -43
- data/docs/RpmModulemd.md +34 -31
- data/docs/RpmModulemdDefaults.md +18 -15
- data/docs/RpmModulemdDefaultsResponse.md +22 -19
- data/docs/RpmModulemdObsolete.md +30 -27
- data/docs/RpmModulemdObsoleteResponse.md +34 -31
- data/docs/RpmModulemdResponse.md +38 -35
- data/docs/RpmPackageCategoryResponse.md +32 -29
- data/docs/RpmPackageEnvironmentResponse.md +34 -31
- data/docs/RpmPackageGroupResponse.md +38 -35
- data/docs/RpmPackageLangpacksResponse.md +20 -17
- data/docs/RpmPackageResponse.md +102 -99
- data/docs/RpmPruneApi.md +30 -13
- data/docs/RpmRepoMetadataFileResponse.md +38 -35
- data/docs/RpmRepositorySyncURL.md +16 -15
- data/docs/RpmRpmAlternateContentSource.md +14 -13
- data/docs/RpmRpmAlternateContentSourceResponse.md +22 -21
- data/docs/RpmRpmDistribution.md +22 -21
- data/docs/RpmRpmDistributionResponse.md +34 -33
- data/docs/RpmRpmPublication.md +24 -23
- data/docs/RpmRpmPublicationResponse.md +34 -33
- data/docs/RpmRpmRemote.md +50 -49
- data/docs/RpmRpmRemoteResponse.md +50 -49
- data/docs/RpmRpmRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/RpmRpmRepository.md +40 -39
- data/docs/RpmRpmRepositoryResponse.md +54 -53
- data/docs/RpmUlnRemote.md +50 -49
- data/docs/RpmUlnRemoteResponse.md +50 -49
- data/docs/RpmUpdateCollection.md +12 -11
- data/docs/RpmUpdateCollectionResponse.md +14 -13
- data/docs/RpmUpdateRecordResponse.md +52 -49
- data/docs/SetLabel.md +10 -9
- data/docs/SetLabelResponse.md +10 -9
- data/docs/SkipTypesEnum.md +4 -5
- data/docs/SyncPolicyEnum.md +4 -5
- data/docs/TaskGroupOperationResponse.md +8 -7
- data/docs/UnsetLabel.md +8 -7
- data/docs/UnsetLabelResponse.md +10 -9
- data/docs/VariantResponse.md +26 -25
- data/lib/pulp_rpm_client/api/acs_rpm_api.rb +76 -50
- data/lib/pulp_rpm_client/api/content_advisories_api.rb +177 -17
- data/lib/pulp_rpm_client/api/content_distribution_trees_api.rb +162 -9
- data/lib/pulp_rpm_client/api/content_modulemd_defaults_api.rb +174 -17
- data/lib/pulp_rpm_client/api/content_modulemd_obsoletes_api.rb +171 -14
- data/lib/pulp_rpm_client/api/content_modulemds_api.rb +174 -17
- data/lib/pulp_rpm_client/api/content_packagecategories_api.rb +162 -9
- data/lib/pulp_rpm_client/api/content_packageenvironments_api.rb +162 -9
- data/lib/pulp_rpm_client/api/content_packagegroups_api.rb +162 -9
- data/lib/pulp_rpm_client/api/content_packagelangpacks_api.rb +162 -9
- data/lib/pulp_rpm_client/api/content_packages_api.rb +177 -17
- data/lib/pulp_rpm_client/api/content_repo_metadata_files_api.rb +162 -9
- data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +89 -56
- data/lib/pulp_rpm_client/api/publications_rpm_api.rb +67 -47
- data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +104 -68
- data/lib/pulp_rpm_client/api/remotes_uln_api.rb +104 -68
- data/lib/pulp_rpm_client/api/repositories_rpm_api.rb +107 -66
- data/lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb +40 -30
- data/lib/pulp_rpm_client/api/rpm_comps_api.rb +10 -6
- data/lib/pulp_rpm_client/api/rpm_copy_api.rb +10 -6
- data/lib/pulp_rpm_client/api/rpm_prune_api.rb +10 -6
- data/lib/pulp_rpm_client/api_client.rb +137 -102
- data/lib/pulp_rpm_client/api_error.rb +2 -1
- data/lib/pulp_rpm_client/configuration.rb +162 -21
- data/lib/pulp_rpm_client/models/addon_response.rb +40 -22
- data/lib/pulp_rpm_client/models/artifact_response.rb +34 -24
- data/lib/pulp_rpm_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_rpm_client/models/checksum_response.rb +34 -22
- data/lib/pulp_rpm_client/models/compression_type_enum.rb +8 -4
- data/lib/pulp_rpm_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_rpm_client/models/copy.rb +34 -28
- data/lib/pulp_rpm_client/models/image_response.rb +38 -22
- data/lib/pulp_rpm_client/models/my_permissions_response.rb +32 -22
- data/lib/pulp_rpm_client/models/nested_role.rb +32 -22
- data/lib/pulp_rpm_client/models/nested_role_response.rb +32 -22
- data/lib/pulp_rpm_client/models/object_roles_response.rb +32 -22
- data/lib/pulp_rpm_client/models/package_checksum_type_enum.rb +8 -4
- data/lib/pulp_rpm_client/models/paginated_repository_version_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_distribution_tree_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_modulemd_defaults_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_modulemd_obsolete_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_modulemd_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_package_category_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_package_environment_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_package_group_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_package_langpacks_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_package_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_repo_metadata_file_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_rpm_alternate_content_source_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_rpm_distribution_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_rpm_publication_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_rpm_remote_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_rpm_repository_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_uln_remote_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/paginatedrpm_update_record_response_list.rb +34 -22
- data/lib/pulp_rpm_client/models/patchedrpm_rpm_alternate_content_source.rb +36 -24
- data/lib/pulp_rpm_client/models/patchedrpm_rpm_distribution.rb +40 -24
- data/lib/pulp_rpm_client/models/patchedrpm_rpm_remote.rb +82 -44
- data/lib/pulp_rpm_client/models/patchedrpm_rpm_repository.rb +68 -25
- data/lib/pulp_rpm_client/models/patchedrpm_uln_remote.rb +92 -46
- data/lib/pulp_rpm_client/models/policy_enum.rb +8 -4
- data/lib/pulp_rpm_client/models/prune_packages.rb +37 -23
- data/lib/pulp_rpm_client/models/repair.rb +30 -22
- data/lib/pulp_rpm_client/models/repository_add_remove_content.rb +30 -22
- data/lib/pulp_rpm_client/models/repository_version_response.rb +32 -24
- data/lib/pulp_rpm_client/models/rpm_distribution_tree_response.rb +77 -23
- data/lib/pulp_rpm_client/models/rpm_modulemd.rb +63 -23
- data/lib/pulp_rpm_client/models/rpm_modulemd_defaults.rb +52 -28
- data/lib/pulp_rpm_client/models/rpm_modulemd_defaults_response.rb +52 -30
- data/lib/pulp_rpm_client/models/rpm_modulemd_obsolete.rb +68 -28
- data/lib/pulp_rpm_client/models/rpm_modulemd_obsolete_response.rb +63 -25
- data/lib/pulp_rpm_client/models/rpm_modulemd_response.rb +63 -25
- data/lib/pulp_rpm_client/models/rpm_package_category_response.rb +61 -25
- data/lib/pulp_rpm_client/models/rpm_package_environment_response.rb +63 -25
- data/lib/pulp_rpm_client/models/rpm_package_group_response.rb +61 -25
- data/lib/pulp_rpm_client/models/rpm_package_langpacks_response.rb +49 -25
- data/lib/pulp_rpm_client/models/rpm_package_response.rb +55 -25
- data/lib/pulp_rpm_client/models/rpm_repo_metadata_file_response.rb +53 -25
- data/lib/pulp_rpm_client/models/rpm_repository_sync_url.rb +52 -22
- data/lib/pulp_rpm_client/models/rpm_rpm_alternate_content_source.rb +35 -23
- data/lib/pulp_rpm_client/models/rpm_rpm_alternate_content_source_response.rb +37 -25
- data/lib/pulp_rpm_client/models/rpm_rpm_distribution.rb +34 -22
- data/lib/pulp_rpm_client/models/rpm_rpm_distribution_response.rb +36 -24
- data/lib/pulp_rpm_client/models/rpm_rpm_publication.rb +53 -22
- data/lib/pulp_rpm_client/models/rpm_rpm_publication_response.rb +55 -24
- data/lib/pulp_rpm_client/models/rpm_rpm_remote.rb +76 -42
- data/lib/pulp_rpm_client/models/rpm_rpm_remote_response.rb +79 -45
- data/lib/pulp_rpm_client/models/{rpm_rpm_remote_response_hidden_fields.rb → rpm_rpm_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulp_rpm_client/models/rpm_rpm_repository.rb +65 -24
- data/lib/pulp_rpm_client/models/rpm_rpm_repository_response.rb +67 -26
- data/lib/pulp_rpm_client/models/rpm_uln_remote.rb +80 -42
- data/lib/pulp_rpm_client/models/rpm_uln_remote_response.rb +79 -45
- data/lib/pulp_rpm_client/models/rpm_update_collection.rb +36 -22
- data/lib/pulp_rpm_client/models/rpm_update_collection_response.rb +36 -22
- data/lib/pulp_rpm_client/models/rpm_update_record_response.rb +45 -25
- data/lib/pulp_rpm_client/models/set_label.rb +34 -22
- data/lib/pulp_rpm_client/models/set_label_response.rb +34 -22
- data/lib/pulp_rpm_client/models/skip_types_enum.rb +8 -4
- data/lib/pulp_rpm_client/models/sync_policy_enum.rb +8 -4
- data/lib/pulp_rpm_client/models/task_group_operation_response.rb +32 -22
- data/lib/pulp_rpm_client/models/unset_label.rb +33 -23
- data/lib/pulp_rpm_client/models/unset_label_response.rb +33 -23
- data/lib/pulp_rpm_client/models/variant_response.rb +50 -22
- data/lib/pulp_rpm_client/version.rb +2 -2
- data/lib/pulp_rpm_client.rb +2 -5
- data/pulp_rpm_client.gemspec +9 -6
- data/spec/api/acs_rpm_api_spec.rb +12 -12
- data/spec/api/content_advisories_api_spec.rb +33 -5
- data/spec/api/content_distribution_trees_api_spec.rb +30 -3
- data/spec/api/content_modulemd_defaults_api_spec.rb +32 -5
- data/spec/api/content_modulemd_obsoletes_api_spec.rb +31 -4
- data/spec/api/content_modulemds_api_spec.rb +32 -5
- data/spec/api/content_packagecategories_api_spec.rb +30 -3
- data/spec/api/content_packageenvironments_api_spec.rb +30 -3
- data/spec/api/content_packagegroups_api_spec.rb +30 -3
- data/spec/api/content_packagelangpacks_api_spec.rb +30 -3
- data/spec/api/content_packages_api_spec.rb +33 -5
- data/spec/api/content_repo_metadata_files_api_spec.rb +30 -3
- data/spec/api/distributions_rpm_api_spec.rb +13 -13
- data/spec/api/publications_rpm_api_spec.rb +16 -15
- data/spec/api/remotes_rpm_api_spec.rb +20 -19
- data/spec/api/remotes_uln_api_spec.rb +20 -19
- data/spec/api/repositories_rpm_api_spec.rb +15 -15
- data/spec/api/repositories_rpm_versions_api_spec.rb +12 -11
- data/spec/api/rpm_comps_api_spec.rb +2 -2
- data/spec/api/rpm_copy_api_spec.rb +2 -2
- data/spec/api/rpm_prune_api_spec.rb +2 -2
- data/spec/models/addon_response_spec.rb +11 -16
- data/spec/models/artifact_response_spec.rb +18 -23
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/checksum_response_spec.rb +8 -13
- data/spec/models/compression_type_enum_spec.rb +6 -11
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/copy_spec.rb +8 -13
- data/spec/models/image_response_spec.rb +10 -15
- data/spec/models/my_permissions_response_spec.rb +7 -12
- data/spec/models/nested_role_response_spec.rb +9 -14
- data/spec/models/nested_role_spec.rb +9 -14
- data/spec/models/object_roles_response_spec.rb +7 -12
- data/spec/models/package_checksum_type_enum_spec.rb +6 -11
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_distribution_tree_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_modulemd_defaults_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_modulemd_obsolete_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_modulemd_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_package_category_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_package_environment_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_package_group_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_package_langpacks_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_package_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_repo_metadata_file_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_rpm_alternate_content_source_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_rpm_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_rpm_publication_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_rpm_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_rpm_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_uln_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedrpm_update_record_response_list_spec.rb +10 -15
- data/spec/models/patchedrpm_rpm_alternate_content_source_spec.rb +10 -15
- data/spec/models/patchedrpm_rpm_distribution_spec.rb +14 -19
- data/spec/models/patchedrpm_rpm_remote_spec.rb +28 -33
- data/spec/models/patchedrpm_rpm_repository_spec.rb +23 -28
- data/spec/models/patchedrpm_uln_remote_spec.rb +28 -33
- data/spec/models/policy_enum_spec.rb +6 -11
- data/spec/models/prune_packages_spec.rb +9 -14
- data/spec/models/repair_spec.rb +7 -12
- data/spec/models/repository_add_remove_content_spec.rb +9 -14
- data/spec/models/repository_version_response_spec.rb +14 -19
- data/spec/models/rpm_distribution_tree_response_spec.rb +31 -30
- data/spec/models/rpm_modulemd_defaults_response_spec.rb +19 -18
- data/spec/models/rpm_modulemd_defaults_spec.rb +17 -16
- data/spec/models/rpm_modulemd_obsolete_response_spec.rb +25 -24
- data/spec/models/rpm_modulemd_obsolete_spec.rb +23 -22
- data/spec/models/rpm_modulemd_response_spec.rb +27 -26
- data/spec/models/rpm_modulemd_spec.rb +25 -24
- data/spec/models/rpm_package_category_response_spec.rb +24 -23
- data/spec/models/rpm_package_environment_response_spec.rb +25 -24
- data/spec/models/rpm_package_group_response_spec.rb +27 -26
- data/spec/models/rpm_package_langpacks_response_spec.rb +18 -17
- data/spec/models/rpm_package_response_spec.rb +59 -58
- data/spec/models/rpm_repo_metadata_file_response_spec.rb +27 -26
- data/spec/models/rpm_repository_sync_url_spec.rb +11 -16
- data/spec/models/rpm_rpm_alternate_content_source_response_spec.rb +14 -19
- data/spec/models/rpm_rpm_alternate_content_source_spec.rb +10 -15
- data/spec/models/rpm_rpm_distribution_response_spec.rb +20 -25
- data/spec/models/rpm_rpm_distribution_spec.rb +14 -19
- data/spec/models/rpm_rpm_publication_response_spec.rb +20 -25
- data/spec/models/rpm_rpm_publication_spec.rb +15 -20
- data/spec/models/{rpm_rpm_remote_response_hidden_fields_spec.rb → rpm_rpm_remote_response_hidden_fields_inner_spec.rb} +11 -16
- data/spec/models/rpm_rpm_remote_response_spec.rb +28 -33
- data/spec/models/rpm_rpm_remote_spec.rb +28 -33
- data/spec/models/rpm_rpm_repository_response_spec.rb +30 -35
- data/spec/models/rpm_rpm_repository_spec.rb +23 -28
- data/spec/models/rpm_uln_remote_response_spec.rb +28 -33
- data/spec/models/rpm_uln_remote_spec.rb +28 -33
- data/spec/models/rpm_update_collection_response_spec.rb +10 -15
- data/spec/models/rpm_update_collection_spec.rb +9 -14
- data/spec/models/rpm_update_record_response_spec.rb +34 -33
- data/spec/models/set_label_response_spec.rb +8 -13
- data/spec/models/set_label_spec.rb +8 -13
- data/spec/models/skip_types_enum_spec.rb +6 -11
- data/spec/models/sync_policy_enum_spec.rb +6 -11
- data/spec/models/task_group_operation_response_spec.rb +7 -12
- data/spec/models/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/models/variant_response_spec.rb +16 -21
- data/spec/spec_helper.rb +1 -1
- metadata +127 -115
- data/docs/CompsXml.md +0 -21
- data/docs/RpmPackage.md +0 -27
- data/docs/RpmRpmRemoteResponseHiddenFields.md +0 -19
- data/docs/RpmUpdateRecord.md +0 -23
- data/lib/pulp_rpm_client/models/comps_xml.rb +0 -233
- data/lib/pulp_rpm_client/models/rpm_package.rb +0 -288
- data/lib/pulp_rpm_client/models/rpm_update_record.rb +0 -253
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/comps_xml_spec.rb +0 -53
- data/spec/models/rpm_package_spec.rb +0 -71
- data/spec/models/rpm_update_record_spec.rb +0 -59
@@ -6,11 +6,12 @@
|
|
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
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpRpmClient
|
16
17
|
# A Serializer for UlnRemote.
|
@@ -79,6 +80,28 @@ module PulpRpmClient
|
|
79
80
|
# Base URL of the ULN server. If the uln_server_base_url is not provided pulp_rpm willuse the contents of the DEFAULT_ULN_SERVER_BASE_URL setting instead.
|
80
81
|
attr_accessor :uln_server_base_url
|
81
82
|
|
83
|
+
class EnumAttributeValidator
|
84
|
+
attr_reader :datatype
|
85
|
+
attr_reader :allowable_values
|
86
|
+
|
87
|
+
def initialize(datatype, allowable_values)
|
88
|
+
@allowable_values = allowable_values.map do |value|
|
89
|
+
case datatype.to_s
|
90
|
+
when /Integer/i
|
91
|
+
value.to_i
|
92
|
+
when /Float/i
|
93
|
+
value.to_f
|
94
|
+
else
|
95
|
+
value
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
def valid?(value)
|
101
|
+
!value || allowable_values.include?(value)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
82
105
|
# Attribute mapping from ruby-style variable name to JSON key.
|
83
106
|
def self.attribute_map
|
84
107
|
{
|
@@ -107,13 +130,18 @@ module PulpRpmClient
|
|
107
130
|
}
|
108
131
|
end
|
109
132
|
|
133
|
+
# Returns all the JSON keys this model knows about
|
134
|
+
def self.acceptable_attributes
|
135
|
+
attribute_map.values
|
136
|
+
end
|
137
|
+
|
110
138
|
# Attribute type mapping.
|
111
139
|
def self.openapi_types
|
112
140
|
{
|
113
141
|
:'pulp_href' => :'String',
|
114
142
|
:'prn' => :'String',
|
115
|
-
:'pulp_created' => :'
|
116
|
-
:'pulp_last_updated' => :'
|
143
|
+
:'pulp_created' => :'Time',
|
144
|
+
:'pulp_last_updated' => :'Time',
|
117
145
|
:'name' => :'String',
|
118
146
|
:'url' => :'String',
|
119
147
|
:'ca_cert' => :'String',
|
@@ -130,7 +158,7 @@ module PulpRpmClient
|
|
130
158
|
:'sock_read_timeout' => :'Float',
|
131
159
|
:'headers' => :'Array<Object>',
|
132
160
|
:'rate_limit' => :'Integer',
|
133
|
-
:'hidden_fields' => :'Array<
|
161
|
+
:'hidden_fields' => :'Array<RpmRpmRemoteResponseHiddenFieldsInner>',
|
134
162
|
:'uln_server_base_url' => :'String'
|
135
163
|
}
|
136
164
|
end
|
@@ -185,10 +213,14 @@ module PulpRpmClient
|
|
185
213
|
|
186
214
|
if attributes.key?(:'name')
|
187
215
|
self.name = attributes[:'name']
|
216
|
+
else
|
217
|
+
self.name = nil
|
188
218
|
end
|
189
219
|
|
190
220
|
if attributes.key?(:'url')
|
191
221
|
self.url = attributes[:'url']
|
222
|
+
else
|
223
|
+
self.url = nil
|
192
224
|
end
|
193
225
|
|
194
226
|
if attributes.key?(:'ca_cert')
|
@@ -265,6 +297,7 @@ module PulpRpmClient
|
|
265
297
|
# Show invalid properties with the reasons. Usually used together with valid?
|
266
298
|
# @return Array for valid properties with the reasons
|
267
299
|
def list_invalid_properties
|
300
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
268
301
|
invalid_properties = Array.new
|
269
302
|
if @name.nil?
|
270
303
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -278,20 +311,20 @@ module PulpRpmClient
|
|
278
311
|
invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
|
279
312
|
end
|
280
313
|
|
281
|
-
if !@total_timeout.nil? && @total_timeout < 0
|
282
|
-
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.')
|
314
|
+
if !@total_timeout.nil? && @total_timeout < 0.0
|
315
|
+
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
|
283
316
|
end
|
284
317
|
|
285
|
-
if !@connect_timeout.nil? && @connect_timeout < 0
|
286
|
-
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.')
|
318
|
+
if !@connect_timeout.nil? && @connect_timeout < 0.0
|
319
|
+
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
|
287
320
|
end
|
288
321
|
|
289
|
-
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
290
|
-
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.')
|
322
|
+
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
323
|
+
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
|
291
324
|
end
|
292
325
|
|
293
|
-
if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
294
|
-
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.')
|
326
|
+
if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
327
|
+
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
295
328
|
end
|
296
329
|
|
297
330
|
invalid_properties
|
@@ -300,13 +333,14 @@ module PulpRpmClient
|
|
300
333
|
# Check to see if the all the properties in the model are valid
|
301
334
|
# @return true if the model is valid
|
302
335
|
def valid?
|
336
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
303
337
|
return false if @name.nil?
|
304
338
|
return false if @url.nil?
|
305
339
|
return false if !@download_concurrency.nil? && @download_concurrency < 1
|
306
|
-
return false if !@total_timeout.nil? && @total_timeout < 0
|
307
|
-
return false if !@connect_timeout.nil? && @connect_timeout < 0
|
308
|
-
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0
|
309
|
-
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0
|
340
|
+
return false if !@total_timeout.nil? && @total_timeout < 0.0
|
341
|
+
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
342
|
+
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
343
|
+
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
310
344
|
true
|
311
345
|
end
|
312
346
|
|
@@ -323,8 +357,8 @@ module PulpRpmClient
|
|
323
357
|
# Custom attribute writer method with validation
|
324
358
|
# @param [Object] total_timeout Value to be assigned
|
325
359
|
def total_timeout=(total_timeout)
|
326
|
-
if !total_timeout.nil? && total_timeout < 0
|
327
|
-
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.'
|
360
|
+
if !total_timeout.nil? && total_timeout < 0.0
|
361
|
+
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
|
328
362
|
end
|
329
363
|
|
330
364
|
@total_timeout = total_timeout
|
@@ -333,8 +367,8 @@ module PulpRpmClient
|
|
333
367
|
# Custom attribute writer method with validation
|
334
368
|
# @param [Object] connect_timeout Value to be assigned
|
335
369
|
def connect_timeout=(connect_timeout)
|
336
|
-
if !connect_timeout.nil? && connect_timeout < 0
|
337
|
-
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.'
|
370
|
+
if !connect_timeout.nil? && connect_timeout < 0.0
|
371
|
+
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
|
338
372
|
end
|
339
373
|
|
340
374
|
@connect_timeout = connect_timeout
|
@@ -343,8 +377,8 @@ module PulpRpmClient
|
|
343
377
|
# Custom attribute writer method with validation
|
344
378
|
# @param [Object] sock_connect_timeout Value to be assigned
|
345
379
|
def sock_connect_timeout=(sock_connect_timeout)
|
346
|
-
if !sock_connect_timeout.nil? && sock_connect_timeout < 0
|
347
|
-
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.'
|
380
|
+
if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
|
381
|
+
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
|
348
382
|
end
|
349
383
|
|
350
384
|
@sock_connect_timeout = sock_connect_timeout
|
@@ -353,8 +387,8 @@ module PulpRpmClient
|
|
353
387
|
# Custom attribute writer method with validation
|
354
388
|
# @param [Object] sock_read_timeout Value to be assigned
|
355
389
|
def sock_read_timeout=(sock_read_timeout)
|
356
|
-
if !sock_read_timeout.nil? && sock_read_timeout < 0
|
357
|
-
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.'
|
390
|
+
if !sock_read_timeout.nil? && sock_read_timeout < 0.0
|
391
|
+
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
|
358
392
|
end
|
359
393
|
|
360
394
|
@sock_read_timeout = sock_read_timeout
|
@@ -405,37 +439,33 @@ module PulpRpmClient
|
|
405
439
|
# @param [Hash] attributes Model attributes in the form of hash
|
406
440
|
# @return [Object] Returns the model itself
|
407
441
|
def self.build_from_hash(attributes)
|
408
|
-
new.build_from_hash(attributes)
|
409
|
-
end
|
410
|
-
|
411
|
-
# Builds the object from hash
|
412
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
413
|
-
# @return [Object] Returns the model itself
|
414
|
-
def build_from_hash(attributes)
|
415
442
|
return nil unless attributes.is_a?(Hash)
|
416
|
-
|
417
|
-
|
443
|
+
attributes = attributes.transform_keys(&:to_sym)
|
444
|
+
transformed_hash = {}
|
445
|
+
openapi_types.each_pair do |key, type|
|
446
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
447
|
+
transformed_hash["#{key}"] = nil
|
448
|
+
elsif type =~ /\AArray<(.*)>/i
|
418
449
|
# check to ensure the input is an array given that the attribute
|
419
450
|
# is documented as an array but the input is not
|
420
|
-
if attributes[
|
421
|
-
|
451
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
452
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
422
453
|
end
|
423
|
-
elsif !attributes[
|
424
|
-
|
425
|
-
end
|
454
|
+
elsif !attributes[attribute_map[key]].nil?
|
455
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
456
|
+
end
|
426
457
|
end
|
427
|
-
|
428
|
-
self
|
458
|
+
new(transformed_hash)
|
429
459
|
end
|
430
460
|
|
431
461
|
# Deserializes the data based on type
|
432
462
|
# @param string type Data type
|
433
463
|
# @param string value Value to be deserialized
|
434
464
|
# @return [Object] Deserialized data
|
435
|
-
def _deserialize(type, value)
|
465
|
+
def self._deserialize(type, value)
|
436
466
|
case type.to_sym
|
437
|
-
when :
|
438
|
-
|
467
|
+
when :Time
|
468
|
+
Time.parse(value)
|
439
469
|
when :Date
|
440
470
|
Date.parse(value)
|
441
471
|
when :String
|
@@ -465,7 +495,9 @@ module PulpRpmClient
|
|
465
495
|
end
|
466
496
|
end
|
467
497
|
else # model
|
468
|
-
|
498
|
+
# models (e.g. Pet) or oneOf
|
499
|
+
klass = PulpRpmClient.const_get(type)
|
500
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
469
501
|
end
|
470
502
|
end
|
471
503
|
|
@@ -491,7 +523,7 @@ module PulpRpmClient
|
|
491
523
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
492
524
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
493
525
|
end
|
494
|
-
|
526
|
+
|
495
527
|
hash[param] = _to_hash(value)
|
496
528
|
end
|
497
529
|
hash
|
@@ -514,5 +546,7 @@ module PulpRpmClient
|
|
514
546
|
value
|
515
547
|
end
|
516
548
|
end
|
549
|
+
|
517
550
|
end
|
551
|
+
|
518
552
|
end
|
@@ -6,11 +6,12 @@
|
|
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
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpRpmClient
|
16
17
|
# A Serializer for UpdateCollection.
|
@@ -33,6 +34,11 @@ module PulpRpmClient
|
|
33
34
|
}
|
34
35
|
end
|
35
36
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
36
42
|
# Attribute type mapping.
|
37
43
|
def self.openapi_types
|
38
44
|
{
|
@@ -68,20 +74,27 @@ module PulpRpmClient
|
|
68
74
|
|
69
75
|
if attributes.key?(:'name')
|
70
76
|
self.name = attributes[:'name']
|
77
|
+
else
|
78
|
+
self.name = nil
|
71
79
|
end
|
72
80
|
|
73
81
|
if attributes.key?(:'shortname')
|
74
82
|
self.shortname = attributes[:'shortname']
|
83
|
+
else
|
84
|
+
self.shortname = nil
|
75
85
|
end
|
76
86
|
|
77
87
|
if attributes.key?(:'_module')
|
78
88
|
self._module = attributes[:'_module']
|
89
|
+
else
|
90
|
+
self._module = nil
|
79
91
|
end
|
80
92
|
end
|
81
93
|
|
82
94
|
# Show invalid properties with the reasons. Usually used together with valid?
|
83
95
|
# @return Array for valid properties with the reasons
|
84
96
|
def list_invalid_properties
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
85
98
|
invalid_properties = Array.new
|
86
99
|
invalid_properties
|
87
100
|
end
|
@@ -89,6 +102,7 @@ module PulpRpmClient
|
|
89
102
|
# Check to see if the all the properties in the model are valid
|
90
103
|
# @return true if the model is valid
|
91
104
|
def valid?
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
92
106
|
true
|
93
107
|
end
|
94
108
|
|
@@ -118,37 +132,33 @@ module PulpRpmClient
|
|
118
132
|
# @param [Hash] attributes Model attributes in the form of hash
|
119
133
|
# @return [Object] Returns the model itself
|
120
134
|
def self.build_from_hash(attributes)
|
121
|
-
new.build_from_hash(attributes)
|
122
|
-
end
|
123
|
-
|
124
|
-
# Builds the object from hash
|
125
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
-
# @return [Object] Returns the model itself
|
127
|
-
def build_from_hash(attributes)
|
128
135
|
return nil unless attributes.is_a?(Hash)
|
129
|
-
|
130
|
-
|
136
|
+
attributes = attributes.transform_keys(&:to_sym)
|
137
|
+
transformed_hash = {}
|
138
|
+
openapi_types.each_pair do |key, type|
|
139
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
140
|
+
transformed_hash["#{key}"] = nil
|
141
|
+
elsif type =~ /\AArray<(.*)>/i
|
131
142
|
# check to ensure the input is an array given that the attribute
|
132
143
|
# is documented as an array but the input is not
|
133
|
-
if attributes[
|
134
|
-
|
144
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
145
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
135
146
|
end
|
136
|
-
elsif !attributes[
|
137
|
-
|
138
|
-
end
|
147
|
+
elsif !attributes[attribute_map[key]].nil?
|
148
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
149
|
+
end
|
139
150
|
end
|
140
|
-
|
141
|
-
self
|
151
|
+
new(transformed_hash)
|
142
152
|
end
|
143
153
|
|
144
154
|
# Deserializes the data based on type
|
145
155
|
# @param string type Data type
|
146
156
|
# @param string value Value to be deserialized
|
147
157
|
# @return [Object] Deserialized data
|
148
|
-
def _deserialize(type, value)
|
158
|
+
def self._deserialize(type, value)
|
149
159
|
case type.to_sym
|
150
|
-
when :
|
151
|
-
|
160
|
+
when :Time
|
161
|
+
Time.parse(value)
|
152
162
|
when :Date
|
153
163
|
Date.parse(value)
|
154
164
|
when :String
|
@@ -178,7 +188,9 @@ module PulpRpmClient
|
|
178
188
|
end
|
179
189
|
end
|
180
190
|
else # model
|
181
|
-
|
191
|
+
# models (e.g. Pet) or oneOf
|
192
|
+
klass = PulpRpmClient.const_get(type)
|
193
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
182
194
|
end
|
183
195
|
end
|
184
196
|
|
@@ -204,7 +216,7 @@ module PulpRpmClient
|
|
204
216
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
205
217
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
206
218
|
end
|
207
|
-
|
219
|
+
|
208
220
|
hash[param] = _to_hash(value)
|
209
221
|
end
|
210
222
|
hash
|
@@ -227,5 +239,7 @@ module PulpRpmClient
|
|
227
239
|
value
|
228
240
|
end
|
229
241
|
end
|
242
|
+
|
230
243
|
end
|
244
|
+
|
231
245
|
end
|
@@ -6,11 +6,12 @@
|
|
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
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpRpmClient
|
16
17
|
# A Serializer for UpdateCollection.
|
@@ -37,6 +38,11 @@ module PulpRpmClient
|
|
37
38
|
}
|
38
39
|
end
|
39
40
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
42
|
+
def self.acceptable_attributes
|
43
|
+
attribute_map.values
|
44
|
+
end
|
45
|
+
|
40
46
|
# Attribute type mapping.
|
41
47
|
def self.openapi_types
|
42
48
|
{
|
@@ -73,14 +79,20 @@ module PulpRpmClient
|
|
73
79
|
|
74
80
|
if attributes.key?(:'name')
|
75
81
|
self.name = attributes[:'name']
|
82
|
+
else
|
83
|
+
self.name = nil
|
76
84
|
end
|
77
85
|
|
78
86
|
if attributes.key?(:'shortname')
|
79
87
|
self.shortname = attributes[:'shortname']
|
88
|
+
else
|
89
|
+
self.shortname = nil
|
80
90
|
end
|
81
91
|
|
82
92
|
if attributes.key?(:'_module')
|
83
93
|
self._module = attributes[:'_module']
|
94
|
+
else
|
95
|
+
self._module = nil
|
84
96
|
end
|
85
97
|
|
86
98
|
if attributes.key?(:'packages')
|
@@ -93,6 +105,7 @@ module PulpRpmClient
|
|
93
105
|
# Show invalid properties with the reasons. Usually used together with valid?
|
94
106
|
# @return Array for valid properties with the reasons
|
95
107
|
def list_invalid_properties
|
108
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
96
109
|
invalid_properties = Array.new
|
97
110
|
invalid_properties
|
98
111
|
end
|
@@ -100,6 +113,7 @@ module PulpRpmClient
|
|
100
113
|
# Check to see if the all the properties in the model are valid
|
101
114
|
# @return true if the model is valid
|
102
115
|
def valid?
|
116
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
103
117
|
true
|
104
118
|
end
|
105
119
|
|
@@ -130,37 +144,33 @@ module PulpRpmClient
|
|
130
144
|
# @param [Hash] attributes Model attributes in the form of hash
|
131
145
|
# @return [Object] Returns the model itself
|
132
146
|
def self.build_from_hash(attributes)
|
133
|
-
new.build_from_hash(attributes)
|
134
|
-
end
|
135
|
-
|
136
|
-
# Builds the object from hash
|
137
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
-
# @return [Object] Returns the model itself
|
139
|
-
def build_from_hash(attributes)
|
140
147
|
return nil unless attributes.is_a?(Hash)
|
141
|
-
|
142
|
-
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
149
|
+
transformed_hash = {}
|
150
|
+
openapi_types.each_pair do |key, type|
|
151
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
152
|
+
transformed_hash["#{key}"] = nil
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
143
154
|
# check to ensure the input is an array given that the attribute
|
144
155
|
# is documented as an array but the input is not
|
145
|
-
if attributes[
|
146
|
-
|
156
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
157
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
147
158
|
end
|
148
|
-
elsif !attributes[
|
149
|
-
|
150
|
-
end
|
159
|
+
elsif !attributes[attribute_map[key]].nil?
|
160
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
161
|
+
end
|
151
162
|
end
|
152
|
-
|
153
|
-
self
|
163
|
+
new(transformed_hash)
|
154
164
|
end
|
155
165
|
|
156
166
|
# Deserializes the data based on type
|
157
167
|
# @param string type Data type
|
158
168
|
# @param string value Value to be deserialized
|
159
169
|
# @return [Object] Deserialized data
|
160
|
-
def _deserialize(type, value)
|
170
|
+
def self._deserialize(type, value)
|
161
171
|
case type.to_sym
|
162
|
-
when :
|
163
|
-
|
172
|
+
when :Time
|
173
|
+
Time.parse(value)
|
164
174
|
when :Date
|
165
175
|
Date.parse(value)
|
166
176
|
when :String
|
@@ -190,7 +200,9 @@ module PulpRpmClient
|
|
190
200
|
end
|
191
201
|
end
|
192
202
|
else # model
|
193
|
-
|
203
|
+
# models (e.g. Pet) or oneOf
|
204
|
+
klass = PulpRpmClient.const_get(type)
|
205
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
194
206
|
end
|
195
207
|
end
|
196
208
|
|
@@ -216,7 +228,7 @@ module PulpRpmClient
|
|
216
228
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
217
229
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
218
230
|
end
|
219
|
-
|
231
|
+
|
220
232
|
hash[param] = _to_hash(value)
|
221
233
|
end
|
222
234
|
hash
|
@@ -239,5 +251,7 @@ module PulpRpmClient
|
|
239
251
|
value
|
240
252
|
end
|
241
253
|
end
|
254
|
+
|
242
255
|
end
|
256
|
+
|
243
257
|
end
|