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
|
# Serializer for RPM Distributions.
|
@@ -52,6 +53,11 @@ module PulpRpmClient
|
|
52
53
|
}
|
53
54
|
end
|
54
55
|
|
56
|
+
# Returns all the JSON keys this model knows about
|
57
|
+
def self.acceptable_attributes
|
58
|
+
attribute_map.values
|
59
|
+
end
|
60
|
+
|
55
61
|
# Attribute type mapping.
|
56
62
|
def self.openapi_types
|
57
63
|
{
|
@@ -92,6 +98,8 @@ module PulpRpmClient
|
|
92
98
|
|
93
99
|
if attributes.key?(:'base_path')
|
94
100
|
self.base_path = attributes[:'base_path']
|
101
|
+
else
|
102
|
+
self.base_path = nil
|
95
103
|
end
|
96
104
|
|
97
105
|
if attributes.key?(:'content_guard')
|
@@ -112,6 +120,8 @@ module PulpRpmClient
|
|
112
120
|
|
113
121
|
if attributes.key?(:'name')
|
114
122
|
self.name = attributes[:'name']
|
123
|
+
else
|
124
|
+
self.name = nil
|
115
125
|
end
|
116
126
|
|
117
127
|
if attributes.key?(:'repository')
|
@@ -132,6 +142,7 @@ module PulpRpmClient
|
|
132
142
|
# Show invalid properties with the reasons. Usually used together with valid?
|
133
143
|
# @return Array for valid properties with the reasons
|
134
144
|
def list_invalid_properties
|
145
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
135
146
|
invalid_properties = Array.new
|
136
147
|
if @base_path.nil?
|
137
148
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
@@ -155,6 +166,7 @@ module PulpRpmClient
|
|
155
166
|
# Check to see if the all the properties in the model are valid
|
156
167
|
# @return true if the model is valid
|
157
168
|
def valid?
|
169
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
158
170
|
return false if @base_path.nil?
|
159
171
|
return false if @base_path.to_s.length < 1
|
160
172
|
return false if @name.nil?
|
@@ -221,37 +233,33 @@ module PulpRpmClient
|
|
221
233
|
# @param [Hash] attributes Model attributes in the form of hash
|
222
234
|
# @return [Object] Returns the model itself
|
223
235
|
def self.build_from_hash(attributes)
|
224
|
-
new.build_from_hash(attributes)
|
225
|
-
end
|
226
|
-
|
227
|
-
# Builds the object from hash
|
228
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
229
|
-
# @return [Object] Returns the model itself
|
230
|
-
def build_from_hash(attributes)
|
231
236
|
return nil unless attributes.is_a?(Hash)
|
232
|
-
|
233
|
-
|
237
|
+
attributes = attributes.transform_keys(&:to_sym)
|
238
|
+
transformed_hash = {}
|
239
|
+
openapi_types.each_pair do |key, type|
|
240
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
241
|
+
transformed_hash["#{key}"] = nil
|
242
|
+
elsif type =~ /\AArray<(.*)>/i
|
234
243
|
# check to ensure the input is an array given that the attribute
|
235
244
|
# is documented as an array but the input is not
|
236
|
-
if attributes[
|
237
|
-
|
245
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
246
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
238
247
|
end
|
239
|
-
elsif !attributes[
|
240
|
-
|
241
|
-
end
|
248
|
+
elsif !attributes[attribute_map[key]].nil?
|
249
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
250
|
+
end
|
242
251
|
end
|
243
|
-
|
244
|
-
self
|
252
|
+
new(transformed_hash)
|
245
253
|
end
|
246
254
|
|
247
255
|
# Deserializes the data based on type
|
248
256
|
# @param string type Data type
|
249
257
|
# @param string value Value to be deserialized
|
250
258
|
# @return [Object] Deserialized data
|
251
|
-
def _deserialize(type, value)
|
259
|
+
def self._deserialize(type, value)
|
252
260
|
case type.to_sym
|
253
|
-
when :
|
254
|
-
|
261
|
+
when :Time
|
262
|
+
Time.parse(value)
|
255
263
|
when :Date
|
256
264
|
Date.parse(value)
|
257
265
|
when :String
|
@@ -281,7 +289,9 @@ module PulpRpmClient
|
|
281
289
|
end
|
282
290
|
end
|
283
291
|
else # model
|
284
|
-
|
292
|
+
# models (e.g. Pet) or oneOf
|
293
|
+
klass = PulpRpmClient.const_get(type)
|
294
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
285
295
|
end
|
286
296
|
end
|
287
297
|
|
@@ -307,7 +317,7 @@ module PulpRpmClient
|
|
307
317
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
308
318
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
309
319
|
end
|
310
|
-
|
320
|
+
|
311
321
|
hash[param] = _to_hash(value)
|
312
322
|
end
|
313
323
|
hash
|
@@ -330,5 +340,7 @@ module PulpRpmClient
|
|
330
340
|
value
|
331
341
|
end
|
332
342
|
end
|
343
|
+
|
333
344
|
end
|
345
|
+
|
334
346
|
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
|
# Serializer for RPM Distributions.
|
@@ -75,13 +76,18 @@ module PulpRpmClient
|
|
75
76
|
}
|
76
77
|
end
|
77
78
|
|
79
|
+
# Returns all the JSON keys this model knows about
|
80
|
+
def self.acceptable_attributes
|
81
|
+
attribute_map.values
|
82
|
+
end
|
83
|
+
|
78
84
|
# Attribute type mapping.
|
79
85
|
def self.openapi_types
|
80
86
|
{
|
81
87
|
:'pulp_href' => :'String',
|
82
88
|
:'prn' => :'String',
|
83
|
-
:'pulp_created' => :'
|
84
|
-
:'pulp_last_updated' => :'
|
89
|
+
:'pulp_created' => :'Time',
|
90
|
+
:'pulp_last_updated' => :'Time',
|
85
91
|
:'base_path' => :'String',
|
86
92
|
:'base_url' => :'String',
|
87
93
|
:'content_guard' => :'String',
|
@@ -137,6 +143,8 @@ module PulpRpmClient
|
|
137
143
|
|
138
144
|
if attributes.key?(:'base_path')
|
139
145
|
self.base_path = attributes[:'base_path']
|
146
|
+
else
|
147
|
+
self.base_path = nil
|
140
148
|
end
|
141
149
|
|
142
150
|
if attributes.key?(:'base_url')
|
@@ -165,6 +173,8 @@ module PulpRpmClient
|
|
165
173
|
|
166
174
|
if attributes.key?(:'name')
|
167
175
|
self.name = attributes[:'name']
|
176
|
+
else
|
177
|
+
self.name = nil
|
168
178
|
end
|
169
179
|
|
170
180
|
if attributes.key?(:'repository')
|
@@ -185,6 +195,7 @@ module PulpRpmClient
|
|
185
195
|
# Show invalid properties with the reasons. Usually used together with valid?
|
186
196
|
# @return Array for valid properties with the reasons
|
187
197
|
def list_invalid_properties
|
198
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
188
199
|
invalid_properties = Array.new
|
189
200
|
if @base_path.nil?
|
190
201
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
@@ -200,6 +211,7 @@ module PulpRpmClient
|
|
200
211
|
# Check to see if the all the properties in the model are valid
|
201
212
|
# @return true if the model is valid
|
202
213
|
def valid?
|
214
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
203
215
|
return false if @base_path.nil?
|
204
216
|
return false if @name.nil?
|
205
217
|
true
|
@@ -242,37 +254,33 @@ module PulpRpmClient
|
|
242
254
|
# @param [Hash] attributes Model attributes in the form of hash
|
243
255
|
# @return [Object] Returns the model itself
|
244
256
|
def self.build_from_hash(attributes)
|
245
|
-
new.build_from_hash(attributes)
|
246
|
-
end
|
247
|
-
|
248
|
-
# Builds the object from hash
|
249
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
250
|
-
# @return [Object] Returns the model itself
|
251
|
-
def build_from_hash(attributes)
|
252
257
|
return nil unless attributes.is_a?(Hash)
|
253
|
-
|
254
|
-
|
258
|
+
attributes = attributes.transform_keys(&:to_sym)
|
259
|
+
transformed_hash = {}
|
260
|
+
openapi_types.each_pair do |key, type|
|
261
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
262
|
+
transformed_hash["#{key}"] = nil
|
263
|
+
elsif type =~ /\AArray<(.*)>/i
|
255
264
|
# check to ensure the input is an array given that the attribute
|
256
265
|
# is documented as an array but the input is not
|
257
|
-
if attributes[
|
258
|
-
|
266
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
267
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
259
268
|
end
|
260
|
-
elsif !attributes[
|
261
|
-
|
262
|
-
end
|
269
|
+
elsif !attributes[attribute_map[key]].nil?
|
270
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
271
|
+
end
|
263
272
|
end
|
264
|
-
|
265
|
-
self
|
273
|
+
new(transformed_hash)
|
266
274
|
end
|
267
275
|
|
268
276
|
# Deserializes the data based on type
|
269
277
|
# @param string type Data type
|
270
278
|
# @param string value Value to be deserialized
|
271
279
|
# @return [Object] Deserialized data
|
272
|
-
def _deserialize(type, value)
|
280
|
+
def self._deserialize(type, value)
|
273
281
|
case type.to_sym
|
274
|
-
when :
|
275
|
-
|
282
|
+
when :Time
|
283
|
+
Time.parse(value)
|
276
284
|
when :Date
|
277
285
|
Date.parse(value)
|
278
286
|
when :String
|
@@ -302,7 +310,9 @@ module PulpRpmClient
|
|
302
310
|
end
|
303
311
|
end
|
304
312
|
else # model
|
305
|
-
|
313
|
+
# models (e.g. Pet) or oneOf
|
314
|
+
klass = PulpRpmClient.const_get(type)
|
315
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
306
316
|
end
|
307
317
|
end
|
308
318
|
|
@@ -328,7 +338,7 @@ module PulpRpmClient
|
|
328
338
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
329
339
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
330
340
|
end
|
331
|
-
|
341
|
+
|
332
342
|
hash[param] = _to_hash(value)
|
333
343
|
end
|
334
344
|
hash
|
@@ -351,5 +361,7 @@ module PulpRpmClient
|
|
351
361
|
value
|
352
362
|
end
|
353
363
|
end
|
364
|
+
|
354
365
|
end
|
366
|
+
|
355
367
|
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 RpmPublication.
|
@@ -41,6 +42,28 @@ module PulpRpmClient
|
|
41
42
|
# The compression type to use for metadata files. * `zstd` - zstd * `gz` - gz
|
42
43
|
attr_accessor :compression_type
|
43
44
|
|
45
|
+
class EnumAttributeValidator
|
46
|
+
attr_reader :datatype
|
47
|
+
attr_reader :allowable_values
|
48
|
+
|
49
|
+
def initialize(datatype, allowable_values)
|
50
|
+
@allowable_values = allowable_values.map do |value|
|
51
|
+
case datatype.to_s
|
52
|
+
when /Integer/i
|
53
|
+
value.to_i
|
54
|
+
when /Float/i
|
55
|
+
value.to_f
|
56
|
+
else
|
57
|
+
value
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def valid?(value)
|
63
|
+
!value || allowable_values.include?(value)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
44
67
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
68
|
def self.attribute_map
|
46
69
|
{
|
@@ -56,6 +79,11 @@ module PulpRpmClient
|
|
56
79
|
}
|
57
80
|
end
|
58
81
|
|
82
|
+
# Returns all the JSON keys this model knows about
|
83
|
+
def self.acceptable_attributes
|
84
|
+
attribute_map.values
|
85
|
+
end
|
86
|
+
|
59
87
|
# Attribute type mapping.
|
60
88
|
def self.openapi_types
|
61
89
|
{
|
@@ -76,6 +104,7 @@ module PulpRpmClient
|
|
76
104
|
Set.new([
|
77
105
|
:'gpgcheck',
|
78
106
|
:'repo_gpgcheck',
|
107
|
+
:'repo_config',
|
79
108
|
])
|
80
109
|
end
|
81
110
|
|
@@ -134,6 +163,7 @@ module PulpRpmClient
|
|
134
163
|
# Show invalid properties with the reasons. Usually used together with valid?
|
135
164
|
# @return Array for valid properties with the reasons
|
136
165
|
def list_invalid_properties
|
166
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
137
167
|
invalid_properties = Array.new
|
138
168
|
if !@gpgcheck.nil? && @gpgcheck > 1
|
139
169
|
invalid_properties.push('invalid value for "gpgcheck", must be smaller than or equal to 1.')
|
@@ -157,6 +187,7 @@ module PulpRpmClient
|
|
157
187
|
# Check to see if the all the properties in the model are valid
|
158
188
|
# @return true if the model is valid
|
159
189
|
def valid?
|
190
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
160
191
|
return false if !@gpgcheck.nil? && @gpgcheck > 1
|
161
192
|
return false if !@gpgcheck.nil? && @gpgcheck < 0
|
162
193
|
return false if !@repo_gpgcheck.nil? && @repo_gpgcheck > 1
|
@@ -224,37 +255,33 @@ module PulpRpmClient
|
|
224
255
|
# @param [Hash] attributes Model attributes in the form of hash
|
225
256
|
# @return [Object] Returns the model itself
|
226
257
|
def self.build_from_hash(attributes)
|
227
|
-
new.build_from_hash(attributes)
|
228
|
-
end
|
229
|
-
|
230
|
-
# Builds the object from hash
|
231
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
232
|
-
# @return [Object] Returns the model itself
|
233
|
-
def build_from_hash(attributes)
|
234
258
|
return nil unless attributes.is_a?(Hash)
|
235
|
-
|
236
|
-
|
259
|
+
attributes = attributes.transform_keys(&:to_sym)
|
260
|
+
transformed_hash = {}
|
261
|
+
openapi_types.each_pair do |key, type|
|
262
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
263
|
+
transformed_hash["#{key}"] = nil
|
264
|
+
elsif type =~ /\AArray<(.*)>/i
|
237
265
|
# check to ensure the input is an array given that the attribute
|
238
266
|
# is documented as an array but the input is not
|
239
|
-
if attributes[
|
240
|
-
|
267
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
268
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
241
269
|
end
|
242
|
-
elsif !attributes[
|
243
|
-
|
244
|
-
end
|
270
|
+
elsif !attributes[attribute_map[key]].nil?
|
271
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
272
|
+
end
|
245
273
|
end
|
246
|
-
|
247
|
-
self
|
274
|
+
new(transformed_hash)
|
248
275
|
end
|
249
276
|
|
250
277
|
# Deserializes the data based on type
|
251
278
|
# @param string type Data type
|
252
279
|
# @param string value Value to be deserialized
|
253
280
|
# @return [Object] Deserialized data
|
254
|
-
def _deserialize(type, value)
|
281
|
+
def self._deserialize(type, value)
|
255
282
|
case type.to_sym
|
256
|
-
when :
|
257
|
-
|
283
|
+
when :Time
|
284
|
+
Time.parse(value)
|
258
285
|
when :Date
|
259
286
|
Date.parse(value)
|
260
287
|
when :String
|
@@ -284,7 +311,9 @@ module PulpRpmClient
|
|
284
311
|
end
|
285
312
|
end
|
286
313
|
else # model
|
287
|
-
|
314
|
+
# models (e.g. Pet) or oneOf
|
315
|
+
klass = PulpRpmClient.const_get(type)
|
316
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
288
317
|
end
|
289
318
|
end
|
290
319
|
|
@@ -310,7 +339,7 @@ module PulpRpmClient
|
|
310
339
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
311
340
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
312
341
|
end
|
313
|
-
|
342
|
+
|
314
343
|
hash[param] = _to_hash(value)
|
315
344
|
end
|
316
345
|
hash
|
@@ -333,5 +362,7 @@ module PulpRpmClient
|
|
333
362
|
value
|
334
363
|
end
|
335
364
|
end
|
365
|
+
|
336
366
|
end
|
367
|
+
|
337
368
|
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 RpmPublication.
|
@@ -55,6 +56,28 @@ module PulpRpmClient
|
|
55
56
|
# The compression type to use for metadata files. * `zstd` - zstd * `gz` - gz
|
56
57
|
attr_accessor :compression_type
|
57
58
|
|
59
|
+
class EnumAttributeValidator
|
60
|
+
attr_reader :datatype
|
61
|
+
attr_reader :allowable_values
|
62
|
+
|
63
|
+
def initialize(datatype, allowable_values)
|
64
|
+
@allowable_values = allowable_values.map do |value|
|
65
|
+
case datatype.to_s
|
66
|
+
when /Integer/i
|
67
|
+
value.to_i
|
68
|
+
when /Float/i
|
69
|
+
value.to_f
|
70
|
+
else
|
71
|
+
value
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def valid?(value)
|
77
|
+
!value || allowable_values.include?(value)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
58
81
|
# Attribute mapping from ruby-style variable name to JSON key.
|
59
82
|
def self.attribute_map
|
60
83
|
{
|
@@ -75,13 +98,18 @@ module PulpRpmClient
|
|
75
98
|
}
|
76
99
|
end
|
77
100
|
|
101
|
+
# Returns all the JSON keys this model knows about
|
102
|
+
def self.acceptable_attributes
|
103
|
+
attribute_map.values
|
104
|
+
end
|
105
|
+
|
78
106
|
# Attribute type mapping.
|
79
107
|
def self.openapi_types
|
80
108
|
{
|
81
109
|
:'pulp_href' => :'String',
|
82
110
|
:'prn' => :'String',
|
83
|
-
:'pulp_created' => :'
|
84
|
-
:'pulp_last_updated' => :'
|
111
|
+
:'pulp_created' => :'Time',
|
112
|
+
:'pulp_last_updated' => :'Time',
|
85
113
|
:'repository_version' => :'String',
|
86
114
|
:'repository' => :'String',
|
87
115
|
:'checksum_type' => :'PackageChecksumTypeEnum',
|
@@ -100,6 +128,7 @@ module PulpRpmClient
|
|
100
128
|
Set.new([
|
101
129
|
:'gpgcheck',
|
102
130
|
:'repo_gpgcheck',
|
131
|
+
:'repo_config',
|
103
132
|
])
|
104
133
|
end
|
105
134
|
|
@@ -180,6 +209,7 @@ module PulpRpmClient
|
|
180
209
|
# Show invalid properties with the reasons. Usually used together with valid?
|
181
210
|
# @return Array for valid properties with the reasons
|
182
211
|
def list_invalid_properties
|
212
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
183
213
|
invalid_properties = Array.new
|
184
214
|
if !@gpgcheck.nil? && @gpgcheck > 1
|
185
215
|
invalid_properties.push('invalid value for "gpgcheck", must be smaller than or equal to 1.')
|
@@ -203,6 +233,7 @@ module PulpRpmClient
|
|
203
233
|
# Check to see if the all the properties in the model are valid
|
204
234
|
# @return true if the model is valid
|
205
235
|
def valid?
|
236
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
206
237
|
return false if !@gpgcheck.nil? && @gpgcheck > 1
|
207
238
|
return false if !@gpgcheck.nil? && @gpgcheck < 0
|
208
239
|
return false if !@repo_gpgcheck.nil? && @repo_gpgcheck > 1
|
@@ -275,37 +306,33 @@ module PulpRpmClient
|
|
275
306
|
# @param [Hash] attributes Model attributes in the form of hash
|
276
307
|
# @return [Object] Returns the model itself
|
277
308
|
def self.build_from_hash(attributes)
|
278
|
-
new.build_from_hash(attributes)
|
279
|
-
end
|
280
|
-
|
281
|
-
# Builds the object from hash
|
282
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
283
|
-
# @return [Object] Returns the model itself
|
284
|
-
def build_from_hash(attributes)
|
285
309
|
return nil unless attributes.is_a?(Hash)
|
286
|
-
|
287
|
-
|
310
|
+
attributes = attributes.transform_keys(&:to_sym)
|
311
|
+
transformed_hash = {}
|
312
|
+
openapi_types.each_pair do |key, type|
|
313
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
314
|
+
transformed_hash["#{key}"] = nil
|
315
|
+
elsif type =~ /\AArray<(.*)>/i
|
288
316
|
# check to ensure the input is an array given that the attribute
|
289
317
|
# is documented as an array but the input is not
|
290
|
-
if attributes[
|
291
|
-
|
318
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
319
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
292
320
|
end
|
293
|
-
elsif !attributes[
|
294
|
-
|
295
|
-
end
|
321
|
+
elsif !attributes[attribute_map[key]].nil?
|
322
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
323
|
+
end
|
296
324
|
end
|
297
|
-
|
298
|
-
self
|
325
|
+
new(transformed_hash)
|
299
326
|
end
|
300
327
|
|
301
328
|
# Deserializes the data based on type
|
302
329
|
# @param string type Data type
|
303
330
|
# @param string value Value to be deserialized
|
304
331
|
# @return [Object] Deserialized data
|
305
|
-
def _deserialize(type, value)
|
332
|
+
def self._deserialize(type, value)
|
306
333
|
case type.to_sym
|
307
|
-
when :
|
308
|
-
|
334
|
+
when :Time
|
335
|
+
Time.parse(value)
|
309
336
|
when :Date
|
310
337
|
Date.parse(value)
|
311
338
|
when :String
|
@@ -335,7 +362,9 @@ module PulpRpmClient
|
|
335
362
|
end
|
336
363
|
end
|
337
364
|
else # model
|
338
|
-
|
365
|
+
# models (e.g. Pet) or oneOf
|
366
|
+
klass = PulpRpmClient.const_get(type)
|
367
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
339
368
|
end
|
340
369
|
end
|
341
370
|
|
@@ -361,7 +390,7 @@ module PulpRpmClient
|
|
361
390
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
362
391
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
363
392
|
end
|
364
|
-
|
393
|
+
|
365
394
|
hash[param] = _to_hash(value)
|
366
395
|
end
|
367
396
|
hash
|
@@ -384,5 +413,7 @@ module PulpRpmClient
|
|
384
413
|
value
|
385
414
|
end
|
386
415
|
end
|
416
|
+
|
387
417
|
end
|
418
|
+
|
388
419
|
end
|