pulp_rpm_client 3.27.1 → 3.28.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 +11 -10
- data/docs/AcsRpmApi.md +346 -157
- data/docs/AddonResponse.md +16 -15
- data/docs/ArtifactResponse.md +30 -27
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ChecksumResponse.md +10 -9
- data/docs/CompressionTypeEnum.md +4 -5
- data/docs/ContentAdvisoriesApi.md +132 -78
- data/docs/ContentDistributionTreesApi.md +84 -49
- data/docs/ContentModulemdDefaultsApi.md +119 -67
- data/docs/ContentModulemdObsoletesApi.md +112 -60
- data/docs/ContentModulemdsApi.md +128 -76
- data/docs/ContentPackagecategoriesApi.md +84 -49
- data/docs/ContentPackageenvironmentsApi.md +84 -49
- data/docs/ContentPackagegroupsApi.md +84 -49
- data/docs/ContentPackagelangpacksApi.md +84 -49
- data/docs/ContentPackagesApi.md +155 -101
- data/docs/ContentRepoMetadataFilesApi.md +84 -49
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/Copy.md +10 -9
- data/docs/DistributionsRpmApi.md +388 -183
- 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 +271 -132
- data/docs/RemotesRpmApi.md +392 -185
- data/docs/RemotesUlnApi.md +392 -185
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesRpmApi.md +449 -210
- data/docs/RepositoriesRpmVersionsApi.md +155 -83
- data/docs/RepositoryAddRemoveContent.md +12 -11
- data/docs/RepositoryVersionResponse.md +22 -19
- data/docs/RpmCompsApi.md +33 -17
- data/docs/RpmCopyApi.md +31 -15
- data/docs/RpmDistributionTreeResponse.md +46 -43
- data/docs/RpmModulemd.md +32 -31
- data/docs/RpmModulemdDefaults.md +16 -15
- data/docs/RpmModulemdDefaultsResponse.md +20 -17
- data/docs/RpmModulemdObsolete.md +28 -27
- data/docs/RpmModulemdObsoleteResponse.md +32 -29
- data/docs/RpmModulemdResponse.md +36 -33
- data/docs/RpmPackageCategoryResponse.md +30 -27
- data/docs/RpmPackageEnvironmentResponse.md +32 -29
- data/docs/RpmPackageGroupResponse.md +36 -33
- data/docs/RpmPackageLangpacksResponse.md +18 -15
- data/docs/RpmPackageResponse.md +100 -97
- data/docs/RpmPruneApi.md +31 -14
- data/docs/RpmRepoMetadataFileResponse.md +36 -33
- data/docs/RpmRepositorySyncURL.md +16 -15
- data/docs/RpmRpmAlternateContentSource.md +14 -13
- data/docs/RpmRpmAlternateContentSourceResponse.md +22 -19
- data/docs/RpmRpmDistribution.md +22 -21
- data/docs/RpmRpmDistributionResponse.md +34 -29
- data/docs/RpmRpmPublication.md +24 -23
- data/docs/RpmRpmPublicationResponse.md +34 -31
- data/docs/RpmRpmRemote.md +50 -49
- data/docs/RpmRpmRemoteResponse.md +50 -47
- data/docs/RpmRpmRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/RpmRpmRepository.md +40 -39
- data/docs/RpmRpmRepositoryResponse.md +54 -51
- data/docs/RpmUlnRemote.md +50 -49
- data/docs/RpmUlnRemoteResponse.md +50 -47
- data/docs/RpmUpdateCollection.md +12 -11
- data/docs/RpmUpdateCollectionResponse.md +14 -13
- data/docs/RpmUpdateRecordResponse.md +50 -47
- 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 +81 -52
- data/lib/pulp_rpm_client/api/content_advisories_api.rb +38 -22
- data/lib/pulp_rpm_client/api/content_distribution_trees_api.rb +22 -17
- data/lib/pulp_rpm_client/api/content_modulemd_defaults_api.rb +31 -22
- data/lib/pulp_rpm_client/api/content_modulemd_obsoletes_api.rb +31 -22
- data/lib/pulp_rpm_client/api/content_modulemds_api.rb +31 -22
- data/lib/pulp_rpm_client/api/content_packagecategories_api.rb +22 -17
- data/lib/pulp_rpm_client/api/content_packageenvironments_api.rb +22 -17
- data/lib/pulp_rpm_client/api/content_packagegroups_api.rb +22 -17
- data/lib/pulp_rpm_client/api/content_packagelangpacks_api.rb +22 -17
- data/lib/pulp_rpm_client/api/content_packages_api.rb +38 -22
- data/lib/pulp_rpm_client/api/content_repo_metadata_files_api.rb +22 -17
- data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +94 -58
- data/lib/pulp_rpm_client/api/publications_rpm_api.rb +81 -58
- data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +109 -70
- data/lib/pulp_rpm_client/api/remotes_uln_api.rb +109 -70
- data/lib/pulp_rpm_client/api/repositories_rpm_api.rb +116 -72
- data/lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb +50 -37
- 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 +46 -26
- 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 +35 -29
- 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 +62 -24
- data/lib/pulp_rpm_client/models/patchedrpm_rpm_repository.rb +69 -26
- data/lib/pulp_rpm_client/models/patchedrpm_uln_remote.rb +72 -26
- 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 +31 -23
- data/lib/pulp_rpm_client/models/repository_version_response.rb +44 -26
- data/lib/pulp_rpm_client/models/rpm_distribution_tree_response.rb +77 -23
- data/lib/pulp_rpm_client/models/rpm_modulemd.rb +53 -25
- data/lib/pulp_rpm_client/models/rpm_modulemd_defaults.rb +40 -28
- data/lib/pulp_rpm_client/models/rpm_modulemd_defaults_response.rb +51 -31
- data/lib/pulp_rpm_client/models/rpm_modulemd_obsolete.rb +55 -27
- data/lib/pulp_rpm_client/models/rpm_modulemd_obsolete_response.rb +61 -25
- data/lib/pulp_rpm_client/models/rpm_modulemd_response.rb +64 -28
- data/lib/pulp_rpm_client/models/rpm_package_category_response.rb +62 -28
- data/lib/pulp_rpm_client/models/rpm_package_environment_response.rb +65 -29
- data/lib/pulp_rpm_client/models/rpm_package_group_response.rb +62 -28
- data/lib/pulp_rpm_client/models/rpm_package_langpacks_response.rb +48 -26
- data/lib/pulp_rpm_client/models/rpm_package_response.rb +63 -35
- data/lib/pulp_rpm_client/models/rpm_repo_metadata_file_response.rb +51 -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 +48 -26
- data/lib/pulp_rpm_client/models/rpm_rpm_distribution.rb +34 -22
- data/lib/pulp_rpm_client/models/rpm_rpm_distribution_response.rb +57 -25
- data/lib/pulp_rpm_client/models/rpm_rpm_publication.rb +54 -23
- data/lib/pulp_rpm_client/models/rpm_rpm_publication_response.rb +67 -26
- data/lib/pulp_rpm_client/models/rpm_rpm_remote.rb +56 -22
- data/lib/pulp_rpm_client/models/rpm_rpm_remote_response.rb +70 -26
- 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 +66 -25
- data/lib/pulp_rpm_client/models/rpm_rpm_repository_response.rb +79 -28
- data/lib/pulp_rpm_client/models/rpm_uln_remote.rb +60 -22
- data/lib/pulp_rpm_client/models/rpm_uln_remote_response.rb +70 -26
- data/lib/pulp_rpm_client/models/rpm_update_collection.rb +37 -23
- data/lib/pulp_rpm_client/models/rpm_update_collection_response.rb +37 -23
- data/lib/pulp_rpm_client/models/rpm_update_record_response.rb +43 -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 +32 -22
- data/lib/pulp_rpm_client/models/unset_label_response.rb +32 -22
- 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 +14 -13
- data/spec/api/content_advisories_api_spec.rb +10 -8
- data/spec/api/content_distribution_trees_api_spec.rb +8 -7
- data/spec/api/content_modulemd_defaults_api_spec.rb +9 -8
- data/spec/api/content_modulemd_obsoletes_api_spec.rb +9 -8
- data/spec/api/content_modulemds_api_spec.rb +9 -8
- data/spec/api/content_packagecategories_api_spec.rb +8 -7
- data/spec/api/content_packageenvironments_api_spec.rb +8 -7
- data/spec/api/content_packagegroups_api_spec.rb +8 -7
- data/spec/api/content_packagelangpacks_api_spec.rb +8 -7
- data/spec/api/content_packages_api_spec.rb +10 -8
- data/spec/api/content_repo_metadata_files_api_spec.rb +8 -7
- data/spec/api/distributions_rpm_api_spec.rb +15 -14
- data/spec/api/publications_rpm_api_spec.rb +22 -20
- data/spec/api/remotes_rpm_api_spec.rb +22 -20
- data/spec/api/remotes_uln_api_spec.rb +22 -20
- data/spec/api/repositories_rpm_api_spec.rb +19 -18
- data/spec/api/repositories_rpm_versions_api_spec.rb +16 -14
- 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 +23 -22
- 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 +19 -18
- data/spec/models/rpm_distribution_tree_response_spec.rb +31 -30
- data/spec/models/rpm_modulemd_defaults_response_spec.rb +18 -17
- data/spec/models/rpm_modulemd_defaults_spec.rb +11 -16
- data/spec/models/rpm_modulemd_obsolete_response_spec.rb +24 -23
- data/spec/models/rpm_modulemd_obsolete_spec.rb +17 -22
- data/spec/models/rpm_modulemd_response_spec.rb +26 -25
- data/spec/models/rpm_modulemd_spec.rb +19 -24
- data/spec/models/rpm_package_category_response_spec.rb +23 -22
- data/spec/models/rpm_package_environment_response_spec.rb +24 -23
- data/spec/models/rpm_package_group_response_spec.rb +26 -25
- data/spec/models/rpm_package_langpacks_response_spec.rb +17 -16
- data/spec/models/rpm_package_response_spec.rb +58 -57
- data/spec/models/rpm_repo_metadata_file_response_spec.rb +26 -25
- data/spec/models/rpm_repository_sync_url_spec.rb +11 -16
- data/spec/models/rpm_rpm_alternate_content_source_response_spec.rb +19 -18
- data/spec/models/rpm_rpm_alternate_content_source_spec.rb +10 -15
- data/spec/models/rpm_rpm_distribution_response_spec.rb +30 -23
- data/spec/models/rpm_rpm_distribution_spec.rb +14 -19
- data/spec/models/rpm_rpm_publication_response_spec.rb +25 -24
- 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 +33 -32
- data/spec/models/rpm_rpm_remote_spec.rb +28 -33
- data/spec/models/rpm_rpm_repository_response_spec.rb +35 -34
- data/spec/models/rpm_rpm_repository_spec.rb +23 -28
- data/spec/models/rpm_uln_remote_response_spec.rb +33 -32
- 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 +33 -32
- 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 +133 -121
- data/docs/CompsXml.md +0 -21
- data/docs/RpmPackage.md +0 -25
- data/docs/RpmRpmRemoteResponseHiddenFields.md +0 -19
- data/docs/RpmUpdateRecord.md +0 -21
- data/lib/pulp_rpm_client/models/comps_xml.rb +0 -233
- data/lib/pulp_rpm_client/models/rpm_package.rb +0 -263
- data/lib/pulp_rpm_client/models/rpm_update_record.rb +0 -228
- 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 -65
- data/spec/models/rpm_update_record_spec.rb +0 -53
@@ -6,17 +6,21 @@
|
|
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
|
# DistributionTree serializer.
|
17
18
|
class RpmDistributionTreeResponse
|
18
19
|
attr_accessor :pulp_href
|
19
20
|
|
21
|
+
# The Pulp Resource Name (PRN).
|
22
|
+
attr_accessor :prn
|
23
|
+
|
20
24
|
# Header Version.
|
21
25
|
attr_accessor :header_version
|
22
26
|
|
@@ -71,6 +75,7 @@ module PulpRpmClient
|
|
71
75
|
def self.attribute_map
|
72
76
|
{
|
73
77
|
:'pulp_href' => :'pulp_href',
|
78
|
+
:'prn' => :'prn',
|
74
79
|
:'header_version' => :'header_version',
|
75
80
|
:'release_name' => :'release_name',
|
76
81
|
:'release_short' => :'release_short',
|
@@ -92,10 +97,16 @@ module PulpRpmClient
|
|
92
97
|
}
|
93
98
|
end
|
94
99
|
|
100
|
+
# Returns all the JSON keys this model knows about
|
101
|
+
def self.acceptable_attributes
|
102
|
+
attribute_map.values
|
103
|
+
end
|
104
|
+
|
95
105
|
# Attribute type mapping.
|
96
106
|
def self.openapi_types
|
97
107
|
{
|
98
108
|
:'pulp_href' => :'String',
|
109
|
+
:'prn' => :'String',
|
99
110
|
:'header_version' => :'String',
|
100
111
|
:'release_name' => :'String',
|
101
112
|
:'release_short' => :'String',
|
@@ -149,90 +160,131 @@ module PulpRpmClient
|
|
149
160
|
self.pulp_href = attributes[:'pulp_href']
|
150
161
|
end
|
151
162
|
|
163
|
+
if attributes.key?(:'prn')
|
164
|
+
self.prn = attributes[:'prn']
|
165
|
+
end
|
166
|
+
|
152
167
|
if attributes.key?(:'header_version')
|
153
168
|
self.header_version = attributes[:'header_version']
|
169
|
+
else
|
170
|
+
self.header_version = nil
|
154
171
|
end
|
155
172
|
|
156
173
|
if attributes.key?(:'release_name')
|
157
174
|
self.release_name = attributes[:'release_name']
|
175
|
+
else
|
176
|
+
self.release_name = nil
|
158
177
|
end
|
159
178
|
|
160
179
|
if attributes.key?(:'release_short')
|
161
180
|
self.release_short = attributes[:'release_short']
|
181
|
+
else
|
182
|
+
self.release_short = nil
|
162
183
|
end
|
163
184
|
|
164
185
|
if attributes.key?(:'release_version')
|
165
186
|
self.release_version = attributes[:'release_version']
|
187
|
+
else
|
188
|
+
self.release_version = nil
|
166
189
|
end
|
167
190
|
|
168
191
|
if attributes.key?(:'release_is_layered')
|
169
192
|
self.release_is_layered = attributes[:'release_is_layered']
|
193
|
+
else
|
194
|
+
self.release_is_layered = nil
|
170
195
|
end
|
171
196
|
|
172
197
|
if attributes.key?(:'base_product_name')
|
173
198
|
self.base_product_name = attributes[:'base_product_name']
|
199
|
+
else
|
200
|
+
self.base_product_name = nil
|
174
201
|
end
|
175
202
|
|
176
203
|
if attributes.key?(:'base_product_short')
|
177
204
|
self.base_product_short = attributes[:'base_product_short']
|
205
|
+
else
|
206
|
+
self.base_product_short = nil
|
178
207
|
end
|
179
208
|
|
180
209
|
if attributes.key?(:'base_product_version')
|
181
210
|
self.base_product_version = attributes[:'base_product_version']
|
211
|
+
else
|
212
|
+
self.base_product_version = nil
|
182
213
|
end
|
183
214
|
|
184
215
|
if attributes.key?(:'arch')
|
185
216
|
self.arch = attributes[:'arch']
|
217
|
+
else
|
218
|
+
self.arch = nil
|
186
219
|
end
|
187
220
|
|
188
221
|
if attributes.key?(:'build_timestamp')
|
189
222
|
self.build_timestamp = attributes[:'build_timestamp']
|
223
|
+
else
|
224
|
+
self.build_timestamp = nil
|
190
225
|
end
|
191
226
|
|
192
227
|
if attributes.key?(:'instimage')
|
193
228
|
self.instimage = attributes[:'instimage']
|
229
|
+
else
|
230
|
+
self.instimage = nil
|
194
231
|
end
|
195
232
|
|
196
233
|
if attributes.key?(:'mainimage')
|
197
234
|
self.mainimage = attributes[:'mainimage']
|
235
|
+
else
|
236
|
+
self.mainimage = nil
|
198
237
|
end
|
199
238
|
|
200
239
|
if attributes.key?(:'discnum')
|
201
240
|
self.discnum = attributes[:'discnum']
|
241
|
+
else
|
242
|
+
self.discnum = nil
|
202
243
|
end
|
203
244
|
|
204
245
|
if attributes.key?(:'totaldiscs')
|
205
246
|
self.totaldiscs = attributes[:'totaldiscs']
|
247
|
+
else
|
248
|
+
self.totaldiscs = nil
|
206
249
|
end
|
207
250
|
|
208
251
|
if attributes.key?(:'addons')
|
209
252
|
if (value = attributes[:'addons']).is_a?(Array)
|
210
253
|
self.addons = value
|
211
254
|
end
|
255
|
+
else
|
256
|
+
self.addons = nil
|
212
257
|
end
|
213
258
|
|
214
259
|
if attributes.key?(:'checksums')
|
215
260
|
if (value = attributes[:'checksums']).is_a?(Array)
|
216
261
|
self.checksums = value
|
217
262
|
end
|
263
|
+
else
|
264
|
+
self.checksums = nil
|
218
265
|
end
|
219
266
|
|
220
267
|
if attributes.key?(:'images')
|
221
268
|
if (value = attributes[:'images']).is_a?(Array)
|
222
269
|
self.images = value
|
223
270
|
end
|
271
|
+
else
|
272
|
+
self.images = nil
|
224
273
|
end
|
225
274
|
|
226
275
|
if attributes.key?(:'variants')
|
227
276
|
if (value = attributes[:'variants']).is_a?(Array)
|
228
277
|
self.variants = value
|
229
278
|
end
|
279
|
+
else
|
280
|
+
self.variants = nil
|
230
281
|
end
|
231
282
|
end
|
232
283
|
|
233
284
|
# Show invalid properties with the reasons. Usually used together with valid?
|
234
285
|
# @return Array for valid properties with the reasons
|
235
286
|
def list_invalid_properties
|
287
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
236
288
|
invalid_properties = Array.new
|
237
289
|
if @header_version.nil?
|
238
290
|
invalid_properties.push('invalid value for "header_version", header_version cannot be nil.')
|
@@ -284,6 +336,7 @@ module PulpRpmClient
|
|
284
336
|
# Check to see if the all the properties in the model are valid
|
285
337
|
# @return true if the model is valid
|
286
338
|
def valid?
|
339
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
287
340
|
return false if @header_version.nil?
|
288
341
|
return false if @release_name.nil?
|
289
342
|
return false if @release_short.nil?
|
@@ -304,6 +357,7 @@ module PulpRpmClient
|
|
304
357
|
return true if self.equal?(o)
|
305
358
|
self.class == o.class &&
|
306
359
|
pulp_href == o.pulp_href &&
|
360
|
+
prn == o.prn &&
|
307
361
|
header_version == o.header_version &&
|
308
362
|
release_name == o.release_name &&
|
309
363
|
release_short == o.release_short &&
|
@@ -333,44 +387,40 @@ module PulpRpmClient
|
|
333
387
|
# Calculates hash code according to all attributes.
|
334
388
|
# @return [Integer] Hash code
|
335
389
|
def hash
|
336
|
-
[pulp_href, header_version, release_name, release_short, release_version, release_is_layered, base_product_name, base_product_short, base_product_version, arch, build_timestamp, instimage, mainimage, discnum, totaldiscs, addons, checksums, images, variants].hash
|
390
|
+
[pulp_href, prn, header_version, release_name, release_short, release_version, release_is_layered, base_product_name, base_product_short, base_product_version, arch, build_timestamp, instimage, mainimage, discnum, totaldiscs, addons, checksums, images, variants].hash
|
337
391
|
end
|
338
392
|
|
339
393
|
# Builds the object from hash
|
340
394
|
# @param [Hash] attributes Model attributes in the form of hash
|
341
395
|
# @return [Object] Returns the model itself
|
342
396
|
def self.build_from_hash(attributes)
|
343
|
-
new.build_from_hash(attributes)
|
344
|
-
end
|
345
|
-
|
346
|
-
# Builds the object from hash
|
347
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
348
|
-
# @return [Object] Returns the model itself
|
349
|
-
def build_from_hash(attributes)
|
350
397
|
return nil unless attributes.is_a?(Hash)
|
351
|
-
|
352
|
-
|
398
|
+
attributes = attributes.transform_keys(&:to_sym)
|
399
|
+
transformed_hash = {}
|
400
|
+
openapi_types.each_pair do |key, type|
|
401
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
402
|
+
transformed_hash["#{key}"] = nil
|
403
|
+
elsif type =~ /\AArray<(.*)>/i
|
353
404
|
# check to ensure the input is an array given that the attribute
|
354
405
|
# is documented as an array but the input is not
|
355
|
-
if attributes[
|
356
|
-
|
406
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
407
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
357
408
|
end
|
358
|
-
elsif !attributes[
|
359
|
-
|
360
|
-
end
|
409
|
+
elsif !attributes[attribute_map[key]].nil?
|
410
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
411
|
+
end
|
361
412
|
end
|
362
|
-
|
363
|
-
self
|
413
|
+
new(transformed_hash)
|
364
414
|
end
|
365
415
|
|
366
416
|
# Deserializes the data based on type
|
367
417
|
# @param string type Data type
|
368
418
|
# @param string value Value to be deserialized
|
369
419
|
# @return [Object] Deserialized data
|
370
|
-
def _deserialize(type, value)
|
420
|
+
def self._deserialize(type, value)
|
371
421
|
case type.to_sym
|
372
|
-
when :
|
373
|
-
|
422
|
+
when :Time
|
423
|
+
Time.parse(value)
|
374
424
|
when :Date
|
375
425
|
Date.parse(value)
|
376
426
|
when :String
|
@@ -400,7 +450,9 @@ module PulpRpmClient
|
|
400
450
|
end
|
401
451
|
end
|
402
452
|
else # model
|
403
|
-
|
453
|
+
# models (e.g. Pet) or oneOf
|
454
|
+
klass = PulpRpmClient.const_get(type)
|
455
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
404
456
|
end
|
405
457
|
end
|
406
458
|
|
@@ -426,7 +478,7 @@ module PulpRpmClient
|
|
426
478
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
427
479
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
428
480
|
end
|
429
|
-
|
481
|
+
|
430
482
|
hash[param] = _to_hash(value)
|
431
483
|
end
|
432
484
|
hash
|
@@ -449,5 +501,7 @@ module PulpRpmClient
|
|
449
501
|
value
|
450
502
|
end
|
451
503
|
end
|
504
|
+
|
452
505
|
end
|
506
|
+
|
453
507
|
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
|
# Modulemd serializer.
|
@@ -73,6 +74,11 @@ module PulpRpmClient
|
|
73
74
|
}
|
74
75
|
end
|
75
76
|
|
77
|
+
# Returns all the JSON keys this model knows about
|
78
|
+
def self.acceptable_attributes
|
79
|
+
attribute_map.values
|
80
|
+
end
|
81
|
+
|
76
82
|
# Attribute type mapping.
|
77
83
|
def self.openapi_types
|
78
84
|
{
|
@@ -83,11 +89,11 @@ module PulpRpmClient
|
|
83
89
|
:'static_context' => :'Boolean',
|
84
90
|
:'context' => :'String',
|
85
91
|
:'arch' => :'String',
|
86
|
-
:'artifacts' => :'
|
87
|
-
:'dependencies' => :'
|
92
|
+
:'artifacts' => :'Object',
|
93
|
+
:'dependencies' => :'Object',
|
88
94
|
:'packages' => :'Array<String>',
|
89
95
|
:'snippet' => :'String',
|
90
|
-
:'profiles' => :'
|
96
|
+
:'profiles' => :'Object',
|
91
97
|
:'description' => :'String'
|
92
98
|
}
|
93
99
|
end
|
@@ -122,14 +128,20 @@ module PulpRpmClient
|
|
122
128
|
|
123
129
|
if attributes.key?(:'name')
|
124
130
|
self.name = attributes[:'name']
|
131
|
+
else
|
132
|
+
self.name = nil
|
125
133
|
end
|
126
134
|
|
127
135
|
if attributes.key?(:'stream')
|
128
136
|
self.stream = attributes[:'stream']
|
137
|
+
else
|
138
|
+
self.stream = nil
|
129
139
|
end
|
130
140
|
|
131
141
|
if attributes.key?(:'version')
|
132
142
|
self.version = attributes[:'version']
|
143
|
+
else
|
144
|
+
self.version = nil
|
133
145
|
end
|
134
146
|
|
135
147
|
if attributes.key?(:'static_context')
|
@@ -138,18 +150,26 @@ module PulpRpmClient
|
|
138
150
|
|
139
151
|
if attributes.key?(:'context')
|
140
152
|
self.context = attributes[:'context']
|
153
|
+
else
|
154
|
+
self.context = nil
|
141
155
|
end
|
142
156
|
|
143
157
|
if attributes.key?(:'arch')
|
144
158
|
self.arch = attributes[:'arch']
|
159
|
+
else
|
160
|
+
self.arch = nil
|
145
161
|
end
|
146
162
|
|
147
163
|
if attributes.key?(:'artifacts')
|
148
164
|
self.artifacts = attributes[:'artifacts']
|
165
|
+
else
|
166
|
+
self.artifacts = nil
|
149
167
|
end
|
150
168
|
|
151
169
|
if attributes.key?(:'dependencies')
|
152
170
|
self.dependencies = attributes[:'dependencies']
|
171
|
+
else
|
172
|
+
self.dependencies = nil
|
153
173
|
end
|
154
174
|
|
155
175
|
if attributes.key?(:'packages')
|
@@ -160,20 +180,27 @@ module PulpRpmClient
|
|
160
180
|
|
161
181
|
if attributes.key?(:'snippet')
|
162
182
|
self.snippet = attributes[:'snippet']
|
183
|
+
else
|
184
|
+
self.snippet = nil
|
163
185
|
end
|
164
186
|
|
165
187
|
if attributes.key?(:'profiles')
|
166
188
|
self.profiles = attributes[:'profiles']
|
189
|
+
else
|
190
|
+
self.profiles = nil
|
167
191
|
end
|
168
192
|
|
169
193
|
if attributes.key?(:'description')
|
170
194
|
self.description = attributes[:'description']
|
195
|
+
else
|
196
|
+
self.description = nil
|
171
197
|
end
|
172
198
|
end
|
173
199
|
|
174
200
|
# Show invalid properties with the reasons. Usually used together with valid?
|
175
201
|
# @return Array for valid properties with the reasons
|
176
202
|
def list_invalid_properties
|
203
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
177
204
|
invalid_properties = Array.new
|
178
205
|
if @name.nil?
|
179
206
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
@@ -237,6 +264,7 @@ module PulpRpmClient
|
|
237
264
|
# Check to see if the all the properties in the model are valid
|
238
265
|
# @return true if the model is valid
|
239
266
|
def valid?
|
267
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
240
268
|
return false if @name.nil?
|
241
269
|
return false if @name.to_s.length < 1
|
242
270
|
return false if @stream.nil?
|
@@ -388,37 +416,33 @@ module PulpRpmClient
|
|
388
416
|
# @param [Hash] attributes Model attributes in the form of hash
|
389
417
|
# @return [Object] Returns the model itself
|
390
418
|
def self.build_from_hash(attributes)
|
391
|
-
new.build_from_hash(attributes)
|
392
|
-
end
|
393
|
-
|
394
|
-
# Builds the object from hash
|
395
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
396
|
-
# @return [Object] Returns the model itself
|
397
|
-
def build_from_hash(attributes)
|
398
419
|
return nil unless attributes.is_a?(Hash)
|
399
|
-
|
400
|
-
|
420
|
+
attributes = attributes.transform_keys(&:to_sym)
|
421
|
+
transformed_hash = {}
|
422
|
+
openapi_types.each_pair do |key, type|
|
423
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
424
|
+
transformed_hash["#{key}"] = nil
|
425
|
+
elsif type =~ /\AArray<(.*)>/i
|
401
426
|
# check to ensure the input is an array given that the attribute
|
402
427
|
# is documented as an array but the input is not
|
403
|
-
if attributes[
|
404
|
-
|
428
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
429
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
405
430
|
end
|
406
|
-
elsif !attributes[
|
407
|
-
|
408
|
-
end
|
431
|
+
elsif !attributes[attribute_map[key]].nil?
|
432
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
433
|
+
end
|
409
434
|
end
|
410
|
-
|
411
|
-
self
|
435
|
+
new(transformed_hash)
|
412
436
|
end
|
413
437
|
|
414
438
|
# Deserializes the data based on type
|
415
439
|
# @param string type Data type
|
416
440
|
# @param string value Value to be deserialized
|
417
441
|
# @return [Object] Deserialized data
|
418
|
-
def _deserialize(type, value)
|
442
|
+
def self._deserialize(type, value)
|
419
443
|
case type.to_sym
|
420
|
-
when :
|
421
|
-
|
444
|
+
when :Time
|
445
|
+
Time.parse(value)
|
422
446
|
when :Date
|
423
447
|
Date.parse(value)
|
424
448
|
when :String
|
@@ -448,7 +472,9 @@ module PulpRpmClient
|
|
448
472
|
end
|
449
473
|
end
|
450
474
|
else # model
|
451
|
-
|
475
|
+
# models (e.g. Pet) or oneOf
|
476
|
+
klass = PulpRpmClient.const_get(type)
|
477
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
452
478
|
end
|
453
479
|
end
|
454
480
|
|
@@ -474,7 +500,7 @@ module PulpRpmClient
|
|
474
500
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
475
501
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
476
502
|
end
|
477
|
-
|
503
|
+
|
478
504
|
hash[param] = _to_hash(value)
|
479
505
|
end
|
480
506
|
hash
|
@@ -497,5 +523,7 @@ module PulpRpmClient
|
|
497
523
|
value
|
498
524
|
end
|
499
525
|
end
|
526
|
+
|
500
527
|
end
|
528
|
+
|
501
529
|
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
|
# ModulemdDefaults serializer.
|
@@ -41,13 +42,18 @@ module PulpRpmClient
|
|
41
42
|
}
|
42
43
|
end
|
43
44
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
46
|
+
def self.acceptable_attributes
|
47
|
+
attribute_map.values
|
48
|
+
end
|
49
|
+
|
44
50
|
# Attribute type mapping.
|
45
51
|
def self.openapi_types
|
46
52
|
{
|
47
53
|
:'repository' => :'String',
|
48
54
|
:'_module' => :'String',
|
49
55
|
:'stream' => :'String',
|
50
|
-
:'profiles' => :'
|
56
|
+
:'profiles' => :'Object',
|
51
57
|
:'snippet' => :'String'
|
52
58
|
}
|
53
59
|
end
|
@@ -55,6 +61,7 @@ module PulpRpmClient
|
|
55
61
|
# List of attributes with nullable: true
|
56
62
|
def self.openapi_nullable
|
57
63
|
Set.new([
|
64
|
+
:'profiles',
|
58
65
|
])
|
59
66
|
end
|
60
67
|
|
@@ -79,24 +86,33 @@ module PulpRpmClient
|
|
79
86
|
|
80
87
|
if attributes.key?(:'_module')
|
81
88
|
self._module = attributes[:'_module']
|
89
|
+
else
|
90
|
+
self._module = nil
|
82
91
|
end
|
83
92
|
|
84
93
|
if attributes.key?(:'stream')
|
85
94
|
self.stream = attributes[:'stream']
|
95
|
+
else
|
96
|
+
self.stream = nil
|
86
97
|
end
|
87
98
|
|
88
99
|
if attributes.key?(:'profiles')
|
89
100
|
self.profiles = attributes[:'profiles']
|
101
|
+
else
|
102
|
+
self.profiles = nil
|
90
103
|
end
|
91
104
|
|
92
105
|
if attributes.key?(:'snippet')
|
93
106
|
self.snippet = attributes[:'snippet']
|
107
|
+
else
|
108
|
+
self.snippet = nil
|
94
109
|
end
|
95
110
|
end
|
96
111
|
|
97
112
|
# Show invalid properties with the reasons. Usually used together with valid?
|
98
113
|
# @return Array for valid properties with the reasons
|
99
114
|
def list_invalid_properties
|
115
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
100
116
|
invalid_properties = Array.new
|
101
117
|
if @_module.nil?
|
102
118
|
invalid_properties.push('invalid value for "_module", _module cannot be nil.')
|
@@ -114,10 +130,6 @@ module PulpRpmClient
|
|
114
130
|
invalid_properties.push('invalid value for "stream", the character length must be great than or equal to 1.')
|
115
131
|
end
|
116
132
|
|
117
|
-
if @profiles.nil?
|
118
|
-
invalid_properties.push('invalid value for "profiles", profiles cannot be nil.')
|
119
|
-
end
|
120
|
-
|
121
133
|
if @snippet.nil?
|
122
134
|
invalid_properties.push('invalid value for "snippet", snippet cannot be nil.')
|
123
135
|
end
|
@@ -132,11 +144,11 @@ module PulpRpmClient
|
|
132
144
|
# Check to see if the all the properties in the model are valid
|
133
145
|
# @return true if the model is valid
|
134
146
|
def valid?
|
147
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
135
148
|
return false if @_module.nil?
|
136
149
|
return false if @_module.to_s.length < 1
|
137
150
|
return false if @stream.nil?
|
138
151
|
return false if @stream.to_s.length < 1
|
139
|
-
return false if @profiles.nil?
|
140
152
|
return false if @snippet.nil?
|
141
153
|
return false if @snippet.to_s.length < 1
|
142
154
|
true
|
@@ -212,37 +224,33 @@ module PulpRpmClient
|
|
212
224
|
# @param [Hash] attributes Model attributes in the form of hash
|
213
225
|
# @return [Object] Returns the model itself
|
214
226
|
def self.build_from_hash(attributes)
|
215
|
-
new.build_from_hash(attributes)
|
216
|
-
end
|
217
|
-
|
218
|
-
# Builds the object from hash
|
219
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
220
|
-
# @return [Object] Returns the model itself
|
221
|
-
def build_from_hash(attributes)
|
222
227
|
return nil unless attributes.is_a?(Hash)
|
223
|
-
|
224
|
-
|
228
|
+
attributes = attributes.transform_keys(&:to_sym)
|
229
|
+
transformed_hash = {}
|
230
|
+
openapi_types.each_pair do |key, type|
|
231
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
232
|
+
transformed_hash["#{key}"] = nil
|
233
|
+
elsif type =~ /\AArray<(.*)>/i
|
225
234
|
# check to ensure the input is an array given that the attribute
|
226
235
|
# is documented as an array but the input is not
|
227
|
-
if attributes[
|
228
|
-
|
236
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
237
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
229
238
|
end
|
230
|
-
elsif !attributes[
|
231
|
-
|
232
|
-
end
|
239
|
+
elsif !attributes[attribute_map[key]].nil?
|
240
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
241
|
+
end
|
233
242
|
end
|
234
|
-
|
235
|
-
self
|
243
|
+
new(transformed_hash)
|
236
244
|
end
|
237
245
|
|
238
246
|
# Deserializes the data based on type
|
239
247
|
# @param string type Data type
|
240
248
|
# @param string value Value to be deserialized
|
241
249
|
# @return [Object] Deserialized data
|
242
|
-
def _deserialize(type, value)
|
250
|
+
def self._deserialize(type, value)
|
243
251
|
case type.to_sym
|
244
|
-
when :
|
245
|
-
|
252
|
+
when :Time
|
253
|
+
Time.parse(value)
|
246
254
|
when :Date
|
247
255
|
Date.parse(value)
|
248
256
|
when :String
|
@@ -272,7 +280,9 @@ module PulpRpmClient
|
|
272
280
|
end
|
273
281
|
end
|
274
282
|
else # model
|
275
|
-
|
283
|
+
# models (e.g. Pet) or oneOf
|
284
|
+
klass = PulpRpmClient.const_get(type)
|
285
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
276
286
|
end
|
277
287
|
end
|
278
288
|
|
@@ -298,7 +308,7 @@ module PulpRpmClient
|
|
298
308
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
299
309
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
300
310
|
end
|
301
|
-
|
311
|
+
|
302
312
|
hash[param] = _to_hash(value)
|
303
313
|
end
|
304
314
|
hash
|
@@ -321,5 +331,7 @@ module PulpRpmClient
|
|
321
331
|
value
|
322
332
|
end
|
323
333
|
end
|
334
|
+
|
324
335
|
end
|
336
|
+
|
325
337
|
end
|