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,7 +6,7 @@
|
|
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
|
|
@@ -21,6 +21,18 @@ module PulpRpmClient
|
|
21
21
|
# Defines url base path
|
22
22
|
attr_accessor :base_path
|
23
23
|
|
24
|
+
# Define server configuration index
|
25
|
+
attr_accessor :server_index
|
26
|
+
|
27
|
+
# Define server operation configuration index
|
28
|
+
attr_accessor :server_operation_index
|
29
|
+
|
30
|
+
# Default server variables
|
31
|
+
attr_accessor :server_variables
|
32
|
+
|
33
|
+
# Default server operation variables
|
34
|
+
attr_accessor :server_operation_variables
|
35
|
+
|
24
36
|
# Defines API keys used with API Key authentications.
|
25
37
|
#
|
26
38
|
# @return [Hash] key: parameter name, value: parameter value (API key)
|
@@ -50,6 +62,16 @@ module PulpRpmClient
|
|
50
62
|
# Defines the access token (Bearer) used with OAuth2.
|
51
63
|
attr_accessor :access_token
|
52
64
|
|
65
|
+
# Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2.
|
66
|
+
# Overrides the access_token if set
|
67
|
+
# @return [Proc]
|
68
|
+
attr_accessor :access_token_getter
|
69
|
+
|
70
|
+
# Set this to return data as binary instead of downloading a temp file. When enabled (set to true)
|
71
|
+
# HTTP responses with return type `File` will be returned as a stream of binary data.
|
72
|
+
# Default to false.
|
73
|
+
attr_accessor :return_binary_data
|
74
|
+
|
53
75
|
# Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
|
54
76
|
# details will be logged with `logger.debug` (see the `logger` attribute).
|
55
77
|
# Default to false.
|
@@ -57,6 +79,14 @@ module PulpRpmClient
|
|
57
79
|
# @return [true, false]
|
58
80
|
attr_accessor :debugging
|
59
81
|
|
82
|
+
# Set this to ignore operation servers for the API client. This is useful when you need to
|
83
|
+
# send requests to a different server than the one specified in the OpenAPI document.
|
84
|
+
# Will default to the base url defined in the spec but can be overridden by setting
|
85
|
+
# `scheme`, `host`, `base_path` directly.
|
86
|
+
# Default to false.
|
87
|
+
# @return [true, false]
|
88
|
+
attr_accessor :ignore_operation_servers
|
89
|
+
|
60
90
|
# Defines the logger used for debugging.
|
61
91
|
# Default to `Rails.logger` (when in Rails) or logging to STDOUT.
|
62
92
|
#
|
@@ -109,18 +139,17 @@ module PulpRpmClient
|
|
109
139
|
# Client private key file (for client certificate)
|
110
140
|
attr_accessor :ssl_client_key
|
111
141
|
|
142
|
+
### Proxy setting
|
143
|
+
# HTTP Proxy settings
|
144
|
+
attr_accessor :proxy
|
145
|
+
|
112
146
|
# Set this to customize parameters encoder of array parameter.
|
113
147
|
# Default to nil. Faraday uses NestedParamsEncoder when nil.
|
114
148
|
#
|
115
149
|
# @see The params_encoder option of Faraday. Related source code:
|
116
150
|
# https://github.com/lostisland/faraday/tree/main/lib/faraday/encoders
|
117
151
|
attr_accessor :params_encoder
|
118
|
-
|
119
|
-
# Default to nil.
|
120
|
-
#
|
121
|
-
# @see The params_encoding option of Ethon. Related source code:
|
122
|
-
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
|
123
|
-
attr_accessor :params_encoding
|
152
|
+
|
124
153
|
|
125
154
|
attr_accessor :inject_format
|
126
155
|
|
@@ -128,20 +157,28 @@ module PulpRpmClient
|
|
128
157
|
|
129
158
|
def initialize
|
130
159
|
@scheme = 'http'
|
131
|
-
@host = 'localhost'
|
160
|
+
@host = 'localhost:24817'
|
132
161
|
@base_path = ''
|
162
|
+
@server_index = nil
|
163
|
+
@server_operation_index = {}
|
164
|
+
@server_variables = {}
|
165
|
+
@server_operation_variables = {}
|
133
166
|
@api_key = {}
|
134
167
|
@api_key_prefix = {}
|
135
|
-
@timeout = 0
|
136
168
|
@client_side_validation = true
|
137
169
|
@ssl_verify = true
|
138
170
|
@ssl_verify_mode = nil
|
139
171
|
@ssl_ca_file = nil
|
140
172
|
@ssl_client_cert = nil
|
141
173
|
@ssl_client_key = nil
|
142
|
-
@
|
174
|
+
@middlewares = Hash.new { |h, k| h[k] = [] }
|
175
|
+
@configure_connection_blocks = []
|
143
176
|
@timeout = 60
|
177
|
+
# return data as binary instead of file
|
178
|
+
@return_binary_data = false
|
179
|
+
@params_encoder = nil
|
144
180
|
@debugging = false
|
181
|
+
@ignore_operation_servers = false
|
145
182
|
@inject_format = false
|
146
183
|
@force_ending_format = false
|
147
184
|
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
@@ -174,20 +211,35 @@ module PulpRpmClient
|
|
174
211
|
@base_path = '' if @base_path == '/'
|
175
212
|
end
|
176
213
|
|
177
|
-
|
178
|
-
|
214
|
+
# Returns base URL for specified operation based on server settings
|
215
|
+
def base_url(operation = nil)
|
216
|
+
return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if ignore_operation_servers
|
217
|
+
if operation_server_settings.key?(operation) then
|
218
|
+
index = server_operation_index.fetch(operation, server_index)
|
219
|
+
server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|
220
|
+
else
|
221
|
+
server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil)
|
222
|
+
end
|
179
223
|
end
|
180
224
|
|
181
225
|
# Gets API key (with prefix if set).
|
182
226
|
# @param [String] param_name the parameter name of API key auth
|
183
|
-
def api_key_with_prefix(param_name)
|
227
|
+
def api_key_with_prefix(param_name, param_alias = nil)
|
228
|
+
key = @api_key[param_name]
|
229
|
+
key = @api_key.fetch(param_alias, key) unless param_alias.nil?
|
184
230
|
if @api_key_prefix[param_name]
|
185
|
-
"#{@api_key_prefix[param_name]} #{
|
231
|
+
"#{@api_key_prefix[param_name]} #{key}"
|
186
232
|
else
|
187
|
-
|
233
|
+
key
|
188
234
|
end
|
189
235
|
end
|
190
236
|
|
237
|
+
# Gets access_token using access_token_getter or uses the static access_token
|
238
|
+
def access_token_with_refresh
|
239
|
+
return access_token if access_token_getter.nil?
|
240
|
+
access_token_getter.call
|
241
|
+
end
|
242
|
+
|
191
243
|
# Gets Basic Auth token string
|
192
244
|
def basic_auth_token
|
193
245
|
'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
|
@@ -210,31 +262,38 @@ module PulpRpmClient
|
|
210
262
|
def server_settings
|
211
263
|
[
|
212
264
|
{
|
213
|
-
url: "http://localhost:24817
|
265
|
+
url: "http://localhost:24817",
|
214
266
|
description: "No description provided",
|
215
267
|
}
|
216
268
|
]
|
217
269
|
end
|
218
270
|
|
271
|
+
def operation_server_settings
|
272
|
+
{
|
273
|
+
}
|
274
|
+
end
|
275
|
+
|
219
276
|
# Returns URL based on server settings
|
220
277
|
#
|
221
278
|
# @param index array index of the server settings
|
222
279
|
# @param variables hash of variable and the corresponding value
|
223
|
-
def server_url(index, variables = {})
|
224
|
-
servers = server_settings
|
280
|
+
def server_url(index, variables = {}, servers = nil)
|
281
|
+
servers = server_settings if servers == nil
|
225
282
|
|
226
283
|
# check array index out of bound
|
227
|
-
if (index < 0 || index >= servers.size)
|
228
|
-
fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
|
284
|
+
if (index.nil? || index < 0 || index >= servers.size)
|
285
|
+
fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}"
|
229
286
|
end
|
230
287
|
|
231
288
|
server = servers[index]
|
232
289
|
url = server[:url]
|
233
290
|
|
291
|
+
return url unless server.key? :variables
|
292
|
+
|
234
293
|
# go through variable and assign a value
|
235
294
|
server[:variables].each do |name, variable|
|
236
295
|
if variables.key?(name)
|
237
|
-
if (server[:variables][name][:enum_values].include?
|
296
|
+
if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
|
238
297
|
url.gsub! "{" + name.to_s + "}", variables[name]
|
239
298
|
else
|
240
299
|
fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
|
@@ -247,5 +306,87 @@ module PulpRpmClient
|
|
247
306
|
|
248
307
|
url
|
249
308
|
end
|
309
|
+
|
310
|
+
# Configure Faraday connection directly.
|
311
|
+
#
|
312
|
+
# ```
|
313
|
+
# c.configure_faraday_connection do |conn|
|
314
|
+
# conn.use Faraday::HttpCache, shared_cache: false, logger: logger
|
315
|
+
# conn.response :logger, nil, headers: true, bodies: true, log_level: :debug do |logger|
|
316
|
+
# logger.filter(/(Authorization: )(.*)/, '\1[REDACTED]')
|
317
|
+
# end
|
318
|
+
# end
|
319
|
+
#
|
320
|
+
# c.configure_faraday_connection do |conn|
|
321
|
+
# conn.adapter :typhoeus
|
322
|
+
# end
|
323
|
+
# ```
|
324
|
+
#
|
325
|
+
# @param block [Proc] `#call`able object that takes one arg, the connection
|
326
|
+
def configure_faraday_connection(&block)
|
327
|
+
@configure_connection_blocks << block
|
328
|
+
end
|
329
|
+
|
330
|
+
def configure_connection(conn)
|
331
|
+
@configure_connection_blocks.each do |block|
|
332
|
+
block.call(conn)
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
# Adds middleware to the stack
|
337
|
+
def use(*middleware)
|
338
|
+
set_faraday_middleware(:use, *middleware)
|
339
|
+
end
|
340
|
+
|
341
|
+
# Adds request middleware to the stack
|
342
|
+
def request(*middleware)
|
343
|
+
set_faraday_middleware(:request, *middleware)
|
344
|
+
end
|
345
|
+
|
346
|
+
# Adds response middleware to the stack
|
347
|
+
def response(*middleware)
|
348
|
+
set_faraday_middleware(:response, *middleware)
|
349
|
+
end
|
350
|
+
|
351
|
+
# Adds Faraday middleware setting information to the stack
|
352
|
+
#
|
353
|
+
# @example Use the `set_faraday_middleware` method to set middleware information
|
354
|
+
# config.set_faraday_middleware(:request, :retry, max: 3, methods: [:get, :post], retry_statuses: [503])
|
355
|
+
# config.set_faraday_middleware(:response, :logger, nil, { bodies: true, log_level: :debug })
|
356
|
+
# config.set_faraday_middleware(:use, Faraday::HttpCache, store: Rails.cache, shared_cache: false)
|
357
|
+
# config.set_faraday_middleware(:insert, 0, FaradayMiddleware::FollowRedirects, { standards_compliant: true, limit: 1 })
|
358
|
+
# config.set_faraday_middleware(:swap, 0, Faraday::Response::Logger)
|
359
|
+
# config.set_faraday_middleware(:delete, Faraday::Multipart::Middleware)
|
360
|
+
#
|
361
|
+
# @see https://github.com/lostisland/faraday/blob/v2.3.0/lib/faraday/rack_builder.rb#L92-L143
|
362
|
+
def set_faraday_middleware(operation, key, *args, &block)
|
363
|
+
unless [:request, :response, :use, :insert, :insert_before, :insert_after, :swap, :delete].include?(operation)
|
364
|
+
fail ArgumentError, "Invalid faraday middleware operation #{operation}. Must be" \
|
365
|
+
" :request, :response, :use, :insert, :insert_before, :insert_after, :swap or :delete."
|
366
|
+
end
|
367
|
+
|
368
|
+
@middlewares[operation] << [key, args, block]
|
369
|
+
end
|
370
|
+
ruby2_keywords(:set_faraday_middleware) if respond_to?(:ruby2_keywords, true)
|
371
|
+
|
372
|
+
# Set up middleware on the connection
|
373
|
+
def configure_middleware(connection)
|
374
|
+
return if @middlewares.empty?
|
375
|
+
|
376
|
+
[:request, :response, :use, :insert, :insert_before, :insert_after, :swap].each do |operation|
|
377
|
+
next unless @middlewares.key?(operation)
|
378
|
+
|
379
|
+
@middlewares[operation].each do |key, args, block|
|
380
|
+
connection.builder.send(operation, key, *args, &block)
|
381
|
+
end
|
382
|
+
end
|
383
|
+
|
384
|
+
if @middlewares.key?(:delete)
|
385
|
+
@middlewares[:delete].each do |key, _args, _block|
|
386
|
+
connection.builder.delete(key)
|
387
|
+
end
|
388
|
+
end
|
389
|
+
end
|
390
|
+
|
250
391
|
end
|
251
392
|
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
|
# Addon serializer.
|
@@ -41,6 +42,11 @@ 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
|
{
|
@@ -75,28 +81,39 @@ module PulpRpmClient
|
|
75
81
|
|
76
82
|
if attributes.key?(:'addon_id')
|
77
83
|
self.addon_id = attributes[:'addon_id']
|
84
|
+
else
|
85
|
+
self.addon_id = nil
|
78
86
|
end
|
79
87
|
|
80
88
|
if attributes.key?(:'uid')
|
81
89
|
self.uid = attributes[:'uid']
|
90
|
+
else
|
91
|
+
self.uid = nil
|
82
92
|
end
|
83
93
|
|
84
94
|
if attributes.key?(:'name')
|
85
95
|
self.name = attributes[:'name']
|
96
|
+
else
|
97
|
+
self.name = nil
|
86
98
|
end
|
87
99
|
|
88
100
|
if attributes.key?(:'type')
|
89
101
|
self.type = attributes[:'type']
|
102
|
+
else
|
103
|
+
self.type = nil
|
90
104
|
end
|
91
105
|
|
92
106
|
if attributes.key?(:'packages')
|
93
107
|
self.packages = attributes[:'packages']
|
108
|
+
else
|
109
|
+
self.packages = nil
|
94
110
|
end
|
95
111
|
end
|
96
112
|
|
97
113
|
# Show invalid properties with the reasons. Usually used together with valid?
|
98
114
|
# @return Array for valid properties with the reasons
|
99
115
|
def list_invalid_properties
|
116
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
100
117
|
invalid_properties = Array.new
|
101
118
|
if @addon_id.nil?
|
102
119
|
invalid_properties.push('invalid value for "addon_id", addon_id cannot be nil.')
|
@@ -124,6 +141,7 @@ module PulpRpmClient
|
|
124
141
|
# Check to see if the all the properties in the model are valid
|
125
142
|
# @return true if the model is valid
|
126
143
|
def valid?
|
144
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
127
145
|
return false if @addon_id.nil?
|
128
146
|
return false if @uid.nil?
|
129
147
|
return false if @name.nil?
|
@@ -160,37 +178,33 @@ module PulpRpmClient
|
|
160
178
|
# @param [Hash] attributes Model attributes in the form of hash
|
161
179
|
# @return [Object] Returns the model itself
|
162
180
|
def self.build_from_hash(attributes)
|
163
|
-
new.build_from_hash(attributes)
|
164
|
-
end
|
165
|
-
|
166
|
-
# Builds the object from hash
|
167
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
168
|
-
# @return [Object] Returns the model itself
|
169
|
-
def build_from_hash(attributes)
|
170
181
|
return nil unless attributes.is_a?(Hash)
|
171
|
-
|
172
|
-
|
182
|
+
attributes = attributes.transform_keys(&:to_sym)
|
183
|
+
transformed_hash = {}
|
184
|
+
openapi_types.each_pair do |key, type|
|
185
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
186
|
+
transformed_hash["#{key}"] = nil
|
187
|
+
elsif type =~ /\AArray<(.*)>/i
|
173
188
|
# check to ensure the input is an array given that the attribute
|
174
189
|
# is documented as an array but the input is not
|
175
|
-
if attributes[
|
176
|
-
|
190
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
191
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
177
192
|
end
|
178
|
-
elsif !attributes[
|
179
|
-
|
180
|
-
end
|
193
|
+
elsif !attributes[attribute_map[key]].nil?
|
194
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
195
|
+
end
|
181
196
|
end
|
182
|
-
|
183
|
-
self
|
197
|
+
new(transformed_hash)
|
184
198
|
end
|
185
199
|
|
186
200
|
# Deserializes the data based on type
|
187
201
|
# @param string type Data type
|
188
202
|
# @param string value Value to be deserialized
|
189
203
|
# @return [Object] Deserialized data
|
190
|
-
def _deserialize(type, value)
|
204
|
+
def self._deserialize(type, value)
|
191
205
|
case type.to_sym
|
192
|
-
when :
|
193
|
-
|
206
|
+
when :Time
|
207
|
+
Time.parse(value)
|
194
208
|
when :Date
|
195
209
|
Date.parse(value)
|
196
210
|
when :String
|
@@ -220,7 +234,9 @@ module PulpRpmClient
|
|
220
234
|
end
|
221
235
|
end
|
222
236
|
else # model
|
223
|
-
|
237
|
+
# models (e.g. Pet) or oneOf
|
238
|
+
klass = PulpRpmClient.const_get(type)
|
239
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
224
240
|
end
|
225
241
|
end
|
226
242
|
|
@@ -246,7 +262,7 @@ module PulpRpmClient
|
|
246
262
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
247
263
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
248
264
|
end
|
249
|
-
|
265
|
+
|
250
266
|
hash[param] = _to_hash(value)
|
251
267
|
end
|
252
268
|
hash
|
@@ -269,5 +285,7 @@ module PulpRpmClient
|
|
269
285
|
value
|
270
286
|
end
|
271
287
|
end
|
288
|
+
|
272
289
|
end
|
290
|
+
|
273
291
|
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
|
# Base serializer for use with [pulpcore.app.models.Model][] This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
|
@@ -68,13 +69,18 @@ module PulpRpmClient
|
|
68
69
|
}
|
69
70
|
end
|
70
71
|
|
72
|
+
# Returns all the JSON keys this model knows about
|
73
|
+
def self.acceptable_attributes
|
74
|
+
attribute_map.values
|
75
|
+
end
|
76
|
+
|
71
77
|
# Attribute type mapping.
|
72
78
|
def self.openapi_types
|
73
79
|
{
|
74
80
|
:'pulp_href' => :'String',
|
75
81
|
:'prn' => :'String',
|
76
|
-
:'pulp_created' => :'
|
77
|
-
:'pulp_last_updated' => :'
|
82
|
+
:'pulp_created' => :'Time',
|
83
|
+
:'pulp_last_updated' => :'Time',
|
78
84
|
:'file' => :'String',
|
79
85
|
:'size' => :'Integer',
|
80
86
|
:'md5' => :'String',
|
@@ -131,6 +137,8 @@ module PulpRpmClient
|
|
131
137
|
|
132
138
|
if attributes.key?(:'file')
|
133
139
|
self.file = attributes[:'file']
|
140
|
+
else
|
141
|
+
self.file = nil
|
134
142
|
end
|
135
143
|
|
136
144
|
if attributes.key?(:'size')
|
@@ -165,6 +173,7 @@ module PulpRpmClient
|
|
165
173
|
# Show invalid properties with the reasons. Usually used together with valid?
|
166
174
|
# @return Array for valid properties with the reasons
|
167
175
|
def list_invalid_properties
|
176
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
168
177
|
invalid_properties = Array.new
|
169
178
|
if @file.nil?
|
170
179
|
invalid_properties.push('invalid value for "file", file cannot be nil.')
|
@@ -176,6 +185,7 @@ module PulpRpmClient
|
|
176
185
|
# Check to see if the all the properties in the model are valid
|
177
186
|
# @return true if the model is valid
|
178
187
|
def valid?
|
188
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
179
189
|
return false if @file.nil?
|
180
190
|
true
|
181
191
|
end
|
@@ -215,37 +225,33 @@ module PulpRpmClient
|
|
215
225
|
# @param [Hash] attributes Model attributes in the form of hash
|
216
226
|
# @return [Object] Returns the model itself
|
217
227
|
def self.build_from_hash(attributes)
|
218
|
-
new.build_from_hash(attributes)
|
219
|
-
end
|
220
|
-
|
221
|
-
# Builds the object from hash
|
222
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
223
|
-
# @return [Object] Returns the model itself
|
224
|
-
def build_from_hash(attributes)
|
225
228
|
return nil unless attributes.is_a?(Hash)
|
226
|
-
|
227
|
-
|
229
|
+
attributes = attributes.transform_keys(&:to_sym)
|
230
|
+
transformed_hash = {}
|
231
|
+
openapi_types.each_pair do |key, type|
|
232
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
233
|
+
transformed_hash["#{key}"] = nil
|
234
|
+
elsif type =~ /\AArray<(.*)>/i
|
228
235
|
# check to ensure the input is an array given that the attribute
|
229
236
|
# is documented as an array but the input is not
|
230
|
-
if attributes[
|
231
|
-
|
237
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
238
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
232
239
|
end
|
233
|
-
elsif !attributes[
|
234
|
-
|
235
|
-
end
|
240
|
+
elsif !attributes[attribute_map[key]].nil?
|
241
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
242
|
+
end
|
236
243
|
end
|
237
|
-
|
238
|
-
self
|
244
|
+
new(transformed_hash)
|
239
245
|
end
|
240
246
|
|
241
247
|
# Deserializes the data based on type
|
242
248
|
# @param string type Data type
|
243
249
|
# @param string value Value to be deserialized
|
244
250
|
# @return [Object] Deserialized data
|
245
|
-
def _deserialize(type, value)
|
251
|
+
def self._deserialize(type, value)
|
246
252
|
case type.to_sym
|
247
|
-
when :
|
248
|
-
|
253
|
+
when :Time
|
254
|
+
Time.parse(value)
|
249
255
|
when :Date
|
250
256
|
Date.parse(value)
|
251
257
|
when :String
|
@@ -275,7 +281,9 @@ module PulpRpmClient
|
|
275
281
|
end
|
276
282
|
end
|
277
283
|
else # model
|
278
|
-
|
284
|
+
# models (e.g. Pet) or oneOf
|
285
|
+
klass = PulpRpmClient.const_get(type)
|
286
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
279
287
|
end
|
280
288
|
end
|
281
289
|
|
@@ -301,7 +309,7 @@ module PulpRpmClient
|
|
301
309
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
302
310
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
303
311
|
end
|
304
|
-
|
312
|
+
|
305
313
|
hash[param] = _to_hash(value)
|
306
314
|
end
|
307
315
|
hash
|
@@ -324,5 +332,7 @@ module PulpRpmClient
|
|
324
332
|
value
|
325
333
|
end
|
326
334
|
end
|
335
|
+
|
327
336
|
end
|
337
|
+
|
328
338
|
end
|