pulp_deb_client 3.5.0 → 3.5.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 +10 -9
- data/docs/AptRepositorySyncURL.md +12 -11
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContentGenericContentsApi.md +114 -64
- data/docs/ContentInstallerFileIndicesApi.md +111 -61
- data/docs/ContentInstallerPackagesApi.md +130 -80
- data/docs/ContentPackageIndicesApi.md +111 -61
- data/docs/ContentPackageReleaseComponentsApi.md +111 -61
- data/docs/ContentPackagesApi.md +144 -94
- data/docs/ContentReleaseArchitecturesApi.md +109 -59
- data/docs/ContentReleaseComponentsApi.md +110 -60
- data/docs/ContentReleaseFilesApi.md +111 -61
- data/docs/ContentReleasesApi.md +114 -64
- data/docs/ContentSourceIndicesApi.md +110 -60
- data/docs/ContentSourcePackagesApi.md +137 -87
- data/docs/ContentSourceReleaseComponentsApi.md +111 -61
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/Copy.md +12 -11
- data/docs/DebAptDistribution.md +20 -19
- data/docs/DebAptDistributionResponse.md +32 -31
- data/docs/DebAptPublication.md +18 -17
- data/docs/DebAptPublicationResponse.md +26 -25
- data/docs/DebAptRemote.md +64 -63
- data/docs/DebAptRemoteResponse.md +64 -63
- data/docs/DebAptRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/DebAptRepository.md +22 -21
- data/docs/DebAptRepositoryResponse.md +34 -33
- data/docs/DebCopyApi.md +30 -14
- data/docs/DebGenericContentResponse.md +30 -29
- data/docs/DebInstallerFileIndex.md +16 -15
- data/docs/DebInstallerFileIndexResponse.md +22 -21
- data/docs/DebInstallerPackageResponse.md +88 -87
- data/docs/DebPackageIndex.md +16 -15
- data/docs/DebPackageIndexResponse.md +22 -21
- data/docs/DebPackageReleaseComponent.md +12 -11
- data/docs/DebPackageReleaseComponentResponse.md +18 -17
- data/docs/DebPackageResponse.md +92 -91
- data/docs/DebRelease.md +26 -25
- data/docs/DebReleaseArchitecture.md +12 -11
- data/docs/DebReleaseArchitectureResponse.md +18 -17
- data/docs/DebReleaseComponent.md +12 -11
- data/docs/DebReleaseComponentResponse.md +20 -19
- data/docs/DebReleaseFile.md +18 -17
- data/docs/DebReleaseFileResponse.md +24 -23
- data/docs/DebReleaseResponse.md +32 -31
- data/docs/DebSourceIndex.md +16 -15
- data/docs/DebSourceIndexResponse.md +22 -21
- data/docs/DebSourcePackage.md +12 -11
- data/docs/DebSourcePackageReleaseComponent.md +12 -11
- data/docs/DebSourcePackageReleaseComponentResponse.md +18 -17
- data/docs/DebSourcePackageResponse.md +74 -73
- data/docs/DebVerbatimPublication.md +10 -9
- data/docs/DebVerbatimPublicationResponse.md +18 -17
- data/docs/DistributionsAptApi.md +385 -182
- 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/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginateddebAptDistributionResponseList.md +14 -13
- data/docs/PaginateddebAptPublicationResponseList.md +14 -13
- data/docs/PaginateddebAptRemoteResponseList.md +14 -13
- data/docs/PaginateddebAptRepositoryResponseList.md +14 -13
- data/docs/PaginateddebGenericContentResponseList.md +14 -13
- data/docs/PaginateddebInstallerFileIndexResponseList.md +14 -13
- data/docs/PaginateddebInstallerPackageResponseList.md +14 -13
- data/docs/PaginateddebPackageIndexResponseList.md +14 -13
- data/docs/PaginateddebPackageReleaseComponentResponseList.md +14 -13
- data/docs/PaginateddebPackageResponseList.md +14 -13
- data/docs/PaginateddebReleaseArchitectureResponseList.md +14 -13
- data/docs/PaginateddebReleaseComponentResponseList.md +14 -13
- data/docs/PaginateddebReleaseFileResponseList.md +14 -13
- data/docs/PaginateddebReleaseResponseList.md +14 -13
- data/docs/PaginateddebSourceIndexResponseList.md +14 -13
- data/docs/PaginateddebSourcePackageReleaseComponentResponseList.md +14 -13
- data/docs/PaginateddebSourcePackageResponseList.md +14 -13
- data/docs/PaginateddebVerbatimPublicationResponseList.md +14 -13
- data/docs/PatcheddebAptDistribution.md +20 -19
- data/docs/PatcheddebAptRemote.md +64 -63
- data/docs/PatcheddebAptRepository.md +22 -21
- data/docs/PolicyEnum.md +4 -5
- data/docs/PublicationsAptApi.md +267 -130
- data/docs/PublicationsVerbatimApi.md +267 -130
- data/docs/RemotesAptApi.md +389 -184
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesAptApi.md +444 -207
- data/docs/RepositoriesAptVersionsApi.md +152 -82
- data/docs/RepositoryAddRemoveContent.md +12 -11
- data/docs/RepositoryVersionResponse.md +22 -21
- data/docs/SetLabel.md +10 -9
- data/docs/SetLabelResponse.md +10 -9
- data/docs/UnsetLabel.md +8 -7
- data/docs/UnsetLabelResponse.md +10 -9
- data/lib/pulp_deb_client/api/content_generic_contents_api.rb +20 -14
- data/lib/pulp_deb_client/api/content_installer_file_indices_api.rb +20 -14
- data/lib/pulp_deb_client/api/content_installer_packages_api.rb +20 -22
- data/lib/pulp_deb_client/api/content_package_indices_api.rb +20 -14
- data/lib/pulp_deb_client/api/content_package_release_components_api.rb +20 -14
- data/lib/pulp_deb_client/api/content_packages_api.rb +20 -22
- data/lib/pulp_deb_client/api/content_release_architectures_api.rb +20 -14
- data/lib/pulp_deb_client/api/content_release_components_api.rb +20 -14
- data/lib/pulp_deb_client/api/content_release_files_api.rb +20 -14
- data/lib/pulp_deb_client/api/content_releases_api.rb +20 -14
- data/lib/pulp_deb_client/api/content_source_indices_api.rb +20 -14
- data/lib/pulp_deb_client/api/content_source_packages_api.rb +20 -14
- data/lib/pulp_deb_client/api/content_source_release_components_api.rb +20 -14
- data/lib/pulp_deb_client/api/deb_copy_api.rb +10 -6
- data/lib/pulp_deb_client/api/distributions_apt_api.rb +89 -56
- data/lib/pulp_deb_client/api/publications_apt_api.rb +67 -47
- data/lib/pulp_deb_client/api/publications_verbatim_api.rb +67 -47
- data/lib/pulp_deb_client/api/remotes_apt_api.rb +104 -68
- data/lib/pulp_deb_client/api/repositories_apt_api.rb +107 -66
- data/lib/pulp_deb_client/api/repositories_apt_versions_api.rb +40 -30
- data/lib/pulp_deb_client/api_client.rb +137 -102
- data/lib/pulp_deb_client/api_error.rb +2 -1
- data/lib/pulp_deb_client/configuration.rb +162 -21
- data/lib/pulp_deb_client/models/apt_repository_sync_url.rb +30 -22
- data/lib/pulp_deb_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_deb_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_deb_client/models/copy.rb +34 -28
- data/lib/pulp_deb_client/models/deb_apt_distribution.rb +34 -22
- data/lib/pulp_deb_client/models/deb_apt_distribution_response.rb +36 -24
- data/lib/pulp_deb_client/models/deb_apt_publication.rb +30 -22
- data/lib/pulp_deb_client/models/deb_apt_publication_response.rb +32 -24
- data/lib/pulp_deb_client/models/deb_apt_remote.rb +58 -22
- data/lib/pulp_deb_client/models/deb_apt_remote_response.rb +61 -25
- data/lib/pulp_deb_client/models/{deb_apt_remote_response_hidden_fields.rb → deb_apt_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulp_deb_client/models/deb_apt_repository.rb +32 -22
- data/lib/pulp_deb_client/models/deb_apt_repository_response.rb +34 -24
- data/lib/pulp_deb_client/models/deb_generic_content_response.rb +34 -24
- data/lib/pulp_deb_client/models/deb_installer_file_index.rb +41 -23
- data/lib/pulp_deb_client/models/deb_installer_file_index_response.rb +38 -24
- data/lib/pulp_deb_client/models/deb_installer_package_response.rb +32 -24
- data/lib/pulp_deb_client/models/deb_package_index.rb +47 -25
- data/lib/pulp_deb_client/models/deb_package_index_response.rb +34 -24
- data/lib/pulp_deb_client/models/deb_package_release_component.rb +34 -22
- data/lib/pulp_deb_client/models/deb_package_release_component_response.rb +36 -24
- data/lib/pulp_deb_client/models/deb_package_response.rb +32 -24
- data/lib/pulp_deb_client/models/deb_release.rb +36 -22
- data/lib/pulp_deb_client/models/deb_release_architecture.rb +34 -22
- data/lib/pulp_deb_client/models/deb_release_architecture_response.rb +36 -24
- data/lib/pulp_deb_client/models/deb_release_component.rb +34 -22
- data/lib/pulp_deb_client/models/deb_release_component_response.rb +36 -24
- data/lib/pulp_deb_client/models/deb_release_file.rb +49 -25
- data/lib/pulp_deb_client/models/deb_release_file_response.rb +36 -24
- data/lib/pulp_deb_client/models/deb_release_response.rb +38 -24
- data/lib/pulp_deb_client/models/deb_source_index.rb +41 -23
- data/lib/pulp_deb_client/models/deb_source_index_response.rb +38 -24
- data/lib/pulp_deb_client/models/deb_source_package.rb +37 -23
- data/lib/pulp_deb_client/models/deb_source_package_release_component.rb +34 -22
- data/lib/pulp_deb_client/models/deb_source_package_release_component_response.rb +36 -24
- data/lib/pulp_deb_client/models/deb_source_package_response.rb +34 -24
- data/lib/pulp_deb_client/models/deb_verbatim_publication.rb +30 -22
- data/lib/pulp_deb_client/models/deb_verbatim_publication_response.rb +32 -24
- data/lib/pulp_deb_client/models/my_permissions_response.rb +32 -22
- data/lib/pulp_deb_client/models/nested_role.rb +32 -22
- data/lib/pulp_deb_client/models/nested_role_response.rb +32 -22
- data/lib/pulp_deb_client/models/object_roles_response.rb +32 -22
- data/lib/pulp_deb_client/models/paginated_repository_version_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_apt_distribution_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_apt_publication_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_apt_remote_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_apt_repository_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_generic_content_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_installer_file_index_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_installer_package_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_package_index_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_package_release_component_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_package_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_release_architecture_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_release_component_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_release_file_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_release_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_source_index_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_source_package_release_component_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_source_package_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/paginateddeb_verbatim_publication_response_list.rb +34 -22
- data/lib/pulp_deb_client/models/patcheddeb_apt_distribution.rb +40 -24
- data/lib/pulp_deb_client/models/patcheddeb_apt_remote.rb +67 -25
- data/lib/pulp_deb_client/models/patcheddeb_apt_repository.rb +35 -23
- data/lib/pulp_deb_client/models/policy_enum.rb +8 -4
- data/lib/pulp_deb_client/models/repair.rb +30 -22
- data/lib/pulp_deb_client/models/repository_add_remove_content.rb +30 -22
- data/lib/pulp_deb_client/models/repository_version_response.rb +32 -24
- data/lib/pulp_deb_client/models/set_label.rb +34 -22
- data/lib/pulp_deb_client/models/set_label_response.rb +34 -22
- data/lib/pulp_deb_client/models/unset_label.rb +32 -22
- data/lib/pulp_deb_client/models/unset_label_response.rb +32 -22
- data/lib/pulp_deb_client/version.rb +2 -2
- data/lib/pulp_deb_client.rb +2 -5
- data/pulp_deb_client.gemspec +9 -6
- data/spec/api/content_generic_contents_api_spec.rb +4 -4
- data/spec/api/content_installer_file_indices_api_spec.rb +4 -4
- data/spec/api/content_installer_packages_api_spec.rb +4 -4
- data/spec/api/content_package_indices_api_spec.rb +4 -4
- data/spec/api/content_package_release_components_api_spec.rb +4 -4
- data/spec/api/content_packages_api_spec.rb +4 -4
- data/spec/api/content_release_architectures_api_spec.rb +4 -4
- data/spec/api/content_release_components_api_spec.rb +4 -4
- data/spec/api/content_release_files_api_spec.rb +4 -4
- data/spec/api/content_releases_api_spec.rb +4 -4
- data/spec/api/content_source_indices_api_spec.rb +4 -4
- data/spec/api/content_source_packages_api_spec.rb +4 -4
- data/spec/api/content_source_release_components_api_spec.rb +4 -4
- data/spec/api/deb_copy_api_spec.rb +2 -2
- data/spec/api/distributions_apt_api_spec.rb +13 -13
- data/spec/api/publications_apt_api_spec.rb +16 -15
- data/spec/api/publications_verbatim_api_spec.rb +16 -15
- data/spec/api/remotes_apt_api_spec.rb +20 -19
- data/spec/api/repositories_apt_api_spec.rb +15 -15
- data/spec/api/repositories_apt_versions_api_spec.rb +12 -11
- data/spec/models/apt_repository_sync_url_spec.rb +9 -14
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/copy_spec.rb +9 -14
- data/spec/models/deb_apt_distribution_response_spec.rb +19 -24
- data/spec/models/deb_apt_distribution_spec.rb +13 -18
- data/spec/models/deb_apt_publication_response_spec.rb +16 -21
- data/spec/models/deb_apt_publication_spec.rb +12 -17
- data/spec/models/{deb_apt_remote_response_hidden_fields_spec.rb → deb_apt_remote_response_hidden_fields_inner_spec.rb} +11 -16
- data/spec/models/deb_apt_remote_response_spec.rb +35 -40
- data/spec/models/deb_apt_remote_spec.rb +35 -40
- data/spec/models/deb_apt_repository_response_spec.rb +20 -25
- data/spec/models/deb_apt_repository_spec.rb +14 -19
- data/spec/models/deb_generic_content_response_spec.rb +18 -23
- data/spec/models/deb_installer_file_index_response_spec.rb +14 -19
- data/spec/models/deb_installer_file_index_spec.rb +11 -16
- data/spec/models/deb_installer_package_response_spec.rb +47 -52
- data/spec/models/deb_package_index_response_spec.rb +14 -19
- data/spec/models/deb_package_index_spec.rb +11 -16
- data/spec/models/deb_package_release_component_response_spec.rb +12 -17
- data/spec/models/deb_package_release_component_spec.rb +9 -14
- data/spec/models/deb_package_response_spec.rb +49 -54
- data/spec/models/deb_release_architecture_response_spec.rb +12 -17
- data/spec/models/deb_release_architecture_spec.rb +9 -14
- data/spec/models/deb_release_component_response_spec.rb +13 -18
- data/spec/models/deb_release_component_spec.rb +9 -14
- data/spec/models/deb_release_file_response_spec.rb +15 -20
- data/spec/models/deb_release_file_spec.rb +12 -17
- data/spec/models/deb_release_response_spec.rb +19 -24
- data/spec/models/deb_release_spec.rb +16 -21
- data/spec/models/deb_source_index_response_spec.rb +14 -19
- data/spec/models/deb_source_index_spec.rb +11 -16
- data/spec/models/deb_source_package_release_component_response_spec.rb +12 -17
- data/spec/models/deb_source_package_release_component_spec.rb +9 -14
- data/spec/models/deb_source_package_response_spec.rb +40 -45
- data/spec/models/deb_source_package_spec.rb +9 -14
- data/spec/models/deb_verbatim_publication_response_spec.rb +12 -17
- data/spec/models/deb_verbatim_publication_spec.rb +8 -13
- 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/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_apt_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_apt_publication_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_apt_remote_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_apt_repository_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_generic_content_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_installer_file_index_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_installer_package_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_package_index_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_package_release_component_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_package_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_release_architecture_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_release_component_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_release_file_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_release_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_source_index_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_source_package_release_component_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_source_package_response_list_spec.rb +10 -15
- data/spec/models/paginateddeb_verbatim_publication_response_list_spec.rb +10 -15
- data/spec/models/patcheddeb_apt_distribution_spec.rb +13 -18
- data/spec/models/patcheddeb_apt_remote_spec.rb +35 -40
- data/spec/models/patcheddeb_apt_repository_spec.rb +14 -19
- data/spec/models/policy_enum_spec.rb +6 -11
- 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/set_label_response_spec.rb +8 -13
- data/spec/models/set_label_spec.rb +8 -13
- data/spec/models/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +115 -103
- data/docs/DebAptRemoteResponseHiddenFields.md +0 -19
- data/docs/DebGenericContent.md +0 -27
- data/docs/DebInstallerPackage.md +0 -27
- data/docs/DebPackage.md +0 -31
- data/lib/pulp_deb_client/models/deb_generic_content.rb +0 -297
- data/lib/pulp_deb_client/models/deb_installer_package.rb +0 -288
- data/lib/pulp_deb_client/models/deb_package.rb +0 -338
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/deb_generic_content_spec.rb +0 -71
- data/spec/models/deb_installer_package_spec.rb +0 -71
- data/spec/models/deb_package_spec.rb +0 -83
@@ -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 PulpDebClient
|
16
17
|
# A Serializer for SourcePackageReleaseComponent.
|
@@ -44,13 +45,18 @@ module PulpDebClient
|
|
44
45
|
}
|
45
46
|
end
|
46
47
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
49
|
+
def self.acceptable_attributes
|
50
|
+
attribute_map.values
|
51
|
+
end
|
52
|
+
|
47
53
|
# Attribute type mapping.
|
48
54
|
def self.openapi_types
|
49
55
|
{
|
50
56
|
:'pulp_href' => :'String',
|
51
57
|
:'prn' => :'String',
|
52
|
-
:'pulp_created' => :'
|
53
|
-
:'pulp_last_updated' => :'
|
58
|
+
:'pulp_created' => :'Time',
|
59
|
+
:'pulp_last_updated' => :'Time',
|
54
60
|
:'source_package' => :'String',
|
55
61
|
:'release_component' => :'String'
|
56
62
|
}
|
@@ -95,16 +101,21 @@ module PulpDebClient
|
|
95
101
|
|
96
102
|
if attributes.key?(:'source_package')
|
97
103
|
self.source_package = attributes[:'source_package']
|
104
|
+
else
|
105
|
+
self.source_package = nil
|
98
106
|
end
|
99
107
|
|
100
108
|
if attributes.key?(:'release_component')
|
101
109
|
self.release_component = attributes[:'release_component']
|
110
|
+
else
|
111
|
+
self.release_component = nil
|
102
112
|
end
|
103
113
|
end
|
104
114
|
|
105
115
|
# Show invalid properties with the reasons. Usually used together with valid?
|
106
116
|
# @return Array for valid properties with the reasons
|
107
117
|
def list_invalid_properties
|
118
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
108
119
|
invalid_properties = Array.new
|
109
120
|
if @source_package.nil?
|
110
121
|
invalid_properties.push('invalid value for "source_package", source_package cannot be nil.')
|
@@ -120,6 +131,7 @@ module PulpDebClient
|
|
120
131
|
# Check to see if the all the properties in the model are valid
|
121
132
|
# @return true if the model is valid
|
122
133
|
def valid?
|
134
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
123
135
|
return false if @source_package.nil?
|
124
136
|
return false if @release_component.nil?
|
125
137
|
true
|
@@ -154,37 +166,33 @@ module PulpDebClient
|
|
154
166
|
# @param [Hash] attributes Model attributes in the form of hash
|
155
167
|
# @return [Object] Returns the model itself
|
156
168
|
def self.build_from_hash(attributes)
|
157
|
-
new.build_from_hash(attributes)
|
158
|
-
end
|
159
|
-
|
160
|
-
# Builds the object from hash
|
161
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
162
|
-
# @return [Object] Returns the model itself
|
163
|
-
def build_from_hash(attributes)
|
164
169
|
return nil unless attributes.is_a?(Hash)
|
165
|
-
|
166
|
-
|
170
|
+
attributes = attributes.transform_keys(&:to_sym)
|
171
|
+
transformed_hash = {}
|
172
|
+
openapi_types.each_pair do |key, type|
|
173
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
174
|
+
transformed_hash["#{key}"] = nil
|
175
|
+
elsif type =~ /\AArray<(.*)>/i
|
167
176
|
# check to ensure the input is an array given that the attribute
|
168
177
|
# is documented as an array but the input is not
|
169
|
-
if attributes[
|
170
|
-
|
178
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
179
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
171
180
|
end
|
172
|
-
elsif !attributes[
|
173
|
-
|
174
|
-
end
|
181
|
+
elsif !attributes[attribute_map[key]].nil?
|
182
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
183
|
+
end
|
175
184
|
end
|
176
|
-
|
177
|
-
self
|
185
|
+
new(transformed_hash)
|
178
186
|
end
|
179
187
|
|
180
188
|
# Deserializes the data based on type
|
181
189
|
# @param string type Data type
|
182
190
|
# @param string value Value to be deserialized
|
183
191
|
# @return [Object] Deserialized data
|
184
|
-
def _deserialize(type, value)
|
192
|
+
def self._deserialize(type, value)
|
185
193
|
case type.to_sym
|
186
|
-
when :
|
187
|
-
|
194
|
+
when :Time
|
195
|
+
Time.parse(value)
|
188
196
|
when :Date
|
189
197
|
Date.parse(value)
|
190
198
|
when :String
|
@@ -214,7 +222,9 @@ module PulpDebClient
|
|
214
222
|
end
|
215
223
|
end
|
216
224
|
else # model
|
217
|
-
|
225
|
+
# models (e.g. Pet) or oneOf
|
226
|
+
klass = PulpDebClient.const_get(type)
|
227
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
218
228
|
end
|
219
229
|
end
|
220
230
|
|
@@ -240,7 +250,7 @@ module PulpDebClient
|
|
240
250
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
241
251
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
242
252
|
end
|
243
|
-
|
253
|
+
|
244
254
|
hash[param] = _to_hash(value)
|
245
255
|
end
|
246
256
|
hash
|
@@ -263,5 +273,7 @@ module PulpDebClient
|
|
263
273
|
value
|
264
274
|
end
|
265
275
|
end
|
276
|
+
|
266
277
|
end
|
278
|
+
|
267
279
|
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 PulpDebClient
|
16
17
|
# A Serializer for DscFile.
|
@@ -129,13 +130,18 @@ module PulpDebClient
|
|
129
130
|
}
|
130
131
|
end
|
131
132
|
|
133
|
+
# Returns all the JSON keys this model knows about
|
134
|
+
def self.acceptable_attributes
|
135
|
+
attribute_map.values
|
136
|
+
end
|
137
|
+
|
132
138
|
# Attribute type mapping.
|
133
139
|
def self.openapi_types
|
134
140
|
{
|
135
141
|
:'pulp_href' => :'String',
|
136
142
|
:'prn' => :'String',
|
137
|
-
:'pulp_created' => :'
|
138
|
-
:'pulp_last_updated' => :'
|
143
|
+
:'pulp_created' => :'Time',
|
144
|
+
:'pulp_last_updated' => :'Time',
|
139
145
|
:'artifacts' => :'Object',
|
140
146
|
:'relative_path' => :'String',
|
141
147
|
:'sha256' => :'String',
|
@@ -208,6 +214,8 @@ module PulpDebClient
|
|
208
214
|
|
209
215
|
if attributes.key?(:'artifacts')
|
210
216
|
self.artifacts = attributes[:'artifacts']
|
217
|
+
else
|
218
|
+
self.artifacts = nil
|
211
219
|
end
|
212
220
|
|
213
221
|
if attributes.key?(:'relative_path')
|
@@ -330,6 +338,7 @@ module PulpDebClient
|
|
330
338
|
# Show invalid properties with the reasons. Usually used together with valid?
|
331
339
|
# @return Array for valid properties with the reasons
|
332
340
|
def list_invalid_properties
|
341
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
333
342
|
invalid_properties = Array.new
|
334
343
|
if @artifacts.nil?
|
335
344
|
invalid_properties.push('invalid value for "artifacts", artifacts cannot be nil.')
|
@@ -341,6 +350,7 @@ module PulpDebClient
|
|
341
350
|
# Check to see if the all the properties in the model are valid
|
342
351
|
# @return true if the model is valid
|
343
352
|
def valid?
|
353
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
344
354
|
return false if @artifacts.nil?
|
345
355
|
true
|
346
356
|
end
|
@@ -402,37 +412,33 @@ module PulpDebClient
|
|
402
412
|
# @param [Hash] attributes Model attributes in the form of hash
|
403
413
|
# @return [Object] Returns the model itself
|
404
414
|
def self.build_from_hash(attributes)
|
405
|
-
new.build_from_hash(attributes)
|
406
|
-
end
|
407
|
-
|
408
|
-
# Builds the object from hash
|
409
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
410
|
-
# @return [Object] Returns the model itself
|
411
|
-
def build_from_hash(attributes)
|
412
415
|
return nil unless attributes.is_a?(Hash)
|
413
|
-
|
414
|
-
|
416
|
+
attributes = attributes.transform_keys(&:to_sym)
|
417
|
+
transformed_hash = {}
|
418
|
+
openapi_types.each_pair do |key, type|
|
419
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
420
|
+
transformed_hash["#{key}"] = nil
|
421
|
+
elsif type =~ /\AArray<(.*)>/i
|
415
422
|
# check to ensure the input is an array given that the attribute
|
416
423
|
# is documented as an array but the input is not
|
417
|
-
if attributes[
|
418
|
-
|
424
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
425
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
419
426
|
end
|
420
|
-
elsif !attributes[
|
421
|
-
|
422
|
-
end
|
427
|
+
elsif !attributes[attribute_map[key]].nil?
|
428
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
429
|
+
end
|
423
430
|
end
|
424
|
-
|
425
|
-
self
|
431
|
+
new(transformed_hash)
|
426
432
|
end
|
427
433
|
|
428
434
|
# Deserializes the data based on type
|
429
435
|
# @param string type Data type
|
430
436
|
# @param string value Value to be deserialized
|
431
437
|
# @return [Object] Deserialized data
|
432
|
-
def _deserialize(type, value)
|
438
|
+
def self._deserialize(type, value)
|
433
439
|
case type.to_sym
|
434
|
-
when :
|
435
|
-
|
440
|
+
when :Time
|
441
|
+
Time.parse(value)
|
436
442
|
when :Date
|
437
443
|
Date.parse(value)
|
438
444
|
when :String
|
@@ -462,7 +468,9 @@ module PulpDebClient
|
|
462
468
|
end
|
463
469
|
end
|
464
470
|
else # model
|
465
|
-
|
471
|
+
# models (e.g. Pet) or oneOf
|
472
|
+
klass = PulpDebClient.const_get(type)
|
473
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
466
474
|
end
|
467
475
|
end
|
468
476
|
|
@@ -488,7 +496,7 @@ module PulpDebClient
|
|
488
496
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
489
497
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
490
498
|
end
|
491
|
-
|
499
|
+
|
492
500
|
hash[param] = _to_hash(value)
|
493
501
|
end
|
494
502
|
hash
|
@@ -511,5 +519,7 @@ module PulpDebClient
|
|
511
519
|
value
|
512
520
|
end
|
513
521
|
end
|
522
|
+
|
514
523
|
end
|
524
|
+
|
515
525
|
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 PulpDebClient
|
16
17
|
# A Serializer for VerbatimPublication.
|
@@ -28,6 +29,11 @@ module PulpDebClient
|
|
28
29
|
}
|
29
30
|
end
|
30
31
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
31
37
|
# Attribute type mapping.
|
32
38
|
def self.openapi_types
|
33
39
|
{
|
@@ -69,6 +75,7 @@ module PulpDebClient
|
|
69
75
|
# Show invalid properties with the reasons. Usually used together with valid?
|
70
76
|
# @return Array for valid properties with the reasons
|
71
77
|
def list_invalid_properties
|
78
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
72
79
|
invalid_properties = Array.new
|
73
80
|
invalid_properties
|
74
81
|
end
|
@@ -76,6 +83,7 @@ module PulpDebClient
|
|
76
83
|
# Check to see if the all the properties in the model are valid
|
77
84
|
# @return true if the model is valid
|
78
85
|
def valid?
|
86
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
79
87
|
true
|
80
88
|
end
|
81
89
|
|
@@ -104,37 +112,33 @@ module PulpDebClient
|
|
104
112
|
# @param [Hash] attributes Model attributes in the form of hash
|
105
113
|
# @return [Object] Returns the model itself
|
106
114
|
def self.build_from_hash(attributes)
|
107
|
-
new.build_from_hash(attributes)
|
108
|
-
end
|
109
|
-
|
110
|
-
# Builds the object from hash
|
111
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
-
# @return [Object] Returns the model itself
|
113
|
-
def build_from_hash(attributes)
|
114
115
|
return nil unless attributes.is_a?(Hash)
|
115
|
-
|
116
|
-
|
116
|
+
attributes = attributes.transform_keys(&:to_sym)
|
117
|
+
transformed_hash = {}
|
118
|
+
openapi_types.each_pair do |key, type|
|
119
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
120
|
+
transformed_hash["#{key}"] = nil
|
121
|
+
elsif type =~ /\AArray<(.*)>/i
|
117
122
|
# check to ensure the input is an array given that the attribute
|
118
123
|
# is documented as an array but the input is not
|
119
|
-
if attributes[
|
120
|
-
|
124
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
125
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
121
126
|
end
|
122
|
-
elsif !attributes[
|
123
|
-
|
124
|
-
end
|
127
|
+
elsif !attributes[attribute_map[key]].nil?
|
128
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
129
|
+
end
|
125
130
|
end
|
126
|
-
|
127
|
-
self
|
131
|
+
new(transformed_hash)
|
128
132
|
end
|
129
133
|
|
130
134
|
# Deserializes the data based on type
|
131
135
|
# @param string type Data type
|
132
136
|
# @param string value Value to be deserialized
|
133
137
|
# @return [Object] Deserialized data
|
134
|
-
def _deserialize(type, value)
|
138
|
+
def self._deserialize(type, value)
|
135
139
|
case type.to_sym
|
136
|
-
when :
|
137
|
-
|
140
|
+
when :Time
|
141
|
+
Time.parse(value)
|
138
142
|
when :Date
|
139
143
|
Date.parse(value)
|
140
144
|
when :String
|
@@ -164,7 +168,9 @@ module PulpDebClient
|
|
164
168
|
end
|
165
169
|
end
|
166
170
|
else # model
|
167
|
-
|
171
|
+
# models (e.g. Pet) or oneOf
|
172
|
+
klass = PulpDebClient.const_get(type)
|
173
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
174
|
end
|
169
175
|
end
|
170
176
|
|
@@ -190,7 +196,7 @@ module PulpDebClient
|
|
190
196
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
197
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
198
|
end
|
193
|
-
|
199
|
+
|
194
200
|
hash[param] = _to_hash(value)
|
195
201
|
end
|
196
202
|
hash
|
@@ -213,5 +219,7 @@ module PulpDebClient
|
|
213
219
|
value
|
214
220
|
end
|
215
221
|
end
|
222
|
+
|
216
223
|
end
|
224
|
+
|
217
225
|
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 PulpDebClient
|
16
17
|
# A Serializer for VerbatimPublication.
|
@@ -43,13 +44,18 @@ module PulpDebClient
|
|
43
44
|
}
|
44
45
|
end
|
45
46
|
|
47
|
+
# Returns all the JSON keys this model knows about
|
48
|
+
def self.acceptable_attributes
|
49
|
+
attribute_map.values
|
50
|
+
end
|
51
|
+
|
46
52
|
# Attribute type mapping.
|
47
53
|
def self.openapi_types
|
48
54
|
{
|
49
55
|
:'pulp_href' => :'String',
|
50
56
|
:'prn' => :'String',
|
51
|
-
:'pulp_created' => :'
|
52
|
-
:'pulp_last_updated' => :'
|
57
|
+
:'pulp_created' => :'Time',
|
58
|
+
:'pulp_last_updated' => :'Time',
|
53
59
|
:'repository_version' => :'String',
|
54
60
|
:'repository' => :'String'
|
55
61
|
}
|
@@ -104,6 +110,7 @@ module PulpDebClient
|
|
104
110
|
# Show invalid properties with the reasons. Usually used together with valid?
|
105
111
|
# @return Array for valid properties with the reasons
|
106
112
|
def list_invalid_properties
|
113
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
107
114
|
invalid_properties = Array.new
|
108
115
|
invalid_properties
|
109
116
|
end
|
@@ -111,6 +118,7 @@ module PulpDebClient
|
|
111
118
|
# Check to see if the all the properties in the model are valid
|
112
119
|
# @return true if the model is valid
|
113
120
|
def valid?
|
121
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
114
122
|
true
|
115
123
|
end
|
116
124
|
|
@@ -143,37 +151,33 @@ module PulpDebClient
|
|
143
151
|
# @param [Hash] attributes Model attributes in the form of hash
|
144
152
|
# @return [Object] Returns the model itself
|
145
153
|
def self.build_from_hash(attributes)
|
146
|
-
new.build_from_hash(attributes)
|
147
|
-
end
|
148
|
-
|
149
|
-
# Builds the object from hash
|
150
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
151
|
-
# @return [Object] Returns the model itself
|
152
|
-
def build_from_hash(attributes)
|
153
154
|
return nil unless attributes.is_a?(Hash)
|
154
|
-
|
155
|
-
|
155
|
+
attributes = attributes.transform_keys(&:to_sym)
|
156
|
+
transformed_hash = {}
|
157
|
+
openapi_types.each_pair do |key, type|
|
158
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
159
|
+
transformed_hash["#{key}"] = nil
|
160
|
+
elsif type =~ /\AArray<(.*)>/i
|
156
161
|
# check to ensure the input is an array given that the attribute
|
157
162
|
# is documented as an array but the input is not
|
158
|
-
if attributes[
|
159
|
-
|
163
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
164
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
160
165
|
end
|
161
|
-
elsif !attributes[
|
162
|
-
|
163
|
-
end
|
166
|
+
elsif !attributes[attribute_map[key]].nil?
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
168
|
+
end
|
164
169
|
end
|
165
|
-
|
166
|
-
self
|
170
|
+
new(transformed_hash)
|
167
171
|
end
|
168
172
|
|
169
173
|
# Deserializes the data based on type
|
170
174
|
# @param string type Data type
|
171
175
|
# @param string value Value to be deserialized
|
172
176
|
# @return [Object] Deserialized data
|
173
|
-
def _deserialize(type, value)
|
177
|
+
def self._deserialize(type, value)
|
174
178
|
case type.to_sym
|
175
|
-
when :
|
176
|
-
|
179
|
+
when :Time
|
180
|
+
Time.parse(value)
|
177
181
|
when :Date
|
178
182
|
Date.parse(value)
|
179
183
|
when :String
|
@@ -203,7 +207,9 @@ module PulpDebClient
|
|
203
207
|
end
|
204
208
|
end
|
205
209
|
else # model
|
206
|
-
|
210
|
+
# models (e.g. Pet) or oneOf
|
211
|
+
klass = PulpDebClient.const_get(type)
|
212
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
207
213
|
end
|
208
214
|
end
|
209
215
|
|
@@ -229,7 +235,7 @@ module PulpDebClient
|
|
229
235
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
230
236
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
231
237
|
end
|
232
|
-
|
238
|
+
|
233
239
|
hash[param] = _to_hash(value)
|
234
240
|
end
|
235
241
|
hash
|
@@ -252,5 +258,7 @@ module PulpDebClient
|
|
252
258
|
value
|
253
259
|
end
|
254
260
|
end
|
261
|
+
|
255
262
|
end
|
263
|
+
|
256
264
|
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 PulpDebClient
|
16
17
|
class MyPermissionsResponse
|
@@ -23,6 +24,11 @@ module PulpDebClient
|
|
23
24
|
}
|
24
25
|
end
|
25
26
|
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
26
32
|
# Attribute type mapping.
|
27
33
|
def self.openapi_types
|
28
34
|
{
|
@@ -55,12 +61,15 @@ module PulpDebClient
|
|
55
61
|
if (value = attributes[:'permissions']).is_a?(Array)
|
56
62
|
self.permissions = value
|
57
63
|
end
|
64
|
+
else
|
65
|
+
self.permissions = nil
|
58
66
|
end
|
59
67
|
end
|
60
68
|
|
61
69
|
# Show invalid properties with the reasons. Usually used together with valid?
|
62
70
|
# @return Array for valid properties with the reasons
|
63
71
|
def list_invalid_properties
|
72
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
64
73
|
invalid_properties = Array.new
|
65
74
|
if @permissions.nil?
|
66
75
|
invalid_properties.push('invalid value for "permissions", permissions cannot be nil.')
|
@@ -72,6 +81,7 @@ module PulpDebClient
|
|
72
81
|
# Check to see if the all the properties in the model are valid
|
73
82
|
# @return true if the model is valid
|
74
83
|
def valid?
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
75
85
|
return false if @permissions.nil?
|
76
86
|
true
|
77
87
|
end
|
@@ -100,37 +110,33 @@ module PulpDebClient
|
|
100
110
|
# @param [Hash] attributes Model attributes in the form of hash
|
101
111
|
# @return [Object] Returns the model itself
|
102
112
|
def self.build_from_hash(attributes)
|
103
|
-
new.build_from_hash(attributes)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Builds the object from hash
|
107
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
-
# @return [Object] Returns the model itself
|
109
|
-
def build_from_hash(attributes)
|
110
113
|
return nil unless attributes.is_a?(Hash)
|
111
|
-
|
112
|
-
|
114
|
+
attributes = attributes.transform_keys(&:to_sym)
|
115
|
+
transformed_hash = {}
|
116
|
+
openapi_types.each_pair do |key, type|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = nil
|
119
|
+
elsif type =~ /\AArray<(.*)>/i
|
113
120
|
# check to ensure the input is an array given that the attribute
|
114
121
|
# is documented as an array but the input is not
|
115
|
-
if attributes[
|
116
|
-
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
117
124
|
end
|
118
|
-
elsif !attributes[
|
119
|
-
|
120
|
-
end
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
127
|
+
end
|
121
128
|
end
|
122
|
-
|
123
|
-
self
|
129
|
+
new(transformed_hash)
|
124
130
|
end
|
125
131
|
|
126
132
|
# Deserializes the data based on type
|
127
133
|
# @param string type Data type
|
128
134
|
# @param string value Value to be deserialized
|
129
135
|
# @return [Object] Deserialized data
|
130
|
-
def _deserialize(type, value)
|
136
|
+
def self._deserialize(type, value)
|
131
137
|
case type.to_sym
|
132
|
-
when :
|
133
|
-
|
138
|
+
when :Time
|
139
|
+
Time.parse(value)
|
134
140
|
when :Date
|
135
141
|
Date.parse(value)
|
136
142
|
when :String
|
@@ -160,7 +166,9 @@ module PulpDebClient
|
|
160
166
|
end
|
161
167
|
end
|
162
168
|
else # model
|
163
|
-
|
169
|
+
# models (e.g. Pet) or oneOf
|
170
|
+
klass = PulpDebClient.const_get(type)
|
171
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
164
172
|
end
|
165
173
|
end
|
166
174
|
|
@@ -186,7 +194,7 @@ module PulpDebClient
|
|
186
194
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
187
195
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
188
196
|
end
|
189
|
-
|
197
|
+
|
190
198
|
hash[param] = _to_hash(value)
|
191
199
|
end
|
192
200
|
hash
|
@@ -209,5 +217,7 @@ module PulpDebClient
|
|
209
217
|
value
|
210
218
|
end
|
211
219
|
end
|
220
|
+
|
212
221
|
end
|
222
|
+
|
213
223
|
end
|